1# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
2
3# Copyright (C) 1996-2021 Free Software Foundation, Inc.
4
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
18[m4_warning([this file was generated for autoconf 2.71.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# Configure paths for GLIB
24# Owen Taylor     1997-2001
25
26# Increment this whenever this file is changed.
27#serial 4
28
29dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
30dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
31dnl gthread, or gio is specified in MODULES, pass to pkg-config
32dnl
33AC_DEFUN([AM_PATH_GLIB_2_0],
34[dnl
35dnl Get the cflags and libraries from pkg-config
36dnl
37
38dnl We can't use PKG_PREREQ because that needs 0.29.
39m4_ifndef([PKG_PROG_PKG_CONFIG],
40          [pkg.m4 version 0.28 or later is required])
41
42AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
43		    , enable_glibtest=yes)
44
45  min_glib_version=ifelse([$1], [], [2.0.0], [$1])
46  pkg_config_args="glib-2.0 >= $min_glib_version"
47  for module in . $4
48  do
49      case "$module" in
50         gmodule)
51             pkg_config_args="$pkg_config_args gmodule-2.0"
52         ;;
53         gmodule-no-export)
54             pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
55         ;;
56         gobject)
57             pkg_config_args="$pkg_config_args gobject-2.0"
58         ;;
59         gthread)
60             pkg_config_args="$pkg_config_args gthread-2.0"
61         ;;
62         gio*)
63             pkg_config_args="$pkg_config_args $module-2.0"
64         ;;
65      esac
66  done
67
68  PKG_PROG_PKG_CONFIG([0.16])
69
70  no_glib=""
71
72  if test "x$PKG_CONFIG" = x ; then
73    no_glib=yes
74    PKG_CONFIG=no
75  fi
76
77  dnl For GLIB_CFLAGS and GLIB_LIBS
78  PKG_CHECK_MODULES([GLIB], [$pkg_config_args], [:], [:])
79
80  dnl For the tools
81  PKG_CHECK_VAR([GLIB_GENMARSHAL], [glib-2.0], [glib_genmarshal])
82  PKG_CHECK_VAR([GOBJECT_QUERY], [glib-2.0], [gobject_query])
83  PKG_CHECK_VAR([GLIB_MKENUMS], [glib-2.0], [glib_mkenums])
84  PKG_CHECK_VAR([GLIB_COMPILE_RESOURCES], [gio-2.0], [glib_compile_resources])
85
86  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
87
88  if test x$PKG_CONFIG != xno ; then
89    ## don't try to run the test against uninstalled libtool libs
90    if $PKG_CONFIG --uninstalled $pkg_config_args; then
91	  echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
92	  enable_glibtest=no
93    fi
94
95    if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
96	  :
97    else
98	  no_glib=yes
99    fi
100  fi
101
102  if test x"$no_glib" = x ; then
103    glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
104           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
105    glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
106           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
107    glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
108           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
109    if test "x$enable_glibtest" = "xyes" ; then
110      ac_save_CFLAGS="$CFLAGS"
111      ac_save_LIBS="$LIBS"
112      CFLAGS="$CFLAGS $GLIB_CFLAGS"
113      LIBS="$GLIB_LIBS $LIBS"
114dnl
115dnl Now check if the installed GLib is sufficiently new. (Also sanity
116dnl checks the results of pkg-config to some extent)
117dnl
118      rm -f conf.glibtest
119      AC_RUN_IFELSE([AC_LANG_SOURCE([[
120#include <glib.h>
121#include <stdio.h>
122#include <stdlib.h>
123
124int
125main (void)
126{
127  unsigned int major, minor, micro;
128
129  fclose (fopen ("conf.glibtest", "w"));
130
131  if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
132     printf("%s, bad version string\n", "$min_glib_version");
133     exit(1);
134   }
135
136  if ((glib_major_version != $glib_config_major_version) ||
137      (glib_minor_version != $glib_config_minor_version) ||
138      (glib_micro_version != $glib_config_micro_version))
139    {
140      printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
141             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
142             glib_major_version, glib_minor_version, glib_micro_version);
143      printf ("*** was found! If pkg-config was correct, then it is best\n");
144      printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
145      printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
146      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
147      printf("*** required on your system.\n");
148      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
149      printf("*** to point to the correct configuration files\n");
150    }
151  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
152	   (glib_minor_version != GLIB_MINOR_VERSION) ||
153           (glib_micro_version != GLIB_MICRO_VERSION))
154    {
155      printf("*** GLib header files (version %d.%d.%d) do not match\n",
156	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
157      printf("*** library (version %d.%d.%d)\n",
158	     glib_major_version, glib_minor_version, glib_micro_version);
159    }
160  else
161    {
162      if ((glib_major_version > major) ||
163        ((glib_major_version == major) && (glib_minor_version > minor)) ||
164        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
165      {
166        return 0;
167       }
168     else
169      {
170        printf("\n*** An old version of GLib (%u.%u.%u) was found.\n",
171               glib_major_version, glib_minor_version, glib_micro_version);
172        printf("*** You need a version of GLib newer than %u.%u.%u. The latest version of\n",
173	       major, minor, micro);
174        printf("*** GLib is always available from ftp://ftp.gtk.org.\n");
175        printf("***\n");
176        printf("*** If you have already installed a sufficiently new version, this error\n");
177        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
178        printf("*** being found. The easiest way to fix this is to remove the old version\n");
179        printf("*** of GLib, but you can also set the PKG_CONFIG environment to point to the\n");
180        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
181        printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
182        printf("*** so that the correct libraries are found at run-time))\n");
183      }
184    }
185  return 1;
186}
187]])],[],[no_glib=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
188       CFLAGS="$ac_save_CFLAGS"
189       LIBS="$ac_save_LIBS"
190     fi
191  fi
192  if test "x$no_glib" = x ; then
193     AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
194     ifelse([$2], , :, [$2])
195  else
196     AC_MSG_RESULT(no)
197     if test "$PKG_CONFIG" = "no" ; then
198       echo "*** A new enough version of pkg-config was not found."
199       echo "*** See http://www.freedesktop.org/software/pkgconfig/"
200     else
201       if test -f conf.glibtest ; then
202        :
203       else
204          echo "*** Could not run GLib test program, checking why..."
205          ac_save_CFLAGS="$CFLAGS"
206          ac_save_LIBS="$LIBS"
207          CFLAGS="$CFLAGS $GLIB_CFLAGS"
208          LIBS="$LIBS $GLIB_LIBS"
209          AC_LINK_IFELSE([AC_LANG_PROGRAM([[
210#include <glib.h>
211#include <stdio.h>
212]],      [[ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ]])],
213        [ echo "*** The test program compiled, but did not run. This usually means"
214          echo "*** that the run-time linker is not finding GLib or finding the wrong"
215          echo "*** version of GLib. If it is not finding GLib, you'll need to set your"
216          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
217          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
218          echo "*** is required on your system"
219	  echo "***"
220          echo "*** If you have an old version installed, it is best to remove it, although"
221          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
222        [ echo "*** The test program failed to compile or link. See the file config.log for the"
223          echo "*** exact error that occurred. This usually means GLib is incorrectly installed."])
224          CFLAGS="$ac_save_CFLAGS"
225          LIBS="$ac_save_LIBS"
226       fi
227     fi
228     GLIB_CFLAGS=""
229     GLIB_LIBS=""
230     GLIB_GENMARSHAL=""
231     GOBJECT_QUERY=""
232     GLIB_MKENUMS=""
233     GLIB_COMPILE_RESOURCES=""
234     ifelse([$3], , :, [$3])
235  fi
236  rm -f conf.glibtest
237])
238
239# Copyright (C) 1995-2002 Free Software Foundation, Inc.
240# Copyright (C) 2001-2003,2004 Red Hat, Inc.
241#
242# This file is free software, distributed under the terms of the GNU
243# General Public License.  As a special exception to the GNU General
244# Public License, this file may be distributed as part of a program
245# that contains a configuration script generated by Autoconf, under
246# the same distribution terms as the rest of that program.
247#
248# This file can be copied and used freely without restrictions.  It can
249# be used in projects which are not available under the GNU Public License
250# but which still want to provide support for the GNU gettext functionality.
251#
252# Macro to add for using GNU gettext.
253# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
254#
255# Modified to never use included libintl.
256# Owen Taylor <otaylor@redhat.com>, 12/15/1998
257#
258# Major rework to remove unused code
259# Owen Taylor <otaylor@redhat.com>, 12/11/2002
260#
261# Added better handling of ALL_LINGUAS from GNU gettext version
262# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
263#
264# Modified to require ngettext
265# Matthias Clasen <mclasen@redhat.com> 08/06/2004
266
267# Increment this whenever this file is changed.
268#serial 1
269
270# We need this here as well, since someone might use autoconf-2.5x
271# to configure GLib then an older version to configure a package
272# using AM_GLIB_GNU_GETTEXT
273AC_PREREQ(2.53)
274
275dnl
276dnl We go to great lengths to make sure that aclocal won't
277dnl try to pull in the installed version of these macros
278dnl when running aclocal in the glib directory.
279dnl
280m4_copy([AC_DEFUN],[glib_DEFUN])
281m4_copy([AC_REQUIRE],[glib_REQUIRE])
282dnl
283dnl At the end, if we're not within glib, we'll define the public
284dnl definitions in terms of our private definitions.
285dnl
286
287# GLIB_LC_MESSAGES
288#--------------------
289glib_DEFUN([GLIB_LC_MESSAGES],
290  [AC_CHECK_HEADERS([locale.h])
291    if test $ac_cv_header_locale_h = yes; then
292    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
293      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
294       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
295    if test $am_cv_val_LC_MESSAGES = yes; then
296      AC_DEFINE(HAVE_LC_MESSAGES, 1,
297        [Define if your <locale.h> file defines LC_MESSAGES.])
298    fi
299  fi])
300
301# GLIB_PATH_PROG_WITH_TEST
302#----------------------------
303dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
304dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
305glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
306[# Extract the first word of "$2", so it can be a program name with args.
307set dummy $2; ac_word=[$]2
308AC_MSG_CHECKING([for $ac_word])
309AC_CACHE_VAL(ac_cv_path_$1,
310[case "[$]$1" in
311  /*)
312  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
313  ;;
314  *)
315  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
316  for ac_dir in ifelse([$5], , $PATH, [$5]); do
317    test -z "$ac_dir" && ac_dir=.
318    if test -f $ac_dir/$ac_word; then
319      if [$3]; then
320	ac_cv_path_$1="$ac_dir/$ac_word"
321	break
322      fi
323    fi
324  done
325  IFS="$ac_save_ifs"
326dnl If no 4th arg is given, leave the cache variable unset,
327dnl so AC_PATH_PROGS will keep looking.
328ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
329])dnl
330  ;;
331esac])dnl
332$1="$ac_cv_path_$1"
333if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
334  AC_MSG_RESULT([$]$1)
335else
336  AC_MSG_RESULT(no)
337fi
338AC_SUBST($1)dnl
339])
340
341dnl Checks for special options needed on Mac OS X.
342dnl Defines INTL_MACOSX_LIBS.
343dnl
344dnl Copied from intlmacosx.m4 in gettext, GPL.
345dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
346glib_DEFUN([glib_gt_INTL_MACOSX],
347[
348  dnl Check for API introduced in Mac OS X 10.2.
349  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
350    [gt_cv_func_CFPreferencesCopyAppValue],
351    [gt_save_LIBS="$LIBS"
352     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
353     AC_LINK_IFELSE(
354       [AC_LANG_PROGRAM(
355          [[#include <CoreFoundation/CFPreferences.h>]],
356          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
357       [gt_cv_func_CFPreferencesCopyAppValue=yes],
358       [gt_cv_func_CFPreferencesCopyAppValue=no])
359     LIBS="$gt_save_LIBS"])
360  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
361    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
362      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
363  fi
364  dnl Check for API introduced in Mac OS X 10.3.
365  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
366    [gt_save_LIBS="$LIBS"
367     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
368     AC_LINK_IFELSE(
369       [AC_LANG_PROGRAM(
370          [[#include <CoreFoundation/CFLocale.h>]],
371          [[CFLocaleCopyCurrent();]])],
372       [gt_cv_func_CFLocaleCopyCurrent=yes],
373       [gt_cv_func_CFLocaleCopyCurrent=no])
374     LIBS="$gt_save_LIBS"])
375  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
376    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
377      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
378  fi
379  INTL_MACOSX_LIBS=
380  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
381    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
382  fi
383  AC_SUBST([INTL_MACOSX_LIBS])
384])
385
386# GLIB_WITH_NLS
387#-----------------
388glib_DEFUN([GLIB_WITH_NLS],
389  dnl NLS is obligatory
390  [USE_NLS=yes
391    AC_SUBST(USE_NLS)
392
393    gt_cv_have_gettext=no
394
395    CATOBJEXT=NONE
396    XGETTEXT=:
397    INTLLIBS=
398
399    glib_gt_INTL_MACOSX
400
401    AC_CHECK_HEADER(libintl.h,
402     [gt_cv_func_dgettext_libintl="no"
403      libintl_extra_libs=""
404
405      #
406      # First check in libc
407      #
408      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
409        [AC_TRY_LINK([
410#include <libintl.h>
411],
412         [return !ngettext ("","", 1)],
413	  gt_cv_func_ngettext_libc=yes,
414          gt_cv_func_ngettext_libc=no)
415        ])
416
417      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
418	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
419        	[AC_TRY_LINK([
420#include <libintl.h>
421],
422	          [return !dgettext ("","")],
423		  gt_cv_func_dgettext_libc=yes,
424	          gt_cv_func_dgettext_libc=no)
425        	])
426      fi
427
428      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
429        AC_CHECK_FUNCS(bind_textdomain_codeset)
430      fi
431
432      #
433      # If we don't have everything we want, check in libintl
434      #
435      if test "$gt_cv_func_dgettext_libc" != "yes" \
436	 || test "$gt_cv_func_ngettext_libc" != "yes" \
437         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
438
439        AC_CHECK_LIB(intl, bindtextdomain,
440	    [AC_CHECK_LIB(intl, ngettext,
441		    [AC_CHECK_LIB(intl, dgettext,
442			          gt_cv_func_dgettext_libintl=yes)])])
443
444	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
445	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
446	  AC_MSG_RESULT([])
447  	  AC_CHECK_LIB(intl, ngettext,
448          	[AC_CHECK_LIB(intl, dcgettext,
449		       [gt_cv_func_dgettext_libintl=yes
450			libintl_extra_libs=-liconv],
451			:,-liconv)],
452		:,-liconv)
453        fi
454
455        #
456        # If we found libintl, then check in it for bind_textdomain_codeset();
457        # we'll prefer libc if neither have bind_textdomain_codeset(),
458        # and both have dgettext and ngettext
459        #
460        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
461          glib_save_LIBS="$LIBS"
462          LIBS="$LIBS -lintl $libintl_extra_libs"
463          unset ac_cv_func_bind_textdomain_codeset
464          AC_CHECK_FUNCS(bind_textdomain_codeset)
465          LIBS="$glib_save_LIBS"
466
467          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
468            gt_cv_func_dgettext_libc=no
469          else
470            if test "$gt_cv_func_dgettext_libc" = "yes" \
471		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
472              gt_cv_func_dgettext_libintl=no
473            fi
474          fi
475        fi
476      fi
477
478      if test "$gt_cv_func_dgettext_libc" = "yes" \
479	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
480        gt_cv_have_gettext=yes
481      fi
482
483      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
484        INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
485      fi
486
487      if test "$gt_cv_have_gettext" = "yes"; then
488	AC_DEFINE(HAVE_GETTEXT,1,
489	  [Define if the GNU gettext() function is already present or preinstalled.])
490	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
491	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
492	if test "$MSGFMT" != "no"; then
493          glib_save_LIBS="$LIBS"
494          LIBS="$LIBS $INTLLIBS"
495	  AC_CHECK_FUNCS(dcgettext)
496	  MSGFMT_OPTS=
497	  AC_MSG_CHECKING([if msgfmt accepts -c])
498	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
499msgid ""
500msgstr ""
501"Content-Type: text/plain; charset=UTF-8\n"
502"Project-Id-Version: test 1.0\n"
503"PO-Revision-Date: 2007-02-15 12:01+0100\n"
504"Last-Translator: test <foo@bar.xx>\n"
505"Language-Team: C <LL@li.org>\n"
506"MIME-Version: 1.0\n"
507"Content-Transfer-Encoding: 8bit\n"
508], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
509	  AC_SUBST(MSGFMT_OPTS)
510	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
511	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
512	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
513	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
514			 return _nl_msg_cat_cntr],
515	    [CATOBJEXT=.gmo
516             DATADIRNAME=share],
517	    [case $host in
518	    *-*-solaris*)
519	    dnl On Solaris, if bind_textdomain_codeset is in libc,
520	    dnl GNU format message catalog is always supported,
521            dnl since both are added to the libc all together.
522	    dnl Hence, we'd like to go with DATADIRNAME=share and
523	    dnl and CATOBJEXT=.gmo in this case.
524            AC_CHECK_FUNC(bind_textdomain_codeset,
525	      [CATOBJEXT=.gmo
526               DATADIRNAME=share],
527	      [CATOBJEXT=.mo
528               DATADIRNAME=lib])
529	    ;;
530	    *-*-openbsd*)
531	    CATOBJEXT=.mo
532            DATADIRNAME=share
533	    ;;
534	    *)
535	    CATOBJEXT=.mo
536            DATADIRNAME=lib
537	    ;;
538	    esac])
539          LIBS="$glib_save_LIBS"
540	  INSTOBJEXT=.mo
541	else
542	  gt_cv_have_gettext=no
543	fi
544      fi
545    ])
546
547    if test "$gt_cv_have_gettext" = "yes" ; then
548      AC_DEFINE(ENABLE_NLS, 1,
549        [always defined to indicate that i18n is enabled])
550    fi
551
552    dnl Test whether we really found GNU xgettext.
553    if test "$XGETTEXT" != ":"; then
554      dnl If it is not GNU xgettext we define it as : so that the
555      dnl Makefiles still can work.
556      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
557        : ;
558      else
559        AC_MSG_RESULT(
560	  [found xgettext program is not GNU xgettext; ignore it])
561        XGETTEXT=":"
562      fi
563    fi
564
565    # We need to process the po/ directory.
566    POSUB=po
567
568    AC_OUTPUT_COMMANDS(
569      [case "$CONFIG_FILES" in *po/Makefile.in*)
570        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
571      esac])
572
573    dnl These rules are solely for the distribution goal.  While doing this
574    dnl we only have to keep exactly one list of the available catalogs
575    dnl in configure.ac.
576    for lang in $ALL_LINGUAS; do
577      GMOFILES="$GMOFILES $lang.gmo"
578      POFILES="$POFILES $lang.po"
579    done
580
581    dnl Make all variables we use known to autoconf.
582    AC_SUBST(CATALOGS)
583    AC_SUBST(CATOBJEXT)
584    AC_SUBST(DATADIRNAME)
585    AC_SUBST(GMOFILES)
586    AC_SUBST(INSTOBJEXT)
587    AC_SUBST(INTLLIBS)
588    AC_SUBST(PO_IN_DATADIR_TRUE)
589    AC_SUBST(PO_IN_DATADIR_FALSE)
590    AC_SUBST(POFILES)
591    AC_SUBST(POSUB)
592  ])
593
594# AM_GLIB_GNU_GETTEXT
595# -------------------
596# Do checks necessary for use of gettext. If a suitable implementation
597# of gettext is found in either in libintl or in the C library,
598# it will set INTLLIBS to the libraries needed for use of gettext
599# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
600# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
601# on various variables needed by the Makefile.in.in installed by
602# glib-gettextize.
603dnl
604AU_DEFUN([GLIB_GNU_GETTEXT],
605  [AC_REQUIRE([AC_PROG_CC])dnl
606
607   GLIB_LC_MESSAGES
608   GLIB_WITH_NLS
609
610   if test "$gt_cv_have_gettext" = "yes"; then
611     if test "x$ALL_LINGUAS" = "x"; then
612       LINGUAS=
613     else
614       AC_MSG_CHECKING(for catalogs to be installed)
615       NEW_LINGUAS=
616       for presentlang in $ALL_LINGUAS; do
617         useit=no
618         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
619           desiredlanguages="$LINGUAS"
620         else
621           desiredlanguages="$ALL_LINGUAS"
622         fi
623         for desiredlang in $desiredlanguages; do
624 	   # Use the presentlang catalog if desiredlang is
625           #   a. equal to presentlang, or
626           #   b. a variant of presentlang (because in this case,
627           #      presentlang can be used as a fallback for messages
628           #      which are not translated in the desiredlang catalog).
629           case "$desiredlang" in
630             "$presentlang"*) useit=yes;;
631           esac
632         done
633         if test $useit = yes; then
634           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
635         fi
636       done
637       LINGUAS=$NEW_LINGUAS
638       AC_MSG_RESULT($LINGUAS)
639     fi
640
641     dnl Construct list of names of catalog files to be constructed.
642     if test -n "$LINGUAS"; then
643       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
644     fi
645   fi
646
647   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
648   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
649   dnl Try to locate is.
650   MKINSTALLDIRS=
651   if test -n "$ac_aux_dir"; then
652     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
653   fi
654   if test -z "$MKINSTALLDIRS"; then
655     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
656   fi
657   AC_SUBST(MKINSTALLDIRS)
658
659   dnl Generate list of files to be processed by xgettext which will
660   dnl be included in po/Makefile.
661   test -d po || mkdir po
662   if test "x$srcdir" != "x."; then
663     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
664       posrcprefix="$srcdir/"
665     else
666       posrcprefix="../$srcdir/"
667     fi
668   else
669     posrcprefix="../"
670   fi
671   rm -f po/POTFILES
672   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
673	< $srcdir/po/POTFILES.in > po/POTFILES
674  ],
675  [[$0: This macro is deprecated. You should use upstream gettext instead.]])
676
677# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
678# -------------------------------
679# Define VARIABLE to the location where catalog files will
680# be installed by po/Makefile.
681glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
682[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
683glib_save_prefix="$prefix"
684glib_save_exec_prefix="$exec_prefix"
685glib_save_datarootdir="$datarootdir"
686test "x$prefix" = xNONE && prefix=$ac_default_prefix
687test "x$exec_prefix" = xNONE && exec_prefix=$prefix
688datarootdir=`eval echo "${datarootdir}"`
689if test "x$CATOBJEXT" = "x.mo" ; then
690  localedir=`eval echo "${libdir}/locale"`
691else
692  localedir=`eval echo "${datadir}/locale"`
693fi
694prefix="$glib_save_prefix"
695exec_prefix="$glib_save_exec_prefix"
696datarootdir="$glib_save_datarootdir"
697AC_DEFINE_UNQUOTED($1, "$localedir",
698  [Define the location where the catalogs will be installed])
699])
700
701dnl
702dnl Now the definitions that aclocal will find
703dnl
704ifdef(glib_configure_ac,[],[
705AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
706AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
707])dnl
708
709# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
710#
711# Create a temporary file with TEST-FILE as its contents and pass the
712# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
713# 0 and perform ACTION-IF-FAIL for any other exit status.
714AC_DEFUN([GLIB_RUN_PROG],
715[cat >conftest.foo <<_ACEOF
716$2
717_ACEOF
718if AC_RUN_LOG([$1 conftest.foo]); then
719  m4_ifval([$3], [$3], [:])
720m4_ifvaln([$4], [else $4])dnl
721echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
722sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
723fi])
724
725
726# Configure paths for GTK+
727# Owen Taylor     1997-2001
728
729# Version number used by aclocal, see `info automake Serials`.
730# Increment on every change.
731#serial 1
732
733dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
734dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
735dnl pass to pkg-config
736dnl
737AC_DEFUN([AM_PATH_GTK_2_0],
738[dnl
739dnl Get the cflags and libraries from pkg-config
740dnl
741AC_ARG_ENABLE(gtktest, [  --disable-gtktest       do not try to compile and run a test GTK+ program],
742		    , enable_gtktest=yes)
743
744  pkg_config_args=gtk+-2.0
745  for module in . $4
746  do
747      case "$module" in
748         gthread)
749             pkg_config_args="$pkg_config_args gthread-2.0"
750         ;;
751      esac
752  done
753
754  no_gtk=""
755
756  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
757  PKG_PROG_PKG_CONFIG([0.7])
758
759  min_gtk_version=ifelse([$1], ,2.0.0,$1)
760  AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
761
762  if test x$PKG_CONFIG != xno ; then
763    ## don't try to run the test against uninstalled libtool libs
764    if $PKG_CONFIG --uninstalled $pkg_config_args; then
765	  echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
766	  enable_gtktest=no
767    fi
768
769    if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
770	  :
771    else
772	  no_gtk=yes
773    fi
774  fi
775
776  if test x"$no_gtk" = x ; then
777    GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
778    GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
779    gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
780           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
781    gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
782           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
783    gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
784           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
785    if test "x$enable_gtktest" = "xyes" ; then
786      ac_save_CFLAGS="$CFLAGS"
787      ac_save_LIBS="$LIBS"
788      CFLAGS="$CFLAGS $GTK_CFLAGS"
789      LIBS="$GTK_LIBS $LIBS"
790dnl
791dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
792dnl checks the results of pkg-config to some extent)
793dnl
794      rm -f conf.gtktest
795      AC_TRY_RUN([
796#include <gtk/gtk.h>
797#include <stdio.h>
798#include <stdlib.h>
799
800int
801main ()
802{
803  int major, minor, micro;
804  char *tmp_version;
805
806  fclose (fopen ("conf.gtktest", "w"));
807
808  /* HP/UX 9 (%@#!) writes to sscanf strings */
809  tmp_version = g_strdup("$min_gtk_version");
810  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
811     printf("%s, bad version string\n", "$min_gtk_version");
812     exit(1);
813   }
814
815  if ((gtk_major_version != $gtk_config_major_version) ||
816      (gtk_minor_version != $gtk_config_minor_version) ||
817      (gtk_micro_version != $gtk_config_micro_version))
818    {
819      printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
820             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
821             gtk_major_version, gtk_minor_version, gtk_micro_version);
822      printf ("*** was found! If pkg-config was correct, then it is best\n");
823      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
824      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
825      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
826      printf("*** required on your system.\n");
827      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
828      printf("*** to point to the correct configuration files\n");
829    }
830  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
831	   (gtk_minor_version != GTK_MINOR_VERSION) ||
832           (gtk_micro_version != GTK_MICRO_VERSION))
833    {
834      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
835	     GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
836      printf("*** library (version %d.%d.%d)\n",
837	     gtk_major_version, gtk_minor_version, gtk_micro_version);
838    }
839  else
840    {
841      if ((gtk_major_version > major) ||
842        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
843        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
844      {
845        return 0;
846       }
847     else
848      {
849        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
850               gtk_major_version, gtk_minor_version, gtk_micro_version);
851        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
852	       major, minor, micro);
853        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
854        printf("***\n");
855        printf("*** If you have already installed a sufficiently new version, this error\n");
856        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
857        printf("*** being found. The easiest way to fix this is to remove the old version\n");
858        printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
859        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
860        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
861        printf("*** so that the correct libraries are found at run-time))\n");
862      }
863    }
864  return 1;
865}
866],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
867       CFLAGS="$ac_save_CFLAGS"
868       LIBS="$ac_save_LIBS"
869     fi
870  fi
871  if test "x$no_gtk" = x ; then
872     AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
873     ifelse([$2], , :, [$2])
874  else
875     AC_MSG_RESULT(no)
876     if test "$PKG_CONFIG" = "no" ; then
877       echo "*** A new enough version of pkg-config was not found."
878       echo "*** See http://pkgconfig.sourceforge.net"
879     else
880       if test -f conf.gtktest ; then
881        :
882       else
883          echo "*** Could not run GTK+ test program, checking why..."
884	  ac_save_CFLAGS="$CFLAGS"
885	  ac_save_LIBS="$LIBS"
886          CFLAGS="$CFLAGS $GTK_CFLAGS"
887          LIBS="$LIBS $GTK_LIBS"
888          AC_TRY_LINK([
889#include <gtk/gtk.h>
890#include <stdio.h>
891],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
892        [ echo "*** The test program compiled, but did not run. This usually means"
893          echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
894          echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
895          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
896          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
897          echo "*** is required on your system"
898	  echo "***"
899          echo "*** If you have an old version installed, it is best to remove it, although"
900          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
901        [ echo "*** The test program failed to compile or link. See the file config.log for the"
902          echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
903          CFLAGS="$ac_save_CFLAGS"
904          LIBS="$ac_save_LIBS"
905       fi
906     fi
907     GTK_CFLAGS=""
908     GTK_LIBS=""
909     ifelse([$3], , :, [$3])
910  fi
911  AC_SUBST(GTK_CFLAGS)
912  AC_SUBST(GTK_LIBS)
913  rm -f conf.gtktest
914])
915
916# -*- mode: autoconf -*-
917#
918# gtk-doc.m4 - configure macro to check for gtk-doc
919# Copyright (C) 2003 James Henstridge
920#               2007-2017  Stefan Sauer
921#
922# This program is free software: you can redistribute it and/or modify
923# it under the terms of the GNU General Public License as published by
924# the Free Software Foundation, either version 3 of the License, or
925# (at your option) any later version.
926#
927# This program is distributed in the hope that it will be useful,
928# but WITHOUT ANY WARRANTY; without even the implied warranty of
929# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
930# GNU General Public License for more details.
931#
932# You should have received a copy of the GNU General Public License
933# along with this program.  If not, see <http://www.gnu.org/licenses/>.
934#
935# As a special exception, the above copyright owner gives unlimited
936# permission to copy, distribute and modify the configure scripts that
937# are the output of Autoconf when processing the Macro. You need not
938# follow the terms of the GNU General Public License when using or
939# distributing such scripts, even though portions of the text of the
940# Macro appear in them. The GNU General Public License (GPL) does govern
941# all other use of the material that constitutes the Autoconf Macro.
942
943# serial 2
944
945dnl Usage:
946dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
947AC_DEFUN([GTK_DOC_CHECK],
948[
949  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
950  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
951  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
952
953  ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
954  AC_MSG_CHECKING([for gtk-doc])
955  PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
956  AC_MSG_RESULT($have_gtk_doc)
957
958  if test "$have_gtk_doc" = "no"; then
959      AC_MSG_WARN([
960  You will not be able to create source packages with 'make dist'
961  because $gtk_doc_requires is not found.])
962  fi
963
964  dnl check for tools we added during development
965  dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
966  dnl may not be writable by the user. Currently, automake requires that the
967  dnl test name must end in '.test'.
968  dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
969  AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
970  AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
971  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
972  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
973
974  dnl for overriding the documentation installation directory
975  AC_ARG_WITH([html-dir],
976    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
977    [with_html_dir='${datadir}/gtk-doc/html'])
978  HTML_DIR="$with_html_dir"
979  AC_SUBST([HTML_DIR])
980
981  dnl enable/disable documentation building
982  AC_ARG_ENABLE([gtk-doc],
983    AS_HELP_STRING([--enable-gtk-doc],
984                   [use gtk-doc to build documentation [[default=no]]]),,
985    [enable_gtk_doc=no])
986
987  AC_MSG_CHECKING([whether to build gtk-doc documentation])
988  AC_MSG_RESULT($enable_gtk_doc)
989
990  if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
991    AC_MSG_ERROR([
992  You must have $gtk_doc_requires installed to build documentation for
993  $PACKAGE_NAME. Please install gtk-doc or disable building the
994  documentation by adding '--disable-gtk-doc' to '[$]0'.])
995  fi
996
997  dnl don't check for glib if we build glib
998  if test "x$PACKAGE_NAME" != "xglib"; then
999    dnl don't fail if someone does not have glib
1000    PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
1001  fi
1002
1003  dnl enable/disable output formats
1004  AC_ARG_ENABLE([gtk-doc-html],
1005    AS_HELP_STRING([--enable-gtk-doc-html],
1006                   [build documentation in html format [[default=yes]]]),,
1007    [enable_gtk_doc_html=yes])
1008    AC_ARG_ENABLE([gtk-doc-pdf],
1009      AS_HELP_STRING([--enable-gtk-doc-pdf],
1010                     [build documentation in pdf format [[default=no]]]),,
1011      [enable_gtk_doc_pdf=no])
1012
1013  if test -z "$GTKDOC_MKPDF"; then
1014    enable_gtk_doc_pdf=no
1015  fi
1016
1017  if test -z "$AM_DEFAULT_VERBOSITY"; then
1018    AM_DEFAULT_VERBOSITY=1
1019  fi
1020  AC_SUBST([AM_DEFAULT_VERBOSITY])
1021
1022  AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
1023  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
1024  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
1025  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
1026  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
1027  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
1028])
1029
1030
1031dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1032# serial 42 IT_PROG_INTLTOOL
1033AC_DEFUN([IT_PROG_INTLTOOL], [
1034AC_PREREQ([2.50])dnl
1035AC_REQUIRE([AM_NLS])dnl
1036
1037case "$am__api_version" in
1038    1.[01234])
1039	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1040    ;;
1041    *)
1042    ;;
1043esac
1044
1045INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1046INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1047INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1048if test -n "$1"; then
1049    AC_MSG_CHECKING([for intltool >= $1])
1050    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1051    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1052	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
1053fi
1054
1055AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1056AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1057AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1058if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1059    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1060fi
1061
1062if test -z "$AM_DEFAULT_VERBOSITY"; then
1063  AM_DEFAULT_VERBOSITY=1
1064fi
1065AC_SUBST([AM_DEFAULT_VERBOSITY])
1066
1067INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
1068INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
1069INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
1070AC_SUBST(INTLTOOL_V_MERGE)
1071AC_SUBST(INTLTOOL__v_MERGE_)
1072AC_SUBST(INTLTOOL__v_MERGE_0)
1073
1074INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
1075intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
1076intltool__v_merge_options_0='-q'
1077AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
1078AC_SUBST(intltool__v_merge_options_)
1079AC_SUBST(intltool__v_merge_options_0)
1080
1081  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1082INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1083     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1084     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1085      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
1086     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1087   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1088    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1089INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1090       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1091      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1092if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
1093      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
1094else
1095      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
1096fi
1097      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1098      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1099    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1100  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1101    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1102    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1103   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1104
1105_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1106_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1107_IT_SUBST(INTLTOOL_KEYS_RULE)
1108_IT_SUBST(INTLTOOL_PROP_RULE)
1109_IT_SUBST(INTLTOOL_OAF_RULE)
1110_IT_SUBST(INTLTOOL_PONG_RULE)
1111_IT_SUBST(INTLTOOL_SERVER_RULE)
1112_IT_SUBST(INTLTOOL_SHEET_RULE)
1113_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1114_IT_SUBST(INTLTOOL_UI_RULE)
1115_IT_SUBST(INTLTOOL_XAM_RULE)
1116_IT_SUBST(INTLTOOL_KBD_RULE)
1117_IT_SUBST(INTLTOOL_XML_RULE)
1118_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1119_IT_SUBST(INTLTOOL_CAVES_RULE)
1120_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1121_IT_SUBST(INTLTOOL_THEME_RULE)
1122_IT_SUBST(INTLTOOL_SERVICE_RULE)
1123_IT_SUBST(INTLTOOL_POLICY_RULE)
1124
1125# Check the gettext tools to make sure they are GNU
1126AC_PATH_PROG(XGETTEXT, xgettext)
1127AC_PATH_PROG(MSGMERGE, msgmerge)
1128AC_PATH_PROG(MSGFMT, msgfmt)
1129AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1130if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1131    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1132fi
1133xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1134mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1135mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1136if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1137    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1138fi
1139
1140AC_PATH_PROG(INTLTOOL_PERL, perl)
1141if test -z "$INTLTOOL_PERL"; then
1142   AC_MSG_ERROR([perl not found])
1143fi
1144AC_MSG_CHECKING([for perl >= 5.8.1])
1145$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1146if test $? -ne 0; then
1147   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1148else
1149   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1150   AC_MSG_RESULT([$IT_PERL_VERSION])
1151fi
1152if test "x$2" != "xno-xml"; then
1153   AC_MSG_CHECKING([for XML::Parser])
1154   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1155       AC_MSG_RESULT([ok])
1156   else
1157       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1158   fi
1159fi
1160
1161# Substitute ALL_LINGUAS so we can use it in po/Makefile
1162AC_SUBST(ALL_LINGUAS)
1163
1164IT_PO_SUBDIR([po])
1165
1166])
1167
1168
1169# IT_PO_SUBDIR(DIRNAME)
1170# ---------------------
1171# All po subdirs have to be declared with this macro; the subdir "po" is
1172# declared by IT_PROG_INTLTOOL.
1173#
1174AC_DEFUN([IT_PO_SUBDIR],
1175[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1176dnl
1177dnl The following CONFIG_COMMANDS should be executed at the very end
1178dnl of config.status.
1179AC_CONFIG_COMMANDS_PRE([
1180  AC_CONFIG_COMMANDS([$1/stamp-it], [
1181    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1182       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1183    fi
1184    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1185    >"$1/stamp-it.tmp"
1186    [sed '/^#/d
1187	 s/^[[].*] *//
1188	 /^[ 	]*$/d
1189	'"s|^|	$ac_top_srcdir/|" \
1190      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1191    ]
1192    [sed '/^POTFILES =/,/[^\\]$/ {
1193		/^POTFILES =/!d
1194		r $1/POTFILES
1195	  }
1196	 ' "$1/Makefile.in" >"$1/Makefile"]
1197    rm -f "$1/Makefile.tmp"
1198    mv "$1/stamp-it.tmp" "$1/stamp-it"
1199  ])
1200])dnl
1201])
1202
1203# _IT_SUBST(VARIABLE)
1204# -------------------
1205# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1206#
1207AC_DEFUN([_IT_SUBST],
1208[
1209AC_SUBST([$1])
1210m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1211]
1212)
1213
1214# deprecated macros
1215AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1216# A hint is needed for aclocal from Automake <= 1.9.4:
1217# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1218
1219
1220# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1221#
1222#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
1223#   Written by Gordon Matzigkeit, 1996
1224#
1225# This file is free software; the Free Software Foundation gives
1226# unlimited permission to copy and/or distribute it, with or without
1227# modifications, as long as this notice is preserved.
1228
1229m4_define([_LT_COPYING], [dnl
1230# Copyright (C) 2014 Free Software Foundation, Inc.
1231# This is free software; see the source for copying conditions.  There is NO
1232# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1233
1234# GNU Libtool is free software; you can redistribute it and/or modify
1235# it under the terms of the GNU General Public License as published by
1236# the Free Software Foundation; either version 2 of of the License, or
1237# (at your option) any later version.
1238#
1239# As a special exception to the GNU General Public License, if you
1240# distribute this file as part of a program or library that is built
1241# using GNU Libtool, you may include this file under the  same
1242# distribution terms that you use for the rest of that program.
1243#
1244# GNU Libtool is distributed in the hope that it will be useful, but
1245# WITHOUT ANY WARRANTY; without even the implied warranty of
1246# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1247# GNU General Public License for more details.
1248#
1249# You should have received a copy of the GNU General Public License
1250# along with this program.  If not, see <http://www.gnu.org/licenses/>.
1251])
1252
1253# serial 58 LT_INIT
1254
1255
1256# LT_PREREQ(VERSION)
1257# ------------------
1258# Complain and exit if this libtool version is less that VERSION.
1259m4_defun([LT_PREREQ],
1260[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1261       [m4_default([$3],
1262		   [m4_fatal([Libtool version $1 or higher is required],
1263		             63)])],
1264       [$2])])
1265
1266
1267# _LT_CHECK_BUILDDIR
1268# ------------------
1269# Complain if the absolute build directory name contains unusual characters
1270m4_defun([_LT_CHECK_BUILDDIR],
1271[case `pwd` in
1272  *\ * | *\	*)
1273    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1274esac
1275])
1276
1277
1278# LT_INIT([OPTIONS])
1279# ------------------
1280AC_DEFUN([LT_INIT],
1281[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
1282AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1283AC_BEFORE([$0], [LT_LANG])dnl
1284AC_BEFORE([$0], [LT_OUTPUT])dnl
1285AC_BEFORE([$0], [LTDL_INIT])dnl
1286m4_require([_LT_CHECK_BUILDDIR])dnl
1287
1288dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1289m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1290m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1291dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1292dnl unless we require an AC_DEFUNed macro:
1293AC_REQUIRE([LTOPTIONS_VERSION])dnl
1294AC_REQUIRE([LTSUGAR_VERSION])dnl
1295AC_REQUIRE([LTVERSION_VERSION])dnl
1296AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1297m4_require([_LT_PROG_LTMAIN])dnl
1298
1299_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1300
1301dnl Parse OPTIONS
1302_LT_SET_OPTIONS([$0], [$1])
1303
1304# This can be used to rebuild libtool when needed
1305LIBTOOL_DEPS=$ltmain
1306
1307# Always use our own libtool.
1308LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1309AC_SUBST(LIBTOOL)dnl
1310
1311_LT_SETUP
1312
1313# Only expand once:
1314m4_define([LT_INIT])
1315])# LT_INIT
1316
1317# Old names:
1318AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1319AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1320dnl aclocal-1.4 backwards compatibility:
1321dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1322dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1323
1324
1325# _LT_PREPARE_CC_BASENAME
1326# -----------------------
1327m4_defun([_LT_PREPARE_CC_BASENAME], [
1328# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1329func_cc_basename ()
1330{
1331    for cc_temp in @S|@*""; do
1332      case $cc_temp in
1333        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1334        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1335        \-*) ;;
1336        *) break;;
1337      esac
1338    done
1339    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1340}
1341])# _LT_PREPARE_CC_BASENAME
1342
1343
1344# _LT_CC_BASENAME(CC)
1345# -------------------
1346# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
1347# but that macro is also expanded into generated libtool script, which
1348# arranges for $SED and $ECHO to be set by different means.
1349m4_defun([_LT_CC_BASENAME],
1350[m4_require([_LT_PREPARE_CC_BASENAME])dnl
1351AC_REQUIRE([_LT_DECL_SED])dnl
1352AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1353func_cc_basename $1
1354cc_basename=$func_cc_basename_result
1355])
1356
1357
1358# _LT_FILEUTILS_DEFAULTS
1359# ----------------------
1360# It is okay to use these file commands and assume they have been set
1361# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
1362m4_defun([_LT_FILEUTILS_DEFAULTS],
1363[: ${CP="cp -f"}
1364: ${MV="mv -f"}
1365: ${RM="rm -f"}
1366])# _LT_FILEUTILS_DEFAULTS
1367
1368
1369# _LT_SETUP
1370# ---------
1371m4_defun([_LT_SETUP],
1372[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1373AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1374AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1375AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1376
1377_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1378dnl
1379_LT_DECL([], [host_alias], [0], [The host system])dnl
1380_LT_DECL([], [host], [0])dnl
1381_LT_DECL([], [host_os], [0])dnl
1382dnl
1383_LT_DECL([], [build_alias], [0], [The build system])dnl
1384_LT_DECL([], [build], [0])dnl
1385_LT_DECL([], [build_os], [0])dnl
1386dnl
1387AC_REQUIRE([AC_PROG_CC])dnl
1388AC_REQUIRE([LT_PATH_LD])dnl
1389AC_REQUIRE([LT_PATH_NM])dnl
1390dnl
1391AC_REQUIRE([AC_PROG_LN_S])dnl
1392test -z "$LN_S" && LN_S="ln -s"
1393_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1394dnl
1395AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1396_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1397_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1398dnl
1399m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1400m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1401m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1402m4_require([_LT_CMD_RELOAD])dnl
1403m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1404m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1405m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1406m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1407m4_require([_LT_WITH_SYSROOT])dnl
1408m4_require([_LT_CMD_TRUNCATE])dnl
1409
1410_LT_CONFIG_LIBTOOL_INIT([
1411# See if we are running on zsh, and set the options that allow our
1412# commands through without removal of \ escapes INIT.
1413if test -n "\${ZSH_VERSION+set}"; then
1414   setopt NO_GLOB_SUBST
1415fi
1416])
1417if test -n "${ZSH_VERSION+set}"; then
1418   setopt NO_GLOB_SUBST
1419fi
1420
1421_LT_CHECK_OBJDIR
1422
1423m4_require([_LT_TAG_COMPILER])dnl
1424
1425case $host_os in
1426aix3*)
1427  # AIX sometimes has problems with the GCC collect2 program.  For some
1428  # reason, if we set the COLLECT_NAMES environment variable, the problems
1429  # vanish in a puff of smoke.
1430  if test set != "${COLLECT_NAMES+set}"; then
1431    COLLECT_NAMES=
1432    export COLLECT_NAMES
1433  fi
1434  ;;
1435esac
1436
1437# Global variables:
1438ofile=libtool
1439can_build_shared=yes
1440
1441# All known linkers require a '.a' archive for static linking (except MSVC,
1442# which needs '.lib').
1443libext=a
1444
1445with_gnu_ld=$lt_cv_prog_gnu_ld
1446
1447old_CC=$CC
1448old_CFLAGS=$CFLAGS
1449
1450# Set sane defaults for various variables
1451test -z "$CC" && CC=cc
1452test -z "$LTCC" && LTCC=$CC
1453test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1454test -z "$LD" && LD=ld
1455test -z "$ac_objext" && ac_objext=o
1456
1457_LT_CC_BASENAME([$compiler])
1458
1459# Only perform the check for file, if the check method requires it
1460test -z "$MAGIC_CMD" && MAGIC_CMD=file
1461case $deplibs_check_method in
1462file_magic*)
1463  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1464    _LT_PATH_MAGIC
1465  fi
1466  ;;
1467esac
1468
1469# Use C for the default configuration in the libtool script
1470LT_SUPPORTED_TAG([CC])
1471_LT_LANG_C_CONFIG
1472_LT_LANG_DEFAULT_CONFIG
1473_LT_CONFIG_COMMANDS
1474])# _LT_SETUP
1475
1476
1477# _LT_PREPARE_SED_QUOTE_VARS
1478# --------------------------
1479# Define a few sed substitution that help us do robust quoting.
1480m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1481[# Backslashify metacharacters that are still active within
1482# double-quoted strings.
1483sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1484
1485# Same as above, but do not quote variable references.
1486double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1487
1488# Sed substitution to delay expansion of an escaped shell variable in a
1489# double_quote_subst'ed string.
1490delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1491
1492# Sed substitution to delay expansion of an escaped single quote.
1493delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1494
1495# Sed substitution to avoid accidental globbing in evaled expressions
1496no_glob_subst='s/\*/\\\*/g'
1497])
1498
1499# _LT_PROG_LTMAIN
1500# ---------------
1501# Note that this code is called both from 'configure', and 'config.status'
1502# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1503# 'config.status' has no value for ac_aux_dir unless we are using Automake,
1504# so we pass a copy along to make sure it has a sensible value anyway.
1505m4_defun([_LT_PROG_LTMAIN],
1506[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1507_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1508ltmain=$ac_aux_dir/ltmain.sh
1509])# _LT_PROG_LTMAIN
1510
1511
1512
1513# So that we can recreate a full libtool script including additional
1514# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1515# in macros and then make a single call at the end using the 'libtool'
1516# label.
1517
1518
1519# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1520# ----------------------------------------
1521# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1522m4_define([_LT_CONFIG_LIBTOOL_INIT],
1523[m4_ifval([$1],
1524          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1525                     [$1
1526])])])
1527
1528# Initialize.
1529m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1530
1531
1532# _LT_CONFIG_LIBTOOL([COMMANDS])
1533# ------------------------------
1534# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1535m4_define([_LT_CONFIG_LIBTOOL],
1536[m4_ifval([$1],
1537          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1538                     [$1
1539])])])
1540
1541# Initialize.
1542m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1543
1544
1545# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1546# -----------------------------------------------------
1547m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1548[_LT_CONFIG_LIBTOOL([$1])
1549_LT_CONFIG_LIBTOOL_INIT([$2])
1550])
1551
1552
1553# _LT_FORMAT_COMMENT([COMMENT])
1554# -----------------------------
1555# Add leading comment marks to the start of each line, and a trailing
1556# full-stop to the whole comment if one is not present already.
1557m4_define([_LT_FORMAT_COMMENT],
1558[m4_ifval([$1], [
1559m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1560              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1561)])
1562
1563
1564
1565
1566
1567# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1568# -------------------------------------------------------------------
1569# CONFIGNAME is the name given to the value in the libtool script.
1570# VARNAME is the (base) name used in the configure script.
1571# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1572# VARNAME.  Any other value will be used directly.
1573m4_define([_LT_DECL],
1574[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1575    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1576	[m4_ifval([$1], [$1], [$2])])
1577    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1578    m4_ifval([$4],
1579	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1580    lt_dict_add_subkey([lt_decl_dict], [$2],
1581	[tagged?], [m4_ifval([$5], [yes], [no])])])
1582])
1583
1584
1585# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1586# --------------------------------------------------------
1587m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1588
1589
1590# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1591# ------------------------------------------------
1592m4_define([lt_decl_tag_varnames],
1593[_lt_decl_filter([tagged?], [yes], $@)])
1594
1595
1596# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1597# ---------------------------------------------------------
1598m4_define([_lt_decl_filter],
1599[m4_case([$#],
1600  [0], [m4_fatal([$0: too few arguments: $#])],
1601  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1602  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1603  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1604  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1605])
1606
1607
1608# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1609# --------------------------------------------------
1610m4_define([lt_decl_quote_varnames],
1611[_lt_decl_filter([value], [1], $@)])
1612
1613
1614# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1615# ---------------------------------------------------
1616m4_define([lt_decl_dquote_varnames],
1617[_lt_decl_filter([value], [2], $@)])
1618
1619
1620# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1621# ---------------------------------------------------
1622m4_define([lt_decl_varnames_tagged],
1623[m4_assert([$# <= 2])dnl
1624_$0(m4_quote(m4_default([$1], [[, ]])),
1625    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1626    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1627m4_define([_lt_decl_varnames_tagged],
1628[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1629
1630
1631# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1632# ------------------------------------------------
1633m4_define([lt_decl_all_varnames],
1634[_$0(m4_quote(m4_default([$1], [[, ]])),
1635     m4_if([$2], [],
1636	   m4_quote(lt_decl_varnames),
1637	m4_quote(m4_shift($@))))[]dnl
1638])
1639m4_define([_lt_decl_all_varnames],
1640[lt_join($@, lt_decl_varnames_tagged([$1],
1641			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1642])
1643
1644
1645# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1646# ------------------------------------
1647# Quote a variable value, and forward it to 'config.status' so that its
1648# declaration there will have the same value as in 'configure'.  VARNAME
1649# must have a single quote delimited value for this to work.
1650m4_define([_LT_CONFIG_STATUS_DECLARE],
1651[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1652
1653
1654# _LT_CONFIG_STATUS_DECLARATIONS
1655# ------------------------------
1656# We delimit libtool config variables with single quotes, so when
1657# we write them to config.status, we have to be sure to quote all
1658# embedded single quotes properly.  In configure, this macro expands
1659# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1660#
1661#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1662m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1663[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1664    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1665
1666
1667# _LT_LIBTOOL_TAGS
1668# ----------------
1669# Output comment and list of tags supported by the script
1670m4_defun([_LT_LIBTOOL_TAGS],
1671[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1672available_tags='_LT_TAGS'dnl
1673])
1674
1675
1676# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1677# -----------------------------------
1678# Extract the dictionary values for VARNAME (optionally with TAG) and
1679# expand to a commented shell variable setting:
1680#
1681#    # Some comment about what VAR is for.
1682#    visible_name=$lt_internal_name
1683m4_define([_LT_LIBTOOL_DECLARE],
1684[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1685					   [description])))[]dnl
1686m4_pushdef([_libtool_name],
1687    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1688m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1689    [0], [_libtool_name=[$]$1],
1690    [1], [_libtool_name=$lt_[]$1],
1691    [2], [_libtool_name=$lt_[]$1],
1692    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1693m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1694])
1695
1696
1697# _LT_LIBTOOL_CONFIG_VARS
1698# -----------------------
1699# Produce commented declarations of non-tagged libtool config variables
1700# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
1701# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1702# section) are produced by _LT_LIBTOOL_TAG_VARS.
1703m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1704[m4_foreach([_lt_var],
1705    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1706    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1707
1708
1709# _LT_LIBTOOL_TAG_VARS(TAG)
1710# -------------------------
1711m4_define([_LT_LIBTOOL_TAG_VARS],
1712[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1713    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1714
1715
1716# _LT_TAGVAR(VARNAME, [TAGNAME])
1717# ------------------------------
1718m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1719
1720
1721# _LT_CONFIG_COMMANDS
1722# -------------------
1723# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1724# variables for single and double quote escaping we saved from calls
1725# to _LT_DECL, we can put quote escaped variables declarations
1726# into 'config.status', and then the shell code to quote escape them in
1727# for loops in 'config.status'.  Finally, any additional code accumulated
1728# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1729m4_defun([_LT_CONFIG_COMMANDS],
1730[AC_PROVIDE_IFELSE([LT_OUTPUT],
1731	dnl If the libtool generation code has been placed in $CONFIG_LT,
1732	dnl instead of duplicating it all over again into config.status,
1733	dnl then we will have config.status run $CONFIG_LT later, so it
1734	dnl needs to know what name is stored there:
1735        [AC_CONFIG_COMMANDS([libtool],
1736            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1737    dnl If the libtool generation code is destined for config.status,
1738    dnl expand the accumulated commands and init code now:
1739    [AC_CONFIG_COMMANDS([libtool],
1740        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1741])#_LT_CONFIG_COMMANDS
1742
1743
1744# Initialize.
1745m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1746[
1747
1748# The HP-UX ksh and POSIX shell print the target directory to stdout
1749# if CDPATH is set.
1750(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1751
1752sed_quote_subst='$sed_quote_subst'
1753double_quote_subst='$double_quote_subst'
1754delay_variable_subst='$delay_variable_subst'
1755_LT_CONFIG_STATUS_DECLARATIONS
1756LTCC='$LTCC'
1757LTCFLAGS='$LTCFLAGS'
1758compiler='$compiler_DEFAULT'
1759
1760# A function that is used when there is no print builtin or printf.
1761func_fallback_echo ()
1762{
1763  eval 'cat <<_LTECHO_EOF
1764\$[]1
1765_LTECHO_EOF'
1766}
1767
1768# Quote evaled strings.
1769for var in lt_decl_all_varnames([[ \
1770]], lt_decl_quote_varnames); do
1771    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1772    *[[\\\\\\\`\\"\\\$]]*)
1773      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
1774      ;;
1775    *)
1776      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1777      ;;
1778    esac
1779done
1780
1781# Double-quote double-evaled strings.
1782for var in lt_decl_all_varnames([[ \
1783]], lt_decl_dquote_varnames); do
1784    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1785    *[[\\\\\\\`\\"\\\$]]*)
1786      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
1787      ;;
1788    *)
1789      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1790      ;;
1791    esac
1792done
1793
1794_LT_OUTPUT_LIBTOOL_INIT
1795])
1796
1797# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1798# ------------------------------------
1799# Generate a child script FILE with all initialization necessary to
1800# reuse the environment learned by the parent script, and make the
1801# file executable.  If COMMENT is supplied, it is inserted after the
1802# '#!' sequence but before initialization text begins.  After this
1803# macro, additional text can be appended to FILE to form the body of
1804# the child script.  The macro ends with non-zero status if the
1805# file could not be fully written (such as if the disk is full).
1806m4_ifdef([AS_INIT_GENERATED],
1807[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1808[m4_defun([_LT_GENERATED_FILE_INIT],
1809[m4_require([AS_PREPARE])]dnl
1810[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1811[lt_write_fail=0
1812cat >$1 <<_ASEOF || lt_write_fail=1
1813#! $SHELL
1814# Generated by $as_me.
1815$2
1816SHELL=\${CONFIG_SHELL-$SHELL}
1817export SHELL
1818_ASEOF
1819cat >>$1 <<\_ASEOF || lt_write_fail=1
1820AS_SHELL_SANITIZE
1821_AS_PREPARE
1822exec AS_MESSAGE_FD>&1
1823_ASEOF
1824test 0 = "$lt_write_fail" && chmod +x $1[]dnl
1825m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1826
1827# LT_OUTPUT
1828# ---------
1829# This macro allows early generation of the libtool script (before
1830# AC_OUTPUT is called), incase it is used in configure for compilation
1831# tests.
1832AC_DEFUN([LT_OUTPUT],
1833[: ${CONFIG_LT=./config.lt}
1834AC_MSG_NOTICE([creating $CONFIG_LT])
1835_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1836[# Run this file to recreate a libtool stub with the current configuration.])
1837
1838cat >>"$CONFIG_LT" <<\_LTEOF
1839lt_cl_silent=false
1840exec AS_MESSAGE_LOG_FD>>config.log
1841{
1842  echo
1843  AS_BOX([Running $as_me.])
1844} >&AS_MESSAGE_LOG_FD
1845
1846lt_cl_help="\
1847'$as_me' creates a local libtool stub from the current configuration,
1848for use in further configure time tests before the real libtool is
1849generated.
1850
1851Usage: $[0] [[OPTIONS]]
1852
1853  -h, --help      print this help, then exit
1854  -V, --version   print version number, then exit
1855  -q, --quiet     do not print progress messages
1856  -d, --debug     don't remove temporary files
1857
1858Report bugs to <bug-libtool@gnu.org>."
1859
1860lt_cl_version="\
1861m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1862m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1863configured by $[0], generated by m4_PACKAGE_STRING.
1864
1865Copyright (C) 2011 Free Software Foundation, Inc.
1866This config.lt script is free software; the Free Software Foundation
1867gives unlimited permision to copy, distribute and modify it."
1868
1869while test 0 != $[#]
1870do
1871  case $[1] in
1872    --version | --v* | -V )
1873      echo "$lt_cl_version"; exit 0 ;;
1874    --help | --h* | -h )
1875      echo "$lt_cl_help"; exit 0 ;;
1876    --debug | --d* | -d )
1877      debug=: ;;
1878    --quiet | --q* | --silent | --s* | -q )
1879      lt_cl_silent=: ;;
1880
1881    -*) AC_MSG_ERROR([unrecognized option: $[1]
1882Try '$[0] --help' for more information.]) ;;
1883
1884    *) AC_MSG_ERROR([unrecognized argument: $[1]
1885Try '$[0] --help' for more information.]) ;;
1886  esac
1887  shift
1888done
1889
1890if $lt_cl_silent; then
1891  exec AS_MESSAGE_FD>/dev/null
1892fi
1893_LTEOF
1894
1895cat >>"$CONFIG_LT" <<_LTEOF
1896_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1897_LTEOF
1898
1899cat >>"$CONFIG_LT" <<\_LTEOF
1900AC_MSG_NOTICE([creating $ofile])
1901_LT_OUTPUT_LIBTOOL_COMMANDS
1902AS_EXIT(0)
1903_LTEOF
1904chmod +x "$CONFIG_LT"
1905
1906# configure is writing to config.log, but config.lt does its own redirection,
1907# appending to config.log, which fails on DOS, as config.log is still kept
1908# open by configure.  Here we exec the FD to /dev/null, effectively closing
1909# config.log, so it can be properly (re)opened and appended to by config.lt.
1910lt_cl_success=:
1911test yes = "$silent" &&
1912  lt_config_lt_args="$lt_config_lt_args --quiet"
1913exec AS_MESSAGE_LOG_FD>/dev/null
1914$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1915exec AS_MESSAGE_LOG_FD>>config.log
1916$lt_cl_success || AS_EXIT(1)
1917])# LT_OUTPUT
1918
1919
1920# _LT_CONFIG(TAG)
1921# ---------------
1922# If TAG is the built-in tag, create an initial libtool script with a
1923# default configuration from the untagged config vars.  Otherwise add code
1924# to config.status for appending the configuration named by TAG from the
1925# matching tagged config vars.
1926m4_defun([_LT_CONFIG],
1927[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1928_LT_CONFIG_SAVE_COMMANDS([
1929  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1930  m4_if(_LT_TAG, [C], [
1931    # See if we are running on zsh, and set the options that allow our
1932    # commands through without removal of \ escapes.
1933    if test -n "${ZSH_VERSION+set}"; then
1934      setopt NO_GLOB_SUBST
1935    fi
1936
1937    cfgfile=${ofile}T
1938    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1939    $RM "$cfgfile"
1940
1941    cat <<_LT_EOF >> "$cfgfile"
1942#! $SHELL
1943# Generated automatically by $as_me ($PACKAGE) $VERSION
1944# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1945
1946# Provide generalized library-building support services.
1947# Written by Gordon Matzigkeit, 1996
1948
1949_LT_COPYING
1950_LT_LIBTOOL_TAGS
1951
1952# Configured defaults for sys_lib_dlsearch_path munging.
1953: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
1954
1955# ### BEGIN LIBTOOL CONFIG
1956_LT_LIBTOOL_CONFIG_VARS
1957_LT_LIBTOOL_TAG_VARS
1958# ### END LIBTOOL CONFIG
1959
1960_LT_EOF
1961
1962    cat <<'_LT_EOF' >> "$cfgfile"
1963
1964# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
1965
1966_LT_PREPARE_MUNGE_PATH_LIST
1967_LT_PREPARE_CC_BASENAME
1968
1969# ### END FUNCTIONS SHARED WITH CONFIGURE
1970
1971_LT_EOF
1972
1973  case $host_os in
1974  aix3*)
1975    cat <<\_LT_EOF >> "$cfgfile"
1976# AIX sometimes has problems with the GCC collect2 program.  For some
1977# reason, if we set the COLLECT_NAMES environment variable, the problems
1978# vanish in a puff of smoke.
1979if test set != "${COLLECT_NAMES+set}"; then
1980  COLLECT_NAMES=
1981  export COLLECT_NAMES
1982fi
1983_LT_EOF
1984    ;;
1985  esac
1986
1987  _LT_PROG_LTMAIN
1988
1989  # We use sed instead of cat because bash on DJGPP gets confused if
1990  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1991  # text mode, it properly converts lines to CR/LF.  This bash problem
1992  # is reportedly fixed, but why not run on old versions too?
1993  sed '$q' "$ltmain" >> "$cfgfile" \
1994     || (rm -f "$cfgfile"; exit 1)
1995
1996   mv -f "$cfgfile" "$ofile" ||
1997    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1998  chmod +x "$ofile"
1999],
2000[cat <<_LT_EOF >> "$ofile"
2001
2002dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2003dnl in a comment (ie after a #).
2004# ### BEGIN LIBTOOL TAG CONFIG: $1
2005_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2006# ### END LIBTOOL TAG CONFIG: $1
2007_LT_EOF
2008])dnl /m4_if
2009],
2010[m4_if([$1], [], [
2011    PACKAGE='$PACKAGE'
2012    VERSION='$VERSION'
2013    RM='$RM'
2014    ofile='$ofile'], [])
2015])dnl /_LT_CONFIG_SAVE_COMMANDS
2016])# _LT_CONFIG
2017
2018
2019# LT_SUPPORTED_TAG(TAG)
2020# ---------------------
2021# Trace this macro to discover what tags are supported by the libtool
2022# --tag option, using:
2023#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2024AC_DEFUN([LT_SUPPORTED_TAG], [])
2025
2026
2027# C support is built-in for now
2028m4_define([_LT_LANG_C_enabled], [])
2029m4_define([_LT_TAGS], [])
2030
2031
2032# LT_LANG(LANG)
2033# -------------
2034# Enable libtool support for the given language if not already enabled.
2035AC_DEFUN([LT_LANG],
2036[AC_BEFORE([$0], [LT_OUTPUT])dnl
2037m4_case([$1],
2038  [C],			[_LT_LANG(C)],
2039  [C++],		[_LT_LANG(CXX)],
2040  [Go],			[_LT_LANG(GO)],
2041  [Java],		[_LT_LANG(GCJ)],
2042  [Fortran 77],		[_LT_LANG(F77)],
2043  [Fortran],		[_LT_LANG(FC)],
2044  [Windows Resource],	[_LT_LANG(RC)],
2045  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2046    [_LT_LANG($1)],
2047    [m4_fatal([$0: unsupported language: "$1"])])])dnl
2048])# LT_LANG
2049
2050
2051# _LT_LANG(LANGNAME)
2052# ------------------
2053m4_defun([_LT_LANG],
2054[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2055  [LT_SUPPORTED_TAG([$1])dnl
2056  m4_append([_LT_TAGS], [$1 ])dnl
2057  m4_define([_LT_LANG_]$1[_enabled], [])dnl
2058  _LT_LANG_$1_CONFIG($1)])dnl
2059])# _LT_LANG
2060
2061
2062m4_ifndef([AC_PROG_GO], [
2063# NOTE: This macro has been submitted for inclusion into   #
2064#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
2065#  a released version of Autoconf we should remove this    #
2066#  macro and use it instead.                               #
2067m4_defun([AC_PROG_GO],
2068[AC_LANG_PUSH(Go)dnl
2069AC_ARG_VAR([GOC],     [Go compiler command])dnl
2070AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
2071_AC_ARG_VAR_LDFLAGS()dnl
2072AC_CHECK_TOOL(GOC, gccgo)
2073if test -z "$GOC"; then
2074  if test -n "$ac_tool_prefix"; then
2075    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
2076  fi
2077fi
2078if test -z "$GOC"; then
2079  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
2080fi
2081])#m4_defun
2082])#m4_ifndef
2083
2084
2085# _LT_LANG_DEFAULT_CONFIG
2086# -----------------------
2087m4_defun([_LT_LANG_DEFAULT_CONFIG],
2088[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2089  [LT_LANG(CXX)],
2090  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2091
2092AC_PROVIDE_IFELSE([AC_PROG_F77],
2093  [LT_LANG(F77)],
2094  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2095
2096AC_PROVIDE_IFELSE([AC_PROG_FC],
2097  [LT_LANG(FC)],
2098  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2099
2100dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2101dnl pulling things in needlessly.
2102AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2103  [LT_LANG(GCJ)],
2104  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2105    [LT_LANG(GCJ)],
2106    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2107      [LT_LANG(GCJ)],
2108      [m4_ifdef([AC_PROG_GCJ],
2109	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2110       m4_ifdef([A][M_PROG_GCJ],
2111	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2112       m4_ifdef([LT_PROG_GCJ],
2113	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2114
2115AC_PROVIDE_IFELSE([AC_PROG_GO],
2116  [LT_LANG(GO)],
2117  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2118
2119AC_PROVIDE_IFELSE([LT_PROG_RC],
2120  [LT_LANG(RC)],
2121  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2122])# _LT_LANG_DEFAULT_CONFIG
2123
2124# Obsolete macros:
2125AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2126AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2127AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2128AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2129AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2130dnl aclocal-1.4 backwards compatibility:
2131dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2132dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2133dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2134dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2135dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2136
2137
2138# _LT_TAG_COMPILER
2139# ----------------
2140m4_defun([_LT_TAG_COMPILER],
2141[AC_REQUIRE([AC_PROG_CC])dnl
2142
2143_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2144_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2145_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2146_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2147
2148# If no C compiler was specified, use CC.
2149LTCC=${LTCC-"$CC"}
2150
2151# If no C compiler flags were specified, use CFLAGS.
2152LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2153
2154# Allow CC to be a program name with arguments.
2155compiler=$CC
2156])# _LT_TAG_COMPILER
2157
2158
2159# _LT_COMPILER_BOILERPLATE
2160# ------------------------
2161# Check for compiler boilerplate output or warnings with
2162# the simple compiler test code.
2163m4_defun([_LT_COMPILER_BOILERPLATE],
2164[m4_require([_LT_DECL_SED])dnl
2165ac_outfile=conftest.$ac_objext
2166echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2167eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2168_lt_compiler_boilerplate=`cat conftest.err`
2169$RM conftest*
2170])# _LT_COMPILER_BOILERPLATE
2171
2172
2173# _LT_LINKER_BOILERPLATE
2174# ----------------------
2175# Check for linker boilerplate output or warnings with
2176# the simple link test code.
2177m4_defun([_LT_LINKER_BOILERPLATE],
2178[m4_require([_LT_DECL_SED])dnl
2179ac_outfile=conftest.$ac_objext
2180echo "$lt_simple_link_test_code" >conftest.$ac_ext
2181eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2182_lt_linker_boilerplate=`cat conftest.err`
2183$RM -r conftest*
2184])# _LT_LINKER_BOILERPLATE
2185
2186# _LT_REQUIRED_DARWIN_CHECKS
2187# -------------------------
2188m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2189  case $host_os in
2190    rhapsody* | darwin*)
2191    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2192    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2193    AC_CHECK_TOOL([LIPO], [lipo], [:])
2194    AC_CHECK_TOOL([OTOOL], [otool], [:])
2195    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2196    _LT_DECL([], [DSYMUTIL], [1],
2197      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2198    _LT_DECL([], [NMEDIT], [1],
2199      [Tool to change global to local symbols on Mac OS X])
2200    _LT_DECL([], [LIPO], [1],
2201      [Tool to manipulate fat objects and archives on Mac OS X])
2202    _LT_DECL([], [OTOOL], [1],
2203      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2204    _LT_DECL([], [OTOOL64], [1],
2205      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2206
2207    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2208      [lt_cv_apple_cc_single_mod=no
2209      if test -z "$LT_MULTI_MODULE"; then
2210	# By default we will add the -single_module flag. You can override
2211	# by either setting the environment variable LT_MULTI_MODULE
2212	# non-empty at configure time, or by adding -multi_module to the
2213	# link flags.
2214	rm -rf libconftest.dylib*
2215	echo "int foo(void){return 1;}" > conftest.c
2216	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2217-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2218	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2219	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2220        _lt_result=$?
2221	# If there is a non-empty error log, and "single_module"
2222	# appears in it, assume the flag caused a linker warning
2223        if test -s conftest.err && $GREP single_module conftest.err; then
2224	  cat conftest.err >&AS_MESSAGE_LOG_FD
2225	# Otherwise, if the output was created with a 0 exit code from
2226	# the compiler, it worked.
2227	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
2228	  lt_cv_apple_cc_single_mod=yes
2229	else
2230	  cat conftest.err >&AS_MESSAGE_LOG_FD
2231	fi
2232	rm -rf libconftest.dylib*
2233	rm -f conftest.*
2234      fi])
2235
2236    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2237      [lt_cv_ld_exported_symbols_list],
2238      [lt_cv_ld_exported_symbols_list=no
2239      save_LDFLAGS=$LDFLAGS
2240      echo "_main" > conftest.sym
2241      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2242      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2243	[lt_cv_ld_exported_symbols_list=yes],
2244	[lt_cv_ld_exported_symbols_list=no])
2245	LDFLAGS=$save_LDFLAGS
2246    ])
2247
2248    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2249      [lt_cv_ld_force_load=no
2250      cat > conftest.c << _LT_EOF
2251int forced_loaded() { return 2;}
2252_LT_EOF
2253      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2254      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2255      echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2256      $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2257      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2258      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2259      cat > conftest.c << _LT_EOF
2260int main() { return 0;}
2261_LT_EOF
2262      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2263      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2264      _lt_result=$?
2265      if test -s conftest.err && $GREP force_load conftest.err; then
2266	cat conftest.err >&AS_MESSAGE_LOG_FD
2267      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
2268	lt_cv_ld_force_load=yes
2269      else
2270	cat conftest.err >&AS_MESSAGE_LOG_FD
2271      fi
2272        rm -f conftest.err libconftest.a conftest conftest.c
2273        rm -rf conftest.dSYM
2274    ])
2275    case $host_os in
2276    rhapsody* | darwin1.[[012]])
2277      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
2278    darwin1.*)
2279      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
2280    darwin*) # darwin 5.x on
2281      # if running on 10.5 or later, the deployment target defaults
2282      # to the OS version, if on x86, and 10.4, the deployment
2283      # target defaults to 10.4. Don't you love it?
2284      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2285	10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
2286	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
2287	10.[[012]][[,.]]*)
2288	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
2289	10.*|11.*)
2290	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
2291      esac
2292    ;;
2293  esac
2294    if test yes = "$lt_cv_apple_cc_single_mod"; then
2295      _lt_dar_single_mod='$single_module'
2296    fi
2297    if test yes = "$lt_cv_ld_exported_symbols_list"; then
2298      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
2299    else
2300      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
2301    fi
2302    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
2303      _lt_dsymutil='~$DSYMUTIL $lib || :'
2304    else
2305      _lt_dsymutil=
2306    fi
2307    ;;
2308  esac
2309])
2310
2311
2312# _LT_DARWIN_LINKER_FEATURES([TAG])
2313# ---------------------------------
2314# Checks for linker and compiler features on darwin
2315m4_defun([_LT_DARWIN_LINKER_FEATURES],
2316[
2317  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2318  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2319  _LT_TAGVAR(hardcode_direct, $1)=no
2320  _LT_TAGVAR(hardcode_automatic, $1)=yes
2321  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2322  if test yes = "$lt_cv_ld_force_load"; then
2323    _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\"`'
2324    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2325                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2326  else
2327    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2328  fi
2329  _LT_TAGVAR(link_all_deplibs, $1)=yes
2330  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
2331  case $cc_basename in
2332     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
2333     *) _lt_dar_can_shared=$GCC ;;
2334  esac
2335  if test yes = "$_lt_dar_can_shared"; then
2336    output_verbose_link_cmd=func_echo_all
2337    _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"
2338    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
2339    _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"
2340    _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"
2341    m4_if([$1], [CXX],
2342[   if test yes != "$lt_cv_apple_cc_single_mod"; then
2343      _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"
2344      _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"
2345    fi
2346],[])
2347  else
2348  _LT_TAGVAR(ld_shlibs, $1)=no
2349  fi
2350])
2351
2352# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2353# ----------------------------------
2354# Links a minimal program and checks the executable
2355# for the system default hardcoded library path. In most cases,
2356# this is /usr/lib:/lib, but when the MPI compilers are used
2357# the location of the communication and MPI libs are included too.
2358# If we don't find anything, use the default library path according
2359# to the aix ld manual.
2360# Store the results from the different compilers for each TAGNAME.
2361# Allow to override them for all tags through lt_cv_aix_libpath.
2362m4_defun([_LT_SYS_MODULE_PATH_AIX],
2363[m4_require([_LT_DECL_SED])dnl
2364if test set = "${lt_cv_aix_libpath+set}"; then
2365  aix_libpath=$lt_cv_aix_libpath
2366else
2367  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2368  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2369  lt_aix_libpath_sed='[
2370      /Import File Strings/,/^$/ {
2371	  /^0/ {
2372	      s/^0  *\([^ ]*\) *$/\1/
2373	      p
2374	  }
2375      }]'
2376  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2377  # Check for a 64-bit object if we didn't find anything.
2378  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2379    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2380  fi],[])
2381  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2382    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
2383  fi
2384  ])
2385  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2386fi
2387])# _LT_SYS_MODULE_PATH_AIX
2388
2389
2390# _LT_SHELL_INIT(ARG)
2391# -------------------
2392m4_define([_LT_SHELL_INIT],
2393[m4_divert_text([M4SH-INIT], [$1
2394])])# _LT_SHELL_INIT
2395
2396
2397
2398# _LT_PROG_ECHO_BACKSLASH
2399# -----------------------
2400# Find how we can fake an echo command that does not interpret backslash.
2401# In particular, with Autoconf 2.60 or later we add some code to the start
2402# of the generated configure script that will find a shell with a builtin
2403# printf (that we can use as an echo command).
2404m4_defun([_LT_PROG_ECHO_BACKSLASH],
2405[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2406ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2407ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2408
2409AC_MSG_CHECKING([how to print strings])
2410# Test print first, because it will be a builtin if present.
2411if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2412   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2413  ECHO='print -r --'
2414elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2415  ECHO='printf %s\n'
2416else
2417  # Use this function as a fallback that always works.
2418  func_fallback_echo ()
2419  {
2420    eval 'cat <<_LTECHO_EOF
2421$[]1
2422_LTECHO_EOF'
2423  }
2424  ECHO='func_fallback_echo'
2425fi
2426
2427# func_echo_all arg...
2428# Invoke $ECHO with all args, space-separated.
2429func_echo_all ()
2430{
2431    $ECHO "$*"
2432}
2433
2434case $ECHO in
2435  printf*) AC_MSG_RESULT([printf]) ;;
2436  print*) AC_MSG_RESULT([print -r]) ;;
2437  *) AC_MSG_RESULT([cat]) ;;
2438esac
2439
2440m4_ifdef([_AS_DETECT_SUGGESTED],
2441[_AS_DETECT_SUGGESTED([
2442  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2443    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2444    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2445    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2446    PATH=/empty FPATH=/empty; export PATH FPATH
2447    test "X`printf %s $ECHO`" = "X$ECHO" \
2448      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2449
2450_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2451_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2452])# _LT_PROG_ECHO_BACKSLASH
2453
2454
2455# _LT_WITH_SYSROOT
2456# ----------------
2457AC_DEFUN([_LT_WITH_SYSROOT],
2458[AC_MSG_CHECKING([for sysroot])
2459AC_ARG_WITH([sysroot],
2460[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
2461  [Search for dependent libraries within DIR (or the compiler's sysroot
2462   if not specified).])],
2463[], [with_sysroot=no])
2464
2465dnl lt_sysroot will always be passed unquoted.  We quote it here
2466dnl in case the user passed a directory name.
2467lt_sysroot=
2468case $with_sysroot in #(
2469 yes)
2470   if test yes = "$GCC"; then
2471     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2472   fi
2473   ;; #(
2474 /*)
2475   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2476   ;; #(
2477 no|'')
2478   ;; #(
2479 *)
2480   AC_MSG_RESULT([$with_sysroot])
2481   AC_MSG_ERROR([The sysroot must be an absolute path.])
2482   ;;
2483esac
2484
2485 AC_MSG_RESULT([${lt_sysroot:-no}])
2486_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2487[dependent libraries, and where our libraries should be installed.])])
2488
2489# _LT_ENABLE_LOCK
2490# ---------------
2491m4_defun([_LT_ENABLE_LOCK],
2492[AC_ARG_ENABLE([libtool-lock],
2493  [AS_HELP_STRING([--disable-libtool-lock],
2494    [avoid locking (might break parallel builds)])])
2495test no = "$enable_libtool_lock" || enable_libtool_lock=yes
2496
2497# Some flags need to be propagated to the compiler or linker for good
2498# libtool support.
2499case $host in
2500ia64-*-hpux*)
2501  # Find out what ABI is being produced by ac_compile, and set mode
2502  # options accordingly.
2503  echo 'int i;' > conftest.$ac_ext
2504  if AC_TRY_EVAL(ac_compile); then
2505    case `/usr/bin/file conftest.$ac_objext` in
2506      *ELF-32*)
2507	HPUX_IA64_MODE=32
2508	;;
2509      *ELF-64*)
2510	HPUX_IA64_MODE=64
2511	;;
2512    esac
2513  fi
2514  rm -rf conftest*
2515  ;;
2516*-*-irix6*)
2517  # Find out what ABI is being produced by ac_compile, and set linker
2518  # options accordingly.
2519  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2520  if AC_TRY_EVAL(ac_compile); then
2521    if test yes = "$lt_cv_prog_gnu_ld"; then
2522      case `/usr/bin/file conftest.$ac_objext` in
2523	*32-bit*)
2524	  LD="${LD-ld} -melf32bsmip"
2525	  ;;
2526	*N32*)
2527	  LD="${LD-ld} -melf32bmipn32"
2528	  ;;
2529	*64-bit*)
2530	  LD="${LD-ld} -melf64bmip"
2531	;;
2532      esac
2533    else
2534      case `/usr/bin/file conftest.$ac_objext` in
2535	*32-bit*)
2536	  LD="${LD-ld} -32"
2537	  ;;
2538	*N32*)
2539	  LD="${LD-ld} -n32"
2540	  ;;
2541	*64-bit*)
2542	  LD="${LD-ld} -64"
2543	  ;;
2544      esac
2545    fi
2546  fi
2547  rm -rf conftest*
2548  ;;
2549
2550mips64*-*linux*)
2551  # Find out what ABI is being produced by ac_compile, and set linker
2552  # options accordingly.
2553  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2554  if AC_TRY_EVAL(ac_compile); then
2555    emul=elf
2556    case `/usr/bin/file conftest.$ac_objext` in
2557      *32-bit*)
2558	emul="${emul}32"
2559	;;
2560      *64-bit*)
2561	emul="${emul}64"
2562	;;
2563    esac
2564    case `/usr/bin/file conftest.$ac_objext` in
2565      *MSB*)
2566	emul="${emul}btsmip"
2567	;;
2568      *LSB*)
2569	emul="${emul}ltsmip"
2570	;;
2571    esac
2572    case `/usr/bin/file conftest.$ac_objext` in
2573      *N32*)
2574	emul="${emul}n32"
2575	;;
2576    esac
2577    LD="${LD-ld} -m $emul"
2578  fi
2579  rm -rf conftest*
2580  ;;
2581
2582x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
2583s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2584  # Find out what ABI is being produced by ac_compile, and set linker
2585  # options accordingly.  Note that the listed cases only cover the
2586  # situations where additional linker options are needed (such as when
2587  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
2588  # vice versa); the common cases where no linker options are needed do
2589  # not appear in the list.
2590  echo 'int i;' > conftest.$ac_ext
2591  if AC_TRY_EVAL(ac_compile); then
2592    case `/usr/bin/file conftest.o` in
2593      *32-bit*)
2594	case $host in
2595	  x86_64-*kfreebsd*-gnu)
2596	    LD="${LD-ld} -m elf_i386_fbsd"
2597	    ;;
2598	  x86_64-*linux*)
2599	    case `/usr/bin/file conftest.o` in
2600	      *x86-64*)
2601		LD="${LD-ld} -m elf32_x86_64"
2602		;;
2603	      *)
2604		LD="${LD-ld} -m elf_i386"
2605		;;
2606	    esac
2607	    ;;
2608	  powerpc64le-*linux*)
2609	    LD="${LD-ld} -m elf32lppclinux"
2610	    ;;
2611	  powerpc64-*linux*)
2612	    LD="${LD-ld} -m elf32ppclinux"
2613	    ;;
2614	  s390x-*linux*)
2615	    LD="${LD-ld} -m elf_s390"
2616	    ;;
2617	  sparc64-*linux*)
2618	    LD="${LD-ld} -m elf32_sparc"
2619	    ;;
2620	esac
2621	;;
2622      *64-bit*)
2623	case $host in
2624	  x86_64-*kfreebsd*-gnu)
2625	    LD="${LD-ld} -m elf_x86_64_fbsd"
2626	    ;;
2627	  x86_64-*linux*)
2628	    LD="${LD-ld} -m elf_x86_64"
2629	    ;;
2630	  powerpcle-*linux*)
2631	    LD="${LD-ld} -m elf64lppc"
2632	    ;;
2633	  powerpc-*linux*)
2634	    LD="${LD-ld} -m elf64ppc"
2635	    ;;
2636	  s390*-*linux*|s390*-*tpf*)
2637	    LD="${LD-ld} -m elf64_s390"
2638	    ;;
2639	  sparc*-*linux*)
2640	    LD="${LD-ld} -m elf64_sparc"
2641	    ;;
2642	esac
2643	;;
2644    esac
2645  fi
2646  rm -rf conftest*
2647  ;;
2648
2649*-*-sco3.2v5*)
2650  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2651  SAVE_CFLAGS=$CFLAGS
2652  CFLAGS="$CFLAGS -belf"
2653  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2654    [AC_LANG_PUSH(C)
2655     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2656     AC_LANG_POP])
2657  if test yes != "$lt_cv_cc_needs_belf"; then
2658    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2659    CFLAGS=$SAVE_CFLAGS
2660  fi
2661  ;;
2662*-*solaris*)
2663  # Find out what ABI is being produced by ac_compile, and set linker
2664  # options accordingly.
2665  echo 'int i;' > conftest.$ac_ext
2666  if AC_TRY_EVAL(ac_compile); then
2667    case `/usr/bin/file conftest.o` in
2668    *64-bit*)
2669      case $lt_cv_prog_gnu_ld in
2670      yes*)
2671        case $host in
2672        i?86-*-solaris*|x86_64-*-solaris*)
2673          LD="${LD-ld} -m elf_x86_64"
2674          ;;
2675        sparc*-*-solaris*)
2676          LD="${LD-ld} -m elf64_sparc"
2677          ;;
2678        esac
2679        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2680        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2681          LD=${LD-ld}_sol2
2682        fi
2683        ;;
2684      *)
2685	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2686	  LD="${LD-ld} -64"
2687	fi
2688	;;
2689      esac
2690      ;;
2691    esac
2692  fi
2693  rm -rf conftest*
2694  ;;
2695esac
2696
2697need_locks=$enable_libtool_lock
2698])# _LT_ENABLE_LOCK
2699
2700
2701# _LT_PROG_AR
2702# -----------
2703m4_defun([_LT_PROG_AR],
2704[AC_CHECK_TOOLS(AR, [ar], false)
2705: ${AR=ar}
2706: ${AR_FLAGS=cr}
2707_LT_DECL([], [AR], [1], [The archiver])
2708_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2709
2710AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2711  [lt_cv_ar_at_file=no
2712   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2713     [echo conftest.$ac_objext > conftest.lst
2714      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2715      AC_TRY_EVAL([lt_ar_try])
2716      if test 0 -eq "$ac_status"; then
2717	# Ensure the archiver fails upon bogus file names.
2718	rm -f conftest.$ac_objext libconftest.a
2719	AC_TRY_EVAL([lt_ar_try])
2720	if test 0 -ne "$ac_status"; then
2721          lt_cv_ar_at_file=@
2722        fi
2723      fi
2724      rm -f conftest.* libconftest.a
2725     ])
2726  ])
2727
2728if test no = "$lt_cv_ar_at_file"; then
2729  archiver_list_spec=
2730else
2731  archiver_list_spec=$lt_cv_ar_at_file
2732fi
2733_LT_DECL([], [archiver_list_spec], [1],
2734  [How to feed a file listing to the archiver])
2735])# _LT_PROG_AR
2736
2737
2738# _LT_CMD_OLD_ARCHIVE
2739# -------------------
2740m4_defun([_LT_CMD_OLD_ARCHIVE],
2741[_LT_PROG_AR
2742
2743AC_CHECK_TOOL(STRIP, strip, :)
2744test -z "$STRIP" && STRIP=:
2745_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2746
2747AC_CHECK_TOOL(RANLIB, ranlib, :)
2748test -z "$RANLIB" && RANLIB=:
2749_LT_DECL([], [RANLIB], [1],
2750    [Commands used to install an old-style archive])
2751
2752# Determine commands to create old-style static archives.
2753old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2754old_postinstall_cmds='chmod 644 $oldlib'
2755old_postuninstall_cmds=
2756
2757if test -n "$RANLIB"; then
2758  case $host_os in
2759  bitrig* | openbsd*)
2760    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2761    ;;
2762  *)
2763    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2764    ;;
2765  esac
2766  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2767fi
2768
2769case $host_os in
2770  darwin*)
2771    lock_old_archive_extraction=yes ;;
2772  *)
2773    lock_old_archive_extraction=no ;;
2774esac
2775_LT_DECL([], [old_postinstall_cmds], [2])
2776_LT_DECL([], [old_postuninstall_cmds], [2])
2777_LT_TAGDECL([], [old_archive_cmds], [2],
2778    [Commands used to build an old-style archive])
2779_LT_DECL([], [lock_old_archive_extraction], [0],
2780    [Whether to use a lock for old archive extraction])
2781])# _LT_CMD_OLD_ARCHIVE
2782
2783
2784# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2785#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2786# ----------------------------------------------------------------
2787# Check whether the given compiler option works
2788AC_DEFUN([_LT_COMPILER_OPTION],
2789[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2790m4_require([_LT_DECL_SED])dnl
2791AC_CACHE_CHECK([$1], [$2],
2792  [$2=no
2793   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2794   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2795   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
2796   # Insert the option either (1) after the last *FLAGS variable, or
2797   # (2) before a word containing "conftest.", or (3) at the end.
2798   # Note that $ac_compile itself does not contain backslashes and begins
2799   # with a dollar sign (not a hyphen), so the echo should work correctly.
2800   # The option is referenced via a variable to avoid confusing sed.
2801   lt_compile=`echo "$ac_compile" | $SED \
2802   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2803   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2804   -e 's:$: $lt_compiler_flag:'`
2805   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2806   (eval "$lt_compile" 2>conftest.err)
2807   ac_status=$?
2808   cat conftest.err >&AS_MESSAGE_LOG_FD
2809   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2810   if (exit $ac_status) && test -s "$ac_outfile"; then
2811     # The compiler can only warn and ignore the option if not recognized
2812     # So say no if there are warnings other than the usual output.
2813     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2814     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2815     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2816       $2=yes
2817     fi
2818   fi
2819   $RM conftest*
2820])
2821
2822if test yes = "[$]$2"; then
2823    m4_if([$5], , :, [$5])
2824else
2825    m4_if([$6], , :, [$6])
2826fi
2827])# _LT_COMPILER_OPTION
2828
2829# Old name:
2830AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2831dnl aclocal-1.4 backwards compatibility:
2832dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2833
2834
2835# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2836#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2837# ----------------------------------------------------
2838# Check whether the given linker option works
2839AC_DEFUN([_LT_LINKER_OPTION],
2840[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2841m4_require([_LT_DECL_SED])dnl
2842AC_CACHE_CHECK([$1], [$2],
2843  [$2=no
2844   save_LDFLAGS=$LDFLAGS
2845   LDFLAGS="$LDFLAGS $3"
2846   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2847   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2848     # The linker can only warn and ignore the option if not recognized
2849     # So say no if there are warnings
2850     if test -s conftest.err; then
2851       # Append any errors to the config.log.
2852       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2853       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2854       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2855       if diff conftest.exp conftest.er2 >/dev/null; then
2856         $2=yes
2857       fi
2858     else
2859       $2=yes
2860     fi
2861   fi
2862   $RM -r conftest*
2863   LDFLAGS=$save_LDFLAGS
2864])
2865
2866if test yes = "[$]$2"; then
2867    m4_if([$4], , :, [$4])
2868else
2869    m4_if([$5], , :, [$5])
2870fi
2871])# _LT_LINKER_OPTION
2872
2873# Old name:
2874AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2875dnl aclocal-1.4 backwards compatibility:
2876dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2877
2878
2879# LT_CMD_MAX_LEN
2880#---------------
2881AC_DEFUN([LT_CMD_MAX_LEN],
2882[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2883# find the maximum length of command line arguments
2884AC_MSG_CHECKING([the maximum length of command line arguments])
2885AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2886  i=0
2887  teststring=ABCD
2888
2889  case $build_os in
2890  msdosdjgpp*)
2891    # On DJGPP, this test can blow up pretty badly due to problems in libc
2892    # (any single argument exceeding 2000 bytes causes a buffer overrun
2893    # during glob expansion).  Even if it were fixed, the result of this
2894    # check would be larger than it should be.
2895    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2896    ;;
2897
2898  gnu*)
2899    # Under GNU Hurd, this test is not required because there is
2900    # no limit to the length of command line arguments.
2901    # Libtool will interpret -1 as no limit whatsoever
2902    lt_cv_sys_max_cmd_len=-1;
2903    ;;
2904
2905  cygwin* | mingw* | cegcc*)
2906    # On Win9x/ME, this test blows up -- it succeeds, but takes
2907    # about 5 minutes as the teststring grows exponentially.
2908    # Worse, since 9x/ME are not pre-emptively multitasking,
2909    # you end up with a "frozen" computer, even though with patience
2910    # the test eventually succeeds (with a max line length of 256k).
2911    # Instead, let's just punt: use the minimum linelength reported by
2912    # all of the supported platforms: 8192 (on NT/2K/XP).
2913    lt_cv_sys_max_cmd_len=8192;
2914    ;;
2915
2916  mint*)
2917    # On MiNT this can take a long time and run out of memory.
2918    lt_cv_sys_max_cmd_len=8192;
2919    ;;
2920
2921  amigaos*)
2922    # On AmigaOS with pdksh, this test takes hours, literally.
2923    # So we just punt and use a minimum line length of 8192.
2924    lt_cv_sys_max_cmd_len=8192;
2925    ;;
2926
2927  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
2928    # This has been around since 386BSD, at least.  Likely further.
2929    if test -x /sbin/sysctl; then
2930      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2931    elif test -x /usr/sbin/sysctl; then
2932      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2933    else
2934      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2935    fi
2936    # And add a safety zone
2937    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2938    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2939    ;;
2940
2941  interix*)
2942    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2943    lt_cv_sys_max_cmd_len=196608
2944    ;;
2945
2946  os2*)
2947    # The test takes a long time on OS/2.
2948    lt_cv_sys_max_cmd_len=8192
2949    ;;
2950
2951  osf*)
2952    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2953    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2954    # nice to cause kernel panics so lets avoid the loop below.
2955    # First set a reasonable default.
2956    lt_cv_sys_max_cmd_len=16384
2957    #
2958    if test -x /sbin/sysconfig; then
2959      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2960        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2961      esac
2962    fi
2963    ;;
2964  sco3.2v5*)
2965    lt_cv_sys_max_cmd_len=102400
2966    ;;
2967  sysv5* | sco5v6* | sysv4.2uw2*)
2968    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2969    if test -n "$kargmax"; then
2970      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2971    else
2972      lt_cv_sys_max_cmd_len=32768
2973    fi
2974    ;;
2975  *)
2976    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2977    if test -n "$lt_cv_sys_max_cmd_len" && \
2978       test undefined != "$lt_cv_sys_max_cmd_len"; then
2979      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2980      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2981    else
2982      # Make teststring a little bigger before we do anything with it.
2983      # a 1K string should be a reasonable start.
2984      for i in 1 2 3 4 5 6 7 8; do
2985        teststring=$teststring$teststring
2986      done
2987      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2988      # If test is not a shell built-in, we'll probably end up computing a
2989      # maximum length that is only half of the actual maximum length, but
2990      # we can't tell.
2991      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
2992	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2993	      test 17 != "$i" # 1/2 MB should be enough
2994      do
2995        i=`expr $i + 1`
2996        teststring=$teststring$teststring
2997      done
2998      # Only check the string length outside the loop.
2999      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3000      teststring=
3001      # Add a significant safety factor because C++ compilers can tack on
3002      # massive amounts of additional arguments before passing them to the
3003      # linker.  It appears as though 1/2 is a usable value.
3004      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3005    fi
3006    ;;
3007  esac
3008])
3009if test -n "$lt_cv_sys_max_cmd_len"; then
3010  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3011else
3012  AC_MSG_RESULT(none)
3013fi
3014max_cmd_len=$lt_cv_sys_max_cmd_len
3015_LT_DECL([], [max_cmd_len], [0],
3016    [What is the maximum length of a command?])
3017])# LT_CMD_MAX_LEN
3018
3019# Old name:
3020AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3021dnl aclocal-1.4 backwards compatibility:
3022dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3023
3024
3025# _LT_HEADER_DLFCN
3026# ----------------
3027m4_defun([_LT_HEADER_DLFCN],
3028[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3029])# _LT_HEADER_DLFCN
3030
3031
3032# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3033#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3034# ----------------------------------------------------------------
3035m4_defun([_LT_TRY_DLOPEN_SELF],
3036[m4_require([_LT_HEADER_DLFCN])dnl
3037if test yes = "$cross_compiling"; then :
3038  [$4]
3039else
3040  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3041  lt_status=$lt_dlunknown
3042  cat > conftest.$ac_ext <<_LT_EOF
3043[#line $LINENO "configure"
3044#include "confdefs.h"
3045
3046#if HAVE_DLFCN_H
3047#include <dlfcn.h>
3048#endif
3049
3050#include <stdio.h>
3051
3052#ifdef RTLD_GLOBAL
3053#  define LT_DLGLOBAL		RTLD_GLOBAL
3054#else
3055#  ifdef DL_GLOBAL
3056#    define LT_DLGLOBAL		DL_GLOBAL
3057#  else
3058#    define LT_DLGLOBAL		0
3059#  endif
3060#endif
3061
3062/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3063   find out it does not work in some platform. */
3064#ifndef LT_DLLAZY_OR_NOW
3065#  ifdef RTLD_LAZY
3066#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3067#  else
3068#    ifdef DL_LAZY
3069#      define LT_DLLAZY_OR_NOW		DL_LAZY
3070#    else
3071#      ifdef RTLD_NOW
3072#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3073#      else
3074#        ifdef DL_NOW
3075#          define LT_DLLAZY_OR_NOW	DL_NOW
3076#        else
3077#          define LT_DLLAZY_OR_NOW	0
3078#        endif
3079#      endif
3080#    endif
3081#  endif
3082#endif
3083
3084/* When -fvisibility=hidden is used, assume the code has been annotated
3085   correspondingly for the symbols needed.  */
3086#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3087int fnord () __attribute__((visibility("default")));
3088#endif
3089
3090int fnord () { return 42; }
3091int main ()
3092{
3093  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3094  int status = $lt_dlunknown;
3095
3096  if (self)
3097    {
3098      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3099      else
3100        {
3101	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
3102          else puts (dlerror ());
3103	}
3104      /* dlclose (self); */
3105    }
3106  else
3107    puts (dlerror ());
3108
3109  return status;
3110}]
3111_LT_EOF
3112  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
3113    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3114    lt_status=$?
3115    case x$lt_status in
3116      x$lt_dlno_uscore) $1 ;;
3117      x$lt_dlneed_uscore) $2 ;;
3118      x$lt_dlunknown|x*) $3 ;;
3119    esac
3120  else :
3121    # compilation failed
3122    $3
3123  fi
3124fi
3125rm -fr conftest*
3126])# _LT_TRY_DLOPEN_SELF
3127
3128
3129# LT_SYS_DLOPEN_SELF
3130# ------------------
3131AC_DEFUN([LT_SYS_DLOPEN_SELF],
3132[m4_require([_LT_HEADER_DLFCN])dnl
3133if test yes != "$enable_dlopen"; then
3134  enable_dlopen=unknown
3135  enable_dlopen_self=unknown
3136  enable_dlopen_self_static=unknown
3137else
3138  lt_cv_dlopen=no
3139  lt_cv_dlopen_libs=
3140
3141  case $host_os in
3142  beos*)
3143    lt_cv_dlopen=load_add_on
3144    lt_cv_dlopen_libs=
3145    lt_cv_dlopen_self=yes
3146    ;;
3147
3148  mingw* | pw32* | cegcc*)
3149    lt_cv_dlopen=LoadLibrary
3150    lt_cv_dlopen_libs=
3151    ;;
3152
3153  cygwin*)
3154    lt_cv_dlopen=dlopen
3155    lt_cv_dlopen_libs=
3156    ;;
3157
3158  darwin*)
3159    # if libdl is installed we need to link against it
3160    AC_CHECK_LIB([dl], [dlopen],
3161		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
3162    lt_cv_dlopen=dyld
3163    lt_cv_dlopen_libs=
3164    lt_cv_dlopen_self=yes
3165    ])
3166    ;;
3167
3168  tpf*)
3169    # Don't try to run any link tests for TPF.  We know it's impossible
3170    # because TPF is a cross-compiler, and we know how we open DSOs.
3171    lt_cv_dlopen=dlopen
3172    lt_cv_dlopen_libs=
3173    lt_cv_dlopen_self=no
3174    ;;
3175
3176  *)
3177    AC_CHECK_FUNC([shl_load],
3178	  [lt_cv_dlopen=shl_load],
3179      [AC_CHECK_LIB([dld], [shl_load],
3180	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
3181	[AC_CHECK_FUNC([dlopen],
3182	      [lt_cv_dlopen=dlopen],
3183	  [AC_CHECK_LIB([dl], [dlopen],
3184		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
3185	    [AC_CHECK_LIB([svld], [dlopen],
3186		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
3187	      [AC_CHECK_LIB([dld], [dld_link],
3188		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
3189	      ])
3190	    ])
3191	  ])
3192	])
3193      ])
3194    ;;
3195  esac
3196
3197  if test no = "$lt_cv_dlopen"; then
3198    enable_dlopen=no
3199  else
3200    enable_dlopen=yes
3201  fi
3202
3203  case $lt_cv_dlopen in
3204  dlopen)
3205    save_CPPFLAGS=$CPPFLAGS
3206    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3207
3208    save_LDFLAGS=$LDFLAGS
3209    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3210
3211    save_LIBS=$LIBS
3212    LIBS="$lt_cv_dlopen_libs $LIBS"
3213
3214    AC_CACHE_CHECK([whether a program can dlopen itself],
3215	  lt_cv_dlopen_self, [dnl
3216	  _LT_TRY_DLOPEN_SELF(
3217	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3218	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3219    ])
3220
3221    if test yes = "$lt_cv_dlopen_self"; then
3222      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3223      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3224	  lt_cv_dlopen_self_static, [dnl
3225	  _LT_TRY_DLOPEN_SELF(
3226	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3227	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3228      ])
3229    fi
3230
3231    CPPFLAGS=$save_CPPFLAGS
3232    LDFLAGS=$save_LDFLAGS
3233    LIBS=$save_LIBS
3234    ;;
3235  esac
3236
3237  case $lt_cv_dlopen_self in
3238  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3239  *) enable_dlopen_self=unknown ;;
3240  esac
3241
3242  case $lt_cv_dlopen_self_static in
3243  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3244  *) enable_dlopen_self_static=unknown ;;
3245  esac
3246fi
3247_LT_DECL([dlopen_support], [enable_dlopen], [0],
3248	 [Whether dlopen is supported])
3249_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3250	 [Whether dlopen of programs is supported])
3251_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3252	 [Whether dlopen of statically linked programs is supported])
3253])# LT_SYS_DLOPEN_SELF
3254
3255# Old name:
3256AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3257dnl aclocal-1.4 backwards compatibility:
3258dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3259
3260
3261# _LT_COMPILER_C_O([TAGNAME])
3262# ---------------------------
3263# Check to see if options -c and -o are simultaneously supported by compiler.
3264# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3265m4_defun([_LT_COMPILER_C_O],
3266[m4_require([_LT_DECL_SED])dnl
3267m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3268m4_require([_LT_TAG_COMPILER])dnl
3269AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3270  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3271  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3272   $RM -r conftest 2>/dev/null
3273   mkdir conftest
3274   cd conftest
3275   mkdir out
3276   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3277
3278   lt_compiler_flag="-o out/conftest2.$ac_objext"
3279   # Insert the option either (1) after the last *FLAGS variable, or
3280   # (2) before a word containing "conftest.", or (3) at the end.
3281   # Note that $ac_compile itself does not contain backslashes and begins
3282   # with a dollar sign (not a hyphen), so the echo should work correctly.
3283   lt_compile=`echo "$ac_compile" | $SED \
3284   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3285   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3286   -e 's:$: $lt_compiler_flag:'`
3287   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3288   (eval "$lt_compile" 2>out/conftest.err)
3289   ac_status=$?
3290   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3291   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3292   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3293   then
3294     # The compiler can only warn and ignore the option if not recognized
3295     # So say no if there are warnings
3296     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3297     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3298     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3299       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3300     fi
3301   fi
3302   chmod u+w . 2>&AS_MESSAGE_LOG_FD
3303   $RM conftest*
3304   # SGI C++ compiler will create directory out/ii_files/ for
3305   # template instantiation
3306   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3307   $RM out/* && rmdir out
3308   cd ..
3309   $RM -r conftest
3310   $RM conftest*
3311])
3312_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3313	[Does compiler simultaneously support -c and -o options?])
3314])# _LT_COMPILER_C_O
3315
3316
3317# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3318# ----------------------------------
3319# Check to see if we can do hard links to lock some files if needed
3320m4_defun([_LT_COMPILER_FILE_LOCKS],
3321[m4_require([_LT_ENABLE_LOCK])dnl
3322m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3323_LT_COMPILER_C_O([$1])
3324
3325hard_links=nottested
3326if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
3327  # do not overwrite the value of need_locks provided by the user
3328  AC_MSG_CHECKING([if we can lock with hard links])
3329  hard_links=yes
3330  $RM conftest*
3331  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3332  touch conftest.a
3333  ln conftest.a conftest.b 2>&5 || hard_links=no
3334  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3335  AC_MSG_RESULT([$hard_links])
3336  if test no = "$hard_links"; then
3337    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
3338    need_locks=warn
3339  fi
3340else
3341  need_locks=no
3342fi
3343_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3344])# _LT_COMPILER_FILE_LOCKS
3345
3346
3347# _LT_CHECK_OBJDIR
3348# ----------------
3349m4_defun([_LT_CHECK_OBJDIR],
3350[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3351[rm -f .libs 2>/dev/null
3352mkdir .libs 2>/dev/null
3353if test -d .libs; then
3354  lt_cv_objdir=.libs
3355else
3356  # MS-DOS does not allow filenames that begin with a dot.
3357  lt_cv_objdir=_libs
3358fi
3359rmdir .libs 2>/dev/null])
3360objdir=$lt_cv_objdir
3361_LT_DECL([], [objdir], [0],
3362         [The name of the directory that contains temporary libtool files])dnl
3363m4_pattern_allow([LT_OBJDIR])dnl
3364AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
3365  [Define to the sub-directory where libtool stores uninstalled libraries.])
3366])# _LT_CHECK_OBJDIR
3367
3368
3369# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3370# --------------------------------------
3371# Check hardcoding attributes.
3372m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3373[AC_MSG_CHECKING([how to hardcode library paths into programs])
3374_LT_TAGVAR(hardcode_action, $1)=
3375if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3376   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3377   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
3378
3379  # We can hardcode non-existent directories.
3380  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
3381     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3382     # have to relink, otherwise we might link with an installed library
3383     # when we should be linking with a yet-to-be-installed one
3384     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
3385     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
3386    # Linking always hardcodes the temporary library directory.
3387    _LT_TAGVAR(hardcode_action, $1)=relink
3388  else
3389    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3390    _LT_TAGVAR(hardcode_action, $1)=immediate
3391  fi
3392else
3393  # We cannot hardcode anything, or else we can only hardcode existing
3394  # directories.
3395  _LT_TAGVAR(hardcode_action, $1)=unsupported
3396fi
3397AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3398
3399if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
3400   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
3401  # Fast installation is not supported
3402  enable_fast_install=no
3403elif test yes = "$shlibpath_overrides_runpath" ||
3404     test no = "$enable_shared"; then
3405  # Fast installation is not necessary
3406  enable_fast_install=needless
3407fi
3408_LT_TAGDECL([], [hardcode_action], [0],
3409    [How to hardcode a shared library path into an executable])
3410])# _LT_LINKER_HARDCODE_LIBPATH
3411
3412
3413# _LT_CMD_STRIPLIB
3414# ----------------
3415m4_defun([_LT_CMD_STRIPLIB],
3416[m4_require([_LT_DECL_EGREP])
3417striplib=
3418old_striplib=
3419AC_MSG_CHECKING([whether stripping libraries is possible])
3420if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3421  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3422  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3423  AC_MSG_RESULT([yes])
3424else
3425# FIXME - insert some real tests, host_os isn't really good enough
3426  case $host_os in
3427  darwin*)
3428    if test -n "$STRIP"; then
3429      striplib="$STRIP -x"
3430      old_striplib="$STRIP -S"
3431      AC_MSG_RESULT([yes])
3432    else
3433      AC_MSG_RESULT([no])
3434    fi
3435    ;;
3436  *)
3437    AC_MSG_RESULT([no])
3438    ;;
3439  esac
3440fi
3441_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3442_LT_DECL([], [striplib], [1])
3443])# _LT_CMD_STRIPLIB
3444
3445
3446# _LT_PREPARE_MUNGE_PATH_LIST
3447# ---------------------------
3448# Make sure func_munge_path_list() is defined correctly.
3449m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
3450[[# func_munge_path_list VARIABLE PATH
3451# -----------------------------------
3452# VARIABLE is name of variable containing _space_ separated list of
3453# directories to be munged by the contents of PATH, which is string
3454# having a format:
3455# "DIR[:DIR]:"
3456#       string "DIR[ DIR]" will be prepended to VARIABLE
3457# ":DIR[:DIR]"
3458#       string "DIR[ DIR]" will be appended to VARIABLE
3459# "DIRP[:DIRP]::[DIRA:]DIRA"
3460#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
3461#       "DIRA[ DIRA]" will be appended to VARIABLE
3462# "DIR[:DIR]"
3463#       VARIABLE will be replaced by "DIR[ DIR]"
3464func_munge_path_list ()
3465{
3466    case x@S|@2 in
3467    x)
3468        ;;
3469    *:)
3470        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
3471        ;;
3472    x:*)
3473        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
3474        ;;
3475    *::*)
3476        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
3477        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
3478        ;;
3479    *)
3480        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
3481        ;;
3482    esac
3483}
3484]])# _LT_PREPARE_PATH_LIST
3485
3486
3487# _LT_SYS_DYNAMIC_LINKER([TAG])
3488# -----------------------------
3489# PORTME Fill in your ld.so characteristics
3490m4_defun([_LT_SYS_DYNAMIC_LINKER],
3491[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3492m4_require([_LT_DECL_EGREP])dnl
3493m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3494m4_require([_LT_DECL_OBJDUMP])dnl
3495m4_require([_LT_DECL_SED])dnl
3496m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3497m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
3498AC_MSG_CHECKING([dynamic linker characteristics])
3499m4_if([$1],
3500	[], [
3501if test yes = "$GCC"; then
3502  case $host_os in
3503    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
3504    *) lt_awk_arg='/^libraries:/' ;;
3505  esac
3506  case $host_os in
3507    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
3508    *) lt_sed_strip_eq='s|=/|/|g' ;;
3509  esac
3510  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3511  case $lt_search_path_spec in
3512  *\;*)
3513    # if the path contains ";" then we assume it to be the separator
3514    # otherwise default to the standard path separator (i.e. ":") - it is
3515    # assumed that no part of a normal pathname contains ";" but that should
3516    # okay in the real world where ";" in dirpaths is itself problematic.
3517    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3518    ;;
3519  *)
3520    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3521    ;;
3522  esac
3523  # Ok, now we have the path, separated by spaces, we can step through it
3524  # and add multilib dir if necessary...
3525  lt_tmp_lt_search_path_spec=
3526  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3527  # ...but if some path component already ends with the multilib dir we assume
3528  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
3529  case "$lt_multi_os_dir; $lt_search_path_spec " in
3530  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
3531    lt_multi_os_dir=
3532    ;;
3533  esac
3534  for lt_sys_path in $lt_search_path_spec; do
3535    if test -d "$lt_sys_path$lt_multi_os_dir"; then
3536      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
3537    elif test -n "$lt_multi_os_dir"; then
3538      test -d "$lt_sys_path" && \
3539	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3540    fi
3541  done
3542  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3543BEGIN {RS = " "; FS = "/|\n";} {
3544  lt_foo = "";
3545  lt_count = 0;
3546  for (lt_i = NF; lt_i > 0; lt_i--) {
3547    if ($lt_i != "" && $lt_i != ".") {
3548      if ($lt_i == "..") {
3549        lt_count++;
3550      } else {
3551        if (lt_count == 0) {
3552          lt_foo = "/" $lt_i lt_foo;
3553        } else {
3554          lt_count--;
3555        }
3556      }
3557    }
3558  }
3559  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3560  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3561}'`
3562  # AWK program above erroneously prepends '/' to C:/dos/paths
3563  # for these hosts.
3564  case $host_os in
3565    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3566      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
3567  esac
3568  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3569else
3570  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3571fi])
3572library_names_spec=
3573libname_spec='lib$name'
3574soname_spec=
3575shrext_cmds=.so
3576postinstall_cmds=
3577postuninstall_cmds=
3578finish_cmds=
3579finish_eval=
3580shlibpath_var=
3581shlibpath_overrides_runpath=unknown
3582version_type=none
3583dynamic_linker="$host_os ld.so"
3584sys_lib_dlsearch_path_spec="/lib /usr/lib"
3585need_lib_prefix=unknown
3586hardcode_into_libs=no
3587
3588# when you set need_version to no, make sure it does not cause -set_version
3589# flags to be left without arguments
3590need_version=unknown
3591
3592AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
3593[User-defined run-time library search path.])
3594
3595case $host_os in
3596aix3*)
3597  version_type=linux # correct to gnu/linux during the next big refactor
3598  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
3599  shlibpath_var=LIBPATH
3600
3601  # AIX 3 has no versioning support, so we append a major version to the name.
3602  soname_spec='$libname$release$shared_ext$major'
3603  ;;
3604
3605aix[[4-9]]*)
3606  version_type=linux # correct to gnu/linux during the next big refactor
3607  need_lib_prefix=no
3608  need_version=no
3609  hardcode_into_libs=yes
3610  if test ia64 = "$host_cpu"; then
3611    # AIX 5 supports IA64
3612    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
3613    shlibpath_var=LD_LIBRARY_PATH
3614  else
3615    # With GCC up to 2.95.x, collect2 would create an import file
3616    # for dependence libraries.  The import file would start with
3617    # the line '#! .'.  This would cause the generated library to
3618    # depend on '.', always an invalid library.  This was fixed in
3619    # development snapshots of GCC prior to 3.0.
3620    case $host_os in
3621      aix4 | aix4.[[01]] | aix4.[[01]].*)
3622      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3623	   echo ' yes '
3624	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
3625	:
3626      else
3627	can_build_shared=no
3628      fi
3629      ;;
3630    esac
3631    # Using Import Files as archive members, it is possible to support
3632    # filename-based versioning of shared library archives on AIX. While
3633    # this would work for both with and without runtime linking, it will
3634    # prevent static linking of such archives. So we do filename-based
3635    # shared library versioning with .so extension only, which is used
3636    # when both runtime linking and shared linking is enabled.
3637    # Unfortunately, runtime linking may impact performance, so we do
3638    # not want this to be the default eventually. Also, we use the
3639    # versioned .so libs for executables only if there is the -brtl
3640    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
3641    # To allow for filename-based versioning support, we need to create
3642    # libNAME.so.V as an archive file, containing:
3643    # *) an Import File, referring to the versioned filename of the
3644    #    archive as well as the shared archive member, telling the
3645    #    bitwidth (32 or 64) of that shared object, and providing the
3646    #    list of exported symbols of that shared object, eventually
3647    #    decorated with the 'weak' keyword
3648    # *) the shared object with the F_LOADONLY flag set, to really avoid
3649    #    it being seen by the linker.
3650    # At run time we better use the real file rather than another symlink,
3651    # but for link time we create the symlink libNAME.so -> libNAME.so.V
3652
3653    case $with_aix_soname,$aix_use_runtimelinking in
3654    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
3655    # soname into executable. Probably we can add versioning support to
3656    # collect2, so additional links can be useful in future.
3657    aix,yes) # traditional libtool
3658      dynamic_linker='AIX unversionable lib.so'
3659      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3660      # instead of lib<name>.a to let people know that these are not
3661      # typical AIX shared libraries.
3662      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3663      ;;
3664    aix,no) # traditional AIX only
3665      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
3666      # We preserve .a as extension for shared libraries through AIX4.2
3667      # and later when we are not doing run time linking.
3668      library_names_spec='$libname$release.a $libname.a'
3669      soname_spec='$libname$release$shared_ext$major'
3670      ;;
3671    svr4,*) # full svr4 only
3672      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
3673      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
3674      # We do not specify a path in Import Files, so LIBPATH fires.
3675      shlibpath_overrides_runpath=yes
3676      ;;
3677    *,yes) # both, prefer svr4
3678      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
3679      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
3680      # unpreferred sharedlib libNAME.a needs extra handling
3681      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
3682      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
3683      # We do not specify a path in Import Files, so LIBPATH fires.
3684      shlibpath_overrides_runpath=yes
3685      ;;
3686    *,no) # both, prefer aix
3687      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
3688      library_names_spec='$libname$release.a $libname.a'
3689      soname_spec='$libname$release$shared_ext$major'
3690      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
3691      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
3692      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
3693      ;;
3694    esac
3695    shlibpath_var=LIBPATH
3696  fi
3697  ;;
3698
3699amigaos*)
3700  case $host_cpu in
3701  powerpc)
3702    # Since July 2007 AmigaOS4 officially supports .so libraries.
3703    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3704    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3705    ;;
3706  m68k)
3707    library_names_spec='$libname.ixlibrary $libname.a'
3708    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3709    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3710    ;;
3711  esac
3712  ;;
3713
3714beos*)
3715  library_names_spec='$libname$shared_ext'
3716  dynamic_linker="$host_os ld.so"
3717  shlibpath_var=LIBRARY_PATH
3718  ;;
3719
3720bsdi[[45]]*)
3721  version_type=linux # correct to gnu/linux during the next big refactor
3722  need_version=no
3723  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3724  soname_spec='$libname$release$shared_ext$major'
3725  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3726  shlibpath_var=LD_LIBRARY_PATH
3727  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3728  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3729  # the default ld.so.conf also contains /usr/contrib/lib and
3730  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3731  # libtool to hard-code these into programs
3732  ;;
3733
3734cygwin* | mingw* | pw32* | cegcc*)
3735  version_type=windows
3736  shrext_cmds=.dll
3737  need_version=no
3738  need_lib_prefix=no
3739
3740  case $GCC,$cc_basename in
3741  yes,*)
3742    # gcc
3743    library_names_spec='$libname.dll.a'
3744    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3745    postinstall_cmds='base_file=`basename \$file`~
3746      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
3747      dldir=$destdir/`dirname \$dlpath`~
3748      test -d \$dldir || mkdir -p \$dldir~
3749      $install_prog $dir/$dlname \$dldir/$dlname~
3750      chmod a+x \$dldir/$dlname~
3751      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3752        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3753      fi'
3754    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3755      dlpath=$dir/\$dldll~
3756       $RM \$dlpath'
3757    shlibpath_overrides_runpath=yes
3758
3759    case $host_os in
3760    cygwin*)
3761      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3762      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
3763m4_if([$1], [],[
3764      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3765      ;;
3766    mingw* | cegcc*)
3767      # MinGW DLLs use traditional 'lib' prefix
3768      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
3769      ;;
3770    pw32*)
3771      # pw32 DLLs use 'pw' prefix rather than 'lib'
3772      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
3773      ;;
3774    esac
3775    dynamic_linker='Win32 ld.exe'
3776    ;;
3777
3778  *,cl*)
3779    # Native MSVC
3780    libname_spec='$name'
3781    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
3782    library_names_spec='$libname.dll.lib'
3783
3784    case $build_os in
3785    mingw*)
3786      sys_lib_search_path_spec=
3787      lt_save_ifs=$IFS
3788      IFS=';'
3789      for lt_path in $LIB
3790      do
3791        IFS=$lt_save_ifs
3792        # Let DOS variable expansion print the short 8.3 style file name.
3793        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3794        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3795      done
3796      IFS=$lt_save_ifs
3797      # Convert to MSYS style.
3798      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3799      ;;
3800    cygwin*)
3801      # Convert to unix form, then to dos form, then back to unix form
3802      # but this time dos style (no spaces!) so that the unix form looks
3803      # like /cygdrive/c/PROGRA~1:/cygdr...
3804      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3805      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3806      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3807      ;;
3808    *)
3809      sys_lib_search_path_spec=$LIB
3810      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3811        # It is most probably a Windows format PATH.
3812        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3813      else
3814        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3815      fi
3816      # FIXME: find the short name or the path components, as spaces are
3817      # common. (e.g. "Program Files" -> "PROGRA~1")
3818      ;;
3819    esac
3820
3821    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3822    postinstall_cmds='base_file=`basename \$file`~
3823      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
3824      dldir=$destdir/`dirname \$dlpath`~
3825      test -d \$dldir || mkdir -p \$dldir~
3826      $install_prog $dir/$dlname \$dldir/$dlname'
3827    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3828      dlpath=$dir/\$dldll~
3829       $RM \$dlpath'
3830    shlibpath_overrides_runpath=yes
3831    dynamic_linker='Win32 link.exe'
3832    ;;
3833
3834  *)
3835    # Assume MSVC wrapper
3836    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
3837    dynamic_linker='Win32 ld.exe'
3838    ;;
3839  esac
3840  # FIXME: first we should search . and the directory the executable is in
3841  shlibpath_var=PATH
3842  ;;
3843
3844darwin* | rhapsody*)
3845  dynamic_linker="$host_os dyld"
3846  version_type=darwin
3847  need_lib_prefix=no
3848  need_version=no
3849  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
3850  soname_spec='$libname$release$major$shared_ext'
3851  shlibpath_overrides_runpath=yes
3852  shlibpath_var=DYLD_LIBRARY_PATH
3853  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3854m4_if([$1], [],[
3855  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3856  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3857  ;;
3858
3859dgux*)
3860  version_type=linux # correct to gnu/linux during the next big refactor
3861  need_lib_prefix=no
3862  need_version=no
3863  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3864  soname_spec='$libname$release$shared_ext$major'
3865  shlibpath_var=LD_LIBRARY_PATH
3866  ;;
3867
3868freebsd* | dragonfly*)
3869  # DragonFly does not have aout.  When/if they implement a new
3870  # versioning mechanism, adjust this.
3871  if test -x /usr/bin/objformat; then
3872    objformat=`/usr/bin/objformat`
3873  else
3874    case $host_os in
3875    freebsd[[23]].*) objformat=aout ;;
3876    *) objformat=elf ;;
3877    esac
3878  fi
3879  version_type=freebsd-$objformat
3880  case $version_type in
3881    freebsd-elf*)
3882      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3883      soname_spec='$libname$release$shared_ext$major'
3884      need_version=no
3885      need_lib_prefix=no
3886      ;;
3887    freebsd-*)
3888      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3889      need_version=yes
3890      ;;
3891  esac
3892  shlibpath_var=LD_LIBRARY_PATH
3893  case $host_os in
3894  freebsd2.*)
3895    shlibpath_overrides_runpath=yes
3896    ;;
3897  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3898    shlibpath_overrides_runpath=yes
3899    hardcode_into_libs=yes
3900    ;;
3901  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3902  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3903    shlibpath_overrides_runpath=no
3904    hardcode_into_libs=yes
3905    ;;
3906  *) # from 4.6 on, and DragonFly
3907    shlibpath_overrides_runpath=yes
3908    hardcode_into_libs=yes
3909    ;;
3910  esac
3911  ;;
3912
3913haiku*)
3914  version_type=linux # correct to gnu/linux during the next big refactor
3915  need_lib_prefix=no
3916  need_version=no
3917  dynamic_linker="$host_os runtime_loader"
3918  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3919  soname_spec='$libname$release$shared_ext$major'
3920  shlibpath_var=LIBRARY_PATH
3921  shlibpath_overrides_runpath=no
3922  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3923  hardcode_into_libs=yes
3924  ;;
3925
3926hpux9* | hpux10* | hpux11*)
3927  # Give a soname corresponding to the major version so that dld.sl refuses to
3928  # link against other versions.
3929  version_type=sunos
3930  need_lib_prefix=no
3931  need_version=no
3932  case $host_cpu in
3933  ia64*)
3934    shrext_cmds='.so'
3935    hardcode_into_libs=yes
3936    dynamic_linker="$host_os dld.so"
3937    shlibpath_var=LD_LIBRARY_PATH
3938    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3939    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3940    soname_spec='$libname$release$shared_ext$major'
3941    if test 32 = "$HPUX_IA64_MODE"; then
3942      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3943      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
3944    else
3945      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3946      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
3947    fi
3948    ;;
3949  hppa*64*)
3950    shrext_cmds='.sl'
3951    hardcode_into_libs=yes
3952    dynamic_linker="$host_os dld.sl"
3953    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3954    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3955    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3956    soname_spec='$libname$release$shared_ext$major'
3957    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3958    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3959    ;;
3960  *)
3961    shrext_cmds='.sl'
3962    dynamic_linker="$host_os dld.sl"
3963    shlibpath_var=SHLIB_PATH
3964    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3965    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3966    soname_spec='$libname$release$shared_ext$major'
3967    ;;
3968  esac
3969  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3970  postinstall_cmds='chmod 555 $lib'
3971  # or fails outright, so override atomically:
3972  install_override_mode=555
3973  ;;
3974
3975interix[[3-9]]*)
3976  version_type=linux # correct to gnu/linux during the next big refactor
3977  need_lib_prefix=no
3978  need_version=no
3979  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3980  soname_spec='$libname$release$shared_ext$major'
3981  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3982  shlibpath_var=LD_LIBRARY_PATH
3983  shlibpath_overrides_runpath=no
3984  hardcode_into_libs=yes
3985  ;;
3986
3987irix5* | irix6* | nonstopux*)
3988  case $host_os in
3989    nonstopux*) version_type=nonstopux ;;
3990    *)
3991	if test yes = "$lt_cv_prog_gnu_ld"; then
3992		version_type=linux # correct to gnu/linux during the next big refactor
3993	else
3994		version_type=irix
3995	fi ;;
3996  esac
3997  need_lib_prefix=no
3998  need_version=no
3999  soname_spec='$libname$release$shared_ext$major'
4000  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
4001  case $host_os in
4002  irix5* | nonstopux*)
4003    libsuff= shlibsuff=
4004    ;;
4005  *)
4006    case $LD in # libtool.m4 will add one of these switches to LD
4007    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4008      libsuff= shlibsuff= libmagic=32-bit;;
4009    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4010      libsuff=32 shlibsuff=N32 libmagic=N32;;
4011    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4012      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4013    *) libsuff= shlibsuff= libmagic=never-match;;
4014    esac
4015    ;;
4016  esac
4017  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4018  shlibpath_overrides_runpath=no
4019  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
4020  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
4021  hardcode_into_libs=yes
4022  ;;
4023
4024# No shared lib support for Linux oldld, aout, or coff.
4025linux*oldld* | linux*aout* | linux*coff*)
4026  dynamic_linker=no
4027  ;;
4028
4029linux*android*)
4030  version_type=none # Android doesn't support versioned libraries.
4031  need_lib_prefix=no
4032  need_version=no
4033  library_names_spec='$libname$release$shared_ext'
4034  soname_spec='$libname$release$shared_ext'
4035  finish_cmds=
4036  shlibpath_var=LD_LIBRARY_PATH
4037  shlibpath_overrides_runpath=yes
4038
4039  # This implies no fast_install, which is unacceptable.
4040  # Some rework will be needed to allow for fast_install
4041  # before this can be enabled.
4042  hardcode_into_libs=yes
4043
4044  dynamic_linker='Android linker'
4045  # Don't embed -rpath directories since the linker doesn't support them.
4046  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4047  ;;
4048
4049# This must be glibc/ELF.
4050linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4051  version_type=linux # correct to gnu/linux during the next big refactor
4052  need_lib_prefix=no
4053  need_version=no
4054  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4055  soname_spec='$libname$release$shared_ext$major'
4056  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4057  shlibpath_var=LD_LIBRARY_PATH
4058  shlibpath_overrides_runpath=no
4059
4060  # Some binutils ld are patched to set DT_RUNPATH
4061  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4062    [lt_cv_shlibpath_overrides_runpath=no
4063    save_LDFLAGS=$LDFLAGS
4064    save_libdir=$libdir
4065    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4066	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4067    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4068      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4069	 [lt_cv_shlibpath_overrides_runpath=yes])])
4070    LDFLAGS=$save_LDFLAGS
4071    libdir=$save_libdir
4072    ])
4073  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4074
4075  # This implies no fast_install, which is unacceptable.
4076  # Some rework will be needed to allow for fast_install
4077  # before this can be enabled.
4078  hardcode_into_libs=yes
4079
4080  # Ideally, we could use ldconfig to report *all* directores which are
4081  # searched for libraries, however this is still not possible.  Aside from not
4082  # being certain /sbin/ldconfig is available, command
4083  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
4084  # even though it is searched at run-time.  Try to do the best guess by
4085  # appending ld.so.conf contents (and includes) to the search path.
4086  if test -f /etc/ld.so.conf; then
4087    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' ' '`
4088    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4089  fi
4090
4091  # We used to test for /lib/ld.so.1 and disable shared libraries on
4092  # powerpc, because MkLinux only supported shared libraries with the
4093  # GNU dynamic linker.  Since this was broken with cross compilers,
4094  # most powerpc-linux boxes support dynamic linking these days and
4095  # people can always --disable-shared, the test was removed, and we
4096  # assume the GNU/Linux dynamic linker is in use.
4097  dynamic_linker='GNU/Linux ld.so'
4098  ;;
4099
4100netbsdelf*-gnu)
4101  version_type=linux
4102  need_lib_prefix=no
4103  need_version=no
4104  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4105  soname_spec='${libname}${release}${shared_ext}$major'
4106  shlibpath_var=LD_LIBRARY_PATH
4107  shlibpath_overrides_runpath=no
4108  hardcode_into_libs=yes
4109  dynamic_linker='NetBSD ld.elf_so'
4110  ;;
4111
4112netbsd*)
4113  version_type=sunos
4114  need_lib_prefix=no
4115  need_version=no
4116  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4117    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4118    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4119    dynamic_linker='NetBSD (a.out) ld.so'
4120  else
4121    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4122    soname_spec='$libname$release$shared_ext$major'
4123    dynamic_linker='NetBSD ld.elf_so'
4124  fi
4125  shlibpath_var=LD_LIBRARY_PATH
4126  shlibpath_overrides_runpath=yes
4127  hardcode_into_libs=yes
4128  ;;
4129
4130newsos6)
4131  version_type=linux # correct to gnu/linux during the next big refactor
4132  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4133  shlibpath_var=LD_LIBRARY_PATH
4134  shlibpath_overrides_runpath=yes
4135  ;;
4136
4137*nto* | *qnx*)
4138  version_type=qnx
4139  need_lib_prefix=no
4140  need_version=no
4141  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4142  soname_spec='$libname$release$shared_ext$major'
4143  shlibpath_var=LD_LIBRARY_PATH
4144  shlibpath_overrides_runpath=no
4145  hardcode_into_libs=yes
4146  dynamic_linker='ldqnx.so'
4147  ;;
4148
4149openbsd* | bitrig*)
4150  version_type=sunos
4151  sys_lib_dlsearch_path_spec=/usr/lib
4152  need_lib_prefix=no
4153  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
4154    need_version=no
4155  else
4156    need_version=yes
4157  fi
4158  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4159  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4160  shlibpath_var=LD_LIBRARY_PATH
4161  shlibpath_overrides_runpath=yes
4162  ;;
4163
4164os2*)
4165  libname_spec='$name'
4166  version_type=windows
4167  shrext_cmds=.dll
4168  need_version=no
4169  need_lib_prefix=no
4170  # OS/2 can only load a DLL with a base name of 8 characters or less.
4171  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
4172    v=$($ECHO $release$versuffix | tr -d .-);
4173    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
4174    $ECHO $n$v`$shared_ext'
4175  library_names_spec='${libname}_dll.$libext'
4176  dynamic_linker='OS/2 ld.exe'
4177  shlibpath_var=BEGINLIBPATH
4178  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4179  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4180  postinstall_cmds='base_file=`basename \$file`~
4181    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
4182    dldir=$destdir/`dirname \$dlpath`~
4183    test -d \$dldir || mkdir -p \$dldir~
4184    $install_prog $dir/$dlname \$dldir/$dlname~
4185    chmod a+x \$dldir/$dlname~
4186    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4187      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4188    fi'
4189  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
4190    dlpath=$dir/\$dldll~
4191    $RM \$dlpath'
4192  ;;
4193
4194osf3* | osf4* | osf5*)
4195  version_type=osf
4196  need_lib_prefix=no
4197  need_version=no
4198  soname_spec='$libname$release$shared_ext$major'
4199  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4200  shlibpath_var=LD_LIBRARY_PATH
4201  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4202  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4203  ;;
4204
4205rdos*)
4206  dynamic_linker=no
4207  ;;
4208
4209solaris*)
4210  version_type=linux # correct to gnu/linux during the next big refactor
4211  need_lib_prefix=no
4212  need_version=no
4213  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4214  soname_spec='$libname$release$shared_ext$major'
4215  shlibpath_var=LD_LIBRARY_PATH
4216  shlibpath_overrides_runpath=yes
4217  hardcode_into_libs=yes
4218  # ldd complains unless libraries are executable
4219  postinstall_cmds='chmod +x $lib'
4220  ;;
4221
4222sunos4*)
4223  version_type=sunos
4224  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4225  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4226  shlibpath_var=LD_LIBRARY_PATH
4227  shlibpath_overrides_runpath=yes
4228  if test yes = "$with_gnu_ld"; then
4229    need_lib_prefix=no
4230  fi
4231  need_version=yes
4232  ;;
4233
4234sysv4 | sysv4.3*)
4235  version_type=linux # correct to gnu/linux during the next big refactor
4236  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4237  soname_spec='$libname$release$shared_ext$major'
4238  shlibpath_var=LD_LIBRARY_PATH
4239  case $host_vendor in
4240    sni)
4241      shlibpath_overrides_runpath=no
4242      need_lib_prefix=no
4243      runpath_var=LD_RUN_PATH
4244      ;;
4245    siemens)
4246      need_lib_prefix=no
4247      ;;
4248    motorola)
4249      need_lib_prefix=no
4250      need_version=no
4251      shlibpath_overrides_runpath=no
4252      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4253      ;;
4254  esac
4255  ;;
4256
4257sysv4*MP*)
4258  if test -d /usr/nec; then
4259    version_type=linux # correct to gnu/linux during the next big refactor
4260    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
4261    soname_spec='$libname$shared_ext.$major'
4262    shlibpath_var=LD_LIBRARY_PATH
4263  fi
4264  ;;
4265
4266sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4267  version_type=sco
4268  need_lib_prefix=no
4269  need_version=no
4270  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
4271  soname_spec='$libname$release$shared_ext$major'
4272  shlibpath_var=LD_LIBRARY_PATH
4273  shlibpath_overrides_runpath=yes
4274  hardcode_into_libs=yes
4275  if test yes = "$with_gnu_ld"; then
4276    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4277  else
4278    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4279    case $host_os in
4280      sco3.2v5*)
4281        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4282	;;
4283    esac
4284  fi
4285  sys_lib_dlsearch_path_spec='/usr/lib'
4286  ;;
4287
4288tpf*)
4289  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4290  version_type=linux # correct to gnu/linux during the next big refactor
4291  need_lib_prefix=no
4292  need_version=no
4293  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4294  shlibpath_var=LD_LIBRARY_PATH
4295  shlibpath_overrides_runpath=no
4296  hardcode_into_libs=yes
4297  ;;
4298
4299uts4*)
4300  version_type=linux # correct to gnu/linux during the next big refactor
4301  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4302  soname_spec='$libname$release$shared_ext$major'
4303  shlibpath_var=LD_LIBRARY_PATH
4304  ;;
4305
4306*)
4307  dynamic_linker=no
4308  ;;
4309esac
4310AC_MSG_RESULT([$dynamic_linker])
4311test no = "$dynamic_linker" && can_build_shared=no
4312
4313variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4314if test yes = "$GCC"; then
4315  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4316fi
4317
4318if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
4319  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
4320fi
4321
4322if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
4323  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
4324fi
4325
4326# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
4327configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
4328
4329# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
4330func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
4331
4332# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
4333configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
4334
4335_LT_DECL([], [variables_saved_for_relink], [1],
4336    [Variables whose values should be saved in libtool wrapper scripts and
4337    restored at link time])
4338_LT_DECL([], [need_lib_prefix], [0],
4339    [Do we need the "lib" prefix for modules?])
4340_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4341_LT_DECL([], [version_type], [0], [Library versioning type])
4342_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4343_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4344_LT_DECL([], [shlibpath_overrides_runpath], [0],
4345    [Is shlibpath searched before the hard-coded library search path?])
4346_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4347_LT_DECL([], [library_names_spec], [1],
4348    [[List of archive names.  First name is the real one, the rest are links.
4349    The last name is the one that the linker finds with -lNAME]])
4350_LT_DECL([], [soname_spec], [1],
4351    [[The coded name of the library, if different from the real name]])
4352_LT_DECL([], [install_override_mode], [1],
4353    [Permission mode override for installation of shared libraries])
4354_LT_DECL([], [postinstall_cmds], [2],
4355    [Command to use after installation of a shared archive])
4356_LT_DECL([], [postuninstall_cmds], [2],
4357    [Command to use after uninstallation of a shared archive])
4358_LT_DECL([], [finish_cmds], [2],
4359    [Commands used to finish a libtool library installation in a directory])
4360_LT_DECL([], [finish_eval], [1],
4361    [[As "finish_cmds", except a single script fragment to be evaled but
4362    not shown]])
4363_LT_DECL([], [hardcode_into_libs], [0],
4364    [Whether we should hardcode library paths into libraries])
4365_LT_DECL([], [sys_lib_search_path_spec], [2],
4366    [Compile-time system search path for libraries])
4367_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
4368    [Detected run-time system search path for libraries])
4369_LT_DECL([], [configure_time_lt_sys_library_path], [2],
4370    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
4371])# _LT_SYS_DYNAMIC_LINKER
4372
4373
4374# _LT_PATH_TOOL_PREFIX(TOOL)
4375# --------------------------
4376# find a file program that can recognize shared library
4377AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4378[m4_require([_LT_DECL_EGREP])dnl
4379AC_MSG_CHECKING([for $1])
4380AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4381[case $MAGIC_CMD in
4382[[\\/*] |  ?:[\\/]*])
4383  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
4384  ;;
4385*)
4386  lt_save_MAGIC_CMD=$MAGIC_CMD
4387  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
4388dnl $ac_dummy forces splitting on constant user-supplied paths.
4389dnl POSIX.2 word splitting is done only on the output of word expansions,
4390dnl not every word.  This closes a longstanding sh security hole.
4391  ac_dummy="m4_if([$2], , $PATH, [$2])"
4392  for ac_dir in $ac_dummy; do
4393    IFS=$lt_save_ifs
4394    test -z "$ac_dir" && ac_dir=.
4395    if test -f "$ac_dir/$1"; then
4396      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
4397      if test -n "$file_magic_test_file"; then
4398	case $deplibs_check_method in
4399	"file_magic "*)
4400	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4401	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
4402	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4403	    $EGREP "$file_magic_regex" > /dev/null; then
4404	    :
4405	  else
4406	    cat <<_LT_EOF 1>&2
4407
4408*** Warning: the command libtool uses to detect shared libraries,
4409*** $file_magic_cmd, produces output that libtool cannot recognize.
4410*** The result is that libtool may fail to recognize shared libraries
4411*** as such.  This will affect the creation of libtool libraries that
4412*** depend on shared libraries, but programs linked with such libtool
4413*** libraries will work regardless of this problem.  Nevertheless, you
4414*** may want to report the problem to your system manager and/or to
4415*** bug-libtool@gnu.org
4416
4417_LT_EOF
4418	  fi ;;
4419	esac
4420      fi
4421      break
4422    fi
4423  done
4424  IFS=$lt_save_ifs
4425  MAGIC_CMD=$lt_save_MAGIC_CMD
4426  ;;
4427esac])
4428MAGIC_CMD=$lt_cv_path_MAGIC_CMD
4429if test -n "$MAGIC_CMD"; then
4430  AC_MSG_RESULT($MAGIC_CMD)
4431else
4432  AC_MSG_RESULT(no)
4433fi
4434_LT_DECL([], [MAGIC_CMD], [0],
4435	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4436])# _LT_PATH_TOOL_PREFIX
4437
4438# Old name:
4439AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4440dnl aclocal-1.4 backwards compatibility:
4441dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4442
4443
4444# _LT_PATH_MAGIC
4445# --------------
4446# find a file program that can recognize a shared library
4447m4_defun([_LT_PATH_MAGIC],
4448[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4449if test -z "$lt_cv_path_MAGIC_CMD"; then
4450  if test -n "$ac_tool_prefix"; then
4451    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4452  else
4453    MAGIC_CMD=:
4454  fi
4455fi
4456])# _LT_PATH_MAGIC
4457
4458
4459# LT_PATH_LD
4460# ----------
4461# find the pathname to the GNU or non-GNU linker
4462AC_DEFUN([LT_PATH_LD],
4463[AC_REQUIRE([AC_PROG_CC])dnl
4464AC_REQUIRE([AC_CANONICAL_HOST])dnl
4465AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4466m4_require([_LT_DECL_SED])dnl
4467m4_require([_LT_DECL_EGREP])dnl
4468m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4469
4470AC_ARG_WITH([gnu-ld],
4471    [AS_HELP_STRING([--with-gnu-ld],
4472	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4473    [test no = "$withval" || with_gnu_ld=yes],
4474    [with_gnu_ld=no])dnl
4475
4476ac_prog=ld
4477if test yes = "$GCC"; then
4478  # Check if gcc -print-prog-name=ld gives a path.
4479  AC_MSG_CHECKING([for ld used by $CC])
4480  case $host in
4481  *-*-mingw*)
4482    # gcc leaves a trailing carriage return, which upsets mingw
4483    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4484  *)
4485    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4486  esac
4487  case $ac_prog in
4488    # Accept absolute paths.
4489    [[\\/]]* | ?:[[\\/]]*)
4490      re_direlt='/[[^/]][[^/]]*/\.\./'
4491      # Canonicalize the pathname of ld
4492      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4493      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4494	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4495      done
4496      test -z "$LD" && LD=$ac_prog
4497      ;;
4498  "")
4499    # If it fails, then pretend we aren't using GCC.
4500    ac_prog=ld
4501    ;;
4502  *)
4503    # If it is relative, then search for the first ld in PATH.
4504    with_gnu_ld=unknown
4505    ;;
4506  esac
4507elif test yes = "$with_gnu_ld"; then
4508  AC_MSG_CHECKING([for GNU ld])
4509else
4510  AC_MSG_CHECKING([for non-GNU ld])
4511fi
4512AC_CACHE_VAL(lt_cv_path_LD,
4513[if test -z "$LD"; then
4514  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
4515  for ac_dir in $PATH; do
4516    IFS=$lt_save_ifs
4517    test -z "$ac_dir" && ac_dir=.
4518    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4519      lt_cv_path_LD=$ac_dir/$ac_prog
4520      # Check to see if the program is GNU ld.  I'd rather use --version,
4521      # but apparently some variants of GNU ld only accept -v.
4522      # Break only if it was the GNU/non-GNU ld that we prefer.
4523      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4524      *GNU* | *'with BFD'*)
4525	test no != "$with_gnu_ld" && break
4526	;;
4527      *)
4528	test yes != "$with_gnu_ld" && break
4529	;;
4530      esac
4531    fi
4532  done
4533  IFS=$lt_save_ifs
4534else
4535  lt_cv_path_LD=$LD # Let the user override the test with a path.
4536fi])
4537LD=$lt_cv_path_LD
4538if test -n "$LD"; then
4539  AC_MSG_RESULT($LD)
4540else
4541  AC_MSG_RESULT(no)
4542fi
4543test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4544_LT_PATH_LD_GNU
4545AC_SUBST([LD])
4546
4547_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4548])# LT_PATH_LD
4549
4550# Old names:
4551AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4552AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4553dnl aclocal-1.4 backwards compatibility:
4554dnl AC_DEFUN([AM_PROG_LD], [])
4555dnl AC_DEFUN([AC_PROG_LD], [])
4556
4557
4558# _LT_PATH_LD_GNU
4559#- --------------
4560m4_defun([_LT_PATH_LD_GNU],
4561[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4562[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4563case `$LD -v 2>&1 </dev/null` in
4564*GNU* | *'with BFD'*)
4565  lt_cv_prog_gnu_ld=yes
4566  ;;
4567*)
4568  lt_cv_prog_gnu_ld=no
4569  ;;
4570esac])
4571with_gnu_ld=$lt_cv_prog_gnu_ld
4572])# _LT_PATH_LD_GNU
4573
4574
4575# _LT_CMD_RELOAD
4576# --------------
4577# find reload flag for linker
4578#   -- PORTME Some linkers may need a different reload flag.
4579m4_defun([_LT_CMD_RELOAD],
4580[AC_CACHE_CHECK([for $LD option to reload object files],
4581  lt_cv_ld_reload_flag,
4582  [lt_cv_ld_reload_flag='-r'])
4583reload_flag=$lt_cv_ld_reload_flag
4584case $reload_flag in
4585"" | " "*) ;;
4586*) reload_flag=" $reload_flag" ;;
4587esac
4588reload_cmds='$LD$reload_flag -o $output$reload_objs'
4589case $host_os in
4590  cygwin* | mingw* | pw32* | cegcc*)
4591    if test yes != "$GCC"; then
4592      reload_cmds=false
4593    fi
4594    ;;
4595  darwin*)
4596    if test yes = "$GCC"; then
4597      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
4598    else
4599      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4600    fi
4601    ;;
4602esac
4603_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4604_LT_TAGDECL([], [reload_cmds], [2])dnl
4605])# _LT_CMD_RELOAD
4606
4607
4608# _LT_PATH_DD
4609# -----------
4610# find a working dd
4611m4_defun([_LT_PATH_DD],
4612[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
4613[printf 0123456789abcdef0123456789abcdef >conftest.i
4614cat conftest.i conftest.i >conftest2.i
4615: ${lt_DD:=$DD}
4616AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
4617[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
4618  cmp -s conftest.i conftest.out \
4619  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
4620fi])
4621rm -f conftest.i conftest2.i conftest.out])
4622])# _LT_PATH_DD
4623
4624
4625# _LT_CMD_TRUNCATE
4626# ----------------
4627# find command to truncate a binary pipe
4628m4_defun([_LT_CMD_TRUNCATE],
4629[m4_require([_LT_PATH_DD])
4630AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
4631[printf 0123456789abcdef0123456789abcdef >conftest.i
4632cat conftest.i conftest.i >conftest2.i
4633lt_cv_truncate_bin=
4634if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
4635  cmp -s conftest.i conftest.out \
4636  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
4637fi
4638rm -f conftest.i conftest2.i conftest.out
4639test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
4640_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
4641  [Command to truncate a binary pipe])
4642])# _LT_CMD_TRUNCATE
4643
4644
4645# _LT_CHECK_MAGIC_METHOD
4646# ----------------------
4647# how to check for library dependencies
4648#  -- PORTME fill in with the dynamic library characteristics
4649m4_defun([_LT_CHECK_MAGIC_METHOD],
4650[m4_require([_LT_DECL_EGREP])
4651m4_require([_LT_DECL_OBJDUMP])
4652AC_CACHE_CHECK([how to recognize dependent libraries],
4653lt_cv_deplibs_check_method,
4654[lt_cv_file_magic_cmd='$MAGIC_CMD'
4655lt_cv_file_magic_test_file=
4656lt_cv_deplibs_check_method='unknown'
4657# Need to set the preceding variable on all platforms that support
4658# interlibrary dependencies.
4659# 'none' -- dependencies not supported.
4660# 'unknown' -- same as none, but documents that we really don't know.
4661# 'pass_all' -- all dependencies passed with no checks.
4662# 'test_compile' -- check by making test program.
4663# 'file_magic [[regex]]' -- check by looking for files in library path
4664# that responds to the $file_magic_cmd with a given extended regex.
4665# If you have 'file' or equivalent on your system and you're not sure
4666# whether 'pass_all' will *always* work, you probably want this one.
4667
4668case $host_os in
4669aix[[4-9]]*)
4670  lt_cv_deplibs_check_method=pass_all
4671  ;;
4672
4673beos*)
4674  lt_cv_deplibs_check_method=pass_all
4675  ;;
4676
4677bsdi[[45]]*)
4678  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4679  lt_cv_file_magic_cmd='/usr/bin/file -L'
4680  lt_cv_file_magic_test_file=/shlib/libc.so
4681  ;;
4682
4683cygwin*)
4684  # func_win32_libid is a shell function defined in ltmain.sh
4685  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4686  lt_cv_file_magic_cmd='func_win32_libid'
4687  ;;
4688
4689mingw* | pw32*)
4690  # Base MSYS/MinGW do not provide the 'file' command needed by
4691  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4692  # unless we find 'file', for example because we are cross-compiling.
4693  if ( file / ) >/dev/null 2>&1; then
4694    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4695    lt_cv_file_magic_cmd='func_win32_libid'
4696  else
4697    # Keep this pattern in sync with the one in func_win32_libid.
4698    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4699    lt_cv_file_magic_cmd='$OBJDUMP -f'
4700  fi
4701  ;;
4702
4703cegcc*)
4704  # use the weaker test based on 'objdump'. See mingw*.
4705  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4706  lt_cv_file_magic_cmd='$OBJDUMP -f'
4707  ;;
4708
4709darwin* | rhapsody*)
4710  lt_cv_deplibs_check_method=pass_all
4711  ;;
4712
4713freebsd* | dragonfly*)
4714  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4715    case $host_cpu in
4716    i*86 )
4717      # Not sure whether the presence of OpenBSD here was a mistake.
4718      # Let's accept both of them until this is cleared up.
4719      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4720      lt_cv_file_magic_cmd=/usr/bin/file
4721      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4722      ;;
4723    esac
4724  else
4725    lt_cv_deplibs_check_method=pass_all
4726  fi
4727  ;;
4728
4729haiku*)
4730  lt_cv_deplibs_check_method=pass_all
4731  ;;
4732
4733hpux10.20* | hpux11*)
4734  lt_cv_file_magic_cmd=/usr/bin/file
4735  case $host_cpu in
4736  ia64*)
4737    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4738    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4739    ;;
4740  hppa*64*)
4741    [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]']
4742    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4743    ;;
4744  *)
4745    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4746    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4747    ;;
4748  esac
4749  ;;
4750
4751interix[[3-9]]*)
4752  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4753  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4754  ;;
4755
4756irix5* | irix6* | nonstopux*)
4757  case $LD in
4758  *-32|*"-32 ") libmagic=32-bit;;
4759  *-n32|*"-n32 ") libmagic=N32;;
4760  *-64|*"-64 ") libmagic=64-bit;;
4761  *) libmagic=never-match;;
4762  esac
4763  lt_cv_deplibs_check_method=pass_all
4764  ;;
4765
4766# This must be glibc/ELF.
4767linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4768  lt_cv_deplibs_check_method=pass_all
4769  ;;
4770
4771netbsd* | netbsdelf*-gnu)
4772  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4773    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4774  else
4775    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4776  fi
4777  ;;
4778
4779newos6*)
4780  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4781  lt_cv_file_magic_cmd=/usr/bin/file
4782  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4783  ;;
4784
4785*nto* | *qnx*)
4786  lt_cv_deplibs_check_method=pass_all
4787  ;;
4788
4789openbsd* | bitrig*)
4790  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
4791    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4792  else
4793    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4794  fi
4795  ;;
4796
4797osf3* | osf4* | osf5*)
4798  lt_cv_deplibs_check_method=pass_all
4799  ;;
4800
4801rdos*)
4802  lt_cv_deplibs_check_method=pass_all
4803  ;;
4804
4805solaris*)
4806  lt_cv_deplibs_check_method=pass_all
4807  ;;
4808
4809sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4810  lt_cv_deplibs_check_method=pass_all
4811  ;;
4812
4813sysv4 | sysv4.3*)
4814  case $host_vendor in
4815  motorola)
4816    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]]'
4817    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4818    ;;
4819  ncr)
4820    lt_cv_deplibs_check_method=pass_all
4821    ;;
4822  sequent)
4823    lt_cv_file_magic_cmd='/bin/file'
4824    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4825    ;;
4826  sni)
4827    lt_cv_file_magic_cmd='/bin/file'
4828    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4829    lt_cv_file_magic_test_file=/lib/libc.so
4830    ;;
4831  siemens)
4832    lt_cv_deplibs_check_method=pass_all
4833    ;;
4834  pc)
4835    lt_cv_deplibs_check_method=pass_all
4836    ;;
4837  esac
4838  ;;
4839
4840tpf*)
4841  lt_cv_deplibs_check_method=pass_all
4842  ;;
4843os2*)
4844  lt_cv_deplibs_check_method=pass_all
4845  ;;
4846esac
4847])
4848
4849file_magic_glob=
4850want_nocaseglob=no
4851if test "$build" = "$host"; then
4852  case $host_os in
4853  mingw* | pw32*)
4854    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4855      want_nocaseglob=yes
4856    else
4857      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4858    fi
4859    ;;
4860  esac
4861fi
4862
4863file_magic_cmd=$lt_cv_file_magic_cmd
4864deplibs_check_method=$lt_cv_deplibs_check_method
4865test -z "$deplibs_check_method" && deplibs_check_method=unknown
4866
4867_LT_DECL([], [deplibs_check_method], [1],
4868    [Method to check whether dependent libraries are shared objects])
4869_LT_DECL([], [file_magic_cmd], [1],
4870    [Command to use when deplibs_check_method = "file_magic"])
4871_LT_DECL([], [file_magic_glob], [1],
4872    [How to find potential files when deplibs_check_method = "file_magic"])
4873_LT_DECL([], [want_nocaseglob], [1],
4874    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4875])# _LT_CHECK_MAGIC_METHOD
4876
4877
4878# LT_PATH_NM
4879# ----------
4880# find the pathname to a BSD- or MS-compatible name lister
4881AC_DEFUN([LT_PATH_NM],
4882[AC_REQUIRE([AC_PROG_CC])dnl
4883AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4884[if test -n "$NM"; then
4885  # Let the user override the test.
4886  lt_cv_path_NM=$NM
4887else
4888  lt_nm_to_check=${ac_tool_prefix}nm
4889  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4890    lt_nm_to_check="$lt_nm_to_check nm"
4891  fi
4892  for lt_tmp_nm in $lt_nm_to_check; do
4893    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
4894    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4895      IFS=$lt_save_ifs
4896      test -z "$ac_dir" && ac_dir=.
4897      tmp_nm=$ac_dir/$lt_tmp_nm
4898      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
4899	# Check to see if the nm accepts a BSD-compat flag.
4900	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
4901	#   nm: unknown option "B" ignored
4902	# Tru64's nm complains that /dev/null is an invalid object file
4903	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
4904	case $build_os in
4905	mingw*) lt_bad_file=conftest.nm/nofile ;;
4906	*) lt_bad_file=/dev/null ;;
4907	esac
4908	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
4909	*$lt_bad_file* | *'Invalid file or object type'*)
4910	  lt_cv_path_NM="$tmp_nm -B"
4911	  break 2
4912	  ;;
4913	*)
4914	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4915	  */dev/null*)
4916	    lt_cv_path_NM="$tmp_nm -p"
4917	    break 2
4918	    ;;
4919	  *)
4920	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4921	    continue # so that we can try to find one that supports BSD flags
4922	    ;;
4923	  esac
4924	  ;;
4925	esac
4926      fi
4927    done
4928    IFS=$lt_save_ifs
4929  done
4930  : ${lt_cv_path_NM=no}
4931fi])
4932if test no != "$lt_cv_path_NM"; then
4933  NM=$lt_cv_path_NM
4934else
4935  # Didn't find any BSD compatible name lister, look for dumpbin.
4936  if test -n "$DUMPBIN"; then :
4937    # Let the user override the test.
4938  else
4939    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4940    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
4941    *COFF*)
4942      DUMPBIN="$DUMPBIN -symbols -headers"
4943      ;;
4944    *)
4945      DUMPBIN=:
4946      ;;
4947    esac
4948  fi
4949  AC_SUBST([DUMPBIN])
4950  if test : != "$DUMPBIN"; then
4951    NM=$DUMPBIN
4952  fi
4953fi
4954test -z "$NM" && NM=nm
4955AC_SUBST([NM])
4956_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4957
4958AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4959  [lt_cv_nm_interface="BSD nm"
4960  echo "int some_variable = 0;" > conftest.$ac_ext
4961  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4962  (eval "$ac_compile" 2>conftest.err)
4963  cat conftest.err >&AS_MESSAGE_LOG_FD
4964  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4965  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4966  cat conftest.err >&AS_MESSAGE_LOG_FD
4967  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4968  cat conftest.out >&AS_MESSAGE_LOG_FD
4969  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4970    lt_cv_nm_interface="MS dumpbin"
4971  fi
4972  rm -f conftest*])
4973])# LT_PATH_NM
4974
4975# Old names:
4976AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4977AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4978dnl aclocal-1.4 backwards compatibility:
4979dnl AC_DEFUN([AM_PROG_NM], [])
4980dnl AC_DEFUN([AC_PROG_NM], [])
4981
4982# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4983# --------------------------------
4984# how to determine the name of the shared library
4985# associated with a specific link library.
4986#  -- PORTME fill in with the dynamic library characteristics
4987m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4988[m4_require([_LT_DECL_EGREP])
4989m4_require([_LT_DECL_OBJDUMP])
4990m4_require([_LT_DECL_DLLTOOL])
4991AC_CACHE_CHECK([how to associate runtime and link libraries],
4992lt_cv_sharedlib_from_linklib_cmd,
4993[lt_cv_sharedlib_from_linklib_cmd='unknown'
4994
4995case $host_os in
4996cygwin* | mingw* | pw32* | cegcc*)
4997  # two different shell functions defined in ltmain.sh;
4998  # decide which one to use based on capabilities of $DLLTOOL
4999  case `$DLLTOOL --help 2>&1` in
5000  *--identify-strict*)
5001    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5002    ;;
5003  *)
5004    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5005    ;;
5006  esac
5007  ;;
5008*)
5009  # fallback: assume linklib IS sharedlib
5010  lt_cv_sharedlib_from_linklib_cmd=$ECHO
5011  ;;
5012esac
5013])
5014sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5015test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5016
5017_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
5018    [Command to associate shared and link libraries])
5019])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5020
5021
5022# _LT_PATH_MANIFEST_TOOL
5023# ----------------------
5024# locate the manifest tool
5025m4_defun([_LT_PATH_MANIFEST_TOOL],
5026[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
5027test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
5028AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
5029  [lt_cv_path_mainfest_tool=no
5030  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
5031  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
5032  cat conftest.err >&AS_MESSAGE_LOG_FD
5033  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
5034    lt_cv_path_mainfest_tool=yes
5035  fi
5036  rm -f conftest*])
5037if test yes != "$lt_cv_path_mainfest_tool"; then
5038  MANIFEST_TOOL=:
5039fi
5040_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
5041])# _LT_PATH_MANIFEST_TOOL
5042
5043
5044# _LT_DLL_DEF_P([FILE])
5045# ---------------------
5046# True iff FILE is a Windows DLL '.def' file.
5047# Keep in sync with func_dll_def_p in the libtool script
5048AC_DEFUN([_LT_DLL_DEF_P],
5049[dnl
5050  test DEF = "`$SED -n dnl
5051    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
5052    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
5053    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
5054    -e q dnl                          Only consider the first "real" line
5055    $1`" dnl
5056])# _LT_DLL_DEF_P
5057
5058
5059# LT_LIB_M
5060# --------
5061# check for math library
5062AC_DEFUN([LT_LIB_M],
5063[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5064LIBM=
5065case $host in
5066*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5067  # These system don't have libm, or don't need it
5068  ;;
5069*-ncr-sysv4.3*)
5070  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
5071  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5072  ;;
5073*)
5074  AC_CHECK_LIB(m, cos, LIBM=-lm)
5075  ;;
5076esac
5077AC_SUBST([LIBM])
5078])# LT_LIB_M
5079
5080# Old name:
5081AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5082dnl aclocal-1.4 backwards compatibility:
5083dnl AC_DEFUN([AC_CHECK_LIBM], [])
5084
5085
5086# _LT_COMPILER_NO_RTTI([TAGNAME])
5087# -------------------------------
5088m4_defun([_LT_COMPILER_NO_RTTI],
5089[m4_require([_LT_TAG_COMPILER])dnl
5090
5091_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5092
5093if test yes = "$GCC"; then
5094  case $cc_basename in
5095  nvcc*)
5096    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5097  *)
5098    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5099  esac
5100
5101  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5102    lt_cv_prog_compiler_rtti_exceptions,
5103    [-fno-rtti -fno-exceptions], [],
5104    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5105fi
5106_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5107	[Compiler flag to turn off builtin functions])
5108])# _LT_COMPILER_NO_RTTI
5109
5110
5111# _LT_CMD_GLOBAL_SYMBOLS
5112# ----------------------
5113m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5114[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5115AC_REQUIRE([AC_PROG_CC])dnl
5116AC_REQUIRE([AC_PROG_AWK])dnl
5117AC_REQUIRE([LT_PATH_NM])dnl
5118AC_REQUIRE([LT_PATH_LD])dnl
5119m4_require([_LT_DECL_SED])dnl
5120m4_require([_LT_DECL_EGREP])dnl
5121m4_require([_LT_TAG_COMPILER])dnl
5122
5123# Check for command to grab the raw symbol name followed by C symbol from nm.
5124AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5125AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5126[
5127# These are sane defaults that work on at least a few old systems.
5128# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5129
5130# Character class describing NM global symbol codes.
5131symcode='[[BCDEGRST]]'
5132
5133# Regexp to match symbols that can be accessed directly from C.
5134sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5135
5136# Define system-specific variables.
5137case $host_os in
5138aix*)
5139  symcode='[[BCDT]]'
5140  ;;
5141cygwin* | mingw* | pw32* | cegcc*)
5142  symcode='[[ABCDGISTW]]'
5143  ;;
5144hpux*)
5145  if test ia64 = "$host_cpu"; then
5146    symcode='[[ABCDEGRST]]'
5147  fi
5148  ;;
5149irix* | nonstopux*)
5150  symcode='[[BCDEGRST]]'
5151  ;;
5152osf*)
5153  symcode='[[BCDEGQRST]]'
5154  ;;
5155solaris*)
5156  symcode='[[BDRT]]'
5157  ;;
5158sco3.2v5*)
5159  symcode='[[DT]]'
5160  ;;
5161sysv4.2uw2*)
5162  symcode='[[DT]]'
5163  ;;
5164sysv5* | sco5v6* | unixware* | OpenUNIX*)
5165  symcode='[[ABDT]]'
5166  ;;
5167sysv4)
5168  symcode='[[DFNSTU]]'
5169  ;;
5170esac
5171
5172# If we're using GNU nm, then use its standard symbol codes.
5173case `$NM -V 2>&1` in
5174*GNU* | *'with BFD'*)
5175  symcode='[[ABCDGIRSTW]]' ;;
5176esac
5177
5178if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5179  # Gets list of data symbols to import.
5180  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
5181  # Adjust the below global symbol transforms to fixup imported variables.
5182  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
5183  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
5184  lt_c_name_lib_hook="\
5185  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
5186  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
5187else
5188  # Disable hooks by default.
5189  lt_cv_sys_global_symbol_to_import=
5190  lt_cdecl_hook=
5191  lt_c_name_hook=
5192  lt_c_name_lib_hook=
5193fi
5194
5195# Transform an extracted symbol line into a proper C declaration.
5196# Some systems (esp. on ia64) link data and code symbols differently,
5197# so use this general approach.
5198lt_cv_sys_global_symbol_to_cdecl="sed -n"\
5199$lt_cdecl_hook\
5200" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
5201" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
5202
5203# Transform an extracted symbol line into symbol name and symbol address
5204lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
5205$lt_c_name_hook\
5206" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
5207" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
5208
5209# Transform an extracted symbol line into symbol name with lib prefix and
5210# symbol address.
5211lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
5212$lt_c_name_lib_hook\
5213" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
5214" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
5215" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
5216
5217# Handle CRLF in mingw tool chain
5218opt_cr=
5219case $build_os in
5220mingw*)
5221  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5222  ;;
5223esac
5224
5225# Try without a prefix underscore, then with it.
5226for ac_symprfx in "" "_"; do
5227
5228  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5229  symxfrm="\\1 $ac_symprfx\\2 \\2"
5230
5231  # Write the raw and C identifiers.
5232  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5233    # Fake it for dumpbin and say T for any non-static function,
5234    # D for any global variable and I for any imported variable.
5235    # Also find C++ and __fastcall symbols from MSVC++,
5236    # which start with @ or ?.
5237    lt_cv_sys_global_symbol_pipe="$AWK ['"\
5238"     {last_section=section; section=\$ 3};"\
5239"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5240"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5241"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
5242"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
5243"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
5244"     \$ 0!~/External *\|/{next};"\
5245"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5246"     {if(hide[section]) next};"\
5247"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
5248"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
5249"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
5250"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
5251"     ' prfx=^$ac_symprfx]"
5252  else
5253    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5254  fi
5255  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5256
5257  # Check to see that the pipe works correctly.
5258  pipe_works=no
5259
5260  rm -f conftest*
5261  cat > conftest.$ac_ext <<_LT_EOF
5262#ifdef __cplusplus
5263extern "C" {
5264#endif
5265char nm_test_var;
5266void nm_test_func(void);
5267void nm_test_func(void){}
5268#ifdef __cplusplus
5269}
5270#endif
5271int main(){nm_test_var='a';nm_test_func();return(0);}
5272_LT_EOF
5273
5274  if AC_TRY_EVAL(ac_compile); then
5275    # Now try to grab the symbols.
5276    nlist=conftest.nm
5277    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
5278    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
5279      # Try sorting and uniquifying the output.
5280      if sort "$nlist" | uniq > "$nlist"T; then
5281	mv -f "$nlist"T "$nlist"
5282      else
5283	rm -f "$nlist"T
5284      fi
5285
5286      # Make sure that we snagged all the symbols we need.
5287      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5288	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5289	  cat <<_LT_EOF > conftest.$ac_ext
5290/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
5291#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
5292/* DATA imports from DLLs on WIN32 can't be const, because runtime
5293   relocations are performed -- see ld's documentation on pseudo-relocs.  */
5294# define LT@&t@_DLSYM_CONST
5295#elif defined __osf__
5296/* This system does not cope well with relocations in const data.  */
5297# define LT@&t@_DLSYM_CONST
5298#else
5299# define LT@&t@_DLSYM_CONST const
5300#endif
5301
5302#ifdef __cplusplus
5303extern "C" {
5304#endif
5305
5306_LT_EOF
5307	  # Now generate the symbol file.
5308	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5309
5310	  cat <<_LT_EOF >> conftest.$ac_ext
5311
5312/* The mapping between symbol names and symbols.  */
5313LT@&t@_DLSYM_CONST struct {
5314  const char *name;
5315  void       *address;
5316}
5317lt__PROGRAM__LTX_preloaded_symbols[[]] =
5318{
5319  { "@PROGRAM@", (void *) 0 },
5320_LT_EOF
5321	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5322	  cat <<\_LT_EOF >> conftest.$ac_ext
5323  {0, (void *) 0}
5324};
5325
5326/* This works around a problem in FreeBSD linker */
5327#ifdef FREEBSD_WORKAROUND
5328static const void *lt_preloaded_setup() {
5329  return lt__PROGRAM__LTX_preloaded_symbols;
5330}
5331#endif
5332
5333#ifdef __cplusplus
5334}
5335#endif
5336_LT_EOF
5337	  # Now try linking the two files.
5338	  mv conftest.$ac_objext conftstm.$ac_objext
5339	  lt_globsym_save_LIBS=$LIBS
5340	  lt_globsym_save_CFLAGS=$CFLAGS
5341	  LIBS=conftstm.$ac_objext
5342	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5343	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
5344	    pipe_works=yes
5345	  fi
5346	  LIBS=$lt_globsym_save_LIBS
5347	  CFLAGS=$lt_globsym_save_CFLAGS
5348	else
5349	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5350	fi
5351      else
5352	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5353      fi
5354    else
5355      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5356    fi
5357  else
5358    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5359    cat conftest.$ac_ext >&5
5360  fi
5361  rm -rf conftest* conftst*
5362
5363  # Do not use the global_symbol_pipe unless it works.
5364  if test yes = "$pipe_works"; then
5365    break
5366  else
5367    lt_cv_sys_global_symbol_pipe=
5368  fi
5369done
5370])
5371if test -z "$lt_cv_sys_global_symbol_pipe"; then
5372  lt_cv_sys_global_symbol_to_cdecl=
5373fi
5374if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5375  AC_MSG_RESULT(failed)
5376else
5377  AC_MSG_RESULT(ok)
5378fi
5379
5380# Response file support.
5381if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5382  nm_file_list_spec='@'
5383elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
5384  nm_file_list_spec='@'
5385fi
5386
5387_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5388    [Take the output of nm and produce a listing of raw symbols and C names])
5389_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5390    [Transform the output of nm in a proper C declaration])
5391_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
5392    [Transform the output of nm into a list of symbols to manually relocate])
5393_LT_DECL([global_symbol_to_c_name_address],
5394    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5395    [Transform the output of nm in a C name address pair])
5396_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5397    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5398    [Transform the output of nm in a C name address pair when lib prefix is needed])
5399_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
5400    [The name lister interface])
5401_LT_DECL([], [nm_file_list_spec], [1],
5402    [Specify filename containing input files for $NM])
5403]) # _LT_CMD_GLOBAL_SYMBOLS
5404
5405
5406# _LT_COMPILER_PIC([TAGNAME])
5407# ---------------------------
5408m4_defun([_LT_COMPILER_PIC],
5409[m4_require([_LT_TAG_COMPILER])dnl
5410_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5411_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5412_LT_TAGVAR(lt_prog_compiler_static, $1)=
5413
5414m4_if([$1], [CXX], [
5415  # C++ specific cases for pic, static, wl, etc.
5416  if test yes = "$GXX"; then
5417    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5418    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5419
5420    case $host_os in
5421    aix*)
5422      # All AIX code is PIC.
5423      if test ia64 = "$host_cpu"; then
5424	# AIX 5 now supports IA64 processor
5425	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5426      fi
5427      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5428      ;;
5429
5430    amigaos*)
5431      case $host_cpu in
5432      powerpc)
5433            # see comment about AmigaOS4 .so support
5434            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5435        ;;
5436      m68k)
5437            # FIXME: we need at least 68020 code to build shared libraries, but
5438            # adding the '-m68020' flag to GCC prevents building anything better,
5439            # like '-m68040'.
5440            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5441        ;;
5442      esac
5443      ;;
5444
5445    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5446      # PIC is the default for these OSes.
5447      ;;
5448    mingw* | cygwin* | os2* | pw32* | cegcc*)
5449      # This hack is so that the source file can tell whether it is being
5450      # built for inclusion in a dll (and should export symbols for example).
5451      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5452      # (--disable-auto-import) libraries
5453      m4_if([$1], [GCJ], [],
5454	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5455      case $host_os in
5456      os2*)
5457	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
5458	;;
5459      esac
5460      ;;
5461    darwin* | rhapsody*)
5462      # PIC is the default on this platform
5463      # Common symbols not allowed in MH_DYLIB files
5464      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5465      ;;
5466    *djgpp*)
5467      # DJGPP does not support shared libraries at all
5468      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5469      ;;
5470    haiku*)
5471      # PIC is the default for Haiku.
5472      # The "-static" flag exists, but is broken.
5473      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5474      ;;
5475    interix[[3-9]]*)
5476      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5477      # Instead, we relocate shared libraries at runtime.
5478      ;;
5479    sysv4*MP*)
5480      if test -d /usr/nec; then
5481	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5482      fi
5483      ;;
5484    hpux*)
5485      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5486      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5487      # sets the default TLS model and affects inlining.
5488      case $host_cpu in
5489      hppa*64*)
5490	;;
5491      *)
5492	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5493	;;
5494      esac
5495      ;;
5496    *qnx* | *nto*)
5497      # QNX uses GNU C++, but need to define -shared option too, otherwise
5498      # it will coredump.
5499      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5500      ;;
5501    *)
5502      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5503      ;;
5504    esac
5505  else
5506    case $host_os in
5507      aix[[4-9]]*)
5508	# All AIX code is PIC.
5509	if test ia64 = "$host_cpu"; then
5510	  # AIX 5 now supports IA64 processor
5511	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5512	else
5513	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5514	fi
5515	;;
5516      chorus*)
5517	case $cc_basename in
5518	cxch68*)
5519	  # Green Hills C++ Compiler
5520	  # _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"
5521	  ;;
5522	esac
5523	;;
5524      mingw* | cygwin* | os2* | pw32* | cegcc*)
5525	# This hack is so that the source file can tell whether it is being
5526	# built for inclusion in a dll (and should export symbols for example).
5527	m4_if([$1], [GCJ], [],
5528	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5529	;;
5530      dgux*)
5531	case $cc_basename in
5532	  ec++*)
5533	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5534	    ;;
5535	  ghcx*)
5536	    # Green Hills C++ Compiler
5537	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5538	    ;;
5539	  *)
5540	    ;;
5541	esac
5542	;;
5543      freebsd* | dragonfly*)
5544	# FreeBSD uses GNU C++
5545	;;
5546      hpux9* | hpux10* | hpux11*)
5547	case $cc_basename in
5548	  CC*)
5549	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5550	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
5551	    if test ia64 != "$host_cpu"; then
5552	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5553	    fi
5554	    ;;
5555	  aCC*)
5556	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5557	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
5558	    case $host_cpu in
5559	    hppa*64*|ia64*)
5560	      # +Z the default
5561	      ;;
5562	    *)
5563	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5564	      ;;
5565	    esac
5566	    ;;
5567	  *)
5568	    ;;
5569	esac
5570	;;
5571      interix*)
5572	# This is c89, which is MS Visual C++ (no shared libs)
5573	# Anyone wants to do a port?
5574	;;
5575      irix5* | irix6* | nonstopux*)
5576	case $cc_basename in
5577	  CC*)
5578	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5579	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5580	    # CC pic flag -KPIC is the default.
5581	    ;;
5582	  *)
5583	    ;;
5584	esac
5585	;;
5586      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5587	case $cc_basename in
5588	  KCC*)
5589	    # KAI C++ Compiler
5590	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5591	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5592	    ;;
5593	  ecpc* )
5594	    # old Intel C++ for x86_64, which still supported -KPIC.
5595	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5596	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5597	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5598	    ;;
5599	  icpc* )
5600	    # Intel C++, used to be incompatible with GCC.
5601	    # ICC 10 doesn't accept -KPIC any more.
5602	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5603	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5604	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5605	    ;;
5606	  pgCC* | pgcpp*)
5607	    # Portland Group C++ compiler
5608	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5609	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5610	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5611	    ;;
5612	  cxx*)
5613	    # Compaq C++
5614	    # Make sure the PIC flag is empty.  It appears that all Alpha
5615	    # Linux and Compaq Tru64 Unix objects are PIC.
5616	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5617	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5618	    ;;
5619	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5620	    # IBM XL 8.0, 9.0 on PPC and BlueGene
5621	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5622	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5623	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5624	    ;;
5625	  *)
5626	    case `$CC -V 2>&1 | sed 5q` in
5627	    *Sun\ C*)
5628	      # Sun C++ 5.9
5629	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5630	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5631	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5632	      ;;
5633	    esac
5634	    ;;
5635	esac
5636	;;
5637      lynxos*)
5638	;;
5639      m88k*)
5640	;;
5641      mvs*)
5642	case $cc_basename in
5643	  cxx*)
5644	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5645	    ;;
5646	  *)
5647	    ;;
5648	esac
5649	;;
5650      netbsd* | netbsdelf*-gnu)
5651	;;
5652      *qnx* | *nto*)
5653        # QNX uses GNU C++, but need to define -shared option too, otherwise
5654        # it will coredump.
5655        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5656        ;;
5657      osf3* | osf4* | osf5*)
5658	case $cc_basename in
5659	  KCC*)
5660	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5661	    ;;
5662	  RCC*)
5663	    # Rational C++ 2.4.1
5664	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5665	    ;;
5666	  cxx*)
5667	    # Digital/Compaq C++
5668	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5669	    # Make sure the PIC flag is empty.  It appears that all Alpha
5670	    # Linux and Compaq Tru64 Unix objects are PIC.
5671	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5672	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5673	    ;;
5674	  *)
5675	    ;;
5676	esac
5677	;;
5678      psos*)
5679	;;
5680      solaris*)
5681	case $cc_basename in
5682	  CC* | sunCC*)
5683	    # Sun C++ 4.2, 5.x and Centerline C++
5684	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5685	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5686	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5687	    ;;
5688	  gcx*)
5689	    # Green Hills C++ Compiler
5690	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5691	    ;;
5692	  *)
5693	    ;;
5694	esac
5695	;;
5696      sunos4*)
5697	case $cc_basename in
5698	  CC*)
5699	    # Sun C++ 4.x
5700	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5701	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5702	    ;;
5703	  lcc*)
5704	    # Lucid
5705	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5706	    ;;
5707	  *)
5708	    ;;
5709	esac
5710	;;
5711      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5712	case $cc_basename in
5713	  CC*)
5714	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5715	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5716	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5717	    ;;
5718	esac
5719	;;
5720      tandem*)
5721	case $cc_basename in
5722	  NCC*)
5723	    # NonStop-UX NCC 3.20
5724	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5725	    ;;
5726	  *)
5727	    ;;
5728	esac
5729	;;
5730      vxworks*)
5731	;;
5732      *)
5733	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5734	;;
5735    esac
5736  fi
5737],
5738[
5739  if test yes = "$GCC"; then
5740    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5741    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5742
5743    case $host_os in
5744      aix*)
5745      # All AIX code is PIC.
5746      if test ia64 = "$host_cpu"; then
5747	# AIX 5 now supports IA64 processor
5748	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5749      fi
5750      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5751      ;;
5752
5753    amigaos*)
5754      case $host_cpu in
5755      powerpc)
5756            # see comment about AmigaOS4 .so support
5757            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5758        ;;
5759      m68k)
5760            # FIXME: we need at least 68020 code to build shared libraries, but
5761            # adding the '-m68020' flag to GCC prevents building anything better,
5762            # like '-m68040'.
5763            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5764        ;;
5765      esac
5766      ;;
5767
5768    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5769      # PIC is the default for these OSes.
5770      ;;
5771
5772    mingw* | cygwin* | pw32* | os2* | cegcc*)
5773      # This hack is so that the source file can tell whether it is being
5774      # built for inclusion in a dll (and should export symbols for example).
5775      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5776      # (--disable-auto-import) libraries
5777      m4_if([$1], [GCJ], [],
5778	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5779      case $host_os in
5780      os2*)
5781	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
5782	;;
5783      esac
5784      ;;
5785
5786    darwin* | rhapsody*)
5787      # PIC is the default on this platform
5788      # Common symbols not allowed in MH_DYLIB files
5789      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5790      ;;
5791
5792    haiku*)
5793      # PIC is the default for Haiku.
5794      # The "-static" flag exists, but is broken.
5795      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5796      ;;
5797
5798    hpux*)
5799      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5800      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5801      # sets the default TLS model and affects inlining.
5802      case $host_cpu in
5803      hppa*64*)
5804	# +Z the default
5805	;;
5806      *)
5807	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5808	;;
5809      esac
5810      ;;
5811
5812    interix[[3-9]]*)
5813      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5814      # Instead, we relocate shared libraries at runtime.
5815      ;;
5816
5817    msdosdjgpp*)
5818      # Just because we use GCC doesn't mean we suddenly get shared libraries
5819      # on systems that don't support them.
5820      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5821      enable_shared=no
5822      ;;
5823
5824    *nto* | *qnx*)
5825      # QNX uses GNU C++, but need to define -shared option too, otherwise
5826      # it will coredump.
5827      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5828      ;;
5829
5830    sysv4*MP*)
5831      if test -d /usr/nec; then
5832	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5833      fi
5834      ;;
5835
5836    *)
5837      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5838      ;;
5839    esac
5840
5841    case $cc_basename in
5842    nvcc*) # Cuda Compiler Driver 2.2
5843      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5844      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5845        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5846      fi
5847      ;;
5848    esac
5849  else
5850    # PORTME Check for flag to pass linker flags through the system compiler.
5851    case $host_os in
5852    aix*)
5853      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5854      if test ia64 = "$host_cpu"; then
5855	# AIX 5 now supports IA64 processor
5856	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5857      else
5858	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5859      fi
5860      ;;
5861
5862    darwin* | rhapsody*)
5863      # PIC is the default on this platform
5864      # Common symbols not allowed in MH_DYLIB files
5865      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5866      case $cc_basename in
5867      nagfor*)
5868        # NAG Fortran compiler
5869        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5870        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5871        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5872        ;;
5873      esac
5874      ;;
5875
5876    mingw* | cygwin* | pw32* | os2* | cegcc*)
5877      # This hack is so that the source file can tell whether it is being
5878      # built for inclusion in a dll (and should export symbols for example).
5879      m4_if([$1], [GCJ], [],
5880	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5881      case $host_os in
5882      os2*)
5883	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
5884	;;
5885      esac
5886      ;;
5887
5888    hpux9* | hpux10* | hpux11*)
5889      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5890      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5891      # not for PA HP-UX.
5892      case $host_cpu in
5893      hppa*64*|ia64*)
5894	# +Z the default
5895	;;
5896      *)
5897	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5898	;;
5899      esac
5900      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5901      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
5902      ;;
5903
5904    irix5* | irix6* | nonstopux*)
5905      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5906      # PIC (with -KPIC) is the default.
5907      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5908      ;;
5909
5910    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5911      case $cc_basename in
5912      # old Intel for x86_64, which still supported -KPIC.
5913      ecc*)
5914	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5915	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5916	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5917        ;;
5918      # flang / f18. f95 an alias for gfortran or flang on Debian
5919      flang* | f18* | f95*)
5920	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5921	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5922	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5923        ;;
5924      # icc used to be incompatible with GCC.
5925      # ICC 10 doesn't accept -KPIC any more.
5926      icc* | ifort*)
5927	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5928	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5929	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5930        ;;
5931      # Lahey Fortran 8.1.
5932      lf95*)
5933	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5934	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5935	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5936	;;
5937      nagfor*)
5938	# NAG Fortran compiler
5939	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5940	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5941	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5942	;;
5943      tcc*)
5944	# Fabrice Bellard et al's Tiny C Compiler
5945	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5946	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5947	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5948	;;
5949      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5950        # Portland Group compilers (*not* the Pentium gcc compiler,
5951	# which looks to be a dead project)
5952	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5953	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5954	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5955        ;;
5956      ccc*)
5957        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5958        # All Alpha code is PIC.
5959        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5960        ;;
5961      xl* | bgxl* | bgf* | mpixl*)
5962	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5963	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5964	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5965	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5966	;;
5967      *)
5968	case `$CC -V 2>&1 | sed 5q` in
5969	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5970	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5971	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5972	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5973	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5974	  ;;
5975	*Sun\ F* | *Sun*Fortran*)
5976	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5977	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5978	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5979	  ;;
5980	*Sun\ C*)
5981	  # Sun C 5.9
5982	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5983	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5984	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5985	  ;;
5986        *Intel*\ [[CF]]*Compiler*)
5987	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5988	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5989	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5990	  ;;
5991	*Portland\ Group*)
5992	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5993	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5994	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5995	  ;;
5996	esac
5997	;;
5998      esac
5999      ;;
6000
6001    newsos6)
6002      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6003      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6004      ;;
6005
6006    *nto* | *qnx*)
6007      # QNX uses GNU C++, but need to define -shared option too, otherwise
6008      # it will coredump.
6009      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6010      ;;
6011
6012    osf3* | osf4* | osf5*)
6013      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6014      # All OSF/1 code is PIC.
6015      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6016      ;;
6017
6018    rdos*)
6019      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6020      ;;
6021
6022    solaris*)
6023      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6024      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6025      case $cc_basename in
6026      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6027	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6028      *)
6029	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6030      esac
6031      ;;
6032
6033    sunos4*)
6034      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6035      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6036      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6037      ;;
6038
6039    sysv4 | sysv4.2uw2* | sysv4.3*)
6040      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6041      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6042      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6043      ;;
6044
6045    sysv4*MP*)
6046      if test -d /usr/nec; then
6047	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6048	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6049      fi
6050      ;;
6051
6052    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6053      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6054      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6055      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6056      ;;
6057
6058    unicos*)
6059      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6060      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6061      ;;
6062
6063    uts4*)
6064      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6065      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6066      ;;
6067
6068    *)
6069      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6070      ;;
6071    esac
6072  fi
6073])
6074case $host_os in
6075  # For platforms that do not support PIC, -DPIC is meaningless:
6076  *djgpp*)
6077    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6078    ;;
6079  *)
6080    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6081    ;;
6082esac
6083
6084AC_CACHE_CHECK([for $compiler option to produce PIC],
6085  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
6086  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6087_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
6088
6089#
6090# Check to make sure the PIC flag actually works.
6091#
6092if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6093  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6094    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6095    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6096    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6097     "" | " "*) ;;
6098     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6099     esac],
6100    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6101     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6102fi
6103_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6104	[Additional compiler flags for building library objects])
6105
6106_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6107	[How to pass a linker flag through the compiler])
6108#
6109# Check to make sure the static flag actually works.
6110#
6111wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6112_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6113  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6114  $lt_tmp_static_flag,
6115  [],
6116  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6117_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6118	[Compiler flag to prevent dynamic linking])
6119])# _LT_COMPILER_PIC
6120
6121
6122# _LT_LINKER_SHLIBS([TAGNAME])
6123# ----------------------------
6124# See if the linker supports building shared libraries.
6125m4_defun([_LT_LINKER_SHLIBS],
6126[AC_REQUIRE([LT_PATH_LD])dnl
6127AC_REQUIRE([LT_PATH_NM])dnl
6128m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6129m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6130m4_require([_LT_DECL_EGREP])dnl
6131m4_require([_LT_DECL_SED])dnl
6132m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6133m4_require([_LT_TAG_COMPILER])dnl
6134AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6135m4_if([$1], [CXX], [
6136  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6137  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6138  case $host_os in
6139  aix[[4-9]]*)
6140    # If we're using GNU nm, then we don't want the "-C" option.
6141    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
6142    # Without the "-l" option, or with the "-B" option, AIX nm treats
6143    # weak defined symbols like other global defined symbols, whereas
6144    # GNU nm marks them as "W".
6145    # While the 'weak' keyword is ignored in the Export File, we need
6146    # it in the Import File for the 'aix-soname' feature, so we have
6147    # to replace the "-B" option with "-P" for AIX nm.
6148    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6149      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
6150    else
6151      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
6152    fi
6153    ;;
6154  pw32*)
6155    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
6156    ;;
6157  cygwin* | mingw* | cegcc*)
6158    case $cc_basename in
6159    cl*)
6160      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6161      ;;
6162    *)
6163      _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'
6164      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6165      ;;
6166    esac
6167    ;;
6168  linux* | k*bsd*-gnu | gnu*)
6169    _LT_TAGVAR(link_all_deplibs, $1)=no
6170    ;;
6171  *)
6172    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6173    ;;
6174  esac
6175], [
6176  runpath_var=
6177  _LT_TAGVAR(allow_undefined_flag, $1)=
6178  _LT_TAGVAR(always_export_symbols, $1)=no
6179  _LT_TAGVAR(archive_cmds, $1)=
6180  _LT_TAGVAR(archive_expsym_cmds, $1)=
6181  _LT_TAGVAR(compiler_needs_object, $1)=no
6182  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6183  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6184  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6185  _LT_TAGVAR(hardcode_automatic, $1)=no
6186  _LT_TAGVAR(hardcode_direct, $1)=no
6187  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6188  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6189  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6190  _LT_TAGVAR(hardcode_minus_L, $1)=no
6191  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6192  _LT_TAGVAR(inherit_rpath, $1)=no
6193  _LT_TAGVAR(link_all_deplibs, $1)=unknown
6194  _LT_TAGVAR(module_cmds, $1)=
6195  _LT_TAGVAR(module_expsym_cmds, $1)=
6196  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6197  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6198  _LT_TAGVAR(thread_safe_flag_spec, $1)=
6199  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6200  # include_expsyms should be a list of space-separated symbols to be *always*
6201  # included in the symbol list
6202  _LT_TAGVAR(include_expsyms, $1)=
6203  # exclude_expsyms can be an extended regexp of symbols to exclude
6204  # it will be wrapped by ' (' and ')$', so one must not match beginning or
6205  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
6206  # as well as any symbol that contains 'd'.
6207  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6208  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6209  # platforms (ab)use it in PIC code, but their linkers get confused if
6210  # the symbol is explicitly referenced.  Since portable code cannot
6211  # rely on this symbol name, it's probably fine to never include it in
6212  # preloaded symbol tables.
6213  # Exclude shared library initialization/finalization symbols.
6214dnl Note also adjust exclude_expsyms for C++ above.
6215  extract_expsyms_cmds=
6216
6217  case $host_os in
6218  cygwin* | mingw* | pw32* | cegcc*)
6219    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6220    # When not using gcc, we currently assume that we are using
6221    # Microsoft Visual C++.
6222    if test yes != "$GCC"; then
6223      with_gnu_ld=no
6224    fi
6225    ;;
6226  interix*)
6227    # we just hope/assume this is gcc and not c89 (= MSVC++)
6228    with_gnu_ld=yes
6229    ;;
6230  openbsd* | bitrig*)
6231    with_gnu_ld=no
6232    ;;
6233  linux* | k*bsd*-gnu | gnu*)
6234    _LT_TAGVAR(link_all_deplibs, $1)=no
6235    ;;
6236  esac
6237
6238  _LT_TAGVAR(ld_shlibs, $1)=yes
6239
6240  # On some targets, GNU ld is compatible enough with the native linker
6241  # that we're better off using the native interface for both.
6242  lt_use_gnu_ld_interface=no
6243  if test yes = "$with_gnu_ld"; then
6244    case $host_os in
6245      aix*)
6246	# The AIX port of GNU ld has always aspired to compatibility
6247	# with the native linker.  However, as the warning in the GNU ld
6248	# block says, versions before 2.19.5* couldn't really create working
6249	# shared libraries, regardless of the interface used.
6250	case `$LD -v 2>&1` in
6251	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6252	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6253	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6254	  *)
6255	    lt_use_gnu_ld_interface=yes
6256	    ;;
6257	esac
6258	;;
6259      *)
6260	lt_use_gnu_ld_interface=yes
6261	;;
6262    esac
6263  fi
6264
6265  if test yes = "$lt_use_gnu_ld_interface"; then
6266    # If archive_cmds runs LD, not CC, wlarc should be empty
6267    wlarc='$wl'
6268
6269    # Set some defaults for GNU ld with shared library support. These
6270    # are reset later if shared libraries are not supported. Putting them
6271    # here allows them to be overridden if necessary.
6272    runpath_var=LD_RUN_PATH
6273    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6274    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6275    # ancient GNU ld didn't support --whole-archive et. al.
6276    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6277      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6278    else
6279      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6280    fi
6281    supports_anon_versioning=no
6282    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
6283      *GNU\ gold*) supports_anon_versioning=yes ;;
6284      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6285      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6286      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6287      *\ 2.11.*) ;; # other 2.11 versions
6288      *) supports_anon_versioning=yes ;;
6289    esac
6290
6291    # See if GNU ld supports shared libraries.
6292    case $host_os in
6293    aix[[3-9]]*)
6294      # On AIX/PPC, the GNU linker is very broken
6295      if test ia64 != "$host_cpu"; then
6296	_LT_TAGVAR(ld_shlibs, $1)=no
6297	cat <<_LT_EOF 1>&2
6298
6299*** Warning: the GNU linker, at least up to release 2.19, is reported
6300*** to be unable to reliably create shared libraries on AIX.
6301*** Therefore, libtool is disabling shared libraries support.  If you
6302*** really care for shared libraries, you may want to install binutils
6303*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6304*** You will then need to restart the configuration process.
6305
6306_LT_EOF
6307      fi
6308      ;;
6309
6310    amigaos*)
6311      case $host_cpu in
6312      powerpc)
6313            # see comment about AmigaOS4 .so support
6314            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6315            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6316        ;;
6317      m68k)
6318            _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)'
6319            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6320            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6321        ;;
6322      esac
6323      ;;
6324
6325    beos*)
6326      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6327	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6328	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6329	# support --undefined.  This deserves some investigation.  FIXME
6330	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6331      else
6332	_LT_TAGVAR(ld_shlibs, $1)=no
6333      fi
6334      ;;
6335
6336    cygwin* | mingw* | pw32* | cegcc*)
6337      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6338      # as there is no search path for DLLs.
6339      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6340      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6341      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6342      _LT_TAGVAR(always_export_symbols, $1)=no
6343      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6344      _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'
6345      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6346
6347      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6348        _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'
6349	# If the export-symbols file already is a .def file, use it as
6350	# is; otherwise, prepend EXPORTS...
6351	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6352          cp $export_symbols $output_objdir/$soname.def;
6353        else
6354          echo EXPORTS > $output_objdir/$soname.def;
6355          cat $export_symbols >> $output_objdir/$soname.def;
6356        fi~
6357        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6358      else
6359	_LT_TAGVAR(ld_shlibs, $1)=no
6360      fi
6361      ;;
6362
6363    haiku*)
6364      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6365      _LT_TAGVAR(link_all_deplibs, $1)=yes
6366      ;;
6367
6368    os2*)
6369      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6370      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6371      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6372      shrext_cmds=.dll
6373      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6374	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6375	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6376	$ECHO EXPORTS >> $output_objdir/$libname.def~
6377	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6378	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6379	emximp -o $lib $output_objdir/$libname.def'
6380      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6381	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6382	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6383	$ECHO EXPORTS >> $output_objdir/$libname.def~
6384	prefix_cmds="$SED"~
6385	if test EXPORTS = "`$SED 1q $export_symbols`"; then
6386	  prefix_cmds="$prefix_cmds -e 1d";
6387	fi~
6388	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6389	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6390	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6391	emximp -o $lib $output_objdir/$libname.def'
6392      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6393      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6394      ;;
6395
6396    interix[[3-9]]*)
6397      _LT_TAGVAR(hardcode_direct, $1)=no
6398      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6399      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6400      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6401      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6402      # Instead, shared libraries are loaded at an image base (0x10000000 by
6403      # default) and relocated if they conflict, which is a slow very memory
6404      # consuming and fragmenting process.  To avoid this, we pick a random,
6405      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6406      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6407      _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'
6408      _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'
6409      ;;
6410
6411    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6412      tmp_diet=no
6413      if test linux-dietlibc = "$host_os"; then
6414	case $cc_basename in
6415	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
6416	esac
6417      fi
6418      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6419	 && test no = "$tmp_diet"
6420      then
6421	tmp_addflag=' $pic_flag'
6422	tmp_sharedflag='-shared'
6423	case $cc_basename,$host_cpu in
6424        pgcc*)				# Portland Group C compiler
6425	  _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'
6426	  tmp_addflag=' $pic_flag'
6427	  ;;
6428	pgf77* | pgf90* | pgf95* | pgfortran*)
6429					# Portland Group f77 and f90 compilers
6430	  _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'
6431	  tmp_addflag=' $pic_flag -Mnomain' ;;
6432	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
6433	  tmp_addflag=' -i_dynamic' ;;
6434	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6435	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6436	ifc* | ifort*)			# Intel Fortran compiler
6437	  tmp_addflag=' -nofor_main' ;;
6438	lf95*)				# Lahey Fortran 8.1
6439	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6440	  tmp_sharedflag='--shared' ;;
6441        nagfor*)                        # NAGFOR 5.3
6442          tmp_sharedflag='-Wl,-shared' ;;
6443	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6444	  tmp_sharedflag='-qmkshrobj'
6445	  tmp_addflag= ;;
6446	nvcc*)	# Cuda Compiler Driver 2.2
6447	  _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'
6448	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6449	  ;;
6450	esac
6451	case `$CC -V 2>&1 | sed 5q` in
6452	*Sun\ C*)			# Sun C 5.9
6453	  _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'
6454	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6455	  tmp_sharedflag='-G' ;;
6456	*Sun\ F*)			# Sun Fortran 8.3
6457	  tmp_sharedflag='-G' ;;
6458	esac
6459	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6460
6461        if test yes = "$supports_anon_versioning"; then
6462          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6463            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6464            echo "local: *; };" >> $output_objdir/$libname.ver~
6465            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
6466        fi
6467
6468	case $cc_basename in
6469	tcc*)
6470	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
6471	  ;;
6472	xlf* | bgf* | bgxlf* | mpixlf*)
6473	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6474	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6475	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6476	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6477	  if test yes = "$supports_anon_versioning"; then
6478	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6479              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6480              echo "local: *; };" >> $output_objdir/$libname.ver~
6481              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6482	  fi
6483	  ;;
6484	esac
6485      else
6486        _LT_TAGVAR(ld_shlibs, $1)=no
6487      fi
6488      ;;
6489
6490    netbsd* | netbsdelf*-gnu)
6491      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6492	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6493	wlarc=
6494      else
6495	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6496	_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'
6497      fi
6498      ;;
6499
6500    solaris*)
6501      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6502	_LT_TAGVAR(ld_shlibs, $1)=no
6503	cat <<_LT_EOF 1>&2
6504
6505*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6506*** create shared libraries on Solaris systems.  Therefore, libtool
6507*** is disabling shared libraries support.  We urge you to upgrade GNU
6508*** binutils to release 2.9.1 or newer.  Another option is to modify
6509*** your PATH or compiler configuration so that the native linker is
6510*** used, and then restart.
6511
6512_LT_EOF
6513      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6514	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6515	_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'
6516      else
6517	_LT_TAGVAR(ld_shlibs, $1)=no
6518      fi
6519      ;;
6520
6521    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6522      case `$LD -v 2>&1` in
6523        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6524	_LT_TAGVAR(ld_shlibs, $1)=no
6525	cat <<_LT_EOF 1>&2
6526
6527*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
6528*** reliably create shared libraries on SCO systems.  Therefore, libtool
6529*** is disabling shared libraries support.  We urge you to upgrade GNU
6530*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6531*** your PATH or compiler configuration so that the native linker is
6532*** used, and then restart.
6533
6534_LT_EOF
6535	;;
6536	*)
6537	  # For security reasons, it is highly recommended that you always
6538	  # use absolute paths for naming shared libraries, and exclude the
6539	  # DT_RUNPATH tag from executables and libraries.  But doing so
6540	  # requires that you compile everything twice, which is a pain.
6541	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6542	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6543	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6544	    _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'
6545	  else
6546	    _LT_TAGVAR(ld_shlibs, $1)=no
6547	  fi
6548	;;
6549      esac
6550      ;;
6551
6552    sunos4*)
6553      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6554      wlarc=
6555      _LT_TAGVAR(hardcode_direct, $1)=yes
6556      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6557      ;;
6558
6559    *)
6560      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6561	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6562	_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'
6563      else
6564	_LT_TAGVAR(ld_shlibs, $1)=no
6565      fi
6566      ;;
6567    esac
6568
6569    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
6570      runpath_var=
6571      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6572      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6573      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6574    fi
6575  else
6576    # PORTME fill in a description of your system's linker (not GNU ld)
6577    case $host_os in
6578    aix3*)
6579      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6580      _LT_TAGVAR(always_export_symbols, $1)=yes
6581      _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'
6582      # Note: this linker hardcodes the directories in LIBPATH if there
6583      # are no directories specified by -L.
6584      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6585      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
6586	# Neither direct hardcoding nor static linking is supported with a
6587	# broken collect2.
6588	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6589      fi
6590      ;;
6591
6592    aix[[4-9]]*)
6593      if test ia64 = "$host_cpu"; then
6594	# On IA64, the linker does run time linking by default, so we don't
6595	# have to do anything special.
6596	aix_use_runtimelinking=no
6597	exp_sym_flag='-Bexport'
6598	no_entry_flag=
6599      else
6600	# If we're using GNU nm, then we don't want the "-C" option.
6601	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
6602	# Without the "-l" option, or with the "-B" option, AIX nm treats
6603	# weak defined symbols like other global defined symbols, whereas
6604	# GNU nm marks them as "W".
6605	# While the 'weak' keyword is ignored in the Export File, we need
6606	# it in the Import File for the 'aix-soname' feature, so we have
6607	# to replace the "-B" option with "-P" for AIX nm.
6608	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6609	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
6610	else
6611	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
6612	fi
6613	aix_use_runtimelinking=no
6614
6615	# Test if we are trying to use run time linking or normal
6616	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6617	# have runtime linking enabled, and use it for executables.
6618	# For shared libraries, we enable/disable runtime linking
6619	# depending on the kind of the shared library created -
6620	# when "with_aix_soname,aix_use_runtimelinking" is:
6621	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6622	# "aix,yes"  lib.so          shared, rtl:yes, for executables
6623	#            lib.a           static archive
6624	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
6625	#            lib.a(lib.so.V) shared, rtl:no,  for executables
6626	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6627	#            lib.a(lib.so.V) shared, rtl:no
6628	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6629	#            lib.a           static archive
6630	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6631	  for ld_flag in $LDFLAGS; do
6632	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
6633	    aix_use_runtimelinking=yes
6634	    break
6635	  fi
6636	  done
6637	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6638	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
6639	    # so we don't have lib.a shared libs to link our executables.
6640	    # We have to force runtime linking in this case.
6641	    aix_use_runtimelinking=yes
6642	    LDFLAGS="$LDFLAGS -Wl,-brtl"
6643	  fi
6644	  ;;
6645	esac
6646
6647	exp_sym_flag='-bexport'
6648	no_entry_flag='-bnoentry'
6649      fi
6650
6651      # When large executables or shared objects are built, AIX ld can
6652      # have problems creating the table of contents.  If linking a library
6653      # or program results in "error TOC overflow" add -mminimal-toc to
6654      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6655      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6656
6657      _LT_TAGVAR(archive_cmds, $1)=''
6658      _LT_TAGVAR(hardcode_direct, $1)=yes
6659      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6660      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6661      _LT_TAGVAR(link_all_deplibs, $1)=yes
6662      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6663      case $with_aix_soname,$aix_use_runtimelinking in
6664      aix,*) ;; # traditional, no import file
6665      svr4,* | *,yes) # use import file
6666	# The Import File defines what to hardcode.
6667	_LT_TAGVAR(hardcode_direct, $1)=no
6668	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6669	;;
6670      esac
6671
6672      if test yes = "$GCC"; then
6673	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6674	# We only want to do this on AIX 4.2 and lower, the check
6675	# below for broken collect2 doesn't work under 4.3+
6676	  collect2name=`$CC -print-prog-name=collect2`
6677	  if test -f "$collect2name" &&
6678	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6679	  then
6680	  # We have reworked collect2
6681	  :
6682	  else
6683	  # We have old collect2
6684	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
6685	  # It fails to find uninstalled libraries when the uninstalled
6686	  # path is not listed in the libpath.  Setting hardcode_minus_L
6687	  # to unsupported forces relinking
6688	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6689	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6690	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6691	  fi
6692	  ;;
6693	esac
6694	shared_flag='-shared'
6695	if test yes = "$aix_use_runtimelinking"; then
6696	  shared_flag="$shared_flag "'$wl-G'
6697	fi
6698	# Need to ensure runtime linking is disabled for the traditional
6699	# shared library, or the linker may eventually find shared libraries
6700	# /with/ Import File - we do not want to mix them.
6701	shared_flag_aix='-shared'
6702	shared_flag_svr4='-shared $wl-G'
6703      else
6704	# not using gcc
6705	if test ia64 = "$host_cpu"; then
6706	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6707	# chokes on -Wl,-G. The following line is correct:
6708	  shared_flag='-G'
6709	else
6710	  if test yes = "$aix_use_runtimelinking"; then
6711	    shared_flag='$wl-G'
6712	  else
6713	    shared_flag='$wl-bM:SRE'
6714	  fi
6715	  shared_flag_aix='$wl-bM:SRE'
6716	  shared_flag_svr4='$wl-G'
6717	fi
6718      fi
6719
6720      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6721      # It seems that -bexpall does not export symbols beginning with
6722      # underscore (_), so it is better to generate a list of symbols to export.
6723      _LT_TAGVAR(always_export_symbols, $1)=yes
6724      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6725	# Warning - without using the other runtime loading flags (-brtl),
6726	# -berok will link without error, but may produce a broken library.
6727	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6728        # Determine the default libpath from the value encoded in an
6729        # empty executable.
6730        _LT_SYS_MODULE_PATH_AIX([$1])
6731        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6732        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6733      else
6734	if test ia64 = "$host_cpu"; then
6735	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6736	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6737	  _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"
6738	else
6739	 # Determine the default libpath from the value encoded in an
6740	 # empty executable.
6741	 _LT_SYS_MODULE_PATH_AIX([$1])
6742	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6743	  # Warning - without using the other run time loading flags,
6744	  # -berok will link without error, but may produce a broken library.
6745	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6746	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6747	  if test yes = "$with_gnu_ld"; then
6748	    # We only use this code for GNU lds that support --whole-archive.
6749	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6750	  else
6751	    # Exported symbols can be pulled into shared objects from archives
6752	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6753	  fi
6754	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6755	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6756	  # -brtl affects multiple linker settings, -berok does not and is overridden later
6757	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6758	  if test svr4 != "$with_aix_soname"; then
6759	    # This is similar to how AIX traditionally builds its shared libraries.
6760	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6761	  fi
6762	  if test aix != "$with_aix_soname"; then
6763	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6764	  else
6765	    # used by -dlpreopen to get the symbols
6766	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6767	  fi
6768	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6769	fi
6770      fi
6771      ;;
6772
6773    amigaos*)
6774      case $host_cpu in
6775      powerpc)
6776            # see comment about AmigaOS4 .so support
6777            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6778            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6779        ;;
6780      m68k)
6781            _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)'
6782            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6783            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6784        ;;
6785      esac
6786      ;;
6787
6788    bsdi[[45]]*)
6789      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6790      ;;
6791
6792    cygwin* | mingw* | pw32* | cegcc*)
6793      # When not using gcc, we currently assume that we are using
6794      # Microsoft Visual C++.
6795      # hardcode_libdir_flag_spec is actually meaningless, as there is
6796      # no search path for DLLs.
6797      case $cc_basename in
6798      cl*)
6799	# Native MSVC
6800	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6801	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6802	_LT_TAGVAR(always_export_symbols, $1)=yes
6803	_LT_TAGVAR(file_list_spec, $1)='@'
6804	# Tell ltmain to make .lib files, not .a files.
6805	libext=lib
6806	# Tell ltmain to make .dll files, not .so files.
6807	shrext_cmds=.dll
6808	# FIXME: Setting linknames here is a bad hack.
6809	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6810	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6811            cp "$export_symbols" "$output_objdir/$soname.def";
6812            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6813          else
6814            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6815          fi~
6816          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6817          linknames='
6818	# The linker will not automatically build a static lib if we build a DLL.
6819	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6820	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6821	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6822	_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'
6823	# Don't use ranlib
6824	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6825	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6826          lt_tool_outputfile="@TOOL_OUTPUT@"~
6827          case $lt_outputfile in
6828            *.exe|*.EXE) ;;
6829            *)
6830              lt_outputfile=$lt_outputfile.exe
6831              lt_tool_outputfile=$lt_tool_outputfile.exe
6832              ;;
6833          esac~
6834          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6835            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6836            $RM "$lt_outputfile.manifest";
6837          fi'
6838	;;
6839      *)
6840	# Assume MSVC wrapper
6841	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6842	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6843	# Tell ltmain to make .lib files, not .a files.
6844	libext=lib
6845	# Tell ltmain to make .dll files, not .so files.
6846	shrext_cmds=.dll
6847	# FIXME: Setting linknames here is a bad hack.
6848	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6849	# The linker will automatically build a .lib file if we build a DLL.
6850	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6851	# FIXME: Should let the user specify the lib program.
6852	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6853	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6854	;;
6855      esac
6856      ;;
6857
6858    darwin* | rhapsody*)
6859      _LT_DARWIN_LINKER_FEATURES($1)
6860      ;;
6861
6862    dgux*)
6863      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6864      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6865      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6866      ;;
6867
6868    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6869    # support.  Future versions do this automatically, but an explicit c++rt0.o
6870    # does not break anything, and helps significantly (at the cost of a little
6871    # extra space).
6872    freebsd2.2*)
6873      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6874      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6875      _LT_TAGVAR(hardcode_direct, $1)=yes
6876      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6877      ;;
6878
6879    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6880    freebsd2.*)
6881      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6882      _LT_TAGVAR(hardcode_direct, $1)=yes
6883      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6884      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6885      ;;
6886
6887    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6888    freebsd* | dragonfly*)
6889      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6890      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6891      _LT_TAGVAR(hardcode_direct, $1)=yes
6892      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6893      ;;
6894
6895    hpux9*)
6896      if test yes = "$GCC"; then
6897	_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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6898      else
6899	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6900      fi
6901      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6902      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6903      _LT_TAGVAR(hardcode_direct, $1)=yes
6904
6905      # hardcode_minus_L: Not really in the search PATH,
6906      # but as the default location of the library.
6907      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6908      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6909      ;;
6910
6911    hpux10*)
6912      if test yes,no = "$GCC,$with_gnu_ld"; then
6913	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6914      else
6915	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6916      fi
6917      if test no = "$with_gnu_ld"; then
6918	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6919	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6920	_LT_TAGVAR(hardcode_direct, $1)=yes
6921	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6922	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6923	# hardcode_minus_L: Not really in the search PATH,
6924	# but as the default location of the library.
6925	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6926      fi
6927      ;;
6928
6929    hpux11*)
6930      if test yes,no = "$GCC,$with_gnu_ld"; then
6931	case $host_cpu in
6932	hppa*64*)
6933	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6934	  ;;
6935	ia64*)
6936	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6937	  ;;
6938	*)
6939	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6940	  ;;
6941	esac
6942      else
6943	case $host_cpu in
6944	hppa*64*)
6945	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6946	  ;;
6947	ia64*)
6948	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6949	  ;;
6950	*)
6951	m4_if($1, [], [
6952	  # Older versions of the 11.00 compiler do not understand -b yet
6953	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6954	  _LT_LINKER_OPTION([if $CC understands -b],
6955	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6956	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6957	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6958	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6959	  ;;
6960	esac
6961      fi
6962      if test no = "$with_gnu_ld"; then
6963	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6964	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6965
6966	case $host_cpu in
6967	hppa*64*|ia64*)
6968	  _LT_TAGVAR(hardcode_direct, $1)=no
6969	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6970	  ;;
6971	*)
6972	  _LT_TAGVAR(hardcode_direct, $1)=yes
6973	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6974	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6975
6976	  # hardcode_minus_L: Not really in the search PATH,
6977	  # but as the default location of the library.
6978	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6979	  ;;
6980	esac
6981      fi
6982      ;;
6983
6984    irix5* | irix6* | nonstopux*)
6985      if test yes = "$GCC"; then
6986	_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'
6987	# Try to use the -exported_symbol ld option, if it does not
6988	# work, assume that -exports_file does not work either and
6989	# implicitly export all symbols.
6990	# This should be the same for all languages, so no per-tag cache variable.
6991	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6992	  [lt_cv_irix_exported_symbol],
6993	  [save_LDFLAGS=$LDFLAGS
6994	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
6995	   AC_LINK_IFELSE(
6996	     [AC_LANG_SOURCE(
6997	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6998			      [C++], [[int foo (void) { return 0; }]],
6999			      [Fortran 77], [[
7000      subroutine foo
7001      end]],
7002			      [Fortran], [[
7003      subroutine foo
7004      end]])])],
7005	      [lt_cv_irix_exported_symbol=yes],
7006	      [lt_cv_irix_exported_symbol=no])
7007           LDFLAGS=$save_LDFLAGS])
7008	if test yes = "$lt_cv_irix_exported_symbol"; then
7009          _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'
7010	fi
7011	_LT_TAGVAR(link_all_deplibs, $1)=no
7012      else
7013	_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'
7014	_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'
7015      fi
7016      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7017      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7018      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7019      _LT_TAGVAR(inherit_rpath, $1)=yes
7020      _LT_TAGVAR(link_all_deplibs, $1)=yes
7021      ;;
7022
7023    linux*)
7024      case $cc_basename in
7025      tcc*)
7026	# Fabrice Bellard et al's Tiny C Compiler
7027	_LT_TAGVAR(ld_shlibs, $1)=yes
7028	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7029	;;
7030      esac
7031      ;;
7032
7033    netbsd* | netbsdelf*-gnu)
7034      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7035	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7036      else
7037	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7038      fi
7039      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7040      _LT_TAGVAR(hardcode_direct, $1)=yes
7041      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7042      ;;
7043
7044    newsos6)
7045      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7046      _LT_TAGVAR(hardcode_direct, $1)=yes
7047      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7048      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7049      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7050      ;;
7051
7052    *nto* | *qnx*)
7053      ;;
7054
7055    openbsd* | bitrig*)
7056      if test -f /usr/libexec/ld.so; then
7057	_LT_TAGVAR(hardcode_direct, $1)=yes
7058	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7059	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7060	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7061	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7062	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
7063	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7064	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7065	else
7066	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7067	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7068	fi
7069      else
7070	_LT_TAGVAR(ld_shlibs, $1)=no
7071      fi
7072      ;;
7073
7074    os2*)
7075      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7076      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7077      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7078      shrext_cmds=.dll
7079      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7080	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7081	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7082	$ECHO EXPORTS >> $output_objdir/$libname.def~
7083	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
7084	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7085	emximp -o $lib $output_objdir/$libname.def'
7086      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7087	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7088	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7089	$ECHO EXPORTS >> $output_objdir/$libname.def~
7090	prefix_cmds="$SED"~
7091	if test EXPORTS = "`$SED 1q $export_symbols`"; then
7092	  prefix_cmds="$prefix_cmds -e 1d";
7093	fi~
7094	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
7095	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
7096	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7097	emximp -o $lib $output_objdir/$libname.def'
7098      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
7099      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7100      ;;
7101
7102    osf3*)
7103      if test yes = "$GCC"; then
7104	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7105	_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'
7106      else
7107	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7108	_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'
7109      fi
7110      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7111      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7112      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7113      ;;
7114
7115    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7116      if test yes = "$GCC"; then
7117	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7118	_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'
7119	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7120      else
7121	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7122	_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'
7123	_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~
7124          $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'
7125
7126	# Both c and cxx compiler support -rpath directly
7127	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7128      fi
7129      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7130      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7131      ;;
7132
7133    solaris*)
7134      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7135      if test yes = "$GCC"; then
7136	wlarc='$wl'
7137	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
7138	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7139          $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'
7140      else
7141	case `$CC -V 2>&1` in
7142	*"Compilers 5.0"*)
7143	  wlarc=''
7144	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
7145	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7146            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7147	  ;;
7148	*)
7149	  wlarc='$wl'
7150	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7151	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7152            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7153	  ;;
7154	esac
7155      fi
7156      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7157      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7158      case $host_os in
7159      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7160      *)
7161	# The compiler driver will combine and reorder linker options,
7162	# but understands '-z linker_flag'.  GCC discards it without '$wl',
7163	# but is careful enough not to reorder.
7164	# Supported since Solaris 2.6 (maybe 2.5.1?)
7165	if test yes = "$GCC"; then
7166	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7167	else
7168	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7169	fi
7170	;;
7171      esac
7172      _LT_TAGVAR(link_all_deplibs, $1)=yes
7173      ;;
7174
7175    sunos4*)
7176      if test sequent = "$host_vendor"; then
7177	# Use $CC to link under sequent, because it throws in some extra .o
7178	# files that make .init and .fini sections work.
7179	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7180      else
7181	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7182      fi
7183      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7184      _LT_TAGVAR(hardcode_direct, $1)=yes
7185      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7186      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7187      ;;
7188
7189    sysv4)
7190      case $host_vendor in
7191	sni)
7192	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7193	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7194	;;
7195	siemens)
7196	  ## LD is ld it makes a PLAMLIB
7197	  ## CC just makes a GrossModule.
7198	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7199	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7200	  _LT_TAGVAR(hardcode_direct, $1)=no
7201        ;;
7202	motorola)
7203	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7204	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7205	;;
7206      esac
7207      runpath_var='LD_RUN_PATH'
7208      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7209      ;;
7210
7211    sysv4.3*)
7212      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7213      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7214      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7215      ;;
7216
7217    sysv4*MP*)
7218      if test -d /usr/nec; then
7219	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7220	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7221	runpath_var=LD_RUN_PATH
7222	hardcode_runpath_var=yes
7223	_LT_TAGVAR(ld_shlibs, $1)=yes
7224      fi
7225      ;;
7226
7227    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7228      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7229      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7230      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7231      runpath_var='LD_RUN_PATH'
7232
7233      if test yes = "$GCC"; then
7234	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7235	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7236      else
7237	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7238	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7239      fi
7240      ;;
7241
7242    sysv5* | sco3.2v5* | sco5v6*)
7243      # Note: We CANNOT use -z defs as we might desire, because we do not
7244      # link with -lc, and that would cause any symbols used from libc to
7245      # always be unresolved, which means just about no library would
7246      # ever link correctly.  If we're not using GNU ld we use -z text
7247      # though, which does catch some bad symbols but isn't as heavy-handed
7248      # as -z defs.
7249      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7250      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7251      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7252      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7253      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7254      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7255      _LT_TAGVAR(link_all_deplibs, $1)=yes
7256      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7257      runpath_var='LD_RUN_PATH'
7258
7259      if test yes = "$GCC"; then
7260	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7261	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7262      else
7263	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7264	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7265      fi
7266      ;;
7267
7268    uts4*)
7269      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7270      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7271      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7272      ;;
7273
7274    *)
7275      _LT_TAGVAR(ld_shlibs, $1)=no
7276      ;;
7277    esac
7278
7279    if test sni = "$host_vendor"; then
7280      case $host in
7281      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7282	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
7283	;;
7284      esac
7285    fi
7286  fi
7287])
7288AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7289test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7290
7291_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7292
7293_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7294_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7295_LT_DECL([], [extract_expsyms_cmds], [2],
7296    [The commands to extract the exported symbol list from a shared archive])
7297
7298#
7299# Do we need to explicitly link libc?
7300#
7301case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7302x|xyes)
7303  # Assume -lc should be added
7304  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7305
7306  if test yes,yes = "$GCC,$enable_shared"; then
7307    case $_LT_TAGVAR(archive_cmds, $1) in
7308    *'~'*)
7309      # FIXME: we may have to deal with multi-command sequences.
7310      ;;
7311    '$CC '*)
7312      # Test whether the compiler implicitly links with -lc since on some
7313      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7314      # to ld, don't add -lc before -lgcc.
7315      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7316	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7317	[$RM conftest*
7318	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7319
7320	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7321	  soname=conftest
7322	  lib=conftest
7323	  libobjs=conftest.$ac_objext
7324	  deplibs=
7325	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7326	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7327	  compiler_flags=-v
7328	  linker_flags=-v
7329	  verstring=
7330	  output_objdir=.
7331	  libname=conftest
7332	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7333	  _LT_TAGVAR(allow_undefined_flag, $1)=
7334	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7335	  then
7336	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7337	  else
7338	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7339	  fi
7340	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7341	else
7342	  cat conftest.err 1>&5
7343	fi
7344	$RM conftest*
7345	])
7346      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7347      ;;
7348    esac
7349  fi
7350  ;;
7351esac
7352
7353_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7354    [Whether or not to add -lc for building shared libraries])
7355_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7356    [enable_shared_with_static_runtimes], [0],
7357    [Whether or not to disallow shared libs when runtime libs are static])
7358_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7359    [Compiler flag to allow reflexive dlopens])
7360_LT_TAGDECL([], [whole_archive_flag_spec], [1],
7361    [Compiler flag to generate shared objects directly from archives])
7362_LT_TAGDECL([], [compiler_needs_object], [1],
7363    [Whether the compiler copes with passing no objects directly])
7364_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7365    [Create an old-style archive from a shared archive])
7366_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7367    [Create a temporary old-style archive to link instead of a shared archive])
7368_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7369_LT_TAGDECL([], [archive_expsym_cmds], [2])
7370_LT_TAGDECL([], [module_cmds], [2],
7371    [Commands used to build a loadable module if different from building
7372    a shared archive.])
7373_LT_TAGDECL([], [module_expsym_cmds], [2])
7374_LT_TAGDECL([], [with_gnu_ld], [1],
7375    [Whether we are building with GNU ld or not])
7376_LT_TAGDECL([], [allow_undefined_flag], [1],
7377    [Flag that allows shared libraries with undefined symbols to be built])
7378_LT_TAGDECL([], [no_undefined_flag], [1],
7379    [Flag that enforces no undefined symbols])
7380_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7381    [Flag to hardcode $libdir into a binary during linking.
7382    This must work even if $libdir does not exist])
7383_LT_TAGDECL([], [hardcode_libdir_separator], [1],
7384    [Whether we need a single "-rpath" flag with a separated argument])
7385_LT_TAGDECL([], [hardcode_direct], [0],
7386    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
7387    DIR into the resulting binary])
7388_LT_TAGDECL([], [hardcode_direct_absolute], [0],
7389    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
7390    DIR into the resulting binary and the resulting library dependency is
7391    "absolute", i.e impossible to change by setting $shlibpath_var if the
7392    library is relocated])
7393_LT_TAGDECL([], [hardcode_minus_L], [0],
7394    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7395    into the resulting binary])
7396_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7397    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7398    into the resulting binary])
7399_LT_TAGDECL([], [hardcode_automatic], [0],
7400    [Set to "yes" if building a shared library automatically hardcodes DIR
7401    into the library and all subsequent libraries and executables linked
7402    against it])
7403_LT_TAGDECL([], [inherit_rpath], [0],
7404    [Set to yes if linker adds runtime paths of dependent libraries
7405    to runtime path list])
7406_LT_TAGDECL([], [link_all_deplibs], [0],
7407    [Whether libtool must link a program against all its dependency libraries])
7408_LT_TAGDECL([], [always_export_symbols], [0],
7409    [Set to "yes" if exported symbols are required])
7410_LT_TAGDECL([], [export_symbols_cmds], [2],
7411    [The commands to list exported symbols])
7412_LT_TAGDECL([], [exclude_expsyms], [1],
7413    [Symbols that should not be listed in the preloaded symbols])
7414_LT_TAGDECL([], [include_expsyms], [1],
7415    [Symbols that must always be exported])
7416_LT_TAGDECL([], [prelink_cmds], [2],
7417    [Commands necessary for linking programs (against libraries) with templates])
7418_LT_TAGDECL([], [postlink_cmds], [2],
7419    [Commands necessary for finishing linking programs])
7420_LT_TAGDECL([], [file_list_spec], [1],
7421    [Specify filename containing input files])
7422dnl FIXME: Not yet implemented
7423dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7424dnl    [Compiler flag to generate thread safe objects])
7425])# _LT_LINKER_SHLIBS
7426
7427
7428# _LT_LANG_C_CONFIG([TAG])
7429# ------------------------
7430# Ensure that the configuration variables for a C compiler are suitably
7431# defined.  These variables are subsequently used by _LT_CONFIG to write
7432# the compiler configuration to 'libtool'.
7433m4_defun([_LT_LANG_C_CONFIG],
7434[m4_require([_LT_DECL_EGREP])dnl
7435lt_save_CC=$CC
7436AC_LANG_PUSH(C)
7437
7438# Source file extension for C test sources.
7439ac_ext=c
7440
7441# Object file extension for compiled C test sources.
7442objext=o
7443_LT_TAGVAR(objext, $1)=$objext
7444
7445# Code to be used in simple compile tests
7446lt_simple_compile_test_code="int some_variable = 0;"
7447
7448# Code to be used in simple link tests
7449lt_simple_link_test_code='int main(){return(0);}'
7450
7451_LT_TAG_COMPILER
7452# Save the default compiler, since it gets overwritten when the other
7453# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7454compiler_DEFAULT=$CC
7455
7456# save warnings/boilerplate of simple test code
7457_LT_COMPILER_BOILERPLATE
7458_LT_LINKER_BOILERPLATE
7459
7460if test -n "$compiler"; then
7461  _LT_COMPILER_NO_RTTI($1)
7462  _LT_COMPILER_PIC($1)
7463  _LT_COMPILER_C_O($1)
7464  _LT_COMPILER_FILE_LOCKS($1)
7465  _LT_LINKER_SHLIBS($1)
7466  _LT_SYS_DYNAMIC_LINKER($1)
7467  _LT_LINKER_HARDCODE_LIBPATH($1)
7468  LT_SYS_DLOPEN_SELF
7469  _LT_CMD_STRIPLIB
7470
7471  # Report what library types will actually be built
7472  AC_MSG_CHECKING([if libtool supports shared libraries])
7473  AC_MSG_RESULT([$can_build_shared])
7474
7475  AC_MSG_CHECKING([whether to build shared libraries])
7476  test no = "$can_build_shared" && enable_shared=no
7477
7478  # On AIX, shared libraries and static libraries use the same namespace, and
7479  # are all built from PIC.
7480  case $host_os in
7481  aix3*)
7482    test yes = "$enable_shared" && enable_static=no
7483    if test -n "$RANLIB"; then
7484      archive_cmds="$archive_cmds~\$RANLIB \$lib"
7485      postinstall_cmds='$RANLIB $lib'
7486    fi
7487    ;;
7488
7489  aix[[4-9]]*)
7490    if test ia64 != "$host_cpu"; then
7491      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7492      yes,aix,yes) ;;			# shared object as lib.so file only
7493      yes,svr4,*) ;;			# shared object as lib.so archive member only
7494      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7495      esac
7496    fi
7497    ;;
7498  esac
7499  AC_MSG_RESULT([$enable_shared])
7500
7501  AC_MSG_CHECKING([whether to build static libraries])
7502  # Make sure either enable_shared or enable_static is yes.
7503  test yes = "$enable_shared" || enable_static=yes
7504  AC_MSG_RESULT([$enable_static])
7505
7506  _LT_CONFIG($1)
7507fi
7508AC_LANG_POP
7509CC=$lt_save_CC
7510])# _LT_LANG_C_CONFIG
7511
7512
7513# _LT_LANG_CXX_CONFIG([TAG])
7514# --------------------------
7515# Ensure that the configuration variables for a C++ compiler are suitably
7516# defined.  These variables are subsequently used by _LT_CONFIG to write
7517# the compiler configuration to 'libtool'.
7518m4_defun([_LT_LANG_CXX_CONFIG],
7519[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7520m4_require([_LT_DECL_EGREP])dnl
7521m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7522if test -n "$CXX" && ( test no != "$CXX" &&
7523    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
7524    (test g++ != "$CXX"))); then
7525  AC_PROG_CXXCPP
7526else
7527  _lt_caught_CXX_error=yes
7528fi
7529
7530AC_LANG_PUSH(C++)
7531_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7532_LT_TAGVAR(allow_undefined_flag, $1)=
7533_LT_TAGVAR(always_export_symbols, $1)=no
7534_LT_TAGVAR(archive_expsym_cmds, $1)=
7535_LT_TAGVAR(compiler_needs_object, $1)=no
7536_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7537_LT_TAGVAR(hardcode_direct, $1)=no
7538_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7539_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7540_LT_TAGVAR(hardcode_libdir_separator, $1)=
7541_LT_TAGVAR(hardcode_minus_L, $1)=no
7542_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7543_LT_TAGVAR(hardcode_automatic, $1)=no
7544_LT_TAGVAR(inherit_rpath, $1)=no
7545_LT_TAGVAR(module_cmds, $1)=
7546_LT_TAGVAR(module_expsym_cmds, $1)=
7547_LT_TAGVAR(link_all_deplibs, $1)=unknown
7548_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7549_LT_TAGVAR(reload_flag, $1)=$reload_flag
7550_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7551_LT_TAGVAR(no_undefined_flag, $1)=
7552_LT_TAGVAR(whole_archive_flag_spec, $1)=
7553_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7554
7555# Source file extension for C++ test sources.
7556ac_ext=cpp
7557
7558# Object file extension for compiled C++ test sources.
7559objext=o
7560_LT_TAGVAR(objext, $1)=$objext
7561
7562# No sense in running all these tests if we already determined that
7563# the CXX compiler isn't working.  Some variables (like enable_shared)
7564# are currently assumed to apply to all compilers on this platform,
7565# and will be corrupted by setting them based on a non-working compiler.
7566if test yes != "$_lt_caught_CXX_error"; then
7567  # Code to be used in simple compile tests
7568  lt_simple_compile_test_code="int some_variable = 0;"
7569
7570  # Code to be used in simple link tests
7571  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7572
7573  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7574  _LT_TAG_COMPILER
7575
7576  # save warnings/boilerplate of simple test code
7577  _LT_COMPILER_BOILERPLATE
7578  _LT_LINKER_BOILERPLATE
7579
7580  # Allow CC to be a program name with arguments.
7581  lt_save_CC=$CC
7582  lt_save_CFLAGS=$CFLAGS
7583  lt_save_LD=$LD
7584  lt_save_GCC=$GCC
7585  GCC=$GXX
7586  lt_save_with_gnu_ld=$with_gnu_ld
7587  lt_save_path_LD=$lt_cv_path_LD
7588  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7589    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7590  else
7591    $as_unset lt_cv_prog_gnu_ld
7592  fi
7593  if test -n "${lt_cv_path_LDCXX+set}"; then
7594    lt_cv_path_LD=$lt_cv_path_LDCXX
7595  else
7596    $as_unset lt_cv_path_LD
7597  fi
7598  test -z "${LDCXX+set}" || LD=$LDCXX
7599  CC=${CXX-"c++"}
7600  CFLAGS=$CXXFLAGS
7601  compiler=$CC
7602  _LT_TAGVAR(compiler, $1)=$CC
7603  _LT_CC_BASENAME([$compiler])
7604
7605  if test -n "$compiler"; then
7606    # We don't want -fno-exception when compiling C++ code, so set the
7607    # no_builtin_flag separately
7608    if test yes = "$GXX"; then
7609      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7610    else
7611      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7612    fi
7613
7614    if test yes = "$GXX"; then
7615      # Set up default GNU C++ configuration
7616
7617      LT_PATH_LD
7618
7619      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7620      # archiving commands below assume that GNU ld is being used.
7621      if test yes = "$with_gnu_ld"; then
7622        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7623        _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'
7624
7625        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7626        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7627
7628        # If archive_cmds runs LD, not CC, wlarc should be empty
7629        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7630        #     investigate it a little bit more. (MM)
7631        wlarc='$wl'
7632
7633        # ancient GNU ld didn't support --whole-archive et. al.
7634        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7635	  $GREP 'no-whole-archive' > /dev/null; then
7636          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7637        else
7638          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7639        fi
7640      else
7641        with_gnu_ld=no
7642        wlarc=
7643
7644        # A generic and very simple default shared library creation
7645        # command for GNU C++ for the case where it uses the native
7646        # linker, instead of GNU ld.  If possible, this setting should
7647        # overridden to take advantage of the native linker features on
7648        # the platform it is being used on.
7649        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7650      fi
7651
7652      # Commands to make compiler produce verbose output that lists
7653      # what "hidden" libraries, object files and flags are used when
7654      # linking a shared library.
7655      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7656
7657    else
7658      GXX=no
7659      with_gnu_ld=no
7660      wlarc=
7661    fi
7662
7663    # PORTME: fill in a description of your system's C++ link characteristics
7664    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7665    _LT_TAGVAR(ld_shlibs, $1)=yes
7666    case $host_os in
7667      aix3*)
7668        # FIXME: insert proper C++ library support
7669        _LT_TAGVAR(ld_shlibs, $1)=no
7670        ;;
7671      aix[[4-9]]*)
7672        if test ia64 = "$host_cpu"; then
7673          # On IA64, the linker does run time linking by default, so we don't
7674          # have to do anything special.
7675          aix_use_runtimelinking=no
7676          exp_sym_flag='-Bexport'
7677          no_entry_flag=
7678        else
7679          aix_use_runtimelinking=no
7680
7681          # Test if we are trying to use run time linking or normal
7682          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7683          # have runtime linking enabled, and use it for executables.
7684          # For shared libraries, we enable/disable runtime linking
7685          # depending on the kind of the shared library created -
7686          # when "with_aix_soname,aix_use_runtimelinking" is:
7687          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
7688          # "aix,yes"  lib.so          shared, rtl:yes, for executables
7689          #            lib.a           static archive
7690          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
7691          #            lib.a(lib.so.V) shared, rtl:no,  for executables
7692          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
7693          #            lib.a(lib.so.V) shared, rtl:no
7694          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
7695          #            lib.a           static archive
7696          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7697	    for ld_flag in $LDFLAGS; do
7698	      case $ld_flag in
7699	      *-brtl*)
7700	        aix_use_runtimelinking=yes
7701	        break
7702	        ;;
7703	      esac
7704	    done
7705	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
7706	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
7707	      # so we don't have lib.a shared libs to link our executables.
7708	      # We have to force runtime linking in this case.
7709	      aix_use_runtimelinking=yes
7710	      LDFLAGS="$LDFLAGS -Wl,-brtl"
7711	    fi
7712	    ;;
7713          esac
7714
7715          exp_sym_flag='-bexport'
7716          no_entry_flag='-bnoentry'
7717        fi
7718
7719        # When large executables or shared objects are built, AIX ld can
7720        # have problems creating the table of contents.  If linking a library
7721        # or program results in "error TOC overflow" add -mminimal-toc to
7722        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7723        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7724
7725        _LT_TAGVAR(archive_cmds, $1)=''
7726        _LT_TAGVAR(hardcode_direct, $1)=yes
7727        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7728        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7729        _LT_TAGVAR(link_all_deplibs, $1)=yes
7730        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
7731        case $with_aix_soname,$aix_use_runtimelinking in
7732        aix,*) ;;	# no import file
7733        svr4,* | *,yes) # use import file
7734          # The Import File defines what to hardcode.
7735          _LT_TAGVAR(hardcode_direct, $1)=no
7736          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7737          ;;
7738        esac
7739
7740        if test yes = "$GXX"; then
7741          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7742          # We only want to do this on AIX 4.2 and lower, the check
7743          # below for broken collect2 doesn't work under 4.3+
7744	  collect2name=`$CC -print-prog-name=collect2`
7745	  if test -f "$collect2name" &&
7746	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7747	  then
7748	    # We have reworked collect2
7749	    :
7750	  else
7751	    # We have old collect2
7752	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7753	    # It fails to find uninstalled libraries when the uninstalled
7754	    # path is not listed in the libpath.  Setting hardcode_minus_L
7755	    # to unsupported forces relinking
7756	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7757	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7758	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7759	  fi
7760          esac
7761          shared_flag='-shared'
7762	  if test yes = "$aix_use_runtimelinking"; then
7763	    shared_flag=$shared_flag' $wl-G'
7764	  fi
7765	  # Need to ensure runtime linking is disabled for the traditional
7766	  # shared library, or the linker may eventually find shared libraries
7767	  # /with/ Import File - we do not want to mix them.
7768	  shared_flag_aix='-shared'
7769	  shared_flag_svr4='-shared $wl-G'
7770        else
7771          # not using gcc
7772          if test ia64 = "$host_cpu"; then
7773	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7774	  # chokes on -Wl,-G. The following line is correct:
7775	  shared_flag='-G'
7776          else
7777	    if test yes = "$aix_use_runtimelinking"; then
7778	      shared_flag='$wl-G'
7779	    else
7780	      shared_flag='$wl-bM:SRE'
7781	    fi
7782	    shared_flag_aix='$wl-bM:SRE'
7783	    shared_flag_svr4='$wl-G'
7784          fi
7785        fi
7786
7787        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
7788        # It seems that -bexpall does not export symbols beginning with
7789        # underscore (_), so it is better to generate a list of symbols to
7790	# export.
7791        _LT_TAGVAR(always_export_symbols, $1)=yes
7792	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
7793          # Warning - without using the other runtime loading flags (-brtl),
7794          # -berok will link without error, but may produce a broken library.
7795          # The "-G" linker flag allows undefined symbols.
7796          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
7797          # Determine the default libpath from the value encoded in an empty
7798          # executable.
7799          _LT_SYS_MODULE_PATH_AIX([$1])
7800          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7801
7802          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
7803        else
7804          if test ia64 = "$host_cpu"; then
7805	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
7806	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7807	    _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"
7808          else
7809	    # Determine the default libpath from the value encoded in an
7810	    # empty executable.
7811	    _LT_SYS_MODULE_PATH_AIX([$1])
7812	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7813	    # Warning - without using the other run time loading flags,
7814	    # -berok will link without error, but may produce a broken library.
7815	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
7816	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
7817	    if test yes = "$with_gnu_ld"; then
7818	      # We only use this code for GNU lds that support --whole-archive.
7819	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7820	    else
7821	      # Exported symbols can be pulled into shared objects from archives
7822	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7823	    fi
7824	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7825	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
7826	    # -brtl affects multiple linker settings, -berok does not and is overridden later
7827	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
7828	    if test svr4 != "$with_aix_soname"; then
7829	      # This is similar to how AIX traditionally builds its shared
7830	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
7831	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
7832	    fi
7833	    if test aix != "$with_aix_soname"; then
7834	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
7835	    else
7836	      # used by -dlpreopen to get the symbols
7837	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
7838	    fi
7839	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
7840          fi
7841        fi
7842        ;;
7843
7844      beos*)
7845	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7846	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7847	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7848	  # support --undefined.  This deserves some investigation.  FIXME
7849	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7850	else
7851	  _LT_TAGVAR(ld_shlibs, $1)=no
7852	fi
7853	;;
7854
7855      chorus*)
7856        case $cc_basename in
7857          *)
7858	  # FIXME: insert proper C++ library support
7859	  _LT_TAGVAR(ld_shlibs, $1)=no
7860	  ;;
7861        esac
7862        ;;
7863
7864      cygwin* | mingw* | pw32* | cegcc*)
7865	case $GXX,$cc_basename in
7866	,cl* | no,cl*)
7867	  # Native MSVC
7868	  # hardcode_libdir_flag_spec is actually meaningless, as there is
7869	  # no search path for DLLs.
7870	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7871	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7872	  _LT_TAGVAR(always_export_symbols, $1)=yes
7873	  _LT_TAGVAR(file_list_spec, $1)='@'
7874	  # Tell ltmain to make .lib files, not .a files.
7875	  libext=lib
7876	  # Tell ltmain to make .dll files, not .so files.
7877	  shrext_cmds=.dll
7878	  # FIXME: Setting linknames here is a bad hack.
7879	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
7880	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7881              cp "$export_symbols" "$output_objdir/$soname.def";
7882              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
7883            else
7884              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
7885            fi~
7886            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7887            linknames='
7888	  # The linker will not automatically build a static lib if we build a DLL.
7889	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7890	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7891	  # Don't use ranlib
7892	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7893	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7894            lt_tool_outputfile="@TOOL_OUTPUT@"~
7895            case $lt_outputfile in
7896              *.exe|*.EXE) ;;
7897              *)
7898                lt_outputfile=$lt_outputfile.exe
7899                lt_tool_outputfile=$lt_tool_outputfile.exe
7900                ;;
7901            esac~
7902            func_to_tool_file "$lt_outputfile"~
7903            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
7904              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7905              $RM "$lt_outputfile.manifest";
7906            fi'
7907	  ;;
7908	*)
7909	  # g++
7910	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7911	  # as there is no search path for DLLs.
7912	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7913	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
7914	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7915	  _LT_TAGVAR(always_export_symbols, $1)=no
7916	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7917
7918	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7919	    _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'
7920	    # If the export-symbols file already is a .def file, use it as
7921	    # is; otherwise, prepend EXPORTS...
7922	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7923              cp $export_symbols $output_objdir/$soname.def;
7924            else
7925              echo EXPORTS > $output_objdir/$soname.def;
7926              cat $export_symbols >> $output_objdir/$soname.def;
7927            fi~
7928            $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'
7929	  else
7930	    _LT_TAGVAR(ld_shlibs, $1)=no
7931	  fi
7932	  ;;
7933	esac
7934	;;
7935      darwin* | rhapsody*)
7936        _LT_DARWIN_LINKER_FEATURES($1)
7937	;;
7938
7939      os2*)
7940	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7941	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7942	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7943	shrext_cmds=.dll
7944	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7945	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7946	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7947	  $ECHO EXPORTS >> $output_objdir/$libname.def~
7948	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
7949	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7950	  emximp -o $lib $output_objdir/$libname.def'
7951	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7952	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7953	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7954	  $ECHO EXPORTS >> $output_objdir/$libname.def~
7955	  prefix_cmds="$SED"~
7956	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
7957	    prefix_cmds="$prefix_cmds -e 1d";
7958	  fi~
7959	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
7960	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
7961	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7962	  emximp -o $lib $output_objdir/$libname.def'
7963	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
7964	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7965	;;
7966
7967      dgux*)
7968        case $cc_basename in
7969          ec++*)
7970	    # FIXME: insert proper C++ library support
7971	    _LT_TAGVAR(ld_shlibs, $1)=no
7972	    ;;
7973          ghcx*)
7974	    # Green Hills C++ Compiler
7975	    # FIXME: insert proper C++ library support
7976	    _LT_TAGVAR(ld_shlibs, $1)=no
7977	    ;;
7978          *)
7979	    # FIXME: insert proper C++ library support
7980	    _LT_TAGVAR(ld_shlibs, $1)=no
7981	    ;;
7982        esac
7983        ;;
7984
7985      freebsd2.*)
7986        # C++ shared libraries reported to be fairly broken before
7987	# switch to ELF
7988        _LT_TAGVAR(ld_shlibs, $1)=no
7989        ;;
7990
7991      freebsd-elf*)
7992        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7993        ;;
7994
7995      freebsd* | dragonfly*)
7996        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7997        # conventions
7998        _LT_TAGVAR(ld_shlibs, $1)=yes
7999        ;;
8000
8001      haiku*)
8002        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8003        _LT_TAGVAR(link_all_deplibs, $1)=yes
8004        ;;
8005
8006      hpux9*)
8007        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8008        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8009        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8010        _LT_TAGVAR(hardcode_direct, $1)=yes
8011        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8012				             # but as the default
8013				             # location of the library.
8014
8015        case $cc_basename in
8016          CC*)
8017            # FIXME: insert proper C++ library support
8018            _LT_TAGVAR(ld_shlibs, $1)=no
8019            ;;
8020          aCC*)
8021            _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
8022            # Commands to make compiler produce verbose output that lists
8023            # what "hidden" libraries, object files and flags are used when
8024            # linking a shared library.
8025            #
8026            # There doesn't appear to be a way to prevent this compiler from
8027            # explicitly linking system object files so we need to strip them
8028            # from the output so that they don't get included in the library
8029            # dependencies.
8030            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"'
8031            ;;
8032          *)
8033            if test yes = "$GXX"; then
8034              _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
8035            else
8036              # FIXME: insert proper C++ library support
8037              _LT_TAGVAR(ld_shlibs, $1)=no
8038            fi
8039            ;;
8040        esac
8041        ;;
8042
8043      hpux10*|hpux11*)
8044        if test no = "$with_gnu_ld"; then
8045	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8046	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8047
8048          case $host_cpu in
8049            hppa*64*|ia64*)
8050              ;;
8051            *)
8052	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8053              ;;
8054          esac
8055        fi
8056        case $host_cpu in
8057          hppa*64*|ia64*)
8058            _LT_TAGVAR(hardcode_direct, $1)=no
8059            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8060            ;;
8061          *)
8062            _LT_TAGVAR(hardcode_direct, $1)=yes
8063            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8064            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8065					         # but as the default
8066					         # location of the library.
8067            ;;
8068        esac
8069
8070        case $cc_basename in
8071          CC*)
8072	    # FIXME: insert proper C++ library support
8073	    _LT_TAGVAR(ld_shlibs, $1)=no
8074	    ;;
8075          aCC*)
8076	    case $host_cpu in
8077	      hppa*64*)
8078	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8079	        ;;
8080	      ia64*)
8081	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8082	        ;;
8083	      *)
8084	        _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'
8085	        ;;
8086	    esac
8087	    # Commands to make compiler produce verbose output that lists
8088	    # what "hidden" libraries, object files and flags are used when
8089	    # linking a shared library.
8090	    #
8091	    # There doesn't appear to be a way to prevent this compiler from
8092	    # explicitly linking system object files so we need to strip them
8093	    # from the output so that they don't get included in the library
8094	    # dependencies.
8095	    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"'
8096	    ;;
8097          *)
8098	    if test yes = "$GXX"; then
8099	      if test no = "$with_gnu_ld"; then
8100	        case $host_cpu in
8101	          hppa*64*)
8102	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8103	            ;;
8104	          ia64*)
8105	            _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'
8106	            ;;
8107	          *)
8108	            _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'
8109	            ;;
8110	        esac
8111	      fi
8112	    else
8113	      # FIXME: insert proper C++ library support
8114	      _LT_TAGVAR(ld_shlibs, $1)=no
8115	    fi
8116	    ;;
8117        esac
8118        ;;
8119
8120      interix[[3-9]]*)
8121	_LT_TAGVAR(hardcode_direct, $1)=no
8122	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8123	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8124	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8125	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8126	# Instead, shared libraries are loaded at an image base (0x10000000 by
8127	# default) and relocated if they conflict, which is a slow very memory
8128	# consuming and fragmenting process.  To avoid this, we pick a random,
8129	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8130	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8131	_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'
8132	_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'
8133	;;
8134      irix5* | irix6*)
8135        case $cc_basename in
8136          CC*)
8137	    # SGI C++
8138	    _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'
8139
8140	    # Archives containing C++ object files must be created using
8141	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8142	    # necessary to make sure instantiated templates are included
8143	    # in the archive.
8144	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8145	    ;;
8146          *)
8147	    if test yes = "$GXX"; then
8148	      if test no = "$with_gnu_ld"; then
8149	        _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'
8150	      else
8151	        _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'
8152	      fi
8153	    fi
8154	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8155	    ;;
8156        esac
8157        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8158        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8159        _LT_TAGVAR(inherit_rpath, $1)=yes
8160        ;;
8161
8162      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8163        case $cc_basename in
8164          KCC*)
8165	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8166
8167	    # KCC will only create a shared library if the output file
8168	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8169	    # to its proper name (with version) after linking.
8170	    _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'
8171	    _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'
8172	    # Commands to make compiler produce verbose output that lists
8173	    # what "hidden" libraries, object files and flags are used when
8174	    # linking a shared library.
8175	    #
8176	    # There doesn't appear to be a way to prevent this compiler from
8177	    # explicitly linking system object files so we need to strip them
8178	    # from the output so that they don't get included in the library
8179	    # dependencies.
8180	    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"'
8181
8182	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8183	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8184
8185	    # Archives containing C++ object files must be created using
8186	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8187	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8188	    ;;
8189	  icpc* | ecpc* )
8190	    # Intel C++
8191	    with_gnu_ld=yes
8192	    # version 8.0 and above of icpc choke on multiply defined symbols
8193	    # if we add $predep_objects and $postdep_objects, however 7.1 and
8194	    # earlier do not add the objects themselves.
8195	    case `$CC -V 2>&1` in
8196	      *"Version 7."*)
8197	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8198		_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'
8199		;;
8200	      *)  # Version 8.0 or newer
8201	        tmp_idyn=
8202	        case $host_cpu in
8203		  ia64*) tmp_idyn=' -i_dynamic';;
8204		esac
8205	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8206		_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'
8207		;;
8208	    esac
8209	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8210	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8211	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8212	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
8213	    ;;
8214          pgCC* | pgcpp*)
8215            # Portland Group C++ compiler
8216	    case `$CC -V` in
8217	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8218	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8219               rm -rf $tpldir~
8220               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8221               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8222	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8223                rm -rf $tpldir~
8224                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8225                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8226                $RANLIB $oldlib'
8227	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8228                rm -rf $tpldir~
8229                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8230                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8231	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8232                rm -rf $tpldir~
8233                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8234                $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'
8235	      ;;
8236	    *) # Version 6 and above use weak symbols
8237	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8238	      _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'
8239	      ;;
8240	    esac
8241
8242	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
8243	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8244	    _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'
8245            ;;
8246	  cxx*)
8247	    # Compaq C++
8248	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8249	    _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'
8250
8251	    runpath_var=LD_RUN_PATH
8252	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8253	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8254
8255	    # Commands to make compiler produce verbose output that lists
8256	    # what "hidden" libraries, object files and flags are used when
8257	    # linking a shared library.
8258	    #
8259	    # There doesn't appear to be a way to prevent this compiler from
8260	    # explicitly linking system object files so we need to strip them
8261	    # from the output so that they don't get included in the library
8262	    # dependencies.
8263	    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'
8264	    ;;
8265	  xl* | mpixl* | bgxl*)
8266	    # IBM XL 8.0 on PPC, with GNU ld
8267	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8268	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8269	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8270	    if test yes = "$supports_anon_versioning"; then
8271	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8272                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8273                echo "local: *; };" >> $output_objdir/$libname.ver~
8274                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
8275	    fi
8276	    ;;
8277	  *)
8278	    case `$CC -V 2>&1 | sed 5q` in
8279	    *Sun\ C*)
8280	      # Sun C++ 5.9
8281	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8282	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8283	      _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'
8284	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8285	      _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'
8286	      _LT_TAGVAR(compiler_needs_object, $1)=yes
8287
8288	      # Not sure whether something based on
8289	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8290	      # would be better.
8291	      output_verbose_link_cmd='func_echo_all'
8292
8293	      # Archives containing C++ object files must be created using
8294	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8295	      # necessary to make sure instantiated templates are included
8296	      # in the archive.
8297	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8298	      ;;
8299	    esac
8300	    ;;
8301	esac
8302	;;
8303
8304      lynxos*)
8305        # FIXME: insert proper C++ library support
8306	_LT_TAGVAR(ld_shlibs, $1)=no
8307	;;
8308
8309      m88k*)
8310        # FIXME: insert proper C++ library support
8311        _LT_TAGVAR(ld_shlibs, $1)=no
8312	;;
8313
8314      mvs*)
8315        case $cc_basename in
8316          cxx*)
8317	    # FIXME: insert proper C++ library support
8318	    _LT_TAGVAR(ld_shlibs, $1)=no
8319	    ;;
8320	  *)
8321	    # FIXME: insert proper C++ library support
8322	    _LT_TAGVAR(ld_shlibs, $1)=no
8323	    ;;
8324	esac
8325	;;
8326
8327      netbsd*)
8328        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8329	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8330	  wlarc=
8331	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8332	  _LT_TAGVAR(hardcode_direct, $1)=yes
8333	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8334	fi
8335	# Workaround some broken pre-1.5 toolchains
8336	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8337	;;
8338
8339      *nto* | *qnx*)
8340        _LT_TAGVAR(ld_shlibs, $1)=yes
8341	;;
8342
8343      openbsd* | bitrig*)
8344	if test -f /usr/libexec/ld.so; then
8345	  _LT_TAGVAR(hardcode_direct, $1)=yes
8346	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8347	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8348	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8349	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8350	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
8351	    _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'
8352	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8353	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8354	  fi
8355	  output_verbose_link_cmd=func_echo_all
8356	else
8357	  _LT_TAGVAR(ld_shlibs, $1)=no
8358	fi
8359	;;
8360
8361      osf3* | osf4* | osf5*)
8362        case $cc_basename in
8363          KCC*)
8364	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8365
8366	    # KCC will only create a shared library if the output file
8367	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8368	    # to its proper name (with version) after linking.
8369	    _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'
8370
8371	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8372	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8373
8374	    # Archives containing C++ object files must be created using
8375	    # the KAI C++ compiler.
8376	    case $host in
8377	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8378	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8379	    esac
8380	    ;;
8381          RCC*)
8382	    # Rational C++ 2.4.1
8383	    # FIXME: insert proper C++ library support
8384	    _LT_TAGVAR(ld_shlibs, $1)=no
8385	    ;;
8386          cxx*)
8387	    case $host in
8388	      osf3*)
8389	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
8390	        _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'
8391	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8392		;;
8393	      *)
8394	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8395	        _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'
8396	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8397                  echo "-hidden">> $lib.exp~
8398                  $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~
8399                  $RM $lib.exp'
8400	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8401		;;
8402	    esac
8403
8404	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8405
8406	    # Commands to make compiler produce verbose output that lists
8407	    # what "hidden" libraries, object files and flags are used when
8408	    # linking a shared library.
8409	    #
8410	    # There doesn't appear to be a way to prevent this compiler from
8411	    # explicitly linking system object files so we need to strip them
8412	    # from the output so that they don't get included in the library
8413	    # dependencies.
8414	    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"'
8415	    ;;
8416	  *)
8417	    if test yes,no = "$GXX,$with_gnu_ld"; then
8418	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
8419	      case $host in
8420	        osf3*)
8421	          _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'
8422		  ;;
8423	        *)
8424	          _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'
8425		  ;;
8426	      esac
8427
8428	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8429	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8430
8431	      # Commands to make compiler produce verbose output that lists
8432	      # what "hidden" libraries, object files and flags are used when
8433	      # linking a shared library.
8434	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
8435
8436	    else
8437	      # FIXME: insert proper C++ library support
8438	      _LT_TAGVAR(ld_shlibs, $1)=no
8439	    fi
8440	    ;;
8441        esac
8442        ;;
8443
8444      psos*)
8445        # FIXME: insert proper C++ library support
8446        _LT_TAGVAR(ld_shlibs, $1)=no
8447        ;;
8448
8449      sunos4*)
8450        case $cc_basename in
8451          CC*)
8452	    # Sun C++ 4.x
8453	    # FIXME: insert proper C++ library support
8454	    _LT_TAGVAR(ld_shlibs, $1)=no
8455	    ;;
8456          lcc*)
8457	    # Lucid
8458	    # FIXME: insert proper C++ library support
8459	    _LT_TAGVAR(ld_shlibs, $1)=no
8460	    ;;
8461          *)
8462	    # FIXME: insert proper C++ library support
8463	    _LT_TAGVAR(ld_shlibs, $1)=no
8464	    ;;
8465        esac
8466        ;;
8467
8468      solaris*)
8469        case $cc_basename in
8470          CC* | sunCC*)
8471	    # Sun C++ 4.2, 5.x and Centerline C++
8472            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8473	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8474	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8475	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8476              $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'
8477
8478	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8479	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8480	    case $host_os in
8481	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8482	      *)
8483		# The compiler driver will combine and reorder linker options,
8484		# but understands '-z linker_flag'.
8485	        # Supported since Solaris 2.6 (maybe 2.5.1?)
8486		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8487	        ;;
8488	    esac
8489	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8490
8491	    output_verbose_link_cmd='func_echo_all'
8492
8493	    # Archives containing C++ object files must be created using
8494	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8495	    # necessary to make sure instantiated templates are included
8496	    # in the archive.
8497	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8498	    ;;
8499          gcx*)
8500	    # Green Hills C++ Compiler
8501	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8502
8503	    # The C++ compiler must be used to create the archive.
8504	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8505	    ;;
8506          *)
8507	    # GNU C++ compiler with Solaris linker
8508	    if test yes,no = "$GXX,$with_gnu_ld"; then
8509	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
8510	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8511	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8512	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8513                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8514
8515	        # Commands to make compiler produce verbose output that lists
8516	        # what "hidden" libraries, object files and flags are used when
8517	        # linking a shared library.
8518	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
8519	      else
8520	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
8521	        # platform.
8522	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8523	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8524                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8525
8526	        # Commands to make compiler produce verbose output that lists
8527	        # what "hidden" libraries, object files and flags are used when
8528	        # linking a shared library.
8529	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
8530	      fi
8531
8532	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
8533	      case $host_os in
8534		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8535		*)
8536		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
8537		  ;;
8538	      esac
8539	    fi
8540	    ;;
8541        esac
8542        ;;
8543
8544    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8545      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8546      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8547      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8548      runpath_var='LD_RUN_PATH'
8549
8550      case $cc_basename in
8551        CC*)
8552	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8553	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8554	  ;;
8555	*)
8556	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8557	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8558	  ;;
8559      esac
8560      ;;
8561
8562      sysv5* | sco3.2v5* | sco5v6*)
8563	# Note: We CANNOT use -z defs as we might desire, because we do not
8564	# link with -lc, and that would cause any symbols used from libc to
8565	# always be unresolved, which means just about no library would
8566	# ever link correctly.  If we're not using GNU ld we use -z text
8567	# though, which does catch some bad symbols but isn't as heavy-handed
8568	# as -z defs.
8569	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8570	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
8571	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8572	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8573	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
8574	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8575	_LT_TAGVAR(link_all_deplibs, $1)=yes
8576	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
8577	runpath_var='LD_RUN_PATH'
8578
8579	case $cc_basename in
8580          CC*)
8581	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8582	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8583	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8584              '"$_LT_TAGVAR(old_archive_cmds, $1)"
8585	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8586              '"$_LT_TAGVAR(reload_cmds, $1)"
8587	    ;;
8588	  *)
8589	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8590	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8591	    ;;
8592	esac
8593      ;;
8594
8595      tandem*)
8596        case $cc_basename in
8597          NCC*)
8598	    # NonStop-UX NCC 3.20
8599	    # FIXME: insert proper C++ library support
8600	    _LT_TAGVAR(ld_shlibs, $1)=no
8601	    ;;
8602          *)
8603	    # FIXME: insert proper C++ library support
8604	    _LT_TAGVAR(ld_shlibs, $1)=no
8605	    ;;
8606        esac
8607        ;;
8608
8609      vxworks*)
8610        # FIXME: insert proper C++ library support
8611        _LT_TAGVAR(ld_shlibs, $1)=no
8612        ;;
8613
8614      *)
8615        # FIXME: insert proper C++ library support
8616        _LT_TAGVAR(ld_shlibs, $1)=no
8617        ;;
8618    esac
8619
8620    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8621    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
8622
8623    _LT_TAGVAR(GCC, $1)=$GXX
8624    _LT_TAGVAR(LD, $1)=$LD
8625
8626    ## CAVEAT EMPTOR:
8627    ## There is no encapsulation within the following macros, do not change
8628    ## the running order or otherwise move them around unless you know exactly
8629    ## what you are doing...
8630    _LT_SYS_HIDDEN_LIBDEPS($1)
8631    _LT_COMPILER_PIC($1)
8632    _LT_COMPILER_C_O($1)
8633    _LT_COMPILER_FILE_LOCKS($1)
8634    _LT_LINKER_SHLIBS($1)
8635    _LT_SYS_DYNAMIC_LINKER($1)
8636    _LT_LINKER_HARDCODE_LIBPATH($1)
8637
8638    _LT_CONFIG($1)
8639  fi # test -n "$compiler"
8640
8641  CC=$lt_save_CC
8642  CFLAGS=$lt_save_CFLAGS
8643  LDCXX=$LD
8644  LD=$lt_save_LD
8645  GCC=$lt_save_GCC
8646  with_gnu_ld=$lt_save_with_gnu_ld
8647  lt_cv_path_LDCXX=$lt_cv_path_LD
8648  lt_cv_path_LD=$lt_save_path_LD
8649  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8650  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8651fi # test yes != "$_lt_caught_CXX_error"
8652
8653AC_LANG_POP
8654])# _LT_LANG_CXX_CONFIG
8655
8656
8657# _LT_FUNC_STRIPNAME_CNF
8658# ----------------------
8659# func_stripname_cnf prefix suffix name
8660# strip PREFIX and SUFFIX off of NAME.
8661# PREFIX and SUFFIX must not contain globbing or regex special
8662# characters, hashes, percent signs, but SUFFIX may contain a leading
8663# dot (in which case that matches only a dot).
8664#
8665# This function is identical to the (non-XSI) version of func_stripname,
8666# except this one can be used by m4 code that may be executed by configure,
8667# rather than the libtool script.
8668m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8669AC_REQUIRE([_LT_DECL_SED])
8670AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8671func_stripname_cnf ()
8672{
8673  case @S|@2 in
8674  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
8675  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
8676  esac
8677} # func_stripname_cnf
8678])# _LT_FUNC_STRIPNAME_CNF
8679
8680
8681# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8682# ---------------------------------
8683# Figure out "hidden" library dependencies from verbose
8684# compiler output when linking a shared library.
8685# Parse the compiler output and extract the necessary
8686# objects, libraries and library flags.
8687m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8688[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8689AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8690# Dependencies to place before and after the object being linked:
8691_LT_TAGVAR(predep_objects, $1)=
8692_LT_TAGVAR(postdep_objects, $1)=
8693_LT_TAGVAR(predeps, $1)=
8694_LT_TAGVAR(postdeps, $1)=
8695_LT_TAGVAR(compiler_lib_search_path, $1)=
8696
8697dnl we can't use the lt_simple_compile_test_code here,
8698dnl because it contains code intended for an executable,
8699dnl not a library.  It's possible we should let each
8700dnl tag define a new lt_????_link_test_code variable,
8701dnl but it's only used here...
8702m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8703int a;
8704void foo (void) { a = 0; }
8705_LT_EOF
8706], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8707class Foo
8708{
8709public:
8710  Foo (void) { a = 0; }
8711private:
8712  int a;
8713};
8714_LT_EOF
8715], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8716      subroutine foo
8717      implicit none
8718      integer*4 a
8719      a=0
8720      return
8721      end
8722_LT_EOF
8723], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8724      subroutine foo
8725      implicit none
8726      integer a
8727      a=0
8728      return
8729      end
8730_LT_EOF
8731], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8732public class foo {
8733  private int a;
8734  public void bar (void) {
8735    a = 0;
8736  }
8737};
8738_LT_EOF
8739], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8740package foo
8741func foo() {
8742}
8743_LT_EOF
8744])
8745
8746_lt_libdeps_save_CFLAGS=$CFLAGS
8747case "$CC $CFLAGS " in #(
8748*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8749*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8750*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8751esac
8752
8753dnl Parse the compiler output and extract the necessary
8754dnl objects, libraries and library flags.
8755if AC_TRY_EVAL(ac_compile); then
8756  # Parse the compiler output and extract the necessary
8757  # objects, libraries and library flags.
8758
8759  # Sentinel used to keep track of whether or not we are before
8760  # the conftest object file.
8761  pre_test_object_deps_done=no
8762
8763  for p in `eval "$output_verbose_link_cmd"`; do
8764    case $prev$p in
8765
8766    -L* | -R* | -l*)
8767       # Some compilers place space between "-{L,R}" and the path.
8768       # Remove the space.
8769       if test x-L = "$p" ||
8770          test x-R = "$p"; then
8771	 prev=$p
8772	 continue
8773       fi
8774
8775       # Expand the sysroot to ease extracting the directories later.
8776       if test -z "$prev"; then
8777         case $p in
8778         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8779         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8780         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8781         esac
8782       fi
8783       case $p in
8784       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8785       esac
8786       if test no = "$pre_test_object_deps_done"; then
8787	 case $prev in
8788	 -L | -R)
8789	   # Internal compiler library paths should come after those
8790	   # provided the user.  The postdeps already come after the
8791	   # user supplied libs so there is no need to process them.
8792	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8793	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
8794	   else
8795	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
8796	   fi
8797	   ;;
8798	 # The "-l" case would never come before the object being
8799	 # linked, so don't bother handling this case.
8800	 esac
8801       else
8802	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8803	   _LT_TAGVAR(postdeps, $1)=$prev$p
8804	 else
8805	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
8806	 fi
8807       fi
8808       prev=
8809       ;;
8810
8811    *.lto.$objext) ;; # Ignore GCC LTO objects
8812    *.$objext)
8813       # This assumes that the test object file only shows up
8814       # once in the compiler output.
8815       if test "$p" = "conftest.$objext"; then
8816	 pre_test_object_deps_done=yes
8817	 continue
8818       fi
8819
8820       if test no = "$pre_test_object_deps_done"; then
8821	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8822	   _LT_TAGVAR(predep_objects, $1)=$p
8823	 else
8824	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8825	 fi
8826       else
8827	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8828	   _LT_TAGVAR(postdep_objects, $1)=$p
8829	 else
8830	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8831	 fi
8832       fi
8833       ;;
8834
8835    *) ;; # Ignore the rest.
8836
8837    esac
8838  done
8839
8840  # Clean up.
8841  rm -f a.out a.exe
8842else
8843  echo "libtool.m4: error: problem compiling $1 test program"
8844fi
8845
8846$RM -f confest.$objext
8847CFLAGS=$_lt_libdeps_save_CFLAGS
8848
8849# PORTME: override above test on systems where it is broken
8850m4_if([$1], [CXX],
8851[case $host_os in
8852interix[[3-9]]*)
8853  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8854  # hack all around it, let's just trust "g++" to DTRT.
8855  _LT_TAGVAR(predep_objects,$1)=
8856  _LT_TAGVAR(postdep_objects,$1)=
8857  _LT_TAGVAR(postdeps,$1)=
8858  ;;
8859esac
8860])
8861
8862case " $_LT_TAGVAR(postdeps, $1) " in
8863*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8864esac
8865 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8866if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8867 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
8868fi
8869_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8870    [The directories searched by this compiler when creating a shared library])
8871_LT_TAGDECL([], [predep_objects], [1],
8872    [Dependencies to place before and after the objects being linked to
8873    create a shared library])
8874_LT_TAGDECL([], [postdep_objects], [1])
8875_LT_TAGDECL([], [predeps], [1])
8876_LT_TAGDECL([], [postdeps], [1])
8877_LT_TAGDECL([], [compiler_lib_search_path], [1],
8878    [The library search path used internally by the compiler when linking
8879    a shared library])
8880])# _LT_SYS_HIDDEN_LIBDEPS
8881
8882
8883# _LT_LANG_F77_CONFIG([TAG])
8884# --------------------------
8885# Ensure that the configuration variables for a Fortran 77 compiler are
8886# suitably defined.  These variables are subsequently used by _LT_CONFIG
8887# to write the compiler configuration to 'libtool'.
8888m4_defun([_LT_LANG_F77_CONFIG],
8889[AC_LANG_PUSH(Fortran 77)
8890if test -z "$F77" || test no = "$F77"; then
8891  _lt_disable_F77=yes
8892fi
8893
8894_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8895_LT_TAGVAR(allow_undefined_flag, $1)=
8896_LT_TAGVAR(always_export_symbols, $1)=no
8897_LT_TAGVAR(archive_expsym_cmds, $1)=
8898_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8899_LT_TAGVAR(hardcode_direct, $1)=no
8900_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8901_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8902_LT_TAGVAR(hardcode_libdir_separator, $1)=
8903_LT_TAGVAR(hardcode_minus_L, $1)=no
8904_LT_TAGVAR(hardcode_automatic, $1)=no
8905_LT_TAGVAR(inherit_rpath, $1)=no
8906_LT_TAGVAR(module_cmds, $1)=
8907_LT_TAGVAR(module_expsym_cmds, $1)=
8908_LT_TAGVAR(link_all_deplibs, $1)=unknown
8909_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8910_LT_TAGVAR(reload_flag, $1)=$reload_flag
8911_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8912_LT_TAGVAR(no_undefined_flag, $1)=
8913_LT_TAGVAR(whole_archive_flag_spec, $1)=
8914_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8915
8916# Source file extension for f77 test sources.
8917ac_ext=f
8918
8919# Object file extension for compiled f77 test sources.
8920objext=o
8921_LT_TAGVAR(objext, $1)=$objext
8922
8923# No sense in running all these tests if we already determined that
8924# the F77 compiler isn't working.  Some variables (like enable_shared)
8925# are currently assumed to apply to all compilers on this platform,
8926# and will be corrupted by setting them based on a non-working compiler.
8927if test yes != "$_lt_disable_F77"; then
8928  # Code to be used in simple compile tests
8929  lt_simple_compile_test_code="\
8930      subroutine t
8931      return
8932      end
8933"
8934
8935  # Code to be used in simple link tests
8936  lt_simple_link_test_code="\
8937      program t
8938      end
8939"
8940
8941  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8942  _LT_TAG_COMPILER
8943
8944  # save warnings/boilerplate of simple test code
8945  _LT_COMPILER_BOILERPLATE
8946  _LT_LINKER_BOILERPLATE
8947
8948  # Allow CC to be a program name with arguments.
8949  lt_save_CC=$CC
8950  lt_save_GCC=$GCC
8951  lt_save_CFLAGS=$CFLAGS
8952  CC=${F77-"f77"}
8953  CFLAGS=$FFLAGS
8954  compiler=$CC
8955  _LT_TAGVAR(compiler, $1)=$CC
8956  _LT_CC_BASENAME([$compiler])
8957  GCC=$G77
8958  if test -n "$compiler"; then
8959    AC_MSG_CHECKING([if libtool supports shared libraries])
8960    AC_MSG_RESULT([$can_build_shared])
8961
8962    AC_MSG_CHECKING([whether to build shared libraries])
8963    test no = "$can_build_shared" && enable_shared=no
8964
8965    # On AIX, shared libraries and static libraries use the same namespace, and
8966    # are all built from PIC.
8967    case $host_os in
8968      aix3*)
8969        test yes = "$enable_shared" && enable_static=no
8970        if test -n "$RANLIB"; then
8971          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8972          postinstall_cmds='$RANLIB $lib'
8973        fi
8974        ;;
8975      aix[[4-9]]*)
8976	if test ia64 != "$host_cpu"; then
8977	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
8978	  yes,aix,yes) ;;		# shared object as lib.so file only
8979	  yes,svr4,*) ;;		# shared object as lib.so archive member only
8980	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
8981	  esac
8982	fi
8983        ;;
8984    esac
8985    AC_MSG_RESULT([$enable_shared])
8986
8987    AC_MSG_CHECKING([whether to build static libraries])
8988    # Make sure either enable_shared or enable_static is yes.
8989    test yes = "$enable_shared" || enable_static=yes
8990    AC_MSG_RESULT([$enable_static])
8991
8992    _LT_TAGVAR(GCC, $1)=$G77
8993    _LT_TAGVAR(LD, $1)=$LD
8994
8995    ## CAVEAT EMPTOR:
8996    ## There is no encapsulation within the following macros, do not change
8997    ## the running order or otherwise move them around unless you know exactly
8998    ## what you are doing...
8999    _LT_COMPILER_PIC($1)
9000    _LT_COMPILER_C_O($1)
9001    _LT_COMPILER_FILE_LOCKS($1)
9002    _LT_LINKER_SHLIBS($1)
9003    _LT_SYS_DYNAMIC_LINKER($1)
9004    _LT_LINKER_HARDCODE_LIBPATH($1)
9005
9006    _LT_CONFIG($1)
9007  fi # test -n "$compiler"
9008
9009  GCC=$lt_save_GCC
9010  CC=$lt_save_CC
9011  CFLAGS=$lt_save_CFLAGS
9012fi # test yes != "$_lt_disable_F77"
9013
9014AC_LANG_POP
9015])# _LT_LANG_F77_CONFIG
9016
9017
9018# _LT_LANG_FC_CONFIG([TAG])
9019# -------------------------
9020# Ensure that the configuration variables for a Fortran compiler are
9021# suitably defined.  These variables are subsequently used by _LT_CONFIG
9022# to write the compiler configuration to 'libtool'.
9023m4_defun([_LT_LANG_FC_CONFIG],
9024[AC_LANG_PUSH(Fortran)
9025
9026if test -z "$FC" || test no = "$FC"; then
9027  _lt_disable_FC=yes
9028fi
9029
9030_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9031_LT_TAGVAR(allow_undefined_flag, $1)=
9032_LT_TAGVAR(always_export_symbols, $1)=no
9033_LT_TAGVAR(archive_expsym_cmds, $1)=
9034_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9035_LT_TAGVAR(hardcode_direct, $1)=no
9036_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9037_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9038_LT_TAGVAR(hardcode_libdir_separator, $1)=
9039_LT_TAGVAR(hardcode_minus_L, $1)=no
9040_LT_TAGVAR(hardcode_automatic, $1)=no
9041_LT_TAGVAR(inherit_rpath, $1)=no
9042_LT_TAGVAR(module_cmds, $1)=
9043_LT_TAGVAR(module_expsym_cmds, $1)=
9044_LT_TAGVAR(link_all_deplibs, $1)=unknown
9045_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9046_LT_TAGVAR(reload_flag, $1)=$reload_flag
9047_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9048_LT_TAGVAR(no_undefined_flag, $1)=
9049_LT_TAGVAR(whole_archive_flag_spec, $1)=
9050_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9051
9052# Source file extension for fc test sources.
9053ac_ext=${ac_fc_srcext-f}
9054
9055# Object file extension for compiled fc test sources.
9056objext=o
9057_LT_TAGVAR(objext, $1)=$objext
9058
9059# No sense in running all these tests if we already determined that
9060# the FC compiler isn't working.  Some variables (like enable_shared)
9061# are currently assumed to apply to all compilers on this platform,
9062# and will be corrupted by setting them based on a non-working compiler.
9063if test yes != "$_lt_disable_FC"; then
9064  # Code to be used in simple compile tests
9065  lt_simple_compile_test_code="\
9066      subroutine t
9067      return
9068      end
9069"
9070
9071  # Code to be used in simple link tests
9072  lt_simple_link_test_code="\
9073      program t
9074      end
9075"
9076
9077  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9078  _LT_TAG_COMPILER
9079
9080  # save warnings/boilerplate of simple test code
9081  _LT_COMPILER_BOILERPLATE
9082  _LT_LINKER_BOILERPLATE
9083
9084  # Allow CC to be a program name with arguments.
9085  lt_save_CC=$CC
9086  lt_save_GCC=$GCC
9087  lt_save_CFLAGS=$CFLAGS
9088  CC=${FC-"f95"}
9089  CFLAGS=$FCFLAGS
9090  compiler=$CC
9091  GCC=$ac_cv_fc_compiler_gnu
9092
9093  _LT_TAGVAR(compiler, $1)=$CC
9094  _LT_CC_BASENAME([$compiler])
9095
9096  if test -n "$compiler"; then
9097    AC_MSG_CHECKING([if libtool supports shared libraries])
9098    AC_MSG_RESULT([$can_build_shared])
9099
9100    AC_MSG_CHECKING([whether to build shared libraries])
9101    test no = "$can_build_shared" && enable_shared=no
9102
9103    # On AIX, shared libraries and static libraries use the same namespace, and
9104    # are all built from PIC.
9105    case $host_os in
9106      aix3*)
9107        test yes = "$enable_shared" && enable_static=no
9108        if test -n "$RANLIB"; then
9109          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9110          postinstall_cmds='$RANLIB $lib'
9111        fi
9112        ;;
9113      aix[[4-9]]*)
9114	if test ia64 != "$host_cpu"; then
9115	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
9116	  yes,aix,yes) ;;		# shared object as lib.so file only
9117	  yes,svr4,*) ;;		# shared object as lib.so archive member only
9118	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
9119	  esac
9120	fi
9121        ;;
9122    esac
9123    AC_MSG_RESULT([$enable_shared])
9124
9125    AC_MSG_CHECKING([whether to build static libraries])
9126    # Make sure either enable_shared or enable_static is yes.
9127    test yes = "$enable_shared" || enable_static=yes
9128    AC_MSG_RESULT([$enable_static])
9129
9130    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
9131    _LT_TAGVAR(LD, $1)=$LD
9132
9133    ## CAVEAT EMPTOR:
9134    ## There is no encapsulation within the following macros, do not change
9135    ## the running order or otherwise move them around unless you know exactly
9136    ## what you are doing...
9137    _LT_SYS_HIDDEN_LIBDEPS($1)
9138    _LT_COMPILER_PIC($1)
9139    _LT_COMPILER_C_O($1)
9140    _LT_COMPILER_FILE_LOCKS($1)
9141    _LT_LINKER_SHLIBS($1)
9142    _LT_SYS_DYNAMIC_LINKER($1)
9143    _LT_LINKER_HARDCODE_LIBPATH($1)
9144
9145    _LT_CONFIG($1)
9146  fi # test -n "$compiler"
9147
9148  GCC=$lt_save_GCC
9149  CC=$lt_save_CC
9150  CFLAGS=$lt_save_CFLAGS
9151fi # test yes != "$_lt_disable_FC"
9152
9153AC_LANG_POP
9154])# _LT_LANG_FC_CONFIG
9155
9156
9157# _LT_LANG_GCJ_CONFIG([TAG])
9158# --------------------------
9159# Ensure that the configuration variables for the GNU Java Compiler compiler
9160# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9161# to write the compiler configuration to 'libtool'.
9162m4_defun([_LT_LANG_GCJ_CONFIG],
9163[AC_REQUIRE([LT_PROG_GCJ])dnl
9164AC_LANG_SAVE
9165
9166# Source file extension for Java test sources.
9167ac_ext=java
9168
9169# Object file extension for compiled Java test sources.
9170objext=o
9171_LT_TAGVAR(objext, $1)=$objext
9172
9173# Code to be used in simple compile tests
9174lt_simple_compile_test_code="class foo {}"
9175
9176# Code to be used in simple link tests
9177lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9178
9179# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9180_LT_TAG_COMPILER
9181
9182# save warnings/boilerplate of simple test code
9183_LT_COMPILER_BOILERPLATE
9184_LT_LINKER_BOILERPLATE
9185
9186# Allow CC to be a program name with arguments.
9187lt_save_CC=$CC
9188lt_save_CFLAGS=$CFLAGS
9189lt_save_GCC=$GCC
9190GCC=yes
9191CC=${GCJ-"gcj"}
9192CFLAGS=$GCJFLAGS
9193compiler=$CC
9194_LT_TAGVAR(compiler, $1)=$CC
9195_LT_TAGVAR(LD, $1)=$LD
9196_LT_CC_BASENAME([$compiler])
9197
9198# GCJ did not exist at the time GCC didn't implicitly link libc in.
9199_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9200
9201_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9202_LT_TAGVAR(reload_flag, $1)=$reload_flag
9203_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9204
9205if test -n "$compiler"; then
9206  _LT_COMPILER_NO_RTTI($1)
9207  _LT_COMPILER_PIC($1)
9208  _LT_COMPILER_C_O($1)
9209  _LT_COMPILER_FILE_LOCKS($1)
9210  _LT_LINKER_SHLIBS($1)
9211  _LT_LINKER_HARDCODE_LIBPATH($1)
9212
9213  _LT_CONFIG($1)
9214fi
9215
9216AC_LANG_RESTORE
9217
9218GCC=$lt_save_GCC
9219CC=$lt_save_CC
9220CFLAGS=$lt_save_CFLAGS
9221])# _LT_LANG_GCJ_CONFIG
9222
9223
9224# _LT_LANG_GO_CONFIG([TAG])
9225# --------------------------
9226# Ensure that the configuration variables for the GNU Go compiler
9227# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9228# to write the compiler configuration to 'libtool'.
9229m4_defun([_LT_LANG_GO_CONFIG],
9230[AC_REQUIRE([LT_PROG_GO])dnl
9231AC_LANG_SAVE
9232
9233# Source file extension for Go test sources.
9234ac_ext=go
9235
9236# Object file extension for compiled Go test sources.
9237objext=o
9238_LT_TAGVAR(objext, $1)=$objext
9239
9240# Code to be used in simple compile tests
9241lt_simple_compile_test_code="package main; func main() { }"
9242
9243# Code to be used in simple link tests
9244lt_simple_link_test_code='package main; func main() { }'
9245
9246# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9247_LT_TAG_COMPILER
9248
9249# save warnings/boilerplate of simple test code
9250_LT_COMPILER_BOILERPLATE
9251_LT_LINKER_BOILERPLATE
9252
9253# Allow CC to be a program name with arguments.
9254lt_save_CC=$CC
9255lt_save_CFLAGS=$CFLAGS
9256lt_save_GCC=$GCC
9257GCC=yes
9258CC=${GOC-"gccgo"}
9259CFLAGS=$GOFLAGS
9260compiler=$CC
9261_LT_TAGVAR(compiler, $1)=$CC
9262_LT_TAGVAR(LD, $1)=$LD
9263_LT_CC_BASENAME([$compiler])
9264
9265# Go did not exist at the time GCC didn't implicitly link libc in.
9266_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9267
9268_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9269_LT_TAGVAR(reload_flag, $1)=$reload_flag
9270_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9271
9272if test -n "$compiler"; then
9273  _LT_COMPILER_NO_RTTI($1)
9274  _LT_COMPILER_PIC($1)
9275  _LT_COMPILER_C_O($1)
9276  _LT_COMPILER_FILE_LOCKS($1)
9277  _LT_LINKER_SHLIBS($1)
9278  _LT_LINKER_HARDCODE_LIBPATH($1)
9279
9280  _LT_CONFIG($1)
9281fi
9282
9283AC_LANG_RESTORE
9284
9285GCC=$lt_save_GCC
9286CC=$lt_save_CC
9287CFLAGS=$lt_save_CFLAGS
9288])# _LT_LANG_GO_CONFIG
9289
9290
9291# _LT_LANG_RC_CONFIG([TAG])
9292# -------------------------
9293# Ensure that the configuration variables for the Windows resource compiler
9294# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9295# to write the compiler configuration to 'libtool'.
9296m4_defun([_LT_LANG_RC_CONFIG],
9297[AC_REQUIRE([LT_PROG_RC])dnl
9298AC_LANG_SAVE
9299
9300# Source file extension for RC test sources.
9301ac_ext=rc
9302
9303# Object file extension for compiled RC test sources.
9304objext=o
9305_LT_TAGVAR(objext, $1)=$objext
9306
9307# Code to be used in simple compile tests
9308lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9309
9310# Code to be used in simple link tests
9311lt_simple_link_test_code=$lt_simple_compile_test_code
9312
9313# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9314_LT_TAG_COMPILER
9315
9316# save warnings/boilerplate of simple test code
9317_LT_COMPILER_BOILERPLATE
9318_LT_LINKER_BOILERPLATE
9319
9320# Allow CC to be a program name with arguments.
9321lt_save_CC=$CC
9322lt_save_CFLAGS=$CFLAGS
9323lt_save_GCC=$GCC
9324GCC=
9325CC=${RC-"windres"}
9326CFLAGS=
9327compiler=$CC
9328_LT_TAGVAR(compiler, $1)=$CC
9329_LT_CC_BASENAME([$compiler])
9330_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9331
9332if test -n "$compiler"; then
9333  :
9334  _LT_CONFIG($1)
9335fi
9336
9337GCC=$lt_save_GCC
9338AC_LANG_RESTORE
9339CC=$lt_save_CC
9340CFLAGS=$lt_save_CFLAGS
9341])# _LT_LANG_RC_CONFIG
9342
9343
9344# LT_PROG_GCJ
9345# -----------
9346AC_DEFUN([LT_PROG_GCJ],
9347[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9348  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9349    [AC_CHECK_TOOL(GCJ, gcj,)
9350      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
9351      AC_SUBST(GCJFLAGS)])])[]dnl
9352])
9353
9354# Old name:
9355AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9356dnl aclocal-1.4 backwards compatibility:
9357dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9358
9359
9360# LT_PROG_GO
9361# ----------
9362AC_DEFUN([LT_PROG_GO],
9363[AC_CHECK_TOOL(GOC, gccgo,)
9364])
9365
9366
9367# LT_PROG_RC
9368# ----------
9369AC_DEFUN([LT_PROG_RC],
9370[AC_CHECK_TOOL(RC, windres,)
9371])
9372
9373# Old name:
9374AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9375dnl aclocal-1.4 backwards compatibility:
9376dnl AC_DEFUN([LT_AC_PROG_RC], [])
9377
9378
9379# _LT_DECL_EGREP
9380# --------------
9381# If we don't have a new enough Autoconf to choose the best grep
9382# available, choose the one first in the user's PATH.
9383m4_defun([_LT_DECL_EGREP],
9384[AC_REQUIRE([AC_PROG_EGREP])dnl
9385AC_REQUIRE([AC_PROG_FGREP])dnl
9386test -z "$GREP" && GREP=grep
9387_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9388_LT_DECL([], [EGREP], [1], [An ERE matcher])
9389_LT_DECL([], [FGREP], [1], [A literal string matcher])
9390dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9391AC_SUBST([GREP])
9392])
9393
9394
9395# _LT_DECL_OBJDUMP
9396# --------------
9397# If we don't have a new enough Autoconf to choose the best objdump
9398# available, choose the one first in the user's PATH.
9399m4_defun([_LT_DECL_OBJDUMP],
9400[AC_CHECK_TOOL(OBJDUMP, objdump, false)
9401test -z "$OBJDUMP" && OBJDUMP=objdump
9402_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9403AC_SUBST([OBJDUMP])
9404])
9405
9406# _LT_DECL_DLLTOOL
9407# ----------------
9408# Ensure DLLTOOL variable is set.
9409m4_defun([_LT_DECL_DLLTOOL],
9410[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9411test -z "$DLLTOOL" && DLLTOOL=dlltool
9412_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
9413AC_SUBST([DLLTOOL])
9414])
9415
9416# _LT_DECL_SED
9417# ------------
9418# Check for a fully-functional sed program, that truncates
9419# as few characters as possible.  Prefer GNU sed if found.
9420m4_defun([_LT_DECL_SED],
9421[AC_PROG_SED
9422test -z "$SED" && SED=sed
9423Xsed="$SED -e 1s/^X//"
9424_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9425_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9426    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9427])# _LT_DECL_SED
9428
9429m4_ifndef([AC_PROG_SED], [
9430# NOTE: This macro has been submitted for inclusion into   #
9431#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9432#  a released version of Autoconf we should remove this    #
9433#  macro and use it instead.                               #
9434
9435m4_defun([AC_PROG_SED],
9436[AC_MSG_CHECKING([for a sed that does not truncate output])
9437AC_CACHE_VAL(lt_cv_path_SED,
9438[# Loop through the user's path and test for sed and gsed.
9439# Then use that list of sed's as ones to test for truncation.
9440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9441for as_dir in $PATH
9442do
9443  IFS=$as_save_IFS
9444  test -z "$as_dir" && as_dir=.
9445  for lt_ac_prog in sed gsed; do
9446    for ac_exec_ext in '' $ac_executable_extensions; do
9447      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9448        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9449      fi
9450    done
9451  done
9452done
9453IFS=$as_save_IFS
9454lt_ac_max=0
9455lt_ac_count=0
9456# Add /usr/xpg4/bin/sed as it is typically found on Solaris
9457# along with /bin/sed that truncates output.
9458for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9459  test ! -f "$lt_ac_sed" && continue
9460  cat /dev/null > conftest.in
9461  lt_ac_count=0
9462  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9463  # Check for GNU sed and select it if it is found.
9464  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9465    lt_cv_path_SED=$lt_ac_sed
9466    break
9467  fi
9468  while true; do
9469    cat conftest.in conftest.in >conftest.tmp
9470    mv conftest.tmp conftest.in
9471    cp conftest.in conftest.nl
9472    echo >>conftest.nl
9473    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9474    cmp -s conftest.out conftest.nl || break
9475    # 10000 chars as input seems more than enough
9476    test 10 -lt "$lt_ac_count" && break
9477    lt_ac_count=`expr $lt_ac_count + 1`
9478    if test "$lt_ac_count" -gt "$lt_ac_max"; then
9479      lt_ac_max=$lt_ac_count
9480      lt_cv_path_SED=$lt_ac_sed
9481    fi
9482  done
9483done
9484])
9485SED=$lt_cv_path_SED
9486AC_SUBST([SED])
9487AC_MSG_RESULT([$SED])
9488])#AC_PROG_SED
9489])#m4_ifndef
9490
9491# Old name:
9492AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9493dnl aclocal-1.4 backwards compatibility:
9494dnl AC_DEFUN([LT_AC_PROG_SED], [])
9495
9496
9497# _LT_CHECK_SHELL_FEATURES
9498# ------------------------
9499# Find out whether the shell is Bourne or XSI compatible,
9500# or has some other useful features.
9501m4_defun([_LT_CHECK_SHELL_FEATURES],
9502[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9503  lt_unset=unset
9504else
9505  lt_unset=false
9506fi
9507_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9508
9509# test EBCDIC or ASCII
9510case `echo X|tr X '\101'` in
9511 A) # ASCII based system
9512    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9513  lt_SP2NL='tr \040 \012'
9514  lt_NL2SP='tr \015\012 \040\040'
9515  ;;
9516 *) # EBCDIC based system
9517  lt_SP2NL='tr \100 \n'
9518  lt_NL2SP='tr \r\n \100\100'
9519  ;;
9520esac
9521_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9522_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9523])# _LT_CHECK_SHELL_FEATURES
9524
9525
9526# _LT_PATH_CONVERSION_FUNCTIONS
9527# -----------------------------
9528# Determine what file name conversion functions should be used by
9529# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
9530# for certain cross-compile configurations and native mingw.
9531m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9532[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9533AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9534AC_MSG_CHECKING([how to convert $build file names to $host format])
9535AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9536[case $host in
9537  *-*-mingw* )
9538    case $build in
9539      *-*-mingw* ) # actually msys
9540        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9541        ;;
9542      *-*-cygwin* )
9543        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9544        ;;
9545      * ) # otherwise, assume *nix
9546        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9547        ;;
9548    esac
9549    ;;
9550  *-*-cygwin* )
9551    case $build in
9552      *-*-mingw* ) # actually msys
9553        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9554        ;;
9555      *-*-cygwin* )
9556        lt_cv_to_host_file_cmd=func_convert_file_noop
9557        ;;
9558      * ) # otherwise, assume *nix
9559        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9560        ;;
9561    esac
9562    ;;
9563  * ) # unhandled hosts (and "normal" native builds)
9564    lt_cv_to_host_file_cmd=func_convert_file_noop
9565    ;;
9566esac
9567])
9568to_host_file_cmd=$lt_cv_to_host_file_cmd
9569AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9570_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9571         [0], [convert $build file names to $host format])dnl
9572
9573AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9574AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9575[#assume ordinary cross tools, or native build.
9576lt_cv_to_tool_file_cmd=func_convert_file_noop
9577case $host in
9578  *-*-mingw* )
9579    case $build in
9580      *-*-mingw* ) # actually msys
9581        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9582        ;;
9583    esac
9584    ;;
9585esac
9586])
9587to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9588AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9589_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9590         [0], [convert $build files to toolchain format])dnl
9591])# _LT_PATH_CONVERSION_FUNCTIONS
9592
9593# Helper functions for option handling.                    -*- Autoconf -*-
9594#
9595#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
9596#   Foundation, Inc.
9597#   Written by Gary V. Vaughan, 2004
9598#
9599# This file is free software; the Free Software Foundation gives
9600# unlimited permission to copy and/or distribute it, with or without
9601# modifications, as long as this notice is preserved.
9602
9603# serial 8 ltoptions.m4
9604
9605# This is to help aclocal find these macros, as it can't see m4_define.
9606AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9607
9608
9609# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9610# ------------------------------------------
9611m4_define([_LT_MANGLE_OPTION],
9612[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9613
9614
9615# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9616# ---------------------------------------
9617# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9618# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9619# saved as a flag.
9620m4_define([_LT_SET_OPTION],
9621[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9622m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9623        _LT_MANGLE_DEFUN([$1], [$2]),
9624    [m4_warning([Unknown $1 option '$2'])])[]dnl
9625])
9626
9627
9628# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9629# ------------------------------------------------------------
9630# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9631m4_define([_LT_IF_OPTION],
9632[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9633
9634
9635# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9636# -------------------------------------------------------
9637# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9638# are set.
9639m4_define([_LT_UNLESS_OPTIONS],
9640[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9641	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9642		      [m4_define([$0_found])])])[]dnl
9643m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9644])[]dnl
9645])
9646
9647
9648# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9649# ----------------------------------------
9650# OPTION-LIST is a space-separated list of Libtool options associated
9651# with MACRO-NAME.  If any OPTION has a matching handler declared with
9652# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9653# the unknown option and exit.
9654m4_defun([_LT_SET_OPTIONS],
9655[# Set options
9656m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9657    [_LT_SET_OPTION([$1], _LT_Option)])
9658
9659m4_if([$1],[LT_INIT],[
9660  dnl
9661  dnl Simply set some default values (i.e off) if boolean options were not
9662  dnl specified:
9663  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9664  ])
9665  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9666  ])
9667  dnl
9668  dnl If no reference was made to various pairs of opposing options, then
9669  dnl we run the default mode handler for the pair.  For example, if neither
9670  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
9671  dnl archives by default:
9672  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9673  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9674  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9675  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9676		   [_LT_ENABLE_FAST_INSTALL])
9677  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
9678		   [_LT_WITH_AIX_SONAME([aix])])
9679  ])
9680])# _LT_SET_OPTIONS
9681
9682
9683
9684# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9685# -----------------------------------------
9686m4_define([_LT_MANGLE_DEFUN],
9687[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9688
9689
9690# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9691# -----------------------------------------------
9692m4_define([LT_OPTION_DEFINE],
9693[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9694])# LT_OPTION_DEFINE
9695
9696
9697# dlopen
9698# ------
9699LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9700])
9701
9702AU_DEFUN([AC_LIBTOOL_DLOPEN],
9703[_LT_SET_OPTION([LT_INIT], [dlopen])
9704AC_DIAGNOSE([obsolete],
9705[$0: Remove this warning and the call to _LT_SET_OPTION when you
9706put the 'dlopen' option into LT_INIT's first parameter.])
9707])
9708
9709dnl aclocal-1.4 backwards compatibility:
9710dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9711
9712
9713# win32-dll
9714# ---------
9715# Declare package support for building win32 dll's.
9716LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9717[enable_win32_dll=yes
9718
9719case $host in
9720*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9721  AC_CHECK_TOOL(AS, as, false)
9722  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9723  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9724  ;;
9725esac
9726
9727test -z "$AS" && AS=as
9728_LT_DECL([], [AS],      [1], [Assembler program])dnl
9729
9730test -z "$DLLTOOL" && DLLTOOL=dlltool
9731_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9732
9733test -z "$OBJDUMP" && OBJDUMP=objdump
9734_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9735])# win32-dll
9736
9737AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9738[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9739_LT_SET_OPTION([LT_INIT], [win32-dll])
9740AC_DIAGNOSE([obsolete],
9741[$0: Remove this warning and the call to _LT_SET_OPTION when you
9742put the 'win32-dll' option into LT_INIT's first parameter.])
9743])
9744
9745dnl aclocal-1.4 backwards compatibility:
9746dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9747
9748
9749# _LT_ENABLE_SHARED([DEFAULT])
9750# ----------------------------
9751# implement the --enable-shared flag, and supports the 'shared' and
9752# 'disable-shared' LT_INIT options.
9753# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
9754m4_define([_LT_ENABLE_SHARED],
9755[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9756AC_ARG_ENABLE([shared],
9757    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9758	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9759    [p=${PACKAGE-default}
9760    case $enableval in
9761    yes) enable_shared=yes ;;
9762    no) enable_shared=no ;;
9763    *)
9764      enable_shared=no
9765      # Look at the argument we got.  We use all the common list separators.
9766      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9767      for pkg in $enableval; do
9768	IFS=$lt_save_ifs
9769	if test "X$pkg" = "X$p"; then
9770	  enable_shared=yes
9771	fi
9772      done
9773      IFS=$lt_save_ifs
9774      ;;
9775    esac],
9776    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9777
9778    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9779	[Whether or not to build shared libraries])
9780])# _LT_ENABLE_SHARED
9781
9782LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9783LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9784
9785# Old names:
9786AC_DEFUN([AC_ENABLE_SHARED],
9787[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9788])
9789
9790AC_DEFUN([AC_DISABLE_SHARED],
9791[_LT_SET_OPTION([LT_INIT], [disable-shared])
9792])
9793
9794AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9795AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9796
9797dnl aclocal-1.4 backwards compatibility:
9798dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9799dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9800
9801
9802
9803# _LT_ENABLE_STATIC([DEFAULT])
9804# ----------------------------
9805# implement the --enable-static flag, and support the 'static' and
9806# 'disable-static' LT_INIT options.
9807# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
9808m4_define([_LT_ENABLE_STATIC],
9809[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9810AC_ARG_ENABLE([static],
9811    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9812	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9813    [p=${PACKAGE-default}
9814    case $enableval in
9815    yes) enable_static=yes ;;
9816    no) enable_static=no ;;
9817    *)
9818     enable_static=no
9819      # Look at the argument we got.  We use all the common list separators.
9820      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9821      for pkg in $enableval; do
9822	IFS=$lt_save_ifs
9823	if test "X$pkg" = "X$p"; then
9824	  enable_static=yes
9825	fi
9826      done
9827      IFS=$lt_save_ifs
9828      ;;
9829    esac],
9830    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9831
9832    _LT_DECL([build_old_libs], [enable_static], [0],
9833	[Whether or not to build static libraries])
9834])# _LT_ENABLE_STATIC
9835
9836LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9837LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9838
9839# Old names:
9840AC_DEFUN([AC_ENABLE_STATIC],
9841[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9842])
9843
9844AC_DEFUN([AC_DISABLE_STATIC],
9845[_LT_SET_OPTION([LT_INIT], [disable-static])
9846])
9847
9848AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9849AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9850
9851dnl aclocal-1.4 backwards compatibility:
9852dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9853dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9854
9855
9856
9857# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9858# ----------------------------------
9859# implement the --enable-fast-install flag, and support the 'fast-install'
9860# and 'disable-fast-install' LT_INIT options.
9861# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
9862m4_define([_LT_ENABLE_FAST_INSTALL],
9863[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9864AC_ARG_ENABLE([fast-install],
9865    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9866    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9867    [p=${PACKAGE-default}
9868    case $enableval in
9869    yes) enable_fast_install=yes ;;
9870    no) enable_fast_install=no ;;
9871    *)
9872      enable_fast_install=no
9873      # Look at the argument we got.  We use all the common list separators.
9874      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9875      for pkg in $enableval; do
9876	IFS=$lt_save_ifs
9877	if test "X$pkg" = "X$p"; then
9878	  enable_fast_install=yes
9879	fi
9880      done
9881      IFS=$lt_save_ifs
9882      ;;
9883    esac],
9884    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9885
9886_LT_DECL([fast_install], [enable_fast_install], [0],
9887	 [Whether or not to optimize for fast installation])dnl
9888])# _LT_ENABLE_FAST_INSTALL
9889
9890LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9891LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9892
9893# Old names:
9894AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9895[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9896AC_DIAGNOSE([obsolete],
9897[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9898the 'fast-install' option into LT_INIT's first parameter.])
9899])
9900
9901AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9902[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9903AC_DIAGNOSE([obsolete],
9904[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9905the 'disable-fast-install' option into LT_INIT's first parameter.])
9906])
9907
9908dnl aclocal-1.4 backwards compatibility:
9909dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9910dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9911
9912
9913# _LT_WITH_AIX_SONAME([DEFAULT])
9914# ----------------------------------
9915# implement the --with-aix-soname flag, and support the `aix-soname=aix'
9916# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
9917# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
9918m4_define([_LT_WITH_AIX_SONAME],
9919[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
9920shared_archive_member_spec=
9921case $host,$enable_shared in
9922power*-*-aix[[5-9]]*,yes)
9923  AC_MSG_CHECKING([which variant of shared library versioning to provide])
9924  AC_ARG_WITH([aix-soname],
9925    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
9926      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
9927    [case $withval in
9928    aix|svr4|both)
9929      ;;
9930    *)
9931      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
9932      ;;
9933    esac
9934    lt_cv_with_aix_soname=$with_aix_soname],
9935    [AC_CACHE_VAL([lt_cv_with_aix_soname],
9936      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
9937    with_aix_soname=$lt_cv_with_aix_soname])
9938  AC_MSG_RESULT([$with_aix_soname])
9939  if test aix != "$with_aix_soname"; then
9940    # For the AIX way of multilib, we name the shared archive member
9941    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
9942    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
9943    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
9944    # the AIX toolchain works better with OBJECT_MODE set (default 32).
9945    if test 64 = "${OBJECT_MODE-32}"; then
9946      shared_archive_member_spec=shr_64
9947    else
9948      shared_archive_member_spec=shr
9949    fi
9950  fi
9951  ;;
9952*)
9953  with_aix_soname=aix
9954  ;;
9955esac
9956
9957_LT_DECL([], [shared_archive_member_spec], [0],
9958    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
9959])# _LT_WITH_AIX_SONAME
9960
9961LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
9962LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
9963LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
9964
9965
9966# _LT_WITH_PIC([MODE])
9967# --------------------
9968# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
9969# LT_INIT options.
9970# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
9971m4_define([_LT_WITH_PIC],
9972[AC_ARG_WITH([pic],
9973    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9974	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9975    [lt_p=${PACKAGE-default}
9976    case $withval in
9977    yes|no) pic_mode=$withval ;;
9978    *)
9979      pic_mode=default
9980      # Look at the argument we got.  We use all the common list separators.
9981      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9982      for lt_pkg in $withval; do
9983	IFS=$lt_save_ifs
9984	if test "X$lt_pkg" = "X$lt_p"; then
9985	  pic_mode=yes
9986	fi
9987      done
9988      IFS=$lt_save_ifs
9989      ;;
9990    esac],
9991    [pic_mode=m4_default([$1], [default])])
9992
9993_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9994])# _LT_WITH_PIC
9995
9996LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9997LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9998
9999# Old name:
10000AU_DEFUN([AC_LIBTOOL_PICMODE],
10001[_LT_SET_OPTION([LT_INIT], [pic-only])
10002AC_DIAGNOSE([obsolete],
10003[$0: Remove this warning and the call to _LT_SET_OPTION when you
10004put the 'pic-only' option into LT_INIT's first parameter.])
10005])
10006
10007dnl aclocal-1.4 backwards compatibility:
10008dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10009
10010
10011m4_define([_LTDL_MODE], [])
10012LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10013		 [m4_define([_LTDL_MODE], [nonrecursive])])
10014LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10015		 [m4_define([_LTDL_MODE], [recursive])])
10016LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10017		 [m4_define([_LTDL_MODE], [subproject])])
10018
10019m4_define([_LTDL_TYPE], [])
10020LT_OPTION_DEFINE([LTDL_INIT], [installable],
10021		 [m4_define([_LTDL_TYPE], [installable])])
10022LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10023		 [m4_define([_LTDL_TYPE], [convenience])])
10024
10025# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10026#
10027# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
10028# Foundation, Inc.
10029# Written by Gary V. Vaughan, 2004
10030#
10031# This file is free software; the Free Software Foundation gives
10032# unlimited permission to copy and/or distribute it, with or without
10033# modifications, as long as this notice is preserved.
10034
10035# serial 6 ltsugar.m4
10036
10037# This is to help aclocal find these macros, as it can't see m4_define.
10038AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10039
10040
10041# lt_join(SEP, ARG1, [ARG2...])
10042# -----------------------------
10043# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10044# associated separator.
10045# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10046# versions in m4sugar had bugs.
10047m4_define([lt_join],
10048[m4_if([$#], [1], [],
10049       [$#], [2], [[$2]],
10050       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10051m4_define([_lt_join],
10052[m4_if([$#$2], [2], [],
10053       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10054
10055
10056# lt_car(LIST)
10057# lt_cdr(LIST)
10058# ------------
10059# Manipulate m4 lists.
10060# These macros are necessary as long as will still need to support
10061# Autoconf-2.59, which quotes differently.
10062m4_define([lt_car], [[$1]])
10063m4_define([lt_cdr],
10064[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10065       [$#], 1, [],
10066       [m4_dquote(m4_shift($@))])])
10067m4_define([lt_unquote], $1)
10068
10069
10070# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10071# ------------------------------------------
10072# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
10073# Note that neither SEPARATOR nor STRING are expanded; they are appended
10074# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10075# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10076# than defined and empty).
10077#
10078# This macro is needed until we can rely on Autoconf 2.62, since earlier
10079# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10080m4_define([lt_append],
10081[m4_define([$1],
10082	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10083
10084
10085
10086# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10087# ----------------------------------------------------------
10088# Produce a SEP delimited list of all paired combinations of elements of
10089# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10090# has the form PREFIXmINFIXSUFFIXn.
10091# Needed until we can rely on m4_combine added in Autoconf 2.62.
10092m4_define([lt_combine],
10093[m4_if(m4_eval([$# > 3]), [1],
10094       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10095[[m4_foreach([_Lt_prefix], [$2],
10096	     [m4_foreach([_Lt_suffix],
10097		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10098	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10099
10100
10101# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10102# -----------------------------------------------------------------------
10103# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10104# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10105m4_define([lt_if_append_uniq],
10106[m4_ifdef([$1],
10107	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10108		 [lt_append([$1], [$2], [$3])$4],
10109		 [$5])],
10110	  [lt_append([$1], [$2], [$3])$4])])
10111
10112
10113# lt_dict_add(DICT, KEY, VALUE)
10114# -----------------------------
10115m4_define([lt_dict_add],
10116[m4_define([$1($2)], [$3])])
10117
10118
10119# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10120# --------------------------------------------
10121m4_define([lt_dict_add_subkey],
10122[m4_define([$1($2:$3)], [$4])])
10123
10124
10125# lt_dict_fetch(DICT, KEY, [SUBKEY])
10126# ----------------------------------
10127m4_define([lt_dict_fetch],
10128[m4_ifval([$3],
10129	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10130    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10131
10132
10133# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10134# -----------------------------------------------------------------
10135m4_define([lt_if_dict_fetch],
10136[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10137	[$5],
10138    [$6])])
10139
10140
10141# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10142# --------------------------------------------------------------
10143m4_define([lt_dict_filter],
10144[m4_if([$5], [], [],
10145  [lt_join(m4_quote(m4_default([$4], [[, ]])),
10146           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10147		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10148])
10149
10150# ltversion.m4 -- version numbers			-*- Autoconf -*-
10151#
10152#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
10153#   Written by Scott James Remnant, 2004
10154#
10155# This file is free software; the Free Software Foundation gives
10156# unlimited permission to copy and/or distribute it, with or without
10157# modifications, as long as this notice is preserved.
10158
10159# @configure_input@
10160
10161# serial 4179 ltversion.m4
10162# This file is part of GNU Libtool
10163
10164m4_define([LT_PACKAGE_VERSION], [2.4.6])
10165m4_define([LT_PACKAGE_REVISION], [2.4.6])
10166
10167AC_DEFUN([LTVERSION_VERSION],
10168[macro_version='2.4.6'
10169macro_revision='2.4.6'
10170_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10171_LT_DECL(, macro_revision, 0)
10172])
10173
10174# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10175#
10176#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
10177#   Foundation, Inc.
10178#   Written by Scott James Remnant, 2004.
10179#
10180# This file is free software; the Free Software Foundation gives
10181# unlimited permission to copy and/or distribute it, with or without
10182# modifications, as long as this notice is preserved.
10183
10184# serial 5 lt~obsolete.m4
10185
10186# These exist entirely to fool aclocal when bootstrapping libtool.
10187#
10188# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
10189# which have later been changed to m4_define as they aren't part of the
10190# exported API, or moved to Autoconf or Automake where they belong.
10191#
10192# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10193# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10194# using a macro with the same name in our local m4/libtool.m4 it'll
10195# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10196# and doesn't know about Autoconf macros at all.)
10197#
10198# So we provide this file, which has a silly filename so it's always
10199# included after everything else.  This provides aclocal with the
10200# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10201# because those macros already exist, or will be overwritten later.
10202# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
10203#
10204# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10205# Yes, that means every name once taken will need to remain here until
10206# we give up compatibility with versions before 1.7, at which point
10207# we need to keep only those names which we still refer to.
10208
10209# This is to help aclocal find these macros, as it can't see m4_define.
10210AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10211
10212m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10213m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
10214m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10215m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
10216m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10217m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
10218m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
10219m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10220m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
10221m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
10222m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
10223m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10224m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10225m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10226m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10227m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10228m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
10229m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10230m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10231m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
10232m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
10233m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10234m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10235m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10236m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10237m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10238m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10239m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10240m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
10241m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
10242m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
10243m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10244m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10245m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
10246m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
10247m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10248m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10249m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
10250m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10251m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
10252m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
10253m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
10254m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10255m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10256m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10257m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10258m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10259m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10260m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10261m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10262m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10263m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10264m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
10265m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10266m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10267m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10268m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10269m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10270m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
10271m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
10272m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
10273
10274# nls.m4 serial 6 (gettext-0.20.2)
10275dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2020 Free
10276dnl Software Foundation, Inc.
10277dnl This file is free software; the Free Software Foundation
10278dnl gives unlimited permission to copy and/or distribute it,
10279dnl with or without modifications, as long as this notice is preserved.
10280dnl
10281dnl This file can be used in projects which are not available under
10282dnl the GNU General Public License or the GNU Lesser General Public
10283dnl License but which still want to provide support for the GNU gettext
10284dnl functionality.
10285dnl Please note that the actual code of the GNU gettext library is covered
10286dnl by the GNU Lesser General Public License, and the rest of the GNU
10287dnl gettext package is covered by the GNU General Public License.
10288dnl They are *not* in the public domain.
10289
10290dnl Authors:
10291dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
10292dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
10293
10294AC_PREREQ([2.50])
10295
10296AC_DEFUN([AM_NLS],
10297[
10298  AC_MSG_CHECKING([whether NLS is requested])
10299  dnl Default is enabled NLS
10300  AC_ARG_ENABLE([nls],
10301    [  --disable-nls           do not use Native Language Support],
10302    USE_NLS=$enableval, USE_NLS=yes)
10303  AC_MSG_RESULT([$USE_NLS])
10304  AC_SUBST([USE_NLS])
10305])
10306
10307# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
10308# serial 12 (pkg-config-0.29.2)
10309
10310dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
10311dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
10312dnl
10313dnl This program is free software; you can redistribute it and/or modify
10314dnl it under the terms of the GNU General Public License as published by
10315dnl the Free Software Foundation; either version 2 of the License, or
10316dnl (at your option) any later version.
10317dnl
10318dnl This program is distributed in the hope that it will be useful, but
10319dnl WITHOUT ANY WARRANTY; without even the implied warranty of
10320dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10321dnl General Public License for more details.
10322dnl
10323dnl You should have received a copy of the GNU General Public License
10324dnl along with this program; if not, write to the Free Software
10325dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10326dnl 02111-1307, USA.
10327dnl
10328dnl As a special exception to the GNU General Public License, if you
10329dnl distribute this file as part of a program that contains a
10330dnl configuration script generated by Autoconf, you may include it under
10331dnl the same distribution terms that you use for the rest of that
10332dnl program.
10333
10334dnl PKG_PREREQ(MIN-VERSION)
10335dnl -----------------------
10336dnl Since: 0.29
10337dnl
10338dnl Verify that the version of the pkg-config macros are at least
10339dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
10340dnl installed version of pkg-config, this checks the developer's version
10341dnl of pkg.m4 when generating configure.
10342dnl
10343dnl To ensure that this macro is defined, also add:
10344dnl m4_ifndef([PKG_PREREQ],
10345dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
10346dnl
10347dnl See the "Since" comment for each macro you use to see what version
10348dnl of the macros you require.
10349m4_defun([PKG_PREREQ],
10350[m4_define([PKG_MACROS_VERSION], [0.29.2])
10351m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
10352    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
10353])dnl PKG_PREREQ
10354
10355dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
10356dnl ----------------------------------
10357dnl Since: 0.16
10358dnl
10359dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
10360dnl first found in the path. Checks that the version of pkg-config found
10361dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
10362dnl used since that's the first version where most current features of
10363dnl pkg-config existed.
10364AC_DEFUN([PKG_PROG_PKG_CONFIG],
10365[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
10366m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
10367m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
10368AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
10369AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
10370AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
10371
10372if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10373	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
10374fi
10375if test -n "$PKG_CONFIG"; then
10376	_pkg_min_version=m4_default([$1], [0.9.0])
10377	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
10378	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10379		AC_MSG_RESULT([yes])
10380	else
10381		AC_MSG_RESULT([no])
10382		PKG_CONFIG=""
10383	fi
10384fi[]dnl
10385])dnl PKG_PROG_PKG_CONFIG
10386
10387dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10388dnl -------------------------------------------------------------------
10389dnl Since: 0.18
10390dnl
10391dnl Check to see whether a particular set of modules exists. Similar to
10392dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
10393dnl
10394dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10395dnl only at the first occurence in configure.ac, so if the first place
10396dnl it's called might be skipped (such as if it is within an "if", you
10397dnl have to call PKG_CHECK_EXISTS manually
10398AC_DEFUN([PKG_CHECK_EXISTS],
10399[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10400if test -n "$PKG_CONFIG" && \
10401    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
10402  m4_default([$2], [:])
10403m4_ifvaln([$3], [else
10404  $3])dnl
10405fi])
10406
10407dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
10408dnl ---------------------------------------------
10409dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
10410dnl pkg_failed based on the result.
10411m4_define([_PKG_CONFIG],
10412[if test -n "$$1"; then
10413    pkg_cv_[]$1="$$1"
10414 elif test -n "$PKG_CONFIG"; then
10415    PKG_CHECK_EXISTS([$3],
10416                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
10417		      test "x$?" != "x0" && pkg_failed=yes ],
10418		     [pkg_failed=yes])
10419 else
10420    pkg_failed=untried
10421fi[]dnl
10422])dnl _PKG_CONFIG
10423
10424dnl _PKG_SHORT_ERRORS_SUPPORTED
10425dnl ---------------------------
10426dnl Internal check to see if pkg-config supports short errors.
10427AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
10428[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10429if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
10430        _pkg_short_errors_supported=yes
10431else
10432        _pkg_short_errors_supported=no
10433fi[]dnl
10434])dnl _PKG_SHORT_ERRORS_SUPPORTED
10435
10436
10437dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
10438dnl   [ACTION-IF-NOT-FOUND])
10439dnl --------------------------------------------------------------
10440dnl Since: 0.4.0
10441dnl
10442dnl Note that if there is a possibility the first call to
10443dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
10444dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
10445AC_DEFUN([PKG_CHECK_MODULES],
10446[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10447AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
10448AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
10449
10450pkg_failed=no
10451AC_MSG_CHECKING([for $2])
10452
10453_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
10454_PKG_CONFIG([$1][_LIBS], [libs], [$2])
10455
10456m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
10457and $1[]_LIBS to avoid the need to call pkg-config.
10458See the pkg-config man page for more details.])
10459
10460if test $pkg_failed = yes; then
10461        AC_MSG_RESULT([no])
10462        _PKG_SHORT_ERRORS_SUPPORTED
10463        if test $_pkg_short_errors_supported = yes; then
10464	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
10465        else
10466	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
10467        fi
10468	# Put the nasty error message in config.log where it belongs
10469	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10470
10471	m4_default([$4], [AC_MSG_ERROR(
10472[Package requirements ($2) were not met:
10473
10474$$1_PKG_ERRORS
10475
10476Consider adjusting the PKG_CONFIG_PATH environment variable if you
10477installed software in a non-standard prefix.
10478
10479_PKG_TEXT])[]dnl
10480        ])
10481elif test $pkg_failed = untried; then
10482        AC_MSG_RESULT([no])
10483	m4_default([$4], [AC_MSG_FAILURE(
10484[The pkg-config script could not be found or is too old.  Make sure it
10485is in your PATH or set the PKG_CONFIG environment variable to the full
10486path to pkg-config.
10487
10488_PKG_TEXT
10489
10490To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
10491        ])
10492else
10493	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10494	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10495        AC_MSG_RESULT([yes])
10496	$3
10497fi[]dnl
10498])dnl PKG_CHECK_MODULES
10499
10500
10501dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
10502dnl   [ACTION-IF-NOT-FOUND])
10503dnl ---------------------------------------------------------------------
10504dnl Since: 0.29
10505dnl
10506dnl Checks for existence of MODULES and gathers its build flags with
10507dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
10508dnl and VARIABLE-PREFIX_LIBS from --libs.
10509dnl
10510dnl Note that if there is a possibility the first call to
10511dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
10512dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
10513dnl configure.ac.
10514AC_DEFUN([PKG_CHECK_MODULES_STATIC],
10515[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10516_save_PKG_CONFIG=$PKG_CONFIG
10517PKG_CONFIG="$PKG_CONFIG --static"
10518PKG_CHECK_MODULES($@)
10519PKG_CONFIG=$_save_PKG_CONFIG[]dnl
10520])dnl PKG_CHECK_MODULES_STATIC
10521
10522
10523dnl PKG_INSTALLDIR([DIRECTORY])
10524dnl -------------------------
10525dnl Since: 0.27
10526dnl
10527dnl Substitutes the variable pkgconfigdir as the location where a module
10528dnl should install pkg-config .pc files. By default the directory is
10529dnl $libdir/pkgconfig, but the default can be changed by passing
10530dnl DIRECTORY. The user can override through the --with-pkgconfigdir
10531dnl parameter.
10532AC_DEFUN([PKG_INSTALLDIR],
10533[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
10534m4_pushdef([pkg_description],
10535    [pkg-config installation directory @<:@]pkg_default[@:>@])
10536AC_ARG_WITH([pkgconfigdir],
10537    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
10538    [with_pkgconfigdir=]pkg_default)
10539AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
10540m4_popdef([pkg_default])
10541m4_popdef([pkg_description])
10542])dnl PKG_INSTALLDIR
10543
10544
10545dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
10546dnl --------------------------------
10547dnl Since: 0.27
10548dnl
10549dnl Substitutes the variable noarch_pkgconfigdir as the location where a
10550dnl module should install arch-independent pkg-config .pc files. By
10551dnl default the directory is $datadir/pkgconfig, but the default can be
10552dnl changed by passing DIRECTORY. The user can override through the
10553dnl --with-noarch-pkgconfigdir parameter.
10554AC_DEFUN([PKG_NOARCH_INSTALLDIR],
10555[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
10556m4_pushdef([pkg_description],
10557    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
10558AC_ARG_WITH([noarch-pkgconfigdir],
10559    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
10560    [with_noarch_pkgconfigdir=]pkg_default)
10561AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
10562m4_popdef([pkg_default])
10563m4_popdef([pkg_description])
10564])dnl PKG_NOARCH_INSTALLDIR
10565
10566
10567dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
10568dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10569dnl -------------------------------------------
10570dnl Since: 0.28
10571dnl
10572dnl Retrieves the value of the pkg-config variable for the given module.
10573AC_DEFUN([PKG_CHECK_VAR],
10574[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10575AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
10576
10577_PKG_CONFIG([$1], [variable="][$3]["], [$2])
10578AS_VAR_COPY([$1], [pkg_cv_][$1])
10579
10580AS_VAR_IF([$1], [""], [$5], [$4])dnl
10581])dnl PKG_CHECK_VAR
10582
10583# Copyright (C) 2002-2021 Free Software Foundation, Inc.
10584#
10585# This file is free software; the Free Software Foundation
10586# gives unlimited permission to copy and/or distribute it,
10587# with or without modifications, as long as this notice is preserved.
10588
10589# AM_AUTOMAKE_VERSION(VERSION)
10590# ----------------------------
10591# Automake X.Y traces this macro to ensure aclocal.m4 has been
10592# generated from the m4 files accompanying Automake X.Y.
10593# (This private macro should not be called outside this file.)
10594AC_DEFUN([AM_AUTOMAKE_VERSION],
10595[am__api_version='1.16'
10596dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10597dnl require some minimum version.  Point them to the right macro.
10598m4_if([$1], [1.16.5], [],
10599      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10600])
10601
10602# _AM_AUTOCONF_VERSION(VERSION)
10603# -----------------------------
10604# aclocal traces this macro to find the Autoconf version.
10605# This is a private macro too.  Using m4_define simplifies
10606# the logic in aclocal, which can simply ignore this definition.
10607m4_define([_AM_AUTOCONF_VERSION], [])
10608
10609# AM_SET_CURRENT_AUTOMAKE_VERSION
10610# -------------------------------
10611# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10612# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10613AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10614[AM_AUTOMAKE_VERSION([1.16.5])dnl
10615m4_ifndef([AC_AUTOCONF_VERSION],
10616  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10617_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10618
10619# Figure out how to run the assembler.                      -*- Autoconf -*-
10620
10621# Copyright (C) 2001-2021 Free Software Foundation, Inc.
10622#
10623# This file is free software; the Free Software Foundation
10624# gives unlimited permission to copy and/or distribute it,
10625# with or without modifications, as long as this notice is preserved.
10626
10627# AM_PROG_AS
10628# ----------
10629AC_DEFUN([AM_PROG_AS],
10630[# By default we simply use the C compiler to build assembly code.
10631AC_REQUIRE([AC_PROG_CC])
10632test "${CCAS+set}" = set || CCAS=$CC
10633test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
10634AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
10635AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
10636_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
10637])
10638
10639# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
10640
10641# Copyright (C) 2001-2021 Free Software Foundation, Inc.
10642#
10643# This file is free software; the Free Software Foundation
10644# gives unlimited permission to copy and/or distribute it,
10645# with or without modifications, as long as this notice is preserved.
10646
10647# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10648# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
10649# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
10650#
10651# Of course, Automake must honor this variable whenever it calls a
10652# tool from the auxiliary directory.  The problem is that $srcdir (and
10653# therefore $ac_aux_dir as well) can be either absolute or relative,
10654# depending on how configure is run.  This is pretty annoying, since
10655# it makes $ac_aux_dir quite unusable in subdirectories: in the top
10656# source directory, any form will work fine, but in subdirectories a
10657# relative path needs to be adjusted first.
10658#
10659# $ac_aux_dir/missing
10660#    fails when called from a subdirectory if $ac_aux_dir is relative
10661# $top_srcdir/$ac_aux_dir/missing
10662#    fails if $ac_aux_dir is absolute,
10663#    fails when called from a subdirectory in a VPATH build with
10664#          a relative $ac_aux_dir
10665#
10666# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10667# are both prefixed by $srcdir.  In an in-source build this is usually
10668# harmless because $srcdir is '.', but things will broke when you
10669# start a VPATH build or use an absolute $srcdir.
10670#
10671# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10672# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
10673#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10674# and then we would define $MISSING as
10675#   MISSING="\${SHELL} $am_aux_dir/missing"
10676# This will work as long as MISSING is not called from configure, because
10677# unfortunately $(top_srcdir) has no meaning in configure.
10678# However there are other variables, like CC, which are often used in
10679# configure, and could therefore not use this "fixed" $ac_aux_dir.
10680#
10681# Another solution, used here, is to always expand $ac_aux_dir to an
10682# absolute PATH.  The drawback is that using absolute paths prevent a
10683# configured tree to be moved without reconfiguration.
10684
10685AC_DEFUN([AM_AUX_DIR_EXPAND],
10686[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
10687# Expand $ac_aux_dir to an absolute path.
10688am_aux_dir=`cd "$ac_aux_dir" && pwd`
10689])
10690
10691# AM_CONDITIONAL                                            -*- Autoconf -*-
10692
10693# Copyright (C) 1997-2021 Free Software Foundation, Inc.
10694#
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.
10698
10699# AM_CONDITIONAL(NAME, SHELL-CONDITION)
10700# -------------------------------------
10701# Define a conditional.
10702AC_DEFUN([AM_CONDITIONAL],
10703[AC_PREREQ([2.52])dnl
10704 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
10705       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10706AC_SUBST([$1_TRUE])dnl
10707AC_SUBST([$1_FALSE])dnl
10708_AM_SUBST_NOTMAKE([$1_TRUE])dnl
10709_AM_SUBST_NOTMAKE([$1_FALSE])dnl
10710m4_define([_AM_COND_VALUE_$1], [$2])dnl
10711if $2; then
10712  $1_TRUE=
10713  $1_FALSE='#'
10714else
10715  $1_TRUE='#'
10716  $1_FALSE=
10717fi
10718AC_CONFIG_COMMANDS_PRE(
10719[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10720  AC_MSG_ERROR([[conditional "$1" was never defined.
10721Usually this means the macro was only invoked conditionally.]])
10722fi])])
10723
10724# Copyright (C) 1999-2021 Free Software Foundation, Inc.
10725#
10726# This file is free software; the Free Software Foundation
10727# gives unlimited permission to copy and/or distribute it,
10728# with or without modifications, as long as this notice is preserved.
10729
10730
10731# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
10732# written in clear, in which case automake, when reading aclocal.m4,
10733# will think it sees a *use*, and therefore will trigger all it's
10734# C support machinery.  Also note that it means that autoscan, seeing
10735# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10736
10737
10738# _AM_DEPENDENCIES(NAME)
10739# ----------------------
10740# See how the compiler implements dependency checking.
10741# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
10742# We try a few techniques and use that to set a single cache variable.
10743#
10744# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10745# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10746# dependency, and given that the user is not expected to run this macro,
10747# just rely on AC_PROG_CC.
10748AC_DEFUN([_AM_DEPENDENCIES],
10749[AC_REQUIRE([AM_SET_DEPDIR])dnl
10750AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10751AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10752AC_REQUIRE([AM_DEP_TRACK])dnl
10753
10754m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
10755      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
10756      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10757      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
10758      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
10759      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
10760                    [depcc="$$1"   am_compiler_list=])
10761
10762AC_CACHE_CHECK([dependency style of $depcc],
10763               [am_cv_$1_dependencies_compiler_type],
10764[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10765  # We make a subdir and do the tests there.  Otherwise we can end up
10766  # making bogus files that we don't know about and never remove.  For
10767  # instance it was reported that on HP-UX the gcc test will end up
10768  # making a dummy file named 'D' -- because '-MD' means "put the output
10769  # in D".
10770  rm -rf conftest.dir
10771  mkdir conftest.dir
10772  # Copy depcomp to subdir because otherwise we won't find it if we're
10773  # using a relative directory.
10774  cp "$am_depcomp" conftest.dir
10775  cd conftest.dir
10776  # We will build objects and dependencies in a subdirectory because
10777  # it helps to detect inapplicable dependency modes.  For instance
10778  # both Tru64's cc and ICC support -MD to output dependencies as a
10779  # side effect of compilation, but ICC will put the dependencies in
10780  # the current directory while Tru64 will put them in the object
10781  # directory.
10782  mkdir sub
10783
10784  am_cv_$1_dependencies_compiler_type=none
10785  if test "$am_compiler_list" = ""; then
10786     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10787  fi
10788  am__universal=false
10789  m4_case([$1], [CC],
10790    [case " $depcc " in #(
10791     *\ -arch\ *\ -arch\ *) am__universal=true ;;
10792     esac],
10793    [CXX],
10794    [case " $depcc " in #(
10795     *\ -arch\ *\ -arch\ *) am__universal=true ;;
10796     esac])
10797
10798  for depmode in $am_compiler_list; do
10799    # Setup a source with many dependencies, because some compilers
10800    # like to wrap large dependency lists on column 80 (with \), and
10801    # we should not choose a depcomp mode which is confused by this.
10802    #
10803    # We need to recreate these files for each test, as the compiler may
10804    # overwrite some of them when testing with obscure command lines.
10805    # This happens at least with the AIX C compiler.
10806    : > sub/conftest.c
10807    for i in 1 2 3 4 5 6; do
10808      echo '#include "conftst'$i'.h"' >> sub/conftest.c
10809      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
10810      # Solaris 10 /bin/sh.
10811      echo '/* dummy */' > sub/conftst$i.h
10812    done
10813    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10814
10815    # We check with '-c' and '-o' for the sake of the "dashmstdout"
10816    # mode.  It turns out that the SunPro C++ compiler does not properly
10817    # handle '-M -o', and we need to detect this.  Also, some Intel
10818    # versions had trouble with output in subdirs.
10819    am__obj=sub/conftest.${OBJEXT-o}
10820    am__minus_obj="-o $am__obj"
10821    case $depmode in
10822    gcc)
10823      # This depmode causes a compiler race in universal mode.
10824      test "$am__universal" = false || continue
10825      ;;
10826    nosideeffect)
10827      # After this tag, mechanisms are not by side-effect, so they'll
10828      # only be used when explicitly requested.
10829      if test "x$enable_dependency_tracking" = xyes; then
10830	continue
10831      else
10832	break
10833      fi
10834      ;;
10835    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10836      # This compiler won't grok '-c -o', but also, the minuso test has
10837      # not run yet.  These depmodes are late enough in the game, and
10838      # so weak that their functioning should not be impacted.
10839      am__obj=conftest.${OBJEXT-o}
10840      am__minus_obj=
10841      ;;
10842    none) break ;;
10843    esac
10844    if depmode=$depmode \
10845       source=sub/conftest.c object=$am__obj \
10846       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10847       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10848         >/dev/null 2>conftest.err &&
10849       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10850       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10851       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10852       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10853      # icc doesn't choke on unknown options, it will just issue warnings
10854      # or remarks (even with -Werror).  So we grep stderr for any message
10855      # that says an option was ignored or not supported.
10856      # When given -MP, icc 7.0 and 7.1 complain thusly:
10857      #   icc: Command line warning: ignoring option '-M'; no argument required
10858      # The diagnosis changed in icc 8.0:
10859      #   icc: Command line remark: option '-MP' not supported
10860      if (grep 'ignoring option' conftest.err ||
10861          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10862        am_cv_$1_dependencies_compiler_type=$depmode
10863        break
10864      fi
10865    fi
10866  done
10867
10868  cd ..
10869  rm -rf conftest.dir
10870else
10871  am_cv_$1_dependencies_compiler_type=none
10872fi
10873])
10874AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10875AM_CONDITIONAL([am__fastdep$1], [
10876  test "x$enable_dependency_tracking" != xno \
10877  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10878])
10879
10880
10881# AM_SET_DEPDIR
10882# -------------
10883# Choose a directory name for dependency files.
10884# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
10885AC_DEFUN([AM_SET_DEPDIR],
10886[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10887AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10888])
10889
10890
10891# AM_DEP_TRACK
10892# ------------
10893AC_DEFUN([AM_DEP_TRACK],
10894[AC_ARG_ENABLE([dependency-tracking], [dnl
10895AS_HELP_STRING(
10896  [--enable-dependency-tracking],
10897  [do not reject slow dependency extractors])
10898AS_HELP_STRING(
10899  [--disable-dependency-tracking],
10900  [speeds up one-time build])])
10901if test "x$enable_dependency_tracking" != xno; then
10902  am_depcomp="$ac_aux_dir/depcomp"
10903  AMDEPBACKSLASH='\'
10904  am__nodep='_no'
10905fi
10906AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10907AC_SUBST([AMDEPBACKSLASH])dnl
10908_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10909AC_SUBST([am__nodep])dnl
10910_AM_SUBST_NOTMAKE([am__nodep])dnl
10911])
10912
10913# Generate code to set up dependency tracking.              -*- Autoconf -*-
10914
10915# Copyright (C) 1999-2021 Free Software Foundation, Inc.
10916#
10917# This file is free software; the Free Software Foundation
10918# gives unlimited permission to copy and/or distribute it,
10919# with or without modifications, as long as this notice is preserved.
10920
10921# _AM_OUTPUT_DEPENDENCY_COMMANDS
10922# ------------------------------
10923AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10924[{
10925  # Older Autoconf quotes --file arguments for eval, but not when files
10926  # are listed without --file.  Let's play safe and only enable the eval
10927  # if we detect the quoting.
10928  # TODO: see whether this extra hack can be removed once we start
10929  # requiring Autoconf 2.70 or later.
10930  AS_CASE([$CONFIG_FILES],
10931          [*\'*], [eval set x "$CONFIG_FILES"],
10932          [*], [set x $CONFIG_FILES])
10933  shift
10934  # Used to flag and report bootstrapping failures.
10935  am_rc=0
10936  for am_mf
10937  do
10938    # Strip MF so we end up with the name of the file.
10939    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
10940    # Check whether this is an Automake generated Makefile which includes
10941    # dependency-tracking related rules and includes.
10942    # Grep'ing the whole file directly is not great: AIX grep has a line
10943    # limit of 2048, but all sed's we know have understand at least 4000.
10944    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
10945      || continue
10946    am_dirpart=`AS_DIRNAME(["$am_mf"])`
10947    am_filepart=`AS_BASENAME(["$am_mf"])`
10948    AM_RUN_LOG([cd "$am_dirpart" \
10949      && sed -e '/# am--include-marker/d' "$am_filepart" \
10950        | $MAKE -f - am--depfiles]) || am_rc=$?
10951  done
10952  if test $am_rc -ne 0; then
10953    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
10954    for automatic dependency tracking.  If GNU make was not used, consider
10955    re-running the configure script with MAKE="gmake" (or whatever is
10956    necessary).  You can also try re-running configure with the
10957    '--disable-dependency-tracking' option to at least be able to build
10958    the package (albeit without support for automatic dependency tracking).])
10959  fi
10960  AS_UNSET([am_dirpart])
10961  AS_UNSET([am_filepart])
10962  AS_UNSET([am_mf])
10963  AS_UNSET([am_rc])
10964  rm -f conftest-deps.mk
10965}
10966])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10967
10968
10969# AM_OUTPUT_DEPENDENCY_COMMANDS
10970# -----------------------------
10971# This macro should only be invoked once -- use via AC_REQUIRE.
10972#
10973# This code is only required when automatic dependency tracking is enabled.
10974# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
10975# order to bootstrap the dependency handling code.
10976AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10977[AC_CONFIG_COMMANDS([depfiles],
10978     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10979     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
10980
10981# Do all the work for Automake.                             -*- Autoconf -*-
10982
10983# Copyright (C) 1996-2021 Free Software Foundation, Inc.
10984#
10985# This file is free software; the Free Software Foundation
10986# gives unlimited permission to copy and/or distribute it,
10987# with or without modifications, as long as this notice is preserved.
10988
10989# This macro actually does too much.  Some checks are only needed if
10990# your package does certain things.  But this isn't really a big deal.
10991
10992dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
10993m4_define([AC_PROG_CC],
10994m4_defn([AC_PROG_CC])
10995[_AM_PROG_CC_C_O
10996])
10997
10998# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10999# AM_INIT_AUTOMAKE([OPTIONS])
11000# -----------------------------------------------
11001# The call with PACKAGE and VERSION arguments is the old style
11002# call (pre autoconf-2.50), which is being phased out.  PACKAGE
11003# and VERSION should now be passed to AC_INIT and removed from
11004# the call to AM_INIT_AUTOMAKE.
11005# We support both call styles for the transition.  After
11006# the next Automake release, Autoconf can make the AC_INIT
11007# arguments mandatory, and then we can depend on a new Autoconf
11008# release and drop the old call support.
11009AC_DEFUN([AM_INIT_AUTOMAKE],
11010[AC_PREREQ([2.65])dnl
11011m4_ifdef([_$0_ALREADY_INIT],
11012  [m4_fatal([$0 expanded multiple times
11013]m4_defn([_$0_ALREADY_INIT]))],
11014  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
11015dnl Autoconf wants to disallow AM_ names.  We explicitly allow
11016dnl the ones we care about.
11017m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
11018AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
11019AC_REQUIRE([AC_PROG_INSTALL])dnl
11020if test "`cd $srcdir && pwd`" != "`pwd`"; then
11021  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
11022  # is not polluted with repeated "-I."
11023  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
11024  # test to see if srcdir already configured
11025  if test -f $srcdir/config.status; then
11026    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
11027  fi
11028fi
11029
11030# test whether we have cygpath
11031if test -z "$CYGPATH_W"; then
11032  if (cygpath --version) >/dev/null 2>/dev/null; then
11033    CYGPATH_W='cygpath -w'
11034  else
11035    CYGPATH_W=echo
11036  fi
11037fi
11038AC_SUBST([CYGPATH_W])
11039
11040# Define the identity of the package.
11041dnl Distinguish between old-style and new-style calls.
11042m4_ifval([$2],
11043[AC_DIAGNOSE([obsolete],
11044             [$0: two- and three-arguments forms are deprecated.])
11045m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
11046 AC_SUBST([PACKAGE], [$1])dnl
11047 AC_SUBST([VERSION], [$2])],
11048[_AM_SET_OPTIONS([$1])dnl
11049dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
11050m4_if(
11051  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
11052  [ok:ok],,
11053  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
11054 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
11055 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
11056
11057_AM_IF_OPTION([no-define],,
11058[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
11059 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
11060
11061# Some tools Automake needs.
11062AC_REQUIRE([AM_SANITY_CHECK])dnl
11063AC_REQUIRE([AC_ARG_PROGRAM])dnl
11064AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
11065AM_MISSING_PROG([AUTOCONF], [autoconf])
11066AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
11067AM_MISSING_PROG([AUTOHEADER], [autoheader])
11068AM_MISSING_PROG([MAKEINFO], [makeinfo])
11069AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11070AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
11071AC_REQUIRE([AC_PROG_MKDIR_P])dnl
11072# For better backward compatibility.  To be removed once Automake 1.9.x
11073# dies out for good.  For more background, see:
11074# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
11075# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
11076AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
11077# We need awk for the "check" target (and possibly the TAP driver).  The
11078# system "awk" is bad on some platforms.
11079AC_REQUIRE([AC_PROG_AWK])dnl
11080AC_REQUIRE([AC_PROG_MAKE_SET])dnl
11081AC_REQUIRE([AM_SET_LEADING_DOT])dnl
11082_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
11083	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
11084			     [_AM_PROG_TAR([v7])])])
11085_AM_IF_OPTION([no-dependencies],,
11086[AC_PROVIDE_IFELSE([AC_PROG_CC],
11087		  [_AM_DEPENDENCIES([CC])],
11088		  [m4_define([AC_PROG_CC],
11089			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
11090AC_PROVIDE_IFELSE([AC_PROG_CXX],
11091		  [_AM_DEPENDENCIES([CXX])],
11092		  [m4_define([AC_PROG_CXX],
11093			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
11094AC_PROVIDE_IFELSE([AC_PROG_OBJC],
11095		  [_AM_DEPENDENCIES([OBJC])],
11096		  [m4_define([AC_PROG_OBJC],
11097			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
11098AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
11099		  [_AM_DEPENDENCIES([OBJCXX])],
11100		  [m4_define([AC_PROG_OBJCXX],
11101			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
11102])
11103# Variables for tags utilities; see am/tags.am
11104if test -z "$CTAGS"; then
11105  CTAGS=ctags
11106fi
11107AC_SUBST([CTAGS])
11108if test -z "$ETAGS"; then
11109  ETAGS=etags
11110fi
11111AC_SUBST([ETAGS])
11112if test -z "$CSCOPE"; then
11113  CSCOPE=cscope
11114fi
11115AC_SUBST([CSCOPE])
11116
11117AC_REQUIRE([AM_SILENT_RULES])dnl
11118dnl The testsuite driver may need to know about EXEEXT, so add the
11119dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
11120dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
11121AC_CONFIG_COMMANDS_PRE(dnl
11122[m4_provide_if([_AM_COMPILER_EXEEXT],
11123  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
11124
11125# POSIX will say in a future version that running "rm -f" with no argument
11126# is OK; and we want to be able to make that assumption in our Makefile
11127# recipes.  So use an aggressive probe to check that the usage we want is
11128# actually supported "in the wild" to an acceptable degree.
11129# See automake bug#10828.
11130# To make any issue more visible, cause the running configure to be aborted
11131# by default if the 'rm' program in use doesn't match our expectations; the
11132# user can still override this though.
11133if rm -f && rm -fr && rm -rf; then : OK; else
11134  cat >&2 <<'END'
11135Oops!
11136
11137Your 'rm' program seems unable to run without file operands specified
11138on the command line, even when the '-f' option is present.  This is contrary
11139to the behaviour of most rm programs out there, and not conforming with
11140the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
11141
11142Please tell bug-automake@gnu.org about your system, including the value
11143of your $PATH and any error possibly output before this message.  This
11144can help us improve future automake versions.
11145
11146END
11147  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
11148    echo 'Configuration will proceed anyway, since you have set the' >&2
11149    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
11150    echo >&2
11151  else
11152    cat >&2 <<'END'
11153Aborting the configuration process, to ensure you take notice of the issue.
11154
11155You can download and install GNU coreutils to get an 'rm' implementation
11156that behaves properly: <https://www.gnu.org/software/coreutils/>.
11157
11158If you want to complete the configuration process using your problematic
11159'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
11160to "yes", and re-run configure.
11161
11162END
11163    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
11164  fi
11165fi
11166dnl The trailing newline in this macro's definition is deliberate, for
11167dnl backward compatibility and to allow trailing 'dnl'-style comments
11168dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
11169])
11170
11171dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
11172dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
11173dnl mangled by Autoconf and run in a shell conditional statement.
11174m4_define([_AC_COMPILER_EXEEXT],
11175m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
11176
11177# When config.status generates a header, we must update the stamp-h file.
11178# This file resides in the same directory as the config header
11179# that is generated.  The stamp files are numbered to have different names.
11180
11181# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
11182# loop where config.status creates the headers, so we can generate
11183# our stamp files there.
11184AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
11185[# Compute $1's index in $config_headers.
11186_am_arg=$1
11187_am_stamp_count=1
11188for _am_header in $config_headers :; do
11189  case $_am_header in
11190    $_am_arg | $_am_arg:* )
11191      break ;;
11192    * )
11193      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
11194  esac
11195done
11196echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
11197
11198# Copyright (C) 2001-2021 Free Software Foundation, Inc.
11199#
11200# This file is free software; the Free Software Foundation
11201# gives unlimited permission to copy and/or distribute it,
11202# with or without modifications, as long as this notice is preserved.
11203
11204# AM_PROG_INSTALL_SH
11205# ------------------
11206# Define $install_sh.
11207AC_DEFUN([AM_PROG_INSTALL_SH],
11208[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11209if test x"${install_sh+set}" != xset; then
11210  case $am_aux_dir in
11211  *\ * | *\	*)
11212    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
11213  *)
11214    install_sh="\${SHELL} $am_aux_dir/install-sh"
11215  esac
11216fi
11217AC_SUBST([install_sh])])
11218
11219# Copyright (C) 2003-2021 Free Software Foundation, Inc.
11220#
11221# This file is free software; the Free Software Foundation
11222# gives unlimited permission to copy and/or distribute it,
11223# with or without modifications, as long as this notice is preserved.
11224
11225# Check whether the underlying file-system supports filenames
11226# with a leading dot.  For instance MS-DOS doesn't.
11227AC_DEFUN([AM_SET_LEADING_DOT],
11228[rm -rf .tst 2>/dev/null
11229mkdir .tst 2>/dev/null
11230if test -d .tst; then
11231  am__leading_dot=.
11232else
11233  am__leading_dot=_
11234fi
11235rmdir .tst 2>/dev/null
11236AC_SUBST([am__leading_dot])])
11237
11238# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
11239# From Jim Meyering
11240
11241# Copyright (C) 1996-2021 Free Software Foundation, Inc.
11242#
11243# This file is free software; the Free Software Foundation
11244# gives unlimited permission to copy and/or distribute it,
11245# with or without modifications, as long as this notice is preserved.
11246
11247# AM_MAINTAINER_MODE([DEFAULT-MODE])
11248# ----------------------------------
11249# Control maintainer-specific portions of Makefiles.
11250# Default is to disable them, unless 'enable' is passed literally.
11251# For symmetry, 'disable' may be passed as well.  Anyway, the user
11252# can override the default with the --enable/--disable switch.
11253AC_DEFUN([AM_MAINTAINER_MODE],
11254[m4_case(m4_default([$1], [disable]),
11255       [enable], [m4_define([am_maintainer_other], [disable])],
11256       [disable], [m4_define([am_maintainer_other], [enable])],
11257       [m4_define([am_maintainer_other], [enable])
11258        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
11259AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
11260  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
11261  AC_ARG_ENABLE([maintainer-mode],
11262    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
11263      am_maintainer_other[ make rules and dependencies not useful
11264      (and sometimes confusing) to the casual installer])],
11265    [USE_MAINTAINER_MODE=$enableval],
11266    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
11267  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
11268  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
11269  MAINT=$MAINTAINER_MODE_TRUE
11270  AC_SUBST([MAINT])dnl
11271]
11272)
11273
11274# Check to see how 'make' treats includes.	            -*- Autoconf -*-
11275
11276# Copyright (C) 2001-2021 Free Software Foundation, Inc.
11277#
11278# This file is free software; the Free Software Foundation
11279# gives unlimited permission to copy and/or distribute it,
11280# with or without modifications, as long as this notice is preserved.
11281
11282# AM_MAKE_INCLUDE()
11283# -----------------
11284# Check whether make has an 'include' directive that can support all
11285# the idioms we need for our automatic dependency tracking code.
11286AC_DEFUN([AM_MAKE_INCLUDE],
11287[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
11288cat > confinc.mk << 'END'
11289am__doit:
11290	@echo this is the am__doit target >confinc.out
11291.PHONY: am__doit
11292END
11293am__include="#"
11294am__quote=
11295# BSD make does it like this.
11296echo '.include "confinc.mk" # ignored' > confmf.BSD
11297# Other make implementations (GNU, Solaris 10, AIX) do it like this.
11298echo 'include confinc.mk # ignored' > confmf.GNU
11299_am_result=no
11300for s in GNU BSD; do
11301  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
11302  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
11303      ['0:this is the am__doit target'],
11304      [AS_CASE([$s],
11305          [BSD], [am__include='.include' am__quote='"'],
11306          [am__include='include' am__quote=''])])
11307  if test "$am__include" != "#"; then
11308    _am_result="yes ($s style)"
11309    break
11310  fi
11311done
11312rm -f confinc.* confmf.*
11313AC_MSG_RESULT([${_am_result}])
11314AC_SUBST([am__include])])
11315AC_SUBST([am__quote])])
11316
11317# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
11318
11319# Copyright (C) 1997-2021 Free Software Foundation, Inc.
11320#
11321# This file is free software; the Free Software Foundation
11322# gives unlimited permission to copy and/or distribute it,
11323# with or without modifications, as long as this notice is preserved.
11324
11325# AM_MISSING_PROG(NAME, PROGRAM)
11326# ------------------------------
11327AC_DEFUN([AM_MISSING_PROG],
11328[AC_REQUIRE([AM_MISSING_HAS_RUN])
11329$1=${$1-"${am_missing_run}$2"}
11330AC_SUBST($1)])
11331
11332# AM_MISSING_HAS_RUN
11333# ------------------
11334# Define MISSING if not defined so far and test if it is modern enough.
11335# If it is, set am_missing_run to use it, otherwise, to nothing.
11336AC_DEFUN([AM_MISSING_HAS_RUN],
11337[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11338AC_REQUIRE_AUX_FILE([missing])dnl
11339if test x"${MISSING+set}" != xset; then
11340  MISSING="\${SHELL} '$am_aux_dir/missing'"
11341fi
11342# Use eval to expand $SHELL
11343if eval "$MISSING --is-lightweight"; then
11344  am_missing_run="$MISSING "
11345else
11346  am_missing_run=
11347  AC_MSG_WARN(['missing' script is too old or missing])
11348fi
11349])
11350
11351# Helper functions for option handling.                     -*- Autoconf -*-
11352
11353# Copyright (C) 2001-2021 Free Software Foundation, Inc.
11354#
11355# This file is free software; the Free Software Foundation
11356# gives unlimited permission to copy and/or distribute it,
11357# with or without modifications, as long as this notice is preserved.
11358
11359# _AM_MANGLE_OPTION(NAME)
11360# -----------------------
11361AC_DEFUN([_AM_MANGLE_OPTION],
11362[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
11363
11364# _AM_SET_OPTION(NAME)
11365# --------------------
11366# Set option NAME.  Presently that only means defining a flag for this option.
11367AC_DEFUN([_AM_SET_OPTION],
11368[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
11369
11370# _AM_SET_OPTIONS(OPTIONS)
11371# ------------------------
11372# OPTIONS is a space-separated list of Automake options.
11373AC_DEFUN([_AM_SET_OPTIONS],
11374[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
11375
11376# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
11377# -------------------------------------------
11378# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11379AC_DEFUN([_AM_IF_OPTION],
11380[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
11381
11382# Copyright (C) 1999-2021 Free Software Foundation, Inc.
11383#
11384# This file is free software; the Free Software Foundation
11385# gives unlimited permission to copy and/or distribute it,
11386# with or without modifications, as long as this notice is preserved.
11387
11388# _AM_PROG_CC_C_O
11389# ---------------
11390# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
11391# to automatically call this.
11392AC_DEFUN([_AM_PROG_CC_C_O],
11393[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11394AC_REQUIRE_AUX_FILE([compile])dnl
11395AC_LANG_PUSH([C])dnl
11396AC_CACHE_CHECK(
11397  [whether $CC understands -c and -o together],
11398  [am_cv_prog_cc_c_o],
11399  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
11400  # Make sure it works both with $CC and with simple cc.
11401  # Following AC_PROG_CC_C_O, we do the test twice because some
11402  # compilers refuse to overwrite an existing .o file with -o,
11403  # though they will create one.
11404  am_cv_prog_cc_c_o=yes
11405  for am_i in 1 2; do
11406    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
11407         && test -f conftest2.$ac_objext; then
11408      : OK
11409    else
11410      am_cv_prog_cc_c_o=no
11411      break
11412    fi
11413  done
11414  rm -f core conftest*
11415  unset am_i])
11416if test "$am_cv_prog_cc_c_o" != yes; then
11417   # Losing compiler, so override with the script.
11418   # FIXME: It is wrong to rewrite CC.
11419   # But if we don't then we get into trouble of one sort or another.
11420   # A longer-term fix would be to have automake use am__CC in this case,
11421   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
11422   CC="$am_aux_dir/compile $CC"
11423fi
11424AC_LANG_POP([C])])
11425
11426# For backward compatibility.
11427AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
11428
11429# Copyright (C) 2001-2021 Free Software Foundation, Inc.
11430#
11431# This file is free software; the Free Software Foundation
11432# gives unlimited permission to copy and/or distribute it,
11433# with or without modifications, as long as this notice is preserved.
11434
11435# AM_RUN_LOG(COMMAND)
11436# -------------------
11437# Run COMMAND, save the exit status in ac_status, and log it.
11438# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
11439AC_DEFUN([AM_RUN_LOG],
11440[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
11441   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
11442   ac_status=$?
11443   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
11444   (exit $ac_status); }])
11445
11446# Check to make sure that the build environment is sane.    -*- Autoconf -*-
11447
11448# Copyright (C) 1996-2021 Free Software Foundation, Inc.
11449#
11450# This file is free software; the Free Software Foundation
11451# gives unlimited permission to copy and/or distribute it,
11452# with or without modifications, as long as this notice is preserved.
11453
11454# AM_SANITY_CHECK
11455# ---------------
11456AC_DEFUN([AM_SANITY_CHECK],
11457[AC_MSG_CHECKING([whether build environment is sane])
11458# Reject unsafe characters in $srcdir or the absolute working directory
11459# name.  Accept space and tab only in the latter.
11460am_lf='
11461'
11462case `pwd` in
11463  *[[\\\"\#\$\&\'\`$am_lf]]*)
11464    AC_MSG_ERROR([unsafe absolute working directory name]);;
11465esac
11466case $srcdir in
11467  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
11468    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
11469esac
11470
11471# Do 'set' in a subshell so we don't clobber the current shell's
11472# arguments.  Must try -L first in case configure is actually a
11473# symlink; some systems play weird games with the mod time of symlinks
11474# (eg FreeBSD returns the mod time of the symlink's containing
11475# directory).
11476if (
11477   am_has_slept=no
11478   for am_try in 1 2; do
11479     echo "timestamp, slept: $am_has_slept" > conftest.file
11480     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
11481     if test "$[*]" = "X"; then
11482	# -L didn't work.
11483	set X `ls -t "$srcdir/configure" conftest.file`
11484     fi
11485     if test "$[*]" != "X $srcdir/configure conftest.file" \
11486	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
11487
11488	# If neither matched, then we have a broken ls.  This can happen
11489	# if, for instance, CONFIG_SHELL is bash and it inherits a
11490	# broken ls alias from the environment.  This has actually
11491	# happened.  Such a system could not be considered "sane".
11492	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
11493  alias in your environment])
11494     fi
11495     if test "$[2]" = conftest.file || test $am_try -eq 2; then
11496       break
11497     fi
11498     # Just in case.
11499     sleep 1
11500     am_has_slept=yes
11501   done
11502   test "$[2]" = conftest.file
11503   )
11504then
11505   # Ok.
11506   :
11507else
11508   AC_MSG_ERROR([newly created file is older than distributed files!
11509Check your system clock])
11510fi
11511AC_MSG_RESULT([yes])
11512# If we didn't sleep, we still need to ensure time stamps of config.status and
11513# generated files are strictly newer.
11514am_sleep_pid=
11515if grep 'slept: no' conftest.file >/dev/null 2>&1; then
11516  ( sleep 1 ) &
11517  am_sleep_pid=$!
11518fi
11519AC_CONFIG_COMMANDS_PRE(
11520  [AC_MSG_CHECKING([that generated files are newer than configure])
11521   if test -n "$am_sleep_pid"; then
11522     # Hide warnings about reused PIDs.
11523     wait $am_sleep_pid 2>/dev/null
11524   fi
11525   AC_MSG_RESULT([done])])
11526rm -f conftest.file
11527])
11528
11529# Copyright (C) 2009-2021 Free Software Foundation, Inc.
11530#
11531# This file is free software; the Free Software Foundation
11532# gives unlimited permission to copy and/or distribute it,
11533# with or without modifications, as long as this notice is preserved.
11534
11535# AM_SILENT_RULES([DEFAULT])
11536# --------------------------
11537# Enable less verbose build rules; with the default set to DEFAULT
11538# ("yes" being less verbose, "no" or empty being verbose).
11539AC_DEFUN([AM_SILENT_RULES],
11540[AC_ARG_ENABLE([silent-rules], [dnl
11541AS_HELP_STRING(
11542  [--enable-silent-rules],
11543  [less verbose build output (undo: "make V=1")])
11544AS_HELP_STRING(
11545  [--disable-silent-rules],
11546  [verbose build output (undo: "make V=0")])dnl
11547])
11548case $enable_silent_rules in @%:@ (((
11549  yes) AM_DEFAULT_VERBOSITY=0;;
11550   no) AM_DEFAULT_VERBOSITY=1;;
11551    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
11552esac
11553dnl
11554dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
11555dnl do not support nested variable expansions.
11556dnl See automake bug#9928 and bug#10237.
11557am_make=${MAKE-make}
11558AC_CACHE_CHECK([whether $am_make supports nested variables],
11559   [am_cv_make_support_nested_variables],
11560   [if AS_ECHO([['TRUE=$(BAR$(V))
11561BAR0=false
11562BAR1=true
11563V=1
11564am__doit:
11565	@$(TRUE)
11566.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
11567  am_cv_make_support_nested_variables=yes
11568else
11569  am_cv_make_support_nested_variables=no
11570fi])
11571if test $am_cv_make_support_nested_variables = yes; then
11572  dnl Using '$V' instead of '$(V)' breaks IRIX make.
11573  AM_V='$(V)'
11574  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
11575else
11576  AM_V=$AM_DEFAULT_VERBOSITY
11577  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
11578fi
11579AC_SUBST([AM_V])dnl
11580AM_SUBST_NOTMAKE([AM_V])dnl
11581AC_SUBST([AM_DEFAULT_V])dnl
11582AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
11583AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
11584AM_BACKSLASH='\'
11585AC_SUBST([AM_BACKSLASH])dnl
11586_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
11587])
11588
11589# Copyright (C) 2001-2021 Free Software Foundation, Inc.
11590#
11591# This file is free software; the Free Software Foundation
11592# gives unlimited permission to copy and/or distribute it,
11593# with or without modifications, as long as this notice is preserved.
11594
11595# AM_PROG_INSTALL_STRIP
11596# ---------------------
11597# One issue with vendor 'install' (even GNU) is that you can't
11598# specify the program used to strip binaries.  This is especially
11599# annoying in cross-compiling environments, where the build's strip
11600# is unlikely to handle the host's binaries.
11601# Fortunately install-sh will honor a STRIPPROG variable, so we
11602# always use install-sh in "make install-strip", and initialize
11603# STRIPPROG with the value of the STRIP variable (set by the user).
11604AC_DEFUN([AM_PROG_INSTALL_STRIP],
11605[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11606# Installed binaries are usually stripped using 'strip' when the user
11607# run "make install-strip".  However 'strip' might not be the right
11608# tool to use in cross-compilation environments, therefore Automake
11609# will honor the 'STRIP' environment variable to overrule this program.
11610dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
11611if test "$cross_compiling" != no; then
11612  AC_CHECK_TOOL([STRIP], [strip], :)
11613fi
11614INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11615AC_SUBST([INSTALL_STRIP_PROGRAM])])
11616
11617# Copyright (C) 2006-2021 Free Software Foundation, Inc.
11618#
11619# This file is free software; the Free Software Foundation
11620# gives unlimited permission to copy and/or distribute it,
11621# with or without modifications, as long as this notice is preserved.
11622
11623# _AM_SUBST_NOTMAKE(VARIABLE)
11624# ---------------------------
11625# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11626# This macro is traced by Automake.
11627AC_DEFUN([_AM_SUBST_NOTMAKE])
11628
11629# AM_SUBST_NOTMAKE(VARIABLE)
11630# --------------------------
11631# Public sister of _AM_SUBST_NOTMAKE.
11632AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11633
11634# Check how to create a tarball.                            -*- Autoconf -*-
11635
11636# Copyright (C) 2004-2021 Free Software Foundation, Inc.
11637#
11638# This file is free software; the Free Software Foundation
11639# gives unlimited permission to copy and/or distribute it,
11640# with or without modifications, as long as this notice is preserved.
11641
11642# _AM_PROG_TAR(FORMAT)
11643# --------------------
11644# Check how to create a tarball in format FORMAT.
11645# FORMAT should be one of 'v7', 'ustar', or 'pax'.
11646#
11647# Substitute a variable $(am__tar) that is a command
11648# writing to stdout a FORMAT-tarball containing the directory
11649# $tardir.
11650#     tardir=directory && $(am__tar) > result.tar
11651#
11652# Substitute a variable $(am__untar) that extract such
11653# a tarball read from stdin.
11654#     $(am__untar) < result.tar
11655#
11656AC_DEFUN([_AM_PROG_TAR],
11657[# Always define AMTAR for backward compatibility.  Yes, it's still used
11658# in the wild :-(  We should find a proper way to deprecate it ...
11659AC_SUBST([AMTAR], ['$${TAR-tar}'])
11660
11661# We'll loop over all known methods to create a tar archive until one works.
11662_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11663
11664m4_if([$1], [v7],
11665  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
11666
11667  [m4_case([$1],
11668    [ustar],
11669     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
11670      # There is notably a 21 bits limit for the UID and the GID.  In fact,
11671      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
11672      # and bug#13588).
11673      am_max_uid=2097151 # 2^21 - 1
11674      am_max_gid=$am_max_uid
11675      # The $UID and $GID variables are not portable, so we need to resort
11676      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
11677      # below are definitely unexpected, so allow the users to see them
11678      # (that is, avoid stderr redirection).
11679      am_uid=`id -u || echo unknown`
11680      am_gid=`id -g || echo unknown`
11681      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
11682      if test $am_uid -le $am_max_uid; then
11683         AC_MSG_RESULT([yes])
11684      else
11685         AC_MSG_RESULT([no])
11686         _am_tools=none
11687      fi
11688      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
11689      if test $am_gid -le $am_max_gid; then
11690         AC_MSG_RESULT([yes])
11691      else
11692        AC_MSG_RESULT([no])
11693        _am_tools=none
11694      fi],
11695
11696  [pax],
11697    [],
11698
11699  [m4_fatal([Unknown tar format])])
11700
11701  AC_MSG_CHECKING([how to create a $1 tar archive])
11702
11703  # Go ahead even if we have the value already cached.  We do so because we
11704  # need to set the values for the 'am__tar' and 'am__untar' variables.
11705  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11706
11707  for _am_tool in $_am_tools; do
11708    case $_am_tool in
11709    gnutar)
11710      for _am_tar in tar gnutar gtar; do
11711        AM_RUN_LOG([$_am_tar --version]) && break
11712      done
11713      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11714      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11715      am__untar="$_am_tar -xf -"
11716      ;;
11717    plaintar)
11718      # Must skip GNU tar: if it does not support --format= it doesn't create
11719      # ustar tarball either.
11720      (tar --version) >/dev/null 2>&1 && continue
11721      am__tar='tar chf - "$$tardir"'
11722      am__tar_='tar chf - "$tardir"'
11723      am__untar='tar xf -'
11724      ;;
11725    pax)
11726      am__tar='pax -L -x $1 -w "$$tardir"'
11727      am__tar_='pax -L -x $1 -w "$tardir"'
11728      am__untar='pax -r'
11729      ;;
11730    cpio)
11731      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11732      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11733      am__untar='cpio -i -H $1 -d'
11734      ;;
11735    none)
11736      am__tar=false
11737      am__tar_=false
11738      am__untar=false
11739      ;;
11740    esac
11741
11742    # If the value was cached, stop now.  We just wanted to have am__tar
11743    # and am__untar set.
11744    test -n "${am_cv_prog_tar_$1}" && break
11745
11746    # tar/untar a dummy directory, and stop if the command works.
11747    rm -rf conftest.dir
11748    mkdir conftest.dir
11749    echo GrepMe > conftest.dir/file
11750    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11751    rm -rf conftest.dir
11752    if test -s conftest.tar; then
11753      AM_RUN_LOG([$am__untar <conftest.tar])
11754      AM_RUN_LOG([cat conftest.dir/file])
11755      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11756    fi
11757  done
11758  rm -rf conftest.dir
11759
11760  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11761  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11762
11763AC_SUBST([am__tar])
11764AC_SUBST([am__untar])
11765]) # _AM_PROG_TAR
11766
11767m4_include([acinclude.m4])
11768