1# generated automatically by aclocal 1.15 -*- Autoconf -*-
2
3# Copyright (C) 1996-2014 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.69],,
18[m4_warning([this file was generated for autoconf 2.69.
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
26dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
27dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
28dnl gthread, or gio is specified in MODULES, pass to pkg-config
29dnl
30AC_DEFUN([AM_PATH_GLIB_2_0],
31[dnl
32dnl Get the cflags and libraries from pkg-config
33dnl
34AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
35		    , enable_glibtest=yes)
36
37  pkg_config_args=glib-2.0
38  for module in . $4
39  do
40      case "$module" in
41         gmodule)
42             pkg_config_args="$pkg_config_args gmodule-2.0"
43         ;;
44         gmodule-no-export)
45             pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
46         ;;
47         gobject)
48             pkg_config_args="$pkg_config_args gobject-2.0"
49         ;;
50         gthread)
51             pkg_config_args="$pkg_config_args gthread-2.0"
52         ;;
53         gio*)
54             pkg_config_args="$pkg_config_args $module-2.0"
55         ;;
56      esac
57  done
58
59  PKG_PROG_PKG_CONFIG([0.16])
60
61  no_glib=""
62
63  if test "x$PKG_CONFIG" = x ; then
64    no_glib=yes
65    PKG_CONFIG=no
66  fi
67
68  min_glib_version=ifelse([$1], ,2.0.0,$1)
69  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
70
71  if test x$PKG_CONFIG != xno ; then
72    ## don't try to run the test against uninstalled libtool libs
73    if $PKG_CONFIG --uninstalled $pkg_config_args; then
74	  echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
75	  enable_glibtest=no
76    fi
77
78    if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
79	  :
80    else
81	  no_glib=yes
82    fi
83  fi
84
85  if test x"$no_glib" = x ; then
86    GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
87    GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
88    GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
89    GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
90
91    GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
92    GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
93    glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
94           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
95    glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
96           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
97    glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
98           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
99    if test "x$enable_glibtest" = "xyes" ; then
100      ac_save_CFLAGS="$CFLAGS"
101      ac_save_LIBS="$LIBS"
102      CFLAGS="$CFLAGS $GLIB_CFLAGS"
103      LIBS="$GLIB_LIBS $LIBS"
104dnl
105dnl Now check if the installed GLIB is sufficiently new. (Also sanity
106dnl checks the results of pkg-config to some extent)
107dnl
108      rm -f conf.glibtest
109      AC_TRY_RUN([
110#include <glib.h>
111#include <stdio.h>
112#include <stdlib.h>
113
114int
115main ()
116{
117  unsigned int major, minor, micro;
118
119  fclose (fopen ("conf.glibtest", "w"));
120
121  if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
122     printf("%s, bad version string\n", "$min_glib_version");
123     exit(1);
124   }
125
126  if ((glib_major_version != $glib_config_major_version) ||
127      (glib_minor_version != $glib_config_minor_version) ||
128      (glib_micro_version != $glib_config_micro_version))
129    {
130      printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
131             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
132             glib_major_version, glib_minor_version, glib_micro_version);
133      printf ("*** was found! If pkg-config was correct, then it is best\n");
134      printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
135      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
136      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
137      printf("*** required on your system.\n");
138      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
139      printf("*** to point to the correct configuration files\n");
140    }
141  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
142	   (glib_minor_version != GLIB_MINOR_VERSION) ||
143           (glib_micro_version != GLIB_MICRO_VERSION))
144    {
145      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
146	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
147      printf("*** library (version %d.%d.%d)\n",
148	     glib_major_version, glib_minor_version, glib_micro_version);
149    }
150  else
151    {
152      if ((glib_major_version > major) ||
153        ((glib_major_version == major) && (glib_minor_version > minor)) ||
154        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
155      {
156        return 0;
157       }
158     else
159      {
160        printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
161               glib_major_version, glib_minor_version, glib_micro_version);
162        printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
163	       major, minor, micro);
164        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
165        printf("***\n");
166        printf("*** If you have already installed a sufficiently new version, this error\n");
167        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
168        printf("*** being found. The easiest way to fix this is to remove the old version\n");
169        printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
170        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
171        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
172        printf("*** so that the correct libraries are found at run-time))\n");
173      }
174    }
175  return 1;
176}
177],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
178       CFLAGS="$ac_save_CFLAGS"
179       LIBS="$ac_save_LIBS"
180     fi
181  fi
182  if test "x$no_glib" = x ; then
183     AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
184     ifelse([$2], , :, [$2])
185  else
186     AC_MSG_RESULT(no)
187     if test "$PKG_CONFIG" = "no" ; then
188       echo "*** A new enough version of pkg-config was not found."
189       echo "*** See http://www.freedesktop.org/software/pkgconfig/"
190     else
191       if test -f conf.glibtest ; then
192        :
193       else
194          echo "*** Could not run GLIB test program, checking why..."
195          ac_save_CFLAGS="$CFLAGS"
196          ac_save_LIBS="$LIBS"
197          CFLAGS="$CFLAGS $GLIB_CFLAGS"
198          LIBS="$LIBS $GLIB_LIBS"
199          AC_TRY_LINK([
200#include <glib.h>
201#include <stdio.h>
202],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
203        [ echo "*** The test program compiled, but did not run. This usually means"
204          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
205          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
206          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
207          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
208          echo "*** is required on your system"
209	  echo "***"
210          echo "*** If you have an old version installed, it is best to remove it, although"
211          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
212        [ echo "*** The test program failed to compile or link. See the file config.log for the"
213          echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
214          CFLAGS="$ac_save_CFLAGS"
215          LIBS="$ac_save_LIBS"
216       fi
217     fi
218     GLIB_CFLAGS=""
219     GLIB_LIBS=""
220     GLIB_GENMARSHAL=""
221     GOBJECT_QUERY=""
222     GLIB_MKENUMS=""
223     GLIB_COMPILE_RESOURCES=""
224     ifelse([$3], , :, [$3])
225  fi
226  AC_SUBST(GLIB_CFLAGS)
227  AC_SUBST(GLIB_LIBS)
228  AC_SUBST(GLIB_GENMARSHAL)
229  AC_SUBST(GOBJECT_QUERY)
230  AC_SUBST(GLIB_MKENUMS)
231  AC_SUBST(GLIB_COMPILE_RESOURCES)
232  rm -f conf.glibtest
233])
234
235# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
236#
237#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
238#   Written by Gordon Matzigkeit, 1996
239#
240# This file is free software; the Free Software Foundation gives
241# unlimited permission to copy and/or distribute it, with or without
242# modifications, as long as this notice is preserved.
243
244m4_define([_LT_COPYING], [dnl
245# Copyright (C) 2014 Free Software Foundation, Inc.
246# This is free software; see the source for copying conditions.  There is NO
247# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
248
249# GNU Libtool is free software; you can redistribute it and/or modify
250# it under the terms of the GNU General Public License as published by
251# the Free Software Foundation; either version 2 of of the License, or
252# (at your option) any later version.
253#
254# As a special exception to the GNU General Public License, if you
255# distribute this file as part of a program or library that is built
256# using GNU Libtool, you may include this file under the  same
257# distribution terms that you use for the rest of that program.
258#
259# GNU Libtool is distributed in the hope that it will be useful, but
260# WITHOUT ANY WARRANTY; without even the implied warranty of
261# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
262# GNU General Public License for more details.
263#
264# You should have received a copy of the GNU General Public License
265# along with this program.  If not, see <http://www.gnu.org/licenses/>.
266])
267
268# serial 58 LT_INIT
269
270
271# LT_PREREQ(VERSION)
272# ------------------
273# Complain and exit if this libtool version is less that VERSION.
274m4_defun([LT_PREREQ],
275[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
276       [m4_default([$3],
277		   [m4_fatal([Libtool version $1 or higher is required],
278		             63)])],
279       [$2])])
280
281
282# _LT_CHECK_BUILDDIR
283# ------------------
284# Complain if the absolute build directory name contains unusual characters
285m4_defun([_LT_CHECK_BUILDDIR],
286[case `pwd` in
287  *\ * | *\	*)
288    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
289esac
290])
291
292
293# LT_INIT([OPTIONS])
294# ------------------
295AC_DEFUN([LT_INIT],
296[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
297AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
298AC_BEFORE([$0], [LT_LANG])dnl
299AC_BEFORE([$0], [LT_OUTPUT])dnl
300AC_BEFORE([$0], [LTDL_INIT])dnl
301m4_require([_LT_CHECK_BUILDDIR])dnl
302
303dnl Autoconf doesn't catch unexpanded LT_ macros by default:
304m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
305m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
306dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
307dnl unless we require an AC_DEFUNed macro:
308AC_REQUIRE([LTOPTIONS_VERSION])dnl
309AC_REQUIRE([LTSUGAR_VERSION])dnl
310AC_REQUIRE([LTVERSION_VERSION])dnl
311AC_REQUIRE([LTOBSOLETE_VERSION])dnl
312m4_require([_LT_PROG_LTMAIN])dnl
313
314_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
315
316dnl Parse OPTIONS
317_LT_SET_OPTIONS([$0], [$1])
318
319# This can be used to rebuild libtool when needed
320LIBTOOL_DEPS=$ltmain
321
322# Always use our own libtool.
323LIBTOOL='$(SHELL) $(top_builddir)/libtool'
324AC_SUBST(LIBTOOL)dnl
325
326_LT_SETUP
327
328# Only expand once:
329m4_define([LT_INIT])
330])# LT_INIT
331
332# Old names:
333AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
334AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
335dnl aclocal-1.4 backwards compatibility:
336dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
337dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
338
339
340# _LT_PREPARE_CC_BASENAME
341# -----------------------
342m4_defun([_LT_PREPARE_CC_BASENAME], [
343# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
344func_cc_basename ()
345{
346    for cc_temp in @S|@*""; do
347      case $cc_temp in
348        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
349        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
350        \-*) ;;
351        *) break;;
352      esac
353    done
354    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
355}
356])# _LT_PREPARE_CC_BASENAME
357
358
359# _LT_CC_BASENAME(CC)
360# -------------------
361# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
362# but that macro is also expanded into generated libtool script, which
363# arranges for $SED and $ECHO to be set by different means.
364m4_defun([_LT_CC_BASENAME],
365[m4_require([_LT_PREPARE_CC_BASENAME])dnl
366AC_REQUIRE([_LT_DECL_SED])dnl
367AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
368func_cc_basename $1
369cc_basename=$func_cc_basename_result
370])
371
372
373# _LT_FILEUTILS_DEFAULTS
374# ----------------------
375# It is okay to use these file commands and assume they have been set
376# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
377m4_defun([_LT_FILEUTILS_DEFAULTS],
378[: ${CP="cp -f"}
379: ${MV="mv -f"}
380: ${RM="rm -f"}
381])# _LT_FILEUTILS_DEFAULTS
382
383
384# _LT_SETUP
385# ---------
386m4_defun([_LT_SETUP],
387[AC_REQUIRE([AC_CANONICAL_HOST])dnl
388AC_REQUIRE([AC_CANONICAL_BUILD])dnl
389AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
390AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
391
392_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
393dnl
394_LT_DECL([], [host_alias], [0], [The host system])dnl
395_LT_DECL([], [host], [0])dnl
396_LT_DECL([], [host_os], [0])dnl
397dnl
398_LT_DECL([], [build_alias], [0], [The build system])dnl
399_LT_DECL([], [build], [0])dnl
400_LT_DECL([], [build_os], [0])dnl
401dnl
402AC_REQUIRE([AC_PROG_CC])dnl
403AC_REQUIRE([LT_PATH_LD])dnl
404AC_REQUIRE([LT_PATH_NM])dnl
405dnl
406AC_REQUIRE([AC_PROG_LN_S])dnl
407test -z "$LN_S" && LN_S="ln -s"
408_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
409dnl
410AC_REQUIRE([LT_CMD_MAX_LEN])dnl
411_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
412_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
413dnl
414m4_require([_LT_FILEUTILS_DEFAULTS])dnl
415m4_require([_LT_CHECK_SHELL_FEATURES])dnl
416m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
417m4_require([_LT_CMD_RELOAD])dnl
418m4_require([_LT_CHECK_MAGIC_METHOD])dnl
419m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
420m4_require([_LT_CMD_OLD_ARCHIVE])dnl
421m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
422m4_require([_LT_WITH_SYSROOT])dnl
423m4_require([_LT_CMD_TRUNCATE])dnl
424
425_LT_CONFIG_LIBTOOL_INIT([
426# See if we are running on zsh, and set the options that allow our
427# commands through without removal of \ escapes INIT.
428if test -n "\${ZSH_VERSION+set}"; then
429   setopt NO_GLOB_SUBST
430fi
431])
432if test -n "${ZSH_VERSION+set}"; then
433   setopt NO_GLOB_SUBST
434fi
435
436_LT_CHECK_OBJDIR
437
438m4_require([_LT_TAG_COMPILER])dnl
439
440case $host_os in
441aix3*)
442  # AIX sometimes has problems with the GCC collect2 program.  For some
443  # reason, if we set the COLLECT_NAMES environment variable, the problems
444  # vanish in a puff of smoke.
445  if test set != "${COLLECT_NAMES+set}"; then
446    COLLECT_NAMES=
447    export COLLECT_NAMES
448  fi
449  ;;
450esac
451
452# Global variables:
453ofile=libtool
454can_build_shared=yes
455
456# All known linkers require a '.a' archive for static linking (except MSVC,
457# which needs '.lib').
458libext=a
459
460with_gnu_ld=$lt_cv_prog_gnu_ld
461
462old_CC=$CC
463old_CFLAGS=$CFLAGS
464
465# Set sane defaults for various variables
466test -z "$CC" && CC=cc
467test -z "$LTCC" && LTCC=$CC
468test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
469test -z "$LD" && LD=ld
470test -z "$ac_objext" && ac_objext=o
471
472_LT_CC_BASENAME([$compiler])
473
474# Only perform the check for file, if the check method requires it
475test -z "$MAGIC_CMD" && MAGIC_CMD=file
476case $deplibs_check_method in
477file_magic*)
478  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
479    _LT_PATH_MAGIC
480  fi
481  ;;
482esac
483
484# Use C for the default configuration in the libtool script
485LT_SUPPORTED_TAG([CC])
486_LT_LANG_C_CONFIG
487_LT_LANG_DEFAULT_CONFIG
488_LT_CONFIG_COMMANDS
489])# _LT_SETUP
490
491
492# _LT_PREPARE_SED_QUOTE_VARS
493# --------------------------
494# Define a few sed substitution that help us do robust quoting.
495m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
496[# Backslashify metacharacters that are still active within
497# double-quoted strings.
498sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
499
500# Same as above, but do not quote variable references.
501double_quote_subst='s/\([["`\\]]\)/\\\1/g'
502
503# Sed substitution to delay expansion of an escaped shell variable in a
504# double_quote_subst'ed string.
505delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
506
507# Sed substitution to delay expansion of an escaped single quote.
508delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
509
510# Sed substitution to avoid accidental globbing in evaled expressions
511no_glob_subst='s/\*/\\\*/g'
512])
513
514# _LT_PROG_LTMAIN
515# ---------------
516# Note that this code is called both from 'configure', and 'config.status'
517# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
518# 'config.status' has no value for ac_aux_dir unless we are using Automake,
519# so we pass a copy along to make sure it has a sensible value anyway.
520m4_defun([_LT_PROG_LTMAIN],
521[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
522_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
523ltmain=$ac_aux_dir/ltmain.sh
524])# _LT_PROG_LTMAIN
525
526
527
528# So that we can recreate a full libtool script including additional
529# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
530# in macros and then make a single call at the end using the 'libtool'
531# label.
532
533
534# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
535# ----------------------------------------
536# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
537m4_define([_LT_CONFIG_LIBTOOL_INIT],
538[m4_ifval([$1],
539          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
540                     [$1
541])])])
542
543# Initialize.
544m4_define([_LT_OUTPUT_LIBTOOL_INIT])
545
546
547# _LT_CONFIG_LIBTOOL([COMMANDS])
548# ------------------------------
549# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
550m4_define([_LT_CONFIG_LIBTOOL],
551[m4_ifval([$1],
552          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
553                     [$1
554])])])
555
556# Initialize.
557m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
558
559
560# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
561# -----------------------------------------------------
562m4_defun([_LT_CONFIG_SAVE_COMMANDS],
563[_LT_CONFIG_LIBTOOL([$1])
564_LT_CONFIG_LIBTOOL_INIT([$2])
565])
566
567
568# _LT_FORMAT_COMMENT([COMMENT])
569# -----------------------------
570# Add leading comment marks to the start of each line, and a trailing
571# full-stop to the whole comment if one is not present already.
572m4_define([_LT_FORMAT_COMMENT],
573[m4_ifval([$1], [
574m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
575              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
576)])
577
578
579
580
581
582# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
583# -------------------------------------------------------------------
584# CONFIGNAME is the name given to the value in the libtool script.
585# VARNAME is the (base) name used in the configure script.
586# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
587# VARNAME.  Any other value will be used directly.
588m4_define([_LT_DECL],
589[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
590    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
591	[m4_ifval([$1], [$1], [$2])])
592    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
593    m4_ifval([$4],
594	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
595    lt_dict_add_subkey([lt_decl_dict], [$2],
596	[tagged?], [m4_ifval([$5], [yes], [no])])])
597])
598
599
600# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
601# --------------------------------------------------------
602m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
603
604
605# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
606# ------------------------------------------------
607m4_define([lt_decl_tag_varnames],
608[_lt_decl_filter([tagged?], [yes], $@)])
609
610
611# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
612# ---------------------------------------------------------
613m4_define([_lt_decl_filter],
614[m4_case([$#],
615  [0], [m4_fatal([$0: too few arguments: $#])],
616  [1], [m4_fatal([$0: too few arguments: $#: $1])],
617  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
618  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
619  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
620])
621
622
623# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
624# --------------------------------------------------
625m4_define([lt_decl_quote_varnames],
626[_lt_decl_filter([value], [1], $@)])
627
628
629# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
630# ---------------------------------------------------
631m4_define([lt_decl_dquote_varnames],
632[_lt_decl_filter([value], [2], $@)])
633
634
635# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
636# ---------------------------------------------------
637m4_define([lt_decl_varnames_tagged],
638[m4_assert([$# <= 2])dnl
639_$0(m4_quote(m4_default([$1], [[, ]])),
640    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
641    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
642m4_define([_lt_decl_varnames_tagged],
643[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
644
645
646# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
647# ------------------------------------------------
648m4_define([lt_decl_all_varnames],
649[_$0(m4_quote(m4_default([$1], [[, ]])),
650     m4_if([$2], [],
651	   m4_quote(lt_decl_varnames),
652	m4_quote(m4_shift($@))))[]dnl
653])
654m4_define([_lt_decl_all_varnames],
655[lt_join($@, lt_decl_varnames_tagged([$1],
656			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
657])
658
659
660# _LT_CONFIG_STATUS_DECLARE([VARNAME])
661# ------------------------------------
662# Quote a variable value, and forward it to 'config.status' so that its
663# declaration there will have the same value as in 'configure'.  VARNAME
664# must have a single quote delimited value for this to work.
665m4_define([_LT_CONFIG_STATUS_DECLARE],
666[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
667
668
669# _LT_CONFIG_STATUS_DECLARATIONS
670# ------------------------------
671# We delimit libtool config variables with single quotes, so when
672# we write them to config.status, we have to be sure to quote all
673# embedded single quotes properly.  In configure, this macro expands
674# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
675#
676#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
677m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
678[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
679    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
680
681
682# _LT_LIBTOOL_TAGS
683# ----------------
684# Output comment and list of tags supported by the script
685m4_defun([_LT_LIBTOOL_TAGS],
686[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
687available_tags='_LT_TAGS'dnl
688])
689
690
691# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
692# -----------------------------------
693# Extract the dictionary values for VARNAME (optionally with TAG) and
694# expand to a commented shell variable setting:
695#
696#    # Some comment about what VAR is for.
697#    visible_name=$lt_internal_name
698m4_define([_LT_LIBTOOL_DECLARE],
699[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
700					   [description])))[]dnl
701m4_pushdef([_libtool_name],
702    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
703m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
704    [0], [_libtool_name=[$]$1],
705    [1], [_libtool_name=$lt_[]$1],
706    [2], [_libtool_name=$lt_[]$1],
707    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
708m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
709])
710
711
712# _LT_LIBTOOL_CONFIG_VARS
713# -----------------------
714# Produce commented declarations of non-tagged libtool config variables
715# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
716# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
717# section) are produced by _LT_LIBTOOL_TAG_VARS.
718m4_defun([_LT_LIBTOOL_CONFIG_VARS],
719[m4_foreach([_lt_var],
720    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
721    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
722
723
724# _LT_LIBTOOL_TAG_VARS(TAG)
725# -------------------------
726m4_define([_LT_LIBTOOL_TAG_VARS],
727[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
728    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
729
730
731# _LT_TAGVAR(VARNAME, [TAGNAME])
732# ------------------------------
733m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
734
735
736# _LT_CONFIG_COMMANDS
737# -------------------
738# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
739# variables for single and double quote escaping we saved from calls
740# to _LT_DECL, we can put quote escaped variables declarations
741# into 'config.status', and then the shell code to quote escape them in
742# for loops in 'config.status'.  Finally, any additional code accumulated
743# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
744m4_defun([_LT_CONFIG_COMMANDS],
745[AC_PROVIDE_IFELSE([LT_OUTPUT],
746	dnl If the libtool generation code has been placed in $CONFIG_LT,
747	dnl instead of duplicating it all over again into config.status,
748	dnl then we will have config.status run $CONFIG_LT later, so it
749	dnl needs to know what name is stored there:
750        [AC_CONFIG_COMMANDS([libtool],
751            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
752    dnl If the libtool generation code is destined for config.status,
753    dnl expand the accumulated commands and init code now:
754    [AC_CONFIG_COMMANDS([libtool],
755        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
756])#_LT_CONFIG_COMMANDS
757
758
759# Initialize.
760m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
761[
762
763# The HP-UX ksh and POSIX shell print the target directory to stdout
764# if CDPATH is set.
765(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
766
767sed_quote_subst='$sed_quote_subst'
768double_quote_subst='$double_quote_subst'
769delay_variable_subst='$delay_variable_subst'
770_LT_CONFIG_STATUS_DECLARATIONS
771LTCC='$LTCC'
772LTCFLAGS='$LTCFLAGS'
773compiler='$compiler_DEFAULT'
774
775# A function that is used when there is no print builtin or printf.
776func_fallback_echo ()
777{
778  eval 'cat <<_LTECHO_EOF
779\$[]1
780_LTECHO_EOF'
781}
782
783# Quote evaled strings.
784for var in lt_decl_all_varnames([[ \
785]], lt_decl_quote_varnames); do
786    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
787    *[[\\\\\\\`\\"\\\$]]*)
788      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
789      ;;
790    *)
791      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
792      ;;
793    esac
794done
795
796# Double-quote double-evaled strings.
797for var in lt_decl_all_varnames([[ \
798]], lt_decl_dquote_varnames); do
799    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
800    *[[\\\\\\\`\\"\\\$]]*)
801      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
802      ;;
803    *)
804      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
805      ;;
806    esac
807done
808
809_LT_OUTPUT_LIBTOOL_INIT
810])
811
812# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
813# ------------------------------------
814# Generate a child script FILE with all initialization necessary to
815# reuse the environment learned by the parent script, and make the
816# file executable.  If COMMENT is supplied, it is inserted after the
817# '#!' sequence but before initialization text begins.  After this
818# macro, additional text can be appended to FILE to form the body of
819# the child script.  The macro ends with non-zero status if the
820# file could not be fully written (such as if the disk is full).
821m4_ifdef([AS_INIT_GENERATED],
822[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
823[m4_defun([_LT_GENERATED_FILE_INIT],
824[m4_require([AS_PREPARE])]dnl
825[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
826[lt_write_fail=0
827cat >$1 <<_ASEOF || lt_write_fail=1
828#! $SHELL
829# Generated by $as_me.
830$2
831SHELL=\${CONFIG_SHELL-$SHELL}
832export SHELL
833_ASEOF
834cat >>$1 <<\_ASEOF || lt_write_fail=1
835AS_SHELL_SANITIZE
836_AS_PREPARE
837exec AS_MESSAGE_FD>&1
838_ASEOF
839test 0 = "$lt_write_fail" && chmod +x $1[]dnl
840m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
841
842# LT_OUTPUT
843# ---------
844# This macro allows early generation of the libtool script (before
845# AC_OUTPUT is called), incase it is used in configure for compilation
846# tests.
847AC_DEFUN([LT_OUTPUT],
848[: ${CONFIG_LT=./config.lt}
849AC_MSG_NOTICE([creating $CONFIG_LT])
850_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
851[# Run this file to recreate a libtool stub with the current configuration.])
852
853cat >>"$CONFIG_LT" <<\_LTEOF
854lt_cl_silent=false
855exec AS_MESSAGE_LOG_FD>>config.log
856{
857  echo
858  AS_BOX([Running $as_me.])
859} >&AS_MESSAGE_LOG_FD
860
861lt_cl_help="\
862'$as_me' creates a local libtool stub from the current configuration,
863for use in further configure time tests before the real libtool is
864generated.
865
866Usage: $[0] [[OPTIONS]]
867
868  -h, --help      print this help, then exit
869  -V, --version   print version number, then exit
870  -q, --quiet     do not print progress messages
871  -d, --debug     don't remove temporary files
872
873Report bugs to <bug-libtool@gnu.org>."
874
875lt_cl_version="\
876m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
877m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
878configured by $[0], generated by m4_PACKAGE_STRING.
879
880Copyright (C) 2011 Free Software Foundation, Inc.
881This config.lt script is free software; the Free Software Foundation
882gives unlimited permision to copy, distribute and modify it."
883
884while test 0 != $[#]
885do
886  case $[1] in
887    --version | --v* | -V )
888      echo "$lt_cl_version"; exit 0 ;;
889    --help | --h* | -h )
890      echo "$lt_cl_help"; exit 0 ;;
891    --debug | --d* | -d )
892      debug=: ;;
893    --quiet | --q* | --silent | --s* | -q )
894      lt_cl_silent=: ;;
895
896    -*) AC_MSG_ERROR([unrecognized option: $[1]
897Try '$[0] --help' for more information.]) ;;
898
899    *) AC_MSG_ERROR([unrecognized argument: $[1]
900Try '$[0] --help' for more information.]) ;;
901  esac
902  shift
903done
904
905if $lt_cl_silent; then
906  exec AS_MESSAGE_FD>/dev/null
907fi
908_LTEOF
909
910cat >>"$CONFIG_LT" <<_LTEOF
911_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
912_LTEOF
913
914cat >>"$CONFIG_LT" <<\_LTEOF
915AC_MSG_NOTICE([creating $ofile])
916_LT_OUTPUT_LIBTOOL_COMMANDS
917AS_EXIT(0)
918_LTEOF
919chmod +x "$CONFIG_LT"
920
921# configure is writing to config.log, but config.lt does its own redirection,
922# appending to config.log, which fails on DOS, as config.log is still kept
923# open by configure.  Here we exec the FD to /dev/null, effectively closing
924# config.log, so it can be properly (re)opened and appended to by config.lt.
925lt_cl_success=:
926test yes = "$silent" &&
927  lt_config_lt_args="$lt_config_lt_args --quiet"
928exec AS_MESSAGE_LOG_FD>/dev/null
929$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
930exec AS_MESSAGE_LOG_FD>>config.log
931$lt_cl_success || AS_EXIT(1)
932])# LT_OUTPUT
933
934
935# _LT_CONFIG(TAG)
936# ---------------
937# If TAG is the built-in tag, create an initial libtool script with a
938# default configuration from the untagged config vars.  Otherwise add code
939# to config.status for appending the configuration named by TAG from the
940# matching tagged config vars.
941m4_defun([_LT_CONFIG],
942[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
943_LT_CONFIG_SAVE_COMMANDS([
944  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
945  m4_if(_LT_TAG, [C], [
946    # See if we are running on zsh, and set the options that allow our
947    # commands through without removal of \ escapes.
948    if test -n "${ZSH_VERSION+set}"; then
949      setopt NO_GLOB_SUBST
950    fi
951
952    cfgfile=${ofile}T
953    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
954    $RM "$cfgfile"
955
956    cat <<_LT_EOF >> "$cfgfile"
957#! $SHELL
958# Generated automatically by $as_me ($PACKAGE) $VERSION
959# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
960# NOTE: Changes made to this file will be lost: look at ltmain.sh.
961
962# Provide generalized library-building support services.
963# Written by Gordon Matzigkeit, 1996
964
965_LT_COPYING
966_LT_LIBTOOL_TAGS
967
968# Configured defaults for sys_lib_dlsearch_path munging.
969: \${LT_SYS_LIBRARY_PATH="$LT_SYS_LIBRARY_PATH"}
970
971# ### BEGIN LIBTOOL CONFIG
972_LT_LIBTOOL_CONFIG_VARS
973_LT_LIBTOOL_TAG_VARS
974# ### END LIBTOOL CONFIG
975
976_LT_EOF
977
978    cat <<'_LT_EOF' >> "$cfgfile"
979
980_LT_PREPARE_MUNGE_PATH_LIST
981_LT_PREPARE_CC_BASENAME
982
983_LT_EOF
984
985  case $host_os in
986  aix3*)
987    cat <<\_LT_EOF >> "$cfgfile"
988# AIX sometimes has problems with the GCC collect2 program.  For some
989# reason, if we set the COLLECT_NAMES environment variable, the problems
990# vanish in a puff of smoke.
991if test set != "${COLLECT_NAMES+set}"; then
992  COLLECT_NAMES=
993  export COLLECT_NAMES
994fi
995_LT_EOF
996    ;;
997  esac
998
999  _LT_PROG_LTMAIN
1000
1001  # We use sed instead of cat because bash on DJGPP gets confused if
1002  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1003  # text mode, it properly converts lines to CR/LF.  This bash problem
1004  # is reportedly fixed, but why not run on old versions too?
1005  sed '$q' "$ltmain" >> "$cfgfile" \
1006     || (rm -f "$cfgfile"; exit 1)
1007
1008   mv -f "$cfgfile" "$ofile" ||
1009    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1010  chmod +x "$ofile"
1011],
1012[cat <<_LT_EOF >> "$ofile"
1013
1014dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1015dnl in a comment (ie after a #).
1016# ### BEGIN LIBTOOL TAG CONFIG: $1
1017_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1018# ### END LIBTOOL TAG CONFIG: $1
1019_LT_EOF
1020])dnl /m4_if
1021],
1022[m4_if([$1], [], [
1023    PACKAGE='$PACKAGE'
1024    VERSION='$VERSION'
1025    RM='$RM'
1026    ofile='$ofile'], [])
1027])dnl /_LT_CONFIG_SAVE_COMMANDS
1028])# _LT_CONFIG
1029
1030
1031# LT_SUPPORTED_TAG(TAG)
1032# ---------------------
1033# Trace this macro to discover what tags are supported by the libtool
1034# --tag option, using:
1035#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1036AC_DEFUN([LT_SUPPORTED_TAG], [])
1037
1038
1039# C support is built-in for now
1040m4_define([_LT_LANG_C_enabled], [])
1041m4_define([_LT_TAGS], [])
1042
1043
1044# LT_LANG(LANG)
1045# -------------
1046# Enable libtool support for the given language if not already enabled.
1047AC_DEFUN([LT_LANG],
1048[AC_BEFORE([$0], [LT_OUTPUT])dnl
1049m4_case([$1],
1050  [C],			[_LT_LANG(C)],
1051  [C++],		[_LT_LANG(CXX)],
1052  [Go],			[_LT_LANG(GO)],
1053  [Java],		[_LT_LANG(GCJ)],
1054  [Fortran 77],		[_LT_LANG(F77)],
1055  [Fortran],		[_LT_LANG(FC)],
1056  [Windows Resource],	[_LT_LANG(RC)],
1057  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1058    [_LT_LANG($1)],
1059    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1060])# LT_LANG
1061
1062
1063# _LT_LANG(LANGNAME)
1064# ------------------
1065m4_defun([_LT_LANG],
1066[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1067  [LT_SUPPORTED_TAG([$1])dnl
1068  m4_append([_LT_TAGS], [$1 ])dnl
1069  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1070  _LT_LANG_$1_CONFIG($1)])dnl
1071])# _LT_LANG
1072
1073
1074m4_ifndef([AC_PROG_GO], [
1075# NOTE: This macro has been submitted for inclusion into   #
1076#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1077#  a released version of Autoconf we should remove this    #
1078#  macro and use it instead.                               #
1079m4_defun([AC_PROG_GO],
1080[AC_LANG_PUSH(Go)dnl
1081AC_ARG_VAR([GOC],     [Go compiler command])dnl
1082AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1083_AC_ARG_VAR_LDFLAGS()dnl
1084AC_CHECK_TOOL(GOC, gccgo)
1085if test -z "$GOC"; then
1086  if test -n "$ac_tool_prefix"; then
1087    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1088  fi
1089fi
1090if test -z "$GOC"; then
1091  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1092fi
1093])#m4_defun
1094])#m4_ifndef
1095
1096
1097# _LT_LANG_DEFAULT_CONFIG
1098# -----------------------
1099m4_defun([_LT_LANG_DEFAULT_CONFIG],
1100[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1101  [LT_LANG(CXX)],
1102  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1103
1104AC_PROVIDE_IFELSE([AC_PROG_F77],
1105  [LT_LANG(F77)],
1106  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1107
1108AC_PROVIDE_IFELSE([AC_PROG_FC],
1109  [LT_LANG(FC)],
1110  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1111
1112dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1113dnl pulling things in needlessly.
1114AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1115  [LT_LANG(GCJ)],
1116  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1117    [LT_LANG(GCJ)],
1118    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1119      [LT_LANG(GCJ)],
1120      [m4_ifdef([AC_PROG_GCJ],
1121	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1122       m4_ifdef([A][M_PROG_GCJ],
1123	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1124       m4_ifdef([LT_PROG_GCJ],
1125	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1126
1127AC_PROVIDE_IFELSE([AC_PROG_GO],
1128  [LT_LANG(GO)],
1129  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1130
1131AC_PROVIDE_IFELSE([LT_PROG_RC],
1132  [LT_LANG(RC)],
1133  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1134])# _LT_LANG_DEFAULT_CONFIG
1135
1136# Obsolete macros:
1137AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1138AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1139AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1140AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1141AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1142dnl aclocal-1.4 backwards compatibility:
1143dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1144dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1145dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1146dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1147dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1148
1149
1150# _LT_TAG_COMPILER
1151# ----------------
1152m4_defun([_LT_TAG_COMPILER],
1153[AC_REQUIRE([AC_PROG_CC])dnl
1154
1155_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1156_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1157_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1158_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1159
1160# If no C compiler was specified, use CC.
1161LTCC=${LTCC-"$CC"}
1162
1163# If no C compiler flags were specified, use CFLAGS.
1164LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1165
1166# Allow CC to be a program name with arguments.
1167compiler=$CC
1168])# _LT_TAG_COMPILER
1169
1170
1171# _LT_COMPILER_BOILERPLATE
1172# ------------------------
1173# Check for compiler boilerplate output or warnings with
1174# the simple compiler test code.
1175m4_defun([_LT_COMPILER_BOILERPLATE],
1176[m4_require([_LT_DECL_SED])dnl
1177ac_outfile=conftest.$ac_objext
1178echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1179eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1180_lt_compiler_boilerplate=`cat conftest.err`
1181$RM conftest*
1182])# _LT_COMPILER_BOILERPLATE
1183
1184
1185# _LT_LINKER_BOILERPLATE
1186# ----------------------
1187# Check for linker boilerplate output or warnings with
1188# the simple link test code.
1189m4_defun([_LT_LINKER_BOILERPLATE],
1190[m4_require([_LT_DECL_SED])dnl
1191ac_outfile=conftest.$ac_objext
1192echo "$lt_simple_link_test_code" >conftest.$ac_ext
1193eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1194_lt_linker_boilerplate=`cat conftest.err`
1195$RM -r conftest*
1196])# _LT_LINKER_BOILERPLATE
1197
1198# _LT_REQUIRED_DARWIN_CHECKS
1199# -------------------------
1200m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1201  case $host_os in
1202    rhapsody* | darwin*)
1203    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1204    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1205    AC_CHECK_TOOL([LIPO], [lipo], [:])
1206    AC_CHECK_TOOL([OTOOL], [otool], [:])
1207    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1208    _LT_DECL([], [DSYMUTIL], [1],
1209      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1210    _LT_DECL([], [NMEDIT], [1],
1211      [Tool to change global to local symbols on Mac OS X])
1212    _LT_DECL([], [LIPO], [1],
1213      [Tool to manipulate fat objects and archives on Mac OS X])
1214    _LT_DECL([], [OTOOL], [1],
1215      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1216    _LT_DECL([], [OTOOL64], [1],
1217      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1218
1219    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1220      [lt_cv_apple_cc_single_mod=no
1221      if test -z "$LT_MULTI_MODULE"; then
1222	# By default we will add the -single_module flag. You can override
1223	# by either setting the environment variable LT_MULTI_MODULE
1224	# non-empty at configure time, or by adding -multi_module to the
1225	# link flags.
1226	rm -rf libconftest.dylib*
1227	echo "int foo(void){return 1;}" > conftest.c
1228	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1229-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1230	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1231	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1232        _lt_result=$?
1233	# If there is a non-empty error log, and "single_module"
1234	# appears in it, assume the flag caused a linker warning
1235        if test -s conftest.err && $GREP single_module conftest.err; then
1236	  cat conftest.err >&AS_MESSAGE_LOG_FD
1237	# Otherwise, if the output was created with a 0 exit code from
1238	# the compiler, it worked.
1239	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1240	  lt_cv_apple_cc_single_mod=yes
1241	else
1242	  cat conftest.err >&AS_MESSAGE_LOG_FD
1243	fi
1244	rm -rf libconftest.dylib*
1245	rm -f conftest.*
1246      fi])
1247
1248    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1249      [lt_cv_ld_exported_symbols_list],
1250      [lt_cv_ld_exported_symbols_list=no
1251      save_LDFLAGS=$LDFLAGS
1252      echo "_main" > conftest.sym
1253      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1254      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1255	[lt_cv_ld_exported_symbols_list=yes],
1256	[lt_cv_ld_exported_symbols_list=no])
1257	LDFLAGS=$save_LDFLAGS
1258    ])
1259
1260    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1261      [lt_cv_ld_force_load=no
1262      cat > conftest.c << _LT_EOF
1263int forced_loaded() { return 2;}
1264_LT_EOF
1265      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1266      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1267      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1268      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1269      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1270      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1271      cat > conftest.c << _LT_EOF
1272int main() { return 0;}
1273_LT_EOF
1274      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1275      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1276      _lt_result=$?
1277      if test -s conftest.err && $GREP force_load conftest.err; then
1278	cat conftest.err >&AS_MESSAGE_LOG_FD
1279      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1280	lt_cv_ld_force_load=yes
1281      else
1282	cat conftest.err >&AS_MESSAGE_LOG_FD
1283      fi
1284        rm -f conftest.err libconftest.a conftest conftest.c
1285        rm -rf conftest.dSYM
1286    ])
1287    case $host_os in
1288    rhapsody* | darwin1.[[012]])
1289      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1290    darwin1.*)
1291      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1292    darwin*) # darwin 5.x on
1293      # if running on 10.5 or later, the deployment target defaults
1294      # to the OS version, if on x86, and 10.4, the deployment
1295      # target defaults to 10.4. Don't you love it?
1296      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1297	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1298	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1299	10.[[012]][[,.]]*)
1300	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1301	10.*)
1302	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1303      esac
1304    ;;
1305  esac
1306    if test yes = "$lt_cv_apple_cc_single_mod"; then
1307      _lt_dar_single_mod='$single_module'
1308    fi
1309    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1310      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1311    else
1312      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1313    fi
1314    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1315      _lt_dsymutil='~$DSYMUTIL $lib || :'
1316    else
1317      _lt_dsymutil=
1318    fi
1319    ;;
1320  esac
1321])
1322
1323
1324# _LT_DARWIN_LINKER_FEATURES([TAG])
1325# ---------------------------------
1326# Checks for linker and compiler features on darwin
1327m4_defun([_LT_DARWIN_LINKER_FEATURES],
1328[
1329  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1330  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1331  _LT_TAGVAR(hardcode_direct, $1)=no
1332  _LT_TAGVAR(hardcode_automatic, $1)=yes
1333  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1334  if test yes = "$lt_cv_ld_force_load"; then
1335    _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\"`'
1336    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1337                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1338  else
1339    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1340  fi
1341  _LT_TAGVAR(link_all_deplibs, $1)=yes
1342  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1343  case $cc_basename in
1344     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1345     *) _lt_dar_can_shared=$GCC ;;
1346  esac
1347  if test yes = "$_lt_dar_can_shared"; then
1348    output_verbose_link_cmd=func_echo_all
1349    _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"
1350    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1351    _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"
1352    _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"
1353    m4_if([$1], [CXX],
1354[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1355      _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"
1356      _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"
1357    fi
1358],[])
1359  else
1360  _LT_TAGVAR(ld_shlibs, $1)=no
1361  fi
1362])
1363
1364# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1365# ----------------------------------
1366# Links a minimal program and checks the executable
1367# for the system default hardcoded library path. In most cases,
1368# this is /usr/lib:/lib, but when the MPI compilers are used
1369# the location of the communication and MPI libs are included too.
1370# If we don't find anything, use the default library path according
1371# to the aix ld manual.
1372# Store the results from the different compilers for each TAGNAME.
1373# Allow to override them for all tags through lt_cv_aix_libpath.
1374m4_defun([_LT_SYS_MODULE_PATH_AIX],
1375[m4_require([_LT_DECL_SED])dnl
1376if test set = "${lt_cv_aix_libpath+set}"; then
1377  aix_libpath=$lt_cv_aix_libpath
1378else
1379  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1380  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1381  lt_aix_libpath_sed='[
1382      /Import File Strings/,/^$/ {
1383	  /^0/ {
1384	      s/^0  *\([^ ]*\) *$/\1/
1385	      p
1386	  }
1387      }]'
1388  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1389  # Check for a 64-bit object if we didn't find anything.
1390  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1391    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1392  fi],[])
1393  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1394    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1395  fi
1396  ])
1397  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1398fi
1399])# _LT_SYS_MODULE_PATH_AIX
1400
1401
1402# _LT_SHELL_INIT(ARG)
1403# -------------------
1404m4_define([_LT_SHELL_INIT],
1405[m4_divert_text([M4SH-INIT], [$1
1406])])# _LT_SHELL_INIT
1407
1408
1409
1410# _LT_PROG_ECHO_BACKSLASH
1411# -----------------------
1412# Find how we can fake an echo command that does not interpret backslash.
1413# In particular, with Autoconf 2.60 or later we add some code to the start
1414# of the generated configure script that will find a shell with a builtin
1415# printf (that we can use as an echo command).
1416m4_defun([_LT_PROG_ECHO_BACKSLASH],
1417[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1418ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1419ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1420
1421AC_MSG_CHECKING([how to print strings])
1422# Test print first, because it will be a builtin if present.
1423if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1424   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1425  ECHO='print -r --'
1426elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1427  ECHO='printf %s\n'
1428else
1429  # Use this function as a fallback that always works.
1430  func_fallback_echo ()
1431  {
1432    eval 'cat <<_LTECHO_EOF
1433$[]1
1434_LTECHO_EOF'
1435  }
1436  ECHO='func_fallback_echo'
1437fi
1438
1439# func_echo_all arg...
1440# Invoke $ECHO with all args, space-separated.
1441func_echo_all ()
1442{
1443    $ECHO "$*"
1444}
1445
1446case $ECHO in
1447  printf*) AC_MSG_RESULT([printf]) ;;
1448  print*) AC_MSG_RESULT([print -r]) ;;
1449  *) AC_MSG_RESULT([cat]) ;;
1450esac
1451
1452m4_ifdef([_AS_DETECT_SUGGESTED],
1453[_AS_DETECT_SUGGESTED([
1454  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1455    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1456    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1457    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1458    PATH=/empty FPATH=/empty; export PATH FPATH
1459    test "X`printf %s $ECHO`" = "X$ECHO" \
1460      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1461
1462_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1463_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1464])# _LT_PROG_ECHO_BACKSLASH
1465
1466
1467# _LT_WITH_SYSROOT
1468# ----------------
1469AC_DEFUN([_LT_WITH_SYSROOT],
1470[AC_MSG_CHECKING([for sysroot])
1471AC_ARG_WITH([sysroot],
1472[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1473  [Search for dependent libraries within DIR (or the compiler's sysroot
1474   if not specified).])],
1475[], [with_sysroot=no])
1476
1477dnl lt_sysroot will always be passed unquoted.  We quote it here
1478dnl in case the user passed a directory name.
1479lt_sysroot=
1480case $with_sysroot in #(
1481 yes)
1482   if test yes = "$GCC"; then
1483     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1484   fi
1485   ;; #(
1486 /*)
1487   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1488   ;; #(
1489 no|'')
1490   ;; #(
1491 *)
1492   AC_MSG_RESULT([$with_sysroot])
1493   AC_MSG_ERROR([The sysroot must be an absolute path.])
1494   ;;
1495esac
1496
1497 AC_MSG_RESULT([${lt_sysroot:-no}])
1498_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1499[dependent libraries, and where our libraries should be installed.])])
1500
1501# _LT_ENABLE_LOCK
1502# ---------------
1503m4_defun([_LT_ENABLE_LOCK],
1504[AC_ARG_ENABLE([libtool-lock],
1505  [AS_HELP_STRING([--disable-libtool-lock],
1506    [avoid locking (might break parallel builds)])])
1507test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1508
1509# Some flags need to be propagated to the compiler or linker for good
1510# libtool support.
1511case $host in
1512ia64-*-hpux*)
1513  # Find out what ABI is being produced by ac_compile, and set mode
1514  # options accordingly.
1515  echo 'int i;' > conftest.$ac_ext
1516  if AC_TRY_EVAL(ac_compile); then
1517    case `/usr/bin/file conftest.$ac_objext` in
1518      *ELF-32*)
1519	HPUX_IA64_MODE=32
1520	;;
1521      *ELF-64*)
1522	HPUX_IA64_MODE=64
1523	;;
1524    esac
1525  fi
1526  rm -rf conftest*
1527  ;;
1528*-*-irix6*)
1529  # Find out what ABI is being produced by ac_compile, and set linker
1530  # options accordingly.
1531  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1532  if AC_TRY_EVAL(ac_compile); then
1533    if test yes = "$lt_cv_prog_gnu_ld"; then
1534      case `/usr/bin/file conftest.$ac_objext` in
1535	*32-bit*)
1536	  LD="${LD-ld} -melf32bsmip"
1537	  ;;
1538	*N32*)
1539	  LD="${LD-ld} -melf32bmipn32"
1540	  ;;
1541	*64-bit*)
1542	  LD="${LD-ld} -melf64bmip"
1543	;;
1544      esac
1545    else
1546      case `/usr/bin/file conftest.$ac_objext` in
1547	*32-bit*)
1548	  LD="${LD-ld} -32"
1549	  ;;
1550	*N32*)
1551	  LD="${LD-ld} -n32"
1552	  ;;
1553	*64-bit*)
1554	  LD="${LD-ld} -64"
1555	  ;;
1556      esac
1557    fi
1558  fi
1559  rm -rf conftest*
1560  ;;
1561
1562mips64*-*linux*)
1563  # Find out what ABI is being produced by ac_compile, and set linker
1564  # options accordingly.
1565  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1566  if AC_TRY_EVAL(ac_compile); then
1567    emul=elf
1568    case `/usr/bin/file conftest.$ac_objext` in
1569      *32-bit*)
1570	emul="${emul}32"
1571	;;
1572      *64-bit*)
1573	emul="${emul}64"
1574	;;
1575    esac
1576    case `/usr/bin/file conftest.$ac_objext` in
1577      *MSB*)
1578	emul="${emul}btsmip"
1579	;;
1580      *LSB*)
1581	emul="${emul}ltsmip"
1582	;;
1583    esac
1584    case `/usr/bin/file conftest.$ac_objext` in
1585      *N32*)
1586	emul="${emul}n32"
1587	;;
1588    esac
1589    LD="${LD-ld} -m $emul"
1590  fi
1591  rm -rf conftest*
1592  ;;
1593
1594x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1595s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1596  # Find out what ABI is being produced by ac_compile, and set linker
1597  # options accordingly.  Note that the listed cases only cover the
1598  # situations where additional linker options are needed (such as when
1599  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1600  # vice versa); the common cases where no linker options are needed do
1601  # not appear in the list.
1602  echo 'int i;' > conftest.$ac_ext
1603  if AC_TRY_EVAL(ac_compile); then
1604    case `/usr/bin/file conftest.o` in
1605      *32-bit*)
1606	case $host in
1607	  x86_64-*kfreebsd*-gnu)
1608	    LD="${LD-ld} -m elf_i386_fbsd"
1609	    ;;
1610	  x86_64-*linux*)
1611	    case `/usr/bin/file conftest.o` in
1612	      *x86-64*)
1613		LD="${LD-ld} -m elf32_x86_64"
1614		;;
1615	      *)
1616		LD="${LD-ld} -m elf_i386"
1617		;;
1618	    esac
1619	    ;;
1620	  powerpc64le-*linux*)
1621	    LD="${LD-ld} -m elf32lppclinux"
1622	    ;;
1623	  powerpc64-*linux*)
1624	    LD="${LD-ld} -m elf32ppclinux"
1625	    ;;
1626	  s390x-*linux*)
1627	    LD="${LD-ld} -m elf_s390"
1628	    ;;
1629	  sparc64-*linux*)
1630	    LD="${LD-ld} -m elf32_sparc"
1631	    ;;
1632	esac
1633	;;
1634      *64-bit*)
1635	case $host in
1636	  x86_64-*kfreebsd*-gnu)
1637	    LD="${LD-ld} -m elf_x86_64_fbsd"
1638	    ;;
1639	  x86_64-*linux*)
1640	    LD="${LD-ld} -m elf_x86_64"
1641	    ;;
1642	  powerpcle-*linux*)
1643	    LD="${LD-ld} -m elf64lppc"
1644	    ;;
1645	  powerpc-*linux*)
1646	    LD="${LD-ld} -m elf64ppc"
1647	    ;;
1648	  s390*-*linux*|s390*-*tpf*)
1649	    LD="${LD-ld} -m elf64_s390"
1650	    ;;
1651	  sparc*-*linux*)
1652	    LD="${LD-ld} -m elf64_sparc"
1653	    ;;
1654	esac
1655	;;
1656    esac
1657  fi
1658  rm -rf conftest*
1659  ;;
1660
1661*-*-sco3.2v5*)
1662  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1663  SAVE_CFLAGS=$CFLAGS
1664  CFLAGS="$CFLAGS -belf"
1665  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1666    [AC_LANG_PUSH(C)
1667     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1668     AC_LANG_POP])
1669  if test yes != "$lt_cv_cc_needs_belf"; then
1670    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1671    CFLAGS=$SAVE_CFLAGS
1672  fi
1673  ;;
1674*-*solaris*)
1675  # Find out what ABI is being produced by ac_compile, and set linker
1676  # options accordingly.
1677  echo 'int i;' > conftest.$ac_ext
1678  if AC_TRY_EVAL(ac_compile); then
1679    case `/usr/bin/file conftest.o` in
1680    *64-bit*)
1681      case $lt_cv_prog_gnu_ld in
1682      yes*)
1683        case $host in
1684        i?86-*-solaris*|x86_64-*-solaris*)
1685          LD="${LD-ld} -m elf_x86_64"
1686          ;;
1687        sparc*-*-solaris*)
1688          LD="${LD-ld} -m elf64_sparc"
1689          ;;
1690        esac
1691        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1692        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1693          LD=${LD-ld}_sol2
1694        fi
1695        ;;
1696      *)
1697	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1698	  LD="${LD-ld} -64"
1699	fi
1700	;;
1701      esac
1702      ;;
1703    esac
1704  fi
1705  rm -rf conftest*
1706  ;;
1707esac
1708
1709need_locks=$enable_libtool_lock
1710])# _LT_ENABLE_LOCK
1711
1712
1713# _LT_PROG_AR
1714# -----------
1715m4_defun([_LT_PROG_AR],
1716[AC_CHECK_TOOLS(AR, [ar], false)
1717: ${AR=ar}
1718: ${AR_FLAGS=cru}
1719_LT_DECL([], [AR], [1], [The archiver])
1720_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1721
1722AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1723  [lt_cv_ar_at_file=no
1724   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1725     [echo conftest.$ac_objext > conftest.lst
1726      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1727      AC_TRY_EVAL([lt_ar_try])
1728      if test 0 -eq "$ac_status"; then
1729	# Ensure the archiver fails upon bogus file names.
1730	rm -f conftest.$ac_objext libconftest.a
1731	AC_TRY_EVAL([lt_ar_try])
1732	if test 0 -ne "$ac_status"; then
1733          lt_cv_ar_at_file=@
1734        fi
1735      fi
1736      rm -f conftest.* libconftest.a
1737     ])
1738  ])
1739
1740if test no = "$lt_cv_ar_at_file"; then
1741  archiver_list_spec=
1742else
1743  archiver_list_spec=$lt_cv_ar_at_file
1744fi
1745_LT_DECL([], [archiver_list_spec], [1],
1746  [How to feed a file listing to the archiver])
1747])# _LT_PROG_AR
1748
1749
1750# _LT_CMD_OLD_ARCHIVE
1751# -------------------
1752m4_defun([_LT_CMD_OLD_ARCHIVE],
1753[_LT_PROG_AR
1754
1755AC_CHECK_TOOL(STRIP, strip, :)
1756test -z "$STRIP" && STRIP=:
1757_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1758
1759AC_CHECK_TOOL(RANLIB, ranlib, :)
1760test -z "$RANLIB" && RANLIB=:
1761_LT_DECL([], [RANLIB], [1],
1762    [Commands used to install an old-style archive])
1763
1764# Determine commands to create old-style static archives.
1765old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1766old_postinstall_cmds='chmod 644 $oldlib'
1767old_postuninstall_cmds=
1768
1769if test -n "$RANLIB"; then
1770  case $host_os in
1771  bitrig* | openbsd*)
1772    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1773    ;;
1774  *)
1775    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1776    ;;
1777  esac
1778  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1779fi
1780
1781case $host_os in
1782  darwin*)
1783    lock_old_archive_extraction=yes ;;
1784  *)
1785    lock_old_archive_extraction=no ;;
1786esac
1787_LT_DECL([], [old_postinstall_cmds], [2])
1788_LT_DECL([], [old_postuninstall_cmds], [2])
1789_LT_TAGDECL([], [old_archive_cmds], [2],
1790    [Commands used to build an old-style archive])
1791_LT_DECL([], [lock_old_archive_extraction], [0],
1792    [Whether to use a lock for old archive extraction])
1793])# _LT_CMD_OLD_ARCHIVE
1794
1795
1796# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1797#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1798# ----------------------------------------------------------------
1799# Check whether the given compiler option works
1800AC_DEFUN([_LT_COMPILER_OPTION],
1801[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1802m4_require([_LT_DECL_SED])dnl
1803AC_CACHE_CHECK([$1], [$2],
1804  [$2=no
1805   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1806   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1807   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
1808   # Insert the option either (1) after the last *FLAGS variable, or
1809   # (2) before a word containing "conftest.", or (3) at the end.
1810   # Note that $ac_compile itself does not contain backslashes and begins
1811   # with a dollar sign (not a hyphen), so the echo should work correctly.
1812   # The option is referenced via a variable to avoid confusing sed.
1813   lt_compile=`echo "$ac_compile" | $SED \
1814   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1815   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1816   -e 's:$: $lt_compiler_flag:'`
1817   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1818   (eval "$lt_compile" 2>conftest.err)
1819   ac_status=$?
1820   cat conftest.err >&AS_MESSAGE_LOG_FD
1821   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1822   if (exit $ac_status) && test -s "$ac_outfile"; then
1823     # The compiler can only warn and ignore the option if not recognized
1824     # So say no if there are warnings other than the usual output.
1825     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1826     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1827     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1828       $2=yes
1829     fi
1830   fi
1831   $RM conftest*
1832])
1833
1834if test yes = "[$]$2"; then
1835    m4_if([$5], , :, [$5])
1836else
1837    m4_if([$6], , :, [$6])
1838fi
1839])# _LT_COMPILER_OPTION
1840
1841# Old name:
1842AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1843dnl aclocal-1.4 backwards compatibility:
1844dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1845
1846
1847# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1848#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1849# ----------------------------------------------------
1850# Check whether the given linker option works
1851AC_DEFUN([_LT_LINKER_OPTION],
1852[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1853m4_require([_LT_DECL_SED])dnl
1854AC_CACHE_CHECK([$1], [$2],
1855  [$2=no
1856   save_LDFLAGS=$LDFLAGS
1857   LDFLAGS="$LDFLAGS $3"
1858   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1859   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1860     # The linker can only warn and ignore the option if not recognized
1861     # So say no if there are warnings
1862     if test -s conftest.err; then
1863       # Append any errors to the config.log.
1864       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1865       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1866       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1867       if diff conftest.exp conftest.er2 >/dev/null; then
1868         $2=yes
1869       fi
1870     else
1871       $2=yes
1872     fi
1873   fi
1874   $RM -r conftest*
1875   LDFLAGS=$save_LDFLAGS
1876])
1877
1878if test yes = "[$]$2"; then
1879    m4_if([$4], , :, [$4])
1880else
1881    m4_if([$5], , :, [$5])
1882fi
1883])# _LT_LINKER_OPTION
1884
1885# Old name:
1886AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1887dnl aclocal-1.4 backwards compatibility:
1888dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1889
1890
1891# LT_CMD_MAX_LEN
1892#---------------
1893AC_DEFUN([LT_CMD_MAX_LEN],
1894[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1895# find the maximum length of command line arguments
1896AC_MSG_CHECKING([the maximum length of command line arguments])
1897AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1898  i=0
1899  teststring=ABCD
1900
1901  case $build_os in
1902  msdosdjgpp*)
1903    # On DJGPP, this test can blow up pretty badly due to problems in libc
1904    # (any single argument exceeding 2000 bytes causes a buffer overrun
1905    # during glob expansion).  Even if it were fixed, the result of this
1906    # check would be larger than it should be.
1907    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1908    ;;
1909
1910  gnu*)
1911    # Under GNU Hurd, this test is not required because there is
1912    # no limit to the length of command line arguments.
1913    # Libtool will interpret -1 as no limit whatsoever
1914    lt_cv_sys_max_cmd_len=-1;
1915    ;;
1916
1917  cygwin* | mingw* | cegcc*)
1918    # On Win9x/ME, this test blows up -- it succeeds, but takes
1919    # about 5 minutes as the teststring grows exponentially.
1920    # Worse, since 9x/ME are not pre-emptively multitasking,
1921    # you end up with a "frozen" computer, even though with patience
1922    # the test eventually succeeds (with a max line length of 256k).
1923    # Instead, let's just punt: use the minimum linelength reported by
1924    # all of the supported platforms: 8192 (on NT/2K/XP).
1925    lt_cv_sys_max_cmd_len=8192;
1926    ;;
1927
1928  mint*)
1929    # On MiNT this can take a long time and run out of memory.
1930    lt_cv_sys_max_cmd_len=8192;
1931    ;;
1932
1933  amigaos*)
1934    # On AmigaOS with pdksh, this test takes hours, literally.
1935    # So we just punt and use a minimum line length of 8192.
1936    lt_cv_sys_max_cmd_len=8192;
1937    ;;
1938
1939  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1940    # This has been around since 386BSD, at least.  Likely further.
1941    if test -x /sbin/sysctl; then
1942      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1943    elif test -x /usr/sbin/sysctl; then
1944      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1945    else
1946      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1947    fi
1948    # And add a safety zone
1949    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1950    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1951    ;;
1952
1953  interix*)
1954    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1955    lt_cv_sys_max_cmd_len=196608
1956    ;;
1957
1958  os2*)
1959    # The test takes a long time on OS/2.
1960    lt_cv_sys_max_cmd_len=8192
1961    ;;
1962
1963  osf*)
1964    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1965    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1966    # nice to cause kernel panics so lets avoid the loop below.
1967    # First set a reasonable default.
1968    lt_cv_sys_max_cmd_len=16384
1969    #
1970    if test -x /sbin/sysconfig; then
1971      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1972        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1973      esac
1974    fi
1975    ;;
1976  sco3.2v5*)
1977    lt_cv_sys_max_cmd_len=102400
1978    ;;
1979  sysv5* | sco5v6* | sysv4.2uw2*)
1980    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1981    if test -n "$kargmax"; then
1982      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1983    else
1984      lt_cv_sys_max_cmd_len=32768
1985    fi
1986    ;;
1987  *)
1988    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1989    if test -n "$lt_cv_sys_max_cmd_len" && \
1990       test undefined != "$lt_cv_sys_max_cmd_len"; then
1991      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1992      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1993    else
1994      # Make teststring a little bigger before we do anything with it.
1995      # a 1K string should be a reasonable start.
1996      for i in 1 2 3 4 5 6 7 8; do
1997        teststring=$teststring$teststring
1998      done
1999      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2000      # If test is not a shell built-in, we'll probably end up computing a
2001      # maximum length that is only half of the actual maximum length, but
2002      # we can't tell.
2003      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
2004	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2005	      test 17 != "$i" # 1/2 MB should be enough
2006      do
2007        i=`expr $i + 1`
2008        teststring=$teststring$teststring
2009      done
2010      # Only check the string length outside the loop.
2011      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2012      teststring=
2013      # Add a significant safety factor because C++ compilers can tack on
2014      # massive amounts of additional arguments before passing them to the
2015      # linker.  It appears as though 1/2 is a usable value.
2016      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2017    fi
2018    ;;
2019  esac
2020])
2021if test -n "$lt_cv_sys_max_cmd_len"; then
2022  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2023else
2024  AC_MSG_RESULT(none)
2025fi
2026max_cmd_len=$lt_cv_sys_max_cmd_len
2027_LT_DECL([], [max_cmd_len], [0],
2028    [What is the maximum length of a command?])
2029])# LT_CMD_MAX_LEN
2030
2031# Old name:
2032AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2033dnl aclocal-1.4 backwards compatibility:
2034dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2035
2036
2037# _LT_HEADER_DLFCN
2038# ----------------
2039m4_defun([_LT_HEADER_DLFCN],
2040[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2041])# _LT_HEADER_DLFCN
2042
2043
2044# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2045#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2046# ----------------------------------------------------------------
2047m4_defun([_LT_TRY_DLOPEN_SELF],
2048[m4_require([_LT_HEADER_DLFCN])dnl
2049if test yes = "$cross_compiling"; then :
2050  [$4]
2051else
2052  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2053  lt_status=$lt_dlunknown
2054  cat > conftest.$ac_ext <<_LT_EOF
2055[#line $LINENO "configure"
2056#include "confdefs.h"
2057
2058#if HAVE_DLFCN_H
2059#include <dlfcn.h>
2060#endif
2061
2062#include <stdio.h>
2063
2064#ifdef RTLD_GLOBAL
2065#  define LT_DLGLOBAL		RTLD_GLOBAL
2066#else
2067#  ifdef DL_GLOBAL
2068#    define LT_DLGLOBAL		DL_GLOBAL
2069#  else
2070#    define LT_DLGLOBAL		0
2071#  endif
2072#endif
2073
2074/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2075   find out it does not work in some platform. */
2076#ifndef LT_DLLAZY_OR_NOW
2077#  ifdef RTLD_LAZY
2078#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2079#  else
2080#    ifdef DL_LAZY
2081#      define LT_DLLAZY_OR_NOW		DL_LAZY
2082#    else
2083#      ifdef RTLD_NOW
2084#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2085#      else
2086#        ifdef DL_NOW
2087#          define LT_DLLAZY_OR_NOW	DL_NOW
2088#        else
2089#          define LT_DLLAZY_OR_NOW	0
2090#        endif
2091#      endif
2092#    endif
2093#  endif
2094#endif
2095
2096/* When -fvisibility=hidden is used, assume the code has been annotated
2097   correspondingly for the symbols needed.  */
2098#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2099int fnord () __attribute__((visibility("default")));
2100#endif
2101
2102int fnord () { return 42; }
2103int main ()
2104{
2105  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2106  int status = $lt_dlunknown;
2107
2108  if (self)
2109    {
2110      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2111      else
2112        {
2113	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2114          else puts (dlerror ());
2115	}
2116      /* dlclose (self); */
2117    }
2118  else
2119    puts (dlerror ());
2120
2121  return status;
2122}]
2123_LT_EOF
2124  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
2125    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2126    lt_status=$?
2127    case x$lt_status in
2128      x$lt_dlno_uscore) $1 ;;
2129      x$lt_dlneed_uscore) $2 ;;
2130      x$lt_dlunknown|x*) $3 ;;
2131    esac
2132  else :
2133    # compilation failed
2134    $3
2135  fi
2136fi
2137rm -fr conftest*
2138])# _LT_TRY_DLOPEN_SELF
2139
2140
2141# LT_SYS_DLOPEN_SELF
2142# ------------------
2143AC_DEFUN([LT_SYS_DLOPEN_SELF],
2144[m4_require([_LT_HEADER_DLFCN])dnl
2145if test yes != "$enable_dlopen"; then
2146  enable_dlopen=unknown
2147  enable_dlopen_self=unknown
2148  enable_dlopen_self_static=unknown
2149else
2150  lt_cv_dlopen=no
2151  lt_cv_dlopen_libs=
2152
2153  case $host_os in
2154  beos*)
2155    lt_cv_dlopen=load_add_on
2156    lt_cv_dlopen_libs=
2157    lt_cv_dlopen_self=yes
2158    ;;
2159
2160  mingw* | pw32* | cegcc*)
2161    lt_cv_dlopen=LoadLibrary
2162    lt_cv_dlopen_libs=
2163    ;;
2164
2165  cygwin*)
2166    lt_cv_dlopen=dlopen
2167    lt_cv_dlopen_libs=
2168    ;;
2169
2170  darwin*)
2171    # if libdl is installed we need to link against it
2172    AC_CHECK_LIB([dl], [dlopen],
2173		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
2174    lt_cv_dlopen=dyld
2175    lt_cv_dlopen_libs=
2176    lt_cv_dlopen_self=yes
2177    ])
2178    ;;
2179
2180  tpf*)
2181    # Don't try to run any link tests for TPF.  We know it's impossible
2182    # because TPF is a cross-compiler, and we know how we open DSOs.
2183    lt_cv_dlopen=dlopen
2184    lt_cv_dlopen_libs=
2185    lt_cv_dlopen_self=no
2186    ;;
2187
2188  *)
2189    AC_CHECK_FUNC([shl_load],
2190	  [lt_cv_dlopen=shl_load],
2191      [AC_CHECK_LIB([dld], [shl_load],
2192	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
2193	[AC_CHECK_FUNC([dlopen],
2194	      [lt_cv_dlopen=dlopen],
2195	  [AC_CHECK_LIB([dl], [dlopen],
2196		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
2197	    [AC_CHECK_LIB([svld], [dlopen],
2198		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
2199	      [AC_CHECK_LIB([dld], [dld_link],
2200		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
2201	      ])
2202	    ])
2203	  ])
2204	])
2205      ])
2206    ;;
2207  esac
2208
2209  if test no = "$lt_cv_dlopen"; then
2210    enable_dlopen=no
2211  else
2212    enable_dlopen=yes
2213  fi
2214
2215  case $lt_cv_dlopen in
2216  dlopen)
2217    save_CPPFLAGS=$CPPFLAGS
2218    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2219
2220    save_LDFLAGS=$LDFLAGS
2221    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2222
2223    save_LIBS=$LIBS
2224    LIBS="$lt_cv_dlopen_libs $LIBS"
2225
2226    AC_CACHE_CHECK([whether a program can dlopen itself],
2227	  lt_cv_dlopen_self, [dnl
2228	  _LT_TRY_DLOPEN_SELF(
2229	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2230	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2231    ])
2232
2233    if test yes = "$lt_cv_dlopen_self"; then
2234      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2235      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2236	  lt_cv_dlopen_self_static, [dnl
2237	  _LT_TRY_DLOPEN_SELF(
2238	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2239	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2240      ])
2241    fi
2242
2243    CPPFLAGS=$save_CPPFLAGS
2244    LDFLAGS=$save_LDFLAGS
2245    LIBS=$save_LIBS
2246    ;;
2247  esac
2248
2249  case $lt_cv_dlopen_self in
2250  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2251  *) enable_dlopen_self=unknown ;;
2252  esac
2253
2254  case $lt_cv_dlopen_self_static in
2255  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2256  *) enable_dlopen_self_static=unknown ;;
2257  esac
2258fi
2259_LT_DECL([dlopen_support], [enable_dlopen], [0],
2260	 [Whether dlopen is supported])
2261_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2262	 [Whether dlopen of programs is supported])
2263_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2264	 [Whether dlopen of statically linked programs is supported])
2265])# LT_SYS_DLOPEN_SELF
2266
2267# Old name:
2268AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2269dnl aclocal-1.4 backwards compatibility:
2270dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2271
2272
2273# _LT_COMPILER_C_O([TAGNAME])
2274# ---------------------------
2275# Check to see if options -c and -o are simultaneously supported by compiler.
2276# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2277m4_defun([_LT_COMPILER_C_O],
2278[m4_require([_LT_DECL_SED])dnl
2279m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2280m4_require([_LT_TAG_COMPILER])dnl
2281AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2282  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2283  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2284   $RM -r conftest 2>/dev/null
2285   mkdir conftest
2286   cd conftest
2287   mkdir out
2288   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2289
2290   lt_compiler_flag="-o out/conftest2.$ac_objext"
2291   # Insert the option either (1) after the last *FLAGS variable, or
2292   # (2) before a word containing "conftest.", or (3) at the end.
2293   # Note that $ac_compile itself does not contain backslashes and begins
2294   # with a dollar sign (not a hyphen), so the echo should work correctly.
2295   lt_compile=`echo "$ac_compile" | $SED \
2296   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2297   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2298   -e 's:$: $lt_compiler_flag:'`
2299   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2300   (eval "$lt_compile" 2>out/conftest.err)
2301   ac_status=$?
2302   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2303   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2304   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2305   then
2306     # The compiler can only warn and ignore the option if not recognized
2307     # So say no if there are warnings
2308     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2309     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2310     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2311       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2312     fi
2313   fi
2314   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2315   $RM conftest*
2316   # SGI C++ compiler will create directory out/ii_files/ for
2317   # template instantiation
2318   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2319   $RM out/* && rmdir out
2320   cd ..
2321   $RM -r conftest
2322   $RM conftest*
2323])
2324_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2325	[Does compiler simultaneously support -c and -o options?])
2326])# _LT_COMPILER_C_O
2327
2328
2329# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2330# ----------------------------------
2331# Check to see if we can do hard links to lock some files if needed
2332m4_defun([_LT_COMPILER_FILE_LOCKS],
2333[m4_require([_LT_ENABLE_LOCK])dnl
2334m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2335_LT_COMPILER_C_O([$1])
2336
2337hard_links=nottested
2338if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2339  # do not overwrite the value of need_locks provided by the user
2340  AC_MSG_CHECKING([if we can lock with hard links])
2341  hard_links=yes
2342  $RM conftest*
2343  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2344  touch conftest.a
2345  ln conftest.a conftest.b 2>&5 || hard_links=no
2346  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2347  AC_MSG_RESULT([$hard_links])
2348  if test no = "$hard_links"; then
2349    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2350    need_locks=warn
2351  fi
2352else
2353  need_locks=no
2354fi
2355_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2356])# _LT_COMPILER_FILE_LOCKS
2357
2358
2359# _LT_CHECK_OBJDIR
2360# ----------------
2361m4_defun([_LT_CHECK_OBJDIR],
2362[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2363[rm -f .libs 2>/dev/null
2364mkdir .libs 2>/dev/null
2365if test -d .libs; then
2366  lt_cv_objdir=.libs
2367else
2368  # MS-DOS does not allow filenames that begin with a dot.
2369  lt_cv_objdir=_libs
2370fi
2371rmdir .libs 2>/dev/null])
2372objdir=$lt_cv_objdir
2373_LT_DECL([], [objdir], [0],
2374         [The name of the directory that contains temporary libtool files])dnl
2375m4_pattern_allow([LT_OBJDIR])dnl
2376AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2377  [Define to the sub-directory where libtool stores uninstalled libraries.])
2378])# _LT_CHECK_OBJDIR
2379
2380
2381# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2382# --------------------------------------
2383# Check hardcoding attributes.
2384m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2385[AC_MSG_CHECKING([how to hardcode library paths into programs])
2386_LT_TAGVAR(hardcode_action, $1)=
2387if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2388   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2389   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2390
2391  # We can hardcode non-existent directories.
2392  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2393     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2394     # have to relink, otherwise we might link with an installed library
2395     # when we should be linking with a yet-to-be-installed one
2396     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2397     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2398    # Linking always hardcodes the temporary library directory.
2399    _LT_TAGVAR(hardcode_action, $1)=relink
2400  else
2401    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2402    _LT_TAGVAR(hardcode_action, $1)=immediate
2403  fi
2404else
2405  # We cannot hardcode anything, or else we can only hardcode existing
2406  # directories.
2407  _LT_TAGVAR(hardcode_action, $1)=unsupported
2408fi
2409AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2410
2411if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2412   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2413  # Fast installation is not supported
2414  enable_fast_install=no
2415elif test yes = "$shlibpath_overrides_runpath" ||
2416     test no = "$enable_shared"; then
2417  # Fast installation is not necessary
2418  enable_fast_install=needless
2419fi
2420_LT_TAGDECL([], [hardcode_action], [0],
2421    [How to hardcode a shared library path into an executable])
2422])# _LT_LINKER_HARDCODE_LIBPATH
2423
2424
2425# _LT_CMD_STRIPLIB
2426# ----------------
2427m4_defun([_LT_CMD_STRIPLIB],
2428[m4_require([_LT_DECL_EGREP])
2429striplib=
2430old_striplib=
2431AC_MSG_CHECKING([whether stripping libraries is possible])
2432if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2433  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2434  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2435  AC_MSG_RESULT([yes])
2436else
2437# FIXME - insert some real tests, host_os isn't really good enough
2438  case $host_os in
2439  darwin*)
2440    if test -n "$STRIP"; then
2441      striplib="$STRIP -x"
2442      old_striplib="$STRIP -S"
2443      AC_MSG_RESULT([yes])
2444    else
2445      AC_MSG_RESULT([no])
2446    fi
2447    ;;
2448  *)
2449    AC_MSG_RESULT([no])
2450    ;;
2451  esac
2452fi
2453_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2454_LT_DECL([], [striplib], [1])
2455])# _LT_CMD_STRIPLIB
2456
2457
2458# _LT_PREPARE_MUNGE_PATH_LIST
2459# ---------------------------
2460# Make sure func_munge_path_list() is defined correctly.
2461m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2462[[# func_munge_path_list VARIABLE PATH
2463# -----------------------------------
2464# VARIABLE is name of variable containing _space_ separated list of
2465# directories to be munged by the contents of PATH, which is string
2466# having a format:
2467# "DIR[:DIR]:"
2468#       string "DIR[ DIR]" will be prepended to VARIABLE
2469# ":DIR[:DIR]"
2470#       string "DIR[ DIR]" will be appended to VARIABLE
2471# "DIRP[:DIRP]::[DIRA:]DIRA"
2472#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2473#       "DIRA[ DIRA]" will be appended to VARIABLE
2474# "DIR[:DIR]"
2475#       VARIABLE will be replaced by "DIR[ DIR]"
2476func_munge_path_list ()
2477{
2478    case x@S|@2 in
2479    x)
2480        ;;
2481    *:)
2482        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \$@S|@1\"
2483        ;;
2484    x:*)
2485        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2486        ;;
2487    *::*)
2488        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2489        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2490        ;;
2491    *)
2492        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2493        ;;
2494    esac
2495}
2496]])# _LT_PREPARE_PATH_LIST
2497
2498
2499# _LT_SYS_DYNAMIC_LINKER([TAG])
2500# -----------------------------
2501# PORTME Fill in your ld.so characteristics
2502m4_defun([_LT_SYS_DYNAMIC_LINKER],
2503[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2504m4_require([_LT_DECL_EGREP])dnl
2505m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2506m4_require([_LT_DECL_OBJDUMP])dnl
2507m4_require([_LT_DECL_SED])dnl
2508m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2509m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2510AC_MSG_CHECKING([dynamic linker characteristics])
2511m4_if([$1],
2512	[], [
2513if test yes = "$GCC"; then
2514  case $host_os in
2515    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2516    *) lt_awk_arg='/^libraries:/' ;;
2517  esac
2518  case $host_os in
2519    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2520    *) lt_sed_strip_eq='s|=/|/|g' ;;
2521  esac
2522  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2523  case $lt_search_path_spec in
2524  *\;*)
2525    # if the path contains ";" then we assume it to be the separator
2526    # otherwise default to the standard path separator (i.e. ":") - it is
2527    # assumed that no part of a normal pathname contains ";" but that should
2528    # okay in the real world where ";" in dirpaths is itself problematic.
2529    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2530    ;;
2531  *)
2532    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2533    ;;
2534  esac
2535  # Ok, now we have the path, separated by spaces, we can step through it
2536  # and add multilib dir if necessary...
2537  lt_tmp_lt_search_path_spec=
2538  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2539  # ...but if some path component already ends with the multilib dir we assume
2540  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2541  case "$lt_multi_os_dir; $lt_search_path_spec " in
2542  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2543    lt_multi_os_dir=
2544    ;;
2545  esac
2546  for lt_sys_path in $lt_search_path_spec; do
2547    if test -d "$lt_sys_path$lt_multi_os_dir"; then
2548      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2549    elif test -n "$lt_multi_os_dir"; then
2550      test -d "$lt_sys_path" && \
2551	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2552    fi
2553  done
2554  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2555BEGIN {RS = " "; FS = "/|\n";} {
2556  lt_foo = "";
2557  lt_count = 0;
2558  for (lt_i = NF; lt_i > 0; lt_i--) {
2559    if ($lt_i != "" && $lt_i != ".") {
2560      if ($lt_i == "..") {
2561        lt_count++;
2562      } else {
2563        if (lt_count == 0) {
2564          lt_foo = "/" $lt_i lt_foo;
2565        } else {
2566          lt_count--;
2567        }
2568      }
2569    }
2570  }
2571  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2572  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2573}'`
2574  # AWK program above erroneously prepends '/' to C:/dos/paths
2575  # for these hosts.
2576  case $host_os in
2577    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2578      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2579  esac
2580  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2581else
2582  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2583fi])
2584library_names_spec=
2585libname_spec='lib$name'
2586soname_spec=
2587shrext_cmds=.so
2588postinstall_cmds=
2589postuninstall_cmds=
2590finish_cmds=
2591finish_eval=
2592shlibpath_var=
2593shlibpath_overrides_runpath=unknown
2594version_type=none
2595dynamic_linker="$host_os ld.so"
2596sys_lib_dlsearch_path_spec="/lib /usr/lib"
2597need_lib_prefix=unknown
2598hardcode_into_libs=no
2599
2600# when you set need_version to no, make sure it does not cause -set_version
2601# flags to be left without arguments
2602need_version=unknown
2603
2604AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2605[User-defined run-time library search path.])
2606
2607case $host_os in
2608aix3*)
2609  version_type=linux # correct to gnu/linux during the next big refactor
2610  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2611  shlibpath_var=LIBPATH
2612
2613  # AIX 3 has no versioning support, so we append a major version to the name.
2614  soname_spec='$libname$release$shared_ext$major'
2615  ;;
2616
2617aix[[4-9]]*)
2618  version_type=linux # correct to gnu/linux during the next big refactor
2619  need_lib_prefix=no
2620  need_version=no
2621  hardcode_into_libs=yes
2622  if test ia64 = "$host_cpu"; then
2623    # AIX 5 supports IA64
2624    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2625    shlibpath_var=LD_LIBRARY_PATH
2626  else
2627    # With GCC up to 2.95.x, collect2 would create an import file
2628    # for dependence libraries.  The import file would start with
2629    # the line '#! .'.  This would cause the generated library to
2630    # depend on '.', always an invalid library.  This was fixed in
2631    # development snapshots of GCC prior to 3.0.
2632    case $host_os in
2633      aix4 | aix4.[[01]] | aix4.[[01]].*)
2634      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2635	   echo ' yes '
2636	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2637	:
2638      else
2639	can_build_shared=no
2640      fi
2641      ;;
2642    esac
2643    # Using Import Files as archive members, it is possible to support
2644    # filename-based versioning of shared library archives on AIX. While
2645    # this would work for both with and without runtime linking, it will
2646    # prevent static linking of such archives. So we do filename-based
2647    # shared library versioning with .so extension only, which is used
2648    # when both runtime linking and shared linking is enabled.
2649    # Unfortunately, runtime linking may impact performance, so we do
2650    # not want this to be the default eventually. Also, we use the
2651    # versioned .so libs for executables only if there is the -brtl
2652    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2653    # To allow for filename-based versioning support, we need to create
2654    # libNAME.so.V as an archive file, containing:
2655    # *) an Import File, referring to the versioned filename of the
2656    #    archive as well as the shared archive member, telling the
2657    #    bitwidth (32 or 64) of that shared object, and providing the
2658    #    list of exported symbols of that shared object, eventually
2659    #    decorated with the 'weak' keyword
2660    # *) the shared object with the F_LOADONLY flag set, to really avoid
2661    #    it being seen by the linker.
2662    # At run time we better use the real file rather than another symlink,
2663    # but for link time we create the symlink libNAME.so -> libNAME.so.V
2664
2665    case $with_aix_soname,$aix_use_runtimelinking in
2666    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2667    # soname into executable. Probably we can add versioning support to
2668    # collect2, so additional links can be useful in future.
2669    aix,yes) # traditional libtool
2670      dynamic_linker='AIX unversionable lib.so'
2671      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2672      # instead of lib<name>.a to let people know that these are not
2673      # typical AIX shared libraries.
2674      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2675      ;;
2676    aix,no) # traditional AIX only
2677      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2678      # We preserve .a as extension for shared libraries through AIX4.2
2679      # and later when we are not doing run time linking.
2680      library_names_spec='$libname$release.a $libname.a'
2681      soname_spec='$libname$release$shared_ext$major'
2682      ;;
2683    svr4,*) # full svr4 only
2684      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2685      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2686      # We do not specify a path in Import Files, so LIBPATH fires.
2687      shlibpath_overrides_runpath=yes
2688      ;;
2689    *,yes) # both, prefer svr4
2690      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2691      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2692      # unpreferred sharedlib libNAME.a needs extra handling
2693      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"'
2694      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"'
2695      # We do not specify a path in Import Files, so LIBPATH fires.
2696      shlibpath_overrides_runpath=yes
2697      ;;
2698    *,no) # both, prefer aix
2699      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2700      library_names_spec='$libname$release.a $libname.a'
2701      soname_spec='$libname$release$shared_ext$major'
2702      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2703      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)'
2704      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"'
2705      ;;
2706    esac
2707    shlibpath_var=LIBPATH
2708  fi
2709  ;;
2710
2711amigaos*)
2712  case $host_cpu in
2713  powerpc)
2714    # Since July 2007 AmigaOS4 officially supports .so libraries.
2715    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2716    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2717    ;;
2718  m68k)
2719    library_names_spec='$libname.ixlibrary $libname.a'
2720    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2721    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'
2722    ;;
2723  esac
2724  ;;
2725
2726beos*)
2727  library_names_spec='$libname$shared_ext'
2728  dynamic_linker="$host_os ld.so"
2729  shlibpath_var=LIBRARY_PATH
2730  ;;
2731
2732bsdi[[45]]*)
2733  version_type=linux # correct to gnu/linux during the next big refactor
2734  need_version=no
2735  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2736  soname_spec='$libname$release$shared_ext$major'
2737  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2738  shlibpath_var=LD_LIBRARY_PATH
2739  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2740  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2741  # the default ld.so.conf also contains /usr/contrib/lib and
2742  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2743  # libtool to hard-code these into programs
2744  ;;
2745
2746cygwin* | mingw* | pw32* | cegcc*)
2747  version_type=windows
2748  shrext_cmds=.dll
2749  need_version=no
2750  need_lib_prefix=no
2751
2752  case $GCC,$cc_basename in
2753  yes,*)
2754    # gcc
2755    library_names_spec='$libname.dll.a'
2756    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2757    postinstall_cmds='base_file=`basename \$file`~
2758      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2759      dldir=$destdir/`dirname \$dlpath`~
2760      test -d \$dldir || mkdir -p \$dldir~
2761      $install_prog $dir/$dlname \$dldir/$dlname~
2762      chmod a+x \$dldir/$dlname~
2763      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2764        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2765      fi'
2766    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2767      dlpath=$dir/\$dldll~
2768       $RM \$dlpath'
2769    shlibpath_overrides_runpath=yes
2770
2771    case $host_os in
2772    cygwin*)
2773      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2774      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2775m4_if([$1], [],[
2776      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2777      ;;
2778    mingw* | cegcc*)
2779      # MinGW DLLs use traditional 'lib' prefix
2780      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2781      ;;
2782    pw32*)
2783      # pw32 DLLs use 'pw' prefix rather than 'lib'
2784      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2785      ;;
2786    esac
2787    dynamic_linker='Win32 ld.exe'
2788    ;;
2789
2790  *,cl*)
2791    # Native MSVC
2792    libname_spec='$name'
2793    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2794    library_names_spec='$libname.dll.lib'
2795
2796    case $build_os in
2797    mingw*)
2798      sys_lib_search_path_spec=
2799      lt_save_ifs=$IFS
2800      IFS=';'
2801      for lt_path in $LIB
2802      do
2803        IFS=$lt_save_ifs
2804        # Let DOS variable expansion print the short 8.3 style file name.
2805        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2806        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2807      done
2808      IFS=$lt_save_ifs
2809      # Convert to MSYS style.
2810      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2811      ;;
2812    cygwin*)
2813      # Convert to unix form, then to dos form, then back to unix form
2814      # but this time dos style (no spaces!) so that the unix form looks
2815      # like /cygdrive/c/PROGRA~1:/cygdr...
2816      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2817      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2818      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2819      ;;
2820    *)
2821      sys_lib_search_path_spec=$LIB
2822      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2823        # It is most probably a Windows format PATH.
2824        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2825      else
2826        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2827      fi
2828      # FIXME: find the short name or the path components, as spaces are
2829      # common. (e.g. "Program Files" -> "PROGRA~1")
2830      ;;
2831    esac
2832
2833    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2834    postinstall_cmds='base_file=`basename \$file`~
2835      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2836      dldir=$destdir/`dirname \$dlpath`~
2837      test -d \$dldir || mkdir -p \$dldir~
2838      $install_prog $dir/$dlname \$dldir/$dlname'
2839    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2840      dlpath=$dir/\$dldll~
2841       $RM \$dlpath'
2842    shlibpath_overrides_runpath=yes
2843    dynamic_linker='Win32 link.exe'
2844    ;;
2845
2846  *)
2847    # Assume MSVC wrapper
2848    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2849    dynamic_linker='Win32 ld.exe'
2850    ;;
2851  esac
2852  # FIXME: first we should search . and the directory the executable is in
2853  shlibpath_var=PATH
2854  ;;
2855
2856darwin* | rhapsody*)
2857  dynamic_linker="$host_os dyld"
2858  version_type=darwin
2859  need_lib_prefix=no
2860  need_version=no
2861  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2862  soname_spec='$libname$release$major$shared_ext'
2863  shlibpath_overrides_runpath=yes
2864  shlibpath_var=DYLD_LIBRARY_PATH
2865  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2866m4_if([$1], [],[
2867  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2868  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2869  ;;
2870
2871dgux*)
2872  version_type=linux # correct to gnu/linux during the next big refactor
2873  need_lib_prefix=no
2874  need_version=no
2875  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2876  soname_spec='$libname$release$shared_ext$major'
2877  shlibpath_var=LD_LIBRARY_PATH
2878  ;;
2879
2880freebsd* | dragonfly*)
2881  # DragonFly does not have aout.  When/if they implement a new
2882  # versioning mechanism, adjust this.
2883  if test -x /usr/bin/objformat; then
2884    objformat=`/usr/bin/objformat`
2885  else
2886    case $host_os in
2887    freebsd[[23]].*) objformat=aout ;;
2888    *) objformat=elf ;;
2889    esac
2890  fi
2891  version_type=freebsd-$objformat
2892  case $version_type in
2893    freebsd-elf*)
2894      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2895      soname_spec='$libname$release$shared_ext$major'
2896      need_version=no
2897      need_lib_prefix=no
2898      ;;
2899    freebsd-*)
2900      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2901      need_version=yes
2902      ;;
2903  esac
2904  shlibpath_var=LD_LIBRARY_PATH
2905  case $host_os in
2906  freebsd2.*)
2907    shlibpath_overrides_runpath=yes
2908    ;;
2909  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2910    shlibpath_overrides_runpath=yes
2911    hardcode_into_libs=yes
2912    ;;
2913  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2914  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2915    shlibpath_overrides_runpath=no
2916    hardcode_into_libs=yes
2917    ;;
2918  *) # from 4.6 on, and DragonFly
2919    shlibpath_overrides_runpath=yes
2920    hardcode_into_libs=yes
2921    ;;
2922  esac
2923  ;;
2924
2925haiku*)
2926  version_type=linux # correct to gnu/linux during the next big refactor
2927  need_lib_prefix=no
2928  need_version=no
2929  dynamic_linker="$host_os runtime_loader"
2930  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2931  soname_spec='$libname$release$shared_ext$major'
2932  shlibpath_var=LIBRARY_PATH
2933  shlibpath_overrides_runpath=no
2934  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2935  hardcode_into_libs=yes
2936  ;;
2937
2938hpux9* | hpux10* | hpux11*)
2939  # Give a soname corresponding to the major version so that dld.sl refuses to
2940  # link against other versions.
2941  version_type=sunos
2942  need_lib_prefix=no
2943  need_version=no
2944  case $host_cpu in
2945  ia64*)
2946    shrext_cmds='.so'
2947    hardcode_into_libs=yes
2948    dynamic_linker="$host_os dld.so"
2949    shlibpath_var=LD_LIBRARY_PATH
2950    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2951    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2952    soname_spec='$libname$release$shared_ext$major'
2953    if test 32 = "$HPUX_IA64_MODE"; then
2954      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2955      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2956    else
2957      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2958      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2959    fi
2960    ;;
2961  hppa*64*)
2962    shrext_cmds='.sl'
2963    hardcode_into_libs=yes
2964    dynamic_linker="$host_os dld.sl"
2965    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2966    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2967    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2968    soname_spec='$libname$release$shared_ext$major'
2969    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2970    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2971    ;;
2972  *)
2973    shrext_cmds='.sl'
2974    dynamic_linker="$host_os dld.sl"
2975    shlibpath_var=SHLIB_PATH
2976    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2977    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2978    soname_spec='$libname$release$shared_ext$major'
2979    ;;
2980  esac
2981  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2982  postinstall_cmds='chmod 555 $lib'
2983  # or fails outright, so override atomically:
2984  install_override_mode=555
2985  ;;
2986
2987interix[[3-9]]*)
2988  version_type=linux # correct to gnu/linux during the next big refactor
2989  need_lib_prefix=no
2990  need_version=no
2991  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2992  soname_spec='$libname$release$shared_ext$major'
2993  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2994  shlibpath_var=LD_LIBRARY_PATH
2995  shlibpath_overrides_runpath=no
2996  hardcode_into_libs=yes
2997  ;;
2998
2999irix5* | irix6* | nonstopux*)
3000  case $host_os in
3001    nonstopux*) version_type=nonstopux ;;
3002    *)
3003	if test yes = "$lt_cv_prog_gnu_ld"; then
3004		version_type=linux # correct to gnu/linux during the next big refactor
3005	else
3006		version_type=irix
3007	fi ;;
3008  esac
3009  need_lib_prefix=no
3010  need_version=no
3011  soname_spec='$libname$release$shared_ext$major'
3012  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
3013  case $host_os in
3014  irix5* | nonstopux*)
3015    libsuff= shlibsuff=
3016    ;;
3017  *)
3018    case $LD in # libtool.m4 will add one of these switches to LD
3019    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3020      libsuff= shlibsuff= libmagic=32-bit;;
3021    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3022      libsuff=32 shlibsuff=N32 libmagic=N32;;
3023    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3024      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3025    *) libsuff= shlibsuff= libmagic=never-match;;
3026    esac
3027    ;;
3028  esac
3029  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3030  shlibpath_overrides_runpath=no
3031  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
3032  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
3033  hardcode_into_libs=yes
3034  ;;
3035
3036# No shared lib support for Linux oldld, aout, or coff.
3037linux*oldld* | linux*aout* | linux*coff*)
3038  dynamic_linker=no
3039  ;;
3040
3041linux*android*)
3042  version_type=none # Android doesn't support versioned libraries.
3043  need_lib_prefix=no
3044  need_version=no
3045  library_names_spec='$libname$release$shared_ext'
3046  soname_spec='$libname$release$shared_ext'
3047  finish_cmds=
3048  shlibpath_var=LD_LIBRARY_PATH
3049  shlibpath_overrides_runpath=yes
3050
3051  # This implies no fast_install, which is unacceptable.
3052  # Some rework will be needed to allow for fast_install
3053  # before this can be enabled.
3054  hardcode_into_libs=yes
3055
3056  dynamic_linker='Android linker'
3057  # Don't embed -rpath directories since the linker doesn't support them.
3058  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3059  ;;
3060
3061# This must be glibc/ELF.
3062linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3063  version_type=linux # correct to gnu/linux during the next big refactor
3064  need_lib_prefix=no
3065  need_version=no
3066  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3067  soname_spec='$libname$release$shared_ext$major'
3068  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3069  shlibpath_var=LD_LIBRARY_PATH
3070  shlibpath_overrides_runpath=no
3071
3072  # Some binutils ld are patched to set DT_RUNPATH
3073  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3074    [lt_cv_shlibpath_overrides_runpath=no
3075    save_LDFLAGS=$LDFLAGS
3076    save_libdir=$libdir
3077    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3078	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3079    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3080      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3081	 [lt_cv_shlibpath_overrides_runpath=yes])])
3082    LDFLAGS=$save_LDFLAGS
3083    libdir=$save_libdir
3084    ])
3085  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3086
3087  # This implies no fast_install, which is unacceptable.
3088  # Some rework will be needed to allow for fast_install
3089  # before this can be enabled.
3090  hardcode_into_libs=yes
3091
3092  # Ideally, we could use ldconfig to report *all* directores which are
3093  # searched for libraries, however this is still not possible.  Aside from not
3094  # being certain /sbin/ldconfig is available, command
3095  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
3096  # even though it is searched at run-time.  Try to do the best guess by
3097  # appending ld.so.conf contents (and includes) to the search path.
3098  if test -f /etc/ld.so.conf; then
3099    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' ' '`
3100    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3101  fi
3102
3103  # We used to test for /lib/ld.so.1 and disable shared libraries on
3104  # powerpc, because MkLinux only supported shared libraries with the
3105  # GNU dynamic linker.  Since this was broken with cross compilers,
3106  # most powerpc-linux boxes support dynamic linking these days and
3107  # people can always --disable-shared, the test was removed, and we
3108  # assume the GNU/Linux dynamic linker is in use.
3109  dynamic_linker='GNU/Linux ld.so'
3110  ;;
3111
3112netbsd*)
3113  version_type=sunos
3114  need_lib_prefix=no
3115  need_version=no
3116  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3117    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3118    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3119    dynamic_linker='NetBSD (a.out) ld.so'
3120  else
3121    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3122    soname_spec='$libname$release$shared_ext$major'
3123    dynamic_linker='NetBSD ld.elf_so'
3124  fi
3125  shlibpath_var=LD_LIBRARY_PATH
3126  shlibpath_overrides_runpath=yes
3127  hardcode_into_libs=yes
3128  ;;
3129
3130newsos6)
3131  version_type=linux # correct to gnu/linux during the next big refactor
3132  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3133  shlibpath_var=LD_LIBRARY_PATH
3134  shlibpath_overrides_runpath=yes
3135  ;;
3136
3137*nto* | *qnx*)
3138  version_type=qnx
3139  need_lib_prefix=no
3140  need_version=no
3141  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3142  soname_spec='$libname$release$shared_ext$major'
3143  shlibpath_var=LD_LIBRARY_PATH
3144  shlibpath_overrides_runpath=no
3145  hardcode_into_libs=yes
3146  dynamic_linker='ldqnx.so'
3147  ;;
3148
3149openbsd* | bitrig*)
3150  version_type=sunos
3151  sys_lib_dlsearch_path_spec=/usr/lib
3152  need_lib_prefix=no
3153  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3154    need_version=no
3155  else
3156    need_version=yes
3157  fi
3158  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3159  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3160  shlibpath_var=LD_LIBRARY_PATH
3161  shlibpath_overrides_runpath=yes
3162  ;;
3163
3164os2*)
3165  libname_spec='$name'
3166  version_type=windows
3167  shrext_cmds=.dll
3168  need_version=no
3169  need_lib_prefix=no
3170  # OS/2 can only load a DLL with a base name of 8 characters or less.
3171  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
3172    v=$($ECHO $release$versuffix | tr -d .-);
3173    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
3174    $ECHO $n$v`$shared_ext'
3175  library_names_spec='${libname}_dll.$libext'
3176  dynamic_linker='OS/2 ld.exe'
3177  shlibpath_var=BEGINLIBPATH
3178  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3179  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3180  postinstall_cmds='base_file=`basename \$file`~
3181    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
3182    dldir=$destdir/`dirname \$dlpath`~
3183    test -d \$dldir || mkdir -p \$dldir~
3184    $install_prog $dir/$dlname \$dldir/$dlname~
3185    chmod a+x \$dldir/$dlname~
3186    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3187      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3188    fi'
3189  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
3190    dlpath=$dir/\$dldll~
3191    $RM \$dlpath'
3192  ;;
3193
3194osf3* | osf4* | osf5*)
3195  version_type=osf
3196  need_lib_prefix=no
3197  need_version=no
3198  soname_spec='$libname$release$shared_ext$major'
3199  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3200  shlibpath_var=LD_LIBRARY_PATH
3201  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3202  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3203  ;;
3204
3205rdos*)
3206  dynamic_linker=no
3207  ;;
3208
3209solaris*)
3210  version_type=linux # correct to gnu/linux during the next big refactor
3211  need_lib_prefix=no
3212  need_version=no
3213  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3214  soname_spec='$libname$release$shared_ext$major'
3215  shlibpath_var=LD_LIBRARY_PATH
3216  shlibpath_overrides_runpath=yes
3217  hardcode_into_libs=yes
3218  # ldd complains unless libraries are executable
3219  postinstall_cmds='chmod +x $lib'
3220  ;;
3221
3222sunos4*)
3223  version_type=sunos
3224  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3225  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3226  shlibpath_var=LD_LIBRARY_PATH
3227  shlibpath_overrides_runpath=yes
3228  if test yes = "$with_gnu_ld"; then
3229    need_lib_prefix=no
3230  fi
3231  need_version=yes
3232  ;;
3233
3234sysv4 | sysv4.3*)
3235  version_type=linux # correct to gnu/linux during the next big refactor
3236  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3237  soname_spec='$libname$release$shared_ext$major'
3238  shlibpath_var=LD_LIBRARY_PATH
3239  case $host_vendor in
3240    sni)
3241      shlibpath_overrides_runpath=no
3242      need_lib_prefix=no
3243      runpath_var=LD_RUN_PATH
3244      ;;
3245    siemens)
3246      need_lib_prefix=no
3247      ;;
3248    motorola)
3249      need_lib_prefix=no
3250      need_version=no
3251      shlibpath_overrides_runpath=no
3252      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3253      ;;
3254  esac
3255  ;;
3256
3257sysv4*MP*)
3258  if test -d /usr/nec; then
3259    version_type=linux # correct to gnu/linux during the next big refactor
3260    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3261    soname_spec='$libname$shared_ext.$major'
3262    shlibpath_var=LD_LIBRARY_PATH
3263  fi
3264  ;;
3265
3266sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3267  version_type=sco
3268  need_lib_prefix=no
3269  need_version=no
3270  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3271  soname_spec='$libname$release$shared_ext$major'
3272  shlibpath_var=LD_LIBRARY_PATH
3273  shlibpath_overrides_runpath=yes
3274  hardcode_into_libs=yes
3275  if test yes = "$with_gnu_ld"; then
3276    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3277  else
3278    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3279    case $host_os in
3280      sco3.2v5*)
3281        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3282	;;
3283    esac
3284  fi
3285  sys_lib_dlsearch_path_spec='/usr/lib'
3286  ;;
3287
3288tpf*)
3289  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3290  version_type=linux # correct to gnu/linux during the next big refactor
3291  need_lib_prefix=no
3292  need_version=no
3293  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3294  shlibpath_var=LD_LIBRARY_PATH
3295  shlibpath_overrides_runpath=no
3296  hardcode_into_libs=yes
3297  ;;
3298
3299uts4*)
3300  version_type=linux # correct to gnu/linux during the next big refactor
3301  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3302  soname_spec='$libname$release$shared_ext$major'
3303  shlibpath_var=LD_LIBRARY_PATH
3304  ;;
3305
3306*)
3307  dynamic_linker=no
3308  ;;
3309esac
3310AC_MSG_RESULT([$dynamic_linker])
3311test no = "$dynamic_linker" && can_build_shared=no
3312
3313variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3314if test yes = "$GCC"; then
3315  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3316fi
3317
3318if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3319  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3320fi
3321
3322if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3323  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3324fi
3325
3326# lt_cv_sys_lib... is unaugmented for libtool script decls...
3327lt_cv_sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
3328
3329# ..but sys_lib_... needs LT_SYS_LIBRARY_PATH munging for
3330# LT_SYS_DLSEARCH_PATH macro in ltdl.m4 to work with the correct paths:
3331func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3332
3333_LT_DECL([], [variables_saved_for_relink], [1],
3334    [Variables whose values should be saved in libtool wrapper scripts and
3335    restored at link time])
3336_LT_DECL([], [need_lib_prefix], [0],
3337    [Do we need the "lib" prefix for modules?])
3338_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3339_LT_DECL([], [version_type], [0], [Library versioning type])
3340_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3341_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3342_LT_DECL([], [shlibpath_overrides_runpath], [0],
3343    [Is shlibpath searched before the hard-coded library search path?])
3344_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3345_LT_DECL([], [library_names_spec], [1],
3346    [[List of archive names.  First name is the real one, the rest are links.
3347    The last name is the one that the linker finds with -lNAME]])
3348_LT_DECL([], [soname_spec], [1],
3349    [[The coded name of the library, if different from the real name]])
3350_LT_DECL([], [install_override_mode], [1],
3351    [Permission mode override for installation of shared libraries])
3352_LT_DECL([], [postinstall_cmds], [2],
3353    [Command to use after installation of a shared archive])
3354_LT_DECL([], [postuninstall_cmds], [2],
3355    [Command to use after uninstallation of a shared archive])
3356_LT_DECL([], [finish_cmds], [2],
3357    [Commands used to finish a libtool library installation in a directory])
3358_LT_DECL([], [finish_eval], [1],
3359    [[As "finish_cmds", except a single script fragment to be evaled but
3360    not shown]])
3361_LT_DECL([], [hardcode_into_libs], [0],
3362    [Whether we should hardcode library paths into libraries])
3363_LT_DECL([], [sys_lib_search_path_spec], [2],
3364    [Compile-time system search path for libraries])
3365_LT_DECL([sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec], [2],
3366    [Run-time system search path for libraries])
3367])# _LT_SYS_DYNAMIC_LINKER
3368
3369
3370# _LT_PATH_TOOL_PREFIX(TOOL)
3371# --------------------------
3372# find a file program that can recognize shared library
3373AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3374[m4_require([_LT_DECL_EGREP])dnl
3375AC_MSG_CHECKING([for $1])
3376AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3377[case $MAGIC_CMD in
3378[[\\/*] |  ?:[\\/]*])
3379  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3380  ;;
3381*)
3382  lt_save_MAGIC_CMD=$MAGIC_CMD
3383  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3384dnl $ac_dummy forces splitting on constant user-supplied paths.
3385dnl POSIX.2 word splitting is done only on the output of word expansions,
3386dnl not every word.  This closes a longstanding sh security hole.
3387  ac_dummy="m4_if([$2], , $PATH, [$2])"
3388  for ac_dir in $ac_dummy; do
3389    IFS=$lt_save_ifs
3390    test -z "$ac_dir" && ac_dir=.
3391    if test -f "$ac_dir/$1"; then
3392      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3393      if test -n "$file_magic_test_file"; then
3394	case $deplibs_check_method in
3395	"file_magic "*)
3396	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3397	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3398	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3399	    $EGREP "$file_magic_regex" > /dev/null; then
3400	    :
3401	  else
3402	    cat <<_LT_EOF 1>&2
3403
3404*** Warning: the command libtool uses to detect shared libraries,
3405*** $file_magic_cmd, produces output that libtool cannot recognize.
3406*** The result is that libtool may fail to recognize shared libraries
3407*** as such.  This will affect the creation of libtool libraries that
3408*** depend on shared libraries, but programs linked with such libtool
3409*** libraries will work regardless of this problem.  Nevertheless, you
3410*** may want to report the problem to your system manager and/or to
3411*** bug-libtool@gnu.org
3412
3413_LT_EOF
3414	  fi ;;
3415	esac
3416      fi
3417      break
3418    fi
3419  done
3420  IFS=$lt_save_ifs
3421  MAGIC_CMD=$lt_save_MAGIC_CMD
3422  ;;
3423esac])
3424MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3425if test -n "$MAGIC_CMD"; then
3426  AC_MSG_RESULT($MAGIC_CMD)
3427else
3428  AC_MSG_RESULT(no)
3429fi
3430_LT_DECL([], [MAGIC_CMD], [0],
3431	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3432])# _LT_PATH_TOOL_PREFIX
3433
3434# Old name:
3435AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3436dnl aclocal-1.4 backwards compatibility:
3437dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3438
3439
3440# _LT_PATH_MAGIC
3441# --------------
3442# find a file program that can recognize a shared library
3443m4_defun([_LT_PATH_MAGIC],
3444[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3445if test -z "$lt_cv_path_MAGIC_CMD"; then
3446  if test -n "$ac_tool_prefix"; then
3447    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3448  else
3449    MAGIC_CMD=:
3450  fi
3451fi
3452])# _LT_PATH_MAGIC
3453
3454
3455# LT_PATH_LD
3456# ----------
3457# find the pathname to the GNU or non-GNU linker
3458AC_DEFUN([LT_PATH_LD],
3459[AC_REQUIRE([AC_PROG_CC])dnl
3460AC_REQUIRE([AC_CANONICAL_HOST])dnl
3461AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3462m4_require([_LT_DECL_SED])dnl
3463m4_require([_LT_DECL_EGREP])dnl
3464m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3465
3466AC_ARG_WITH([gnu-ld],
3467    [AS_HELP_STRING([--with-gnu-ld],
3468	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3469    [test no = "$withval" || with_gnu_ld=yes],
3470    [with_gnu_ld=no])dnl
3471
3472ac_prog=ld
3473if test yes = "$GCC"; then
3474  # Check if gcc -print-prog-name=ld gives a path.
3475  AC_MSG_CHECKING([for ld used by $CC])
3476  case $host in
3477  *-*-mingw*)
3478    # gcc leaves a trailing carriage return, which upsets mingw
3479    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3480  *)
3481    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3482  esac
3483  case $ac_prog in
3484    # Accept absolute paths.
3485    [[\\/]]* | ?:[[\\/]]*)
3486      re_direlt='/[[^/]][[^/]]*/\.\./'
3487      # Canonicalize the pathname of ld
3488      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3489      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3490	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3491      done
3492      test -z "$LD" && LD=$ac_prog
3493      ;;
3494  "")
3495    # If it fails, then pretend we aren't using GCC.
3496    ac_prog=ld
3497    ;;
3498  *)
3499    # If it is relative, then search for the first ld in PATH.
3500    with_gnu_ld=unknown
3501    ;;
3502  esac
3503elif test yes = "$with_gnu_ld"; then
3504  AC_MSG_CHECKING([for GNU ld])
3505else
3506  AC_MSG_CHECKING([for non-GNU ld])
3507fi
3508AC_CACHE_VAL(lt_cv_path_LD,
3509[if test -z "$LD"; then
3510  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3511  for ac_dir in $PATH; do
3512    IFS=$lt_save_ifs
3513    test -z "$ac_dir" && ac_dir=.
3514    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3515      lt_cv_path_LD=$ac_dir/$ac_prog
3516      # Check to see if the program is GNU ld.  I'd rather use --version,
3517      # but apparently some variants of GNU ld only accept -v.
3518      # Break only if it was the GNU/non-GNU ld that we prefer.
3519      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3520      *GNU* | *'with BFD'*)
3521	test no != "$with_gnu_ld" && break
3522	;;
3523      *)
3524	test yes != "$with_gnu_ld" && break
3525	;;
3526      esac
3527    fi
3528  done
3529  IFS=$lt_save_ifs
3530else
3531  lt_cv_path_LD=$LD # Let the user override the test with a path.
3532fi])
3533LD=$lt_cv_path_LD
3534if test -n "$LD"; then
3535  AC_MSG_RESULT($LD)
3536else
3537  AC_MSG_RESULT(no)
3538fi
3539test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3540_LT_PATH_LD_GNU
3541AC_SUBST([LD])
3542
3543_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3544])# LT_PATH_LD
3545
3546# Old names:
3547AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3548AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3549dnl aclocal-1.4 backwards compatibility:
3550dnl AC_DEFUN([AM_PROG_LD], [])
3551dnl AC_DEFUN([AC_PROG_LD], [])
3552
3553
3554# _LT_PATH_LD_GNU
3555#- --------------
3556m4_defun([_LT_PATH_LD_GNU],
3557[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3558[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3559case `$LD -v 2>&1 </dev/null` in
3560*GNU* | *'with BFD'*)
3561  lt_cv_prog_gnu_ld=yes
3562  ;;
3563*)
3564  lt_cv_prog_gnu_ld=no
3565  ;;
3566esac])
3567with_gnu_ld=$lt_cv_prog_gnu_ld
3568])# _LT_PATH_LD_GNU
3569
3570
3571# _LT_CMD_RELOAD
3572# --------------
3573# find reload flag for linker
3574#   -- PORTME Some linkers may need a different reload flag.
3575m4_defun([_LT_CMD_RELOAD],
3576[AC_CACHE_CHECK([for $LD option to reload object files],
3577  lt_cv_ld_reload_flag,
3578  [lt_cv_ld_reload_flag='-r'])
3579reload_flag=$lt_cv_ld_reload_flag
3580case $reload_flag in
3581"" | " "*) ;;
3582*) reload_flag=" $reload_flag" ;;
3583esac
3584reload_cmds='$LD$reload_flag -o $output$reload_objs'
3585case $host_os in
3586  cygwin* | mingw* | pw32* | cegcc*)
3587    if test yes != "$GCC"; then
3588      reload_cmds=false
3589    fi
3590    ;;
3591  darwin*)
3592    if test yes = "$GCC"; then
3593      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3594    else
3595      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3596    fi
3597    ;;
3598esac
3599_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3600_LT_TAGDECL([], [reload_cmds], [2])dnl
3601])# _LT_CMD_RELOAD
3602
3603
3604# _LT_PATH_DD
3605# -----------
3606# find a working dd
3607m4_defun([_LT_PATH_DD],
3608[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3609[printf 0123456789abcdef0123456789abcdef >conftest.i
3610cat conftest.i conftest.i >conftest2.i
3611: ${lt_DD:=$DD}
3612AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3613[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3614  cmp -s conftest.i conftest.out \
3615  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3616fi])
3617rm -f conftest.i conftest2.i conftest.out])
3618])# _LT_PATH_DD
3619
3620
3621# _LT_CMD_TRUNCATE
3622# ----------------
3623# find command to truncate a binary pipe
3624m4_defun([_LT_CMD_TRUNCATE],
3625[m4_require([_LT_PATH_DD])
3626AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3627[printf 0123456789abcdef0123456789abcdef >conftest.i
3628cat conftest.i conftest.i >conftest2.i
3629lt_cv_truncate_bin=
3630if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3631  cmp -s conftest.i conftest.out \
3632  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3633fi
3634rm -f conftest.i conftest2.i conftest.out
3635test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3636_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3637  [Command to truncate a binary pipe])
3638])# _LT_CMD_TRUNCATE
3639
3640
3641# _LT_CHECK_MAGIC_METHOD
3642# ----------------------
3643# how to check for library dependencies
3644#  -- PORTME fill in with the dynamic library characteristics
3645m4_defun([_LT_CHECK_MAGIC_METHOD],
3646[m4_require([_LT_DECL_EGREP])
3647m4_require([_LT_DECL_OBJDUMP])
3648AC_CACHE_CHECK([how to recognize dependent libraries],
3649lt_cv_deplibs_check_method,
3650[lt_cv_file_magic_cmd='$MAGIC_CMD'
3651lt_cv_file_magic_test_file=
3652lt_cv_deplibs_check_method='unknown'
3653# Need to set the preceding variable on all platforms that support
3654# interlibrary dependencies.
3655# 'none' -- dependencies not supported.
3656# 'unknown' -- same as none, but documents that we really don't know.
3657# 'pass_all' -- all dependencies passed with no checks.
3658# 'test_compile' -- check by making test program.
3659# 'file_magic [[regex]]' -- check by looking for files in library path
3660# that responds to the $file_magic_cmd with a given extended regex.
3661# If you have 'file' or equivalent on your system and you're not sure
3662# whether 'pass_all' will *always* work, you probably want this one.
3663
3664case $host_os in
3665aix[[4-9]]*)
3666  lt_cv_deplibs_check_method=pass_all
3667  ;;
3668
3669beos*)
3670  lt_cv_deplibs_check_method=pass_all
3671  ;;
3672
3673bsdi[[45]]*)
3674  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3675  lt_cv_file_magic_cmd='/usr/bin/file -L'
3676  lt_cv_file_magic_test_file=/shlib/libc.so
3677  ;;
3678
3679cygwin*)
3680  # func_win32_libid is a shell function defined in ltmain.sh
3681  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3682  lt_cv_file_magic_cmd='func_win32_libid'
3683  ;;
3684
3685mingw* | pw32*)
3686  # Base MSYS/MinGW do not provide the 'file' command needed by
3687  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3688  # unless we find 'file', for example because we are cross-compiling.
3689  if ( file / ) >/dev/null 2>&1; then
3690    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3691    lt_cv_file_magic_cmd='func_win32_libid'
3692  else
3693    # Keep this pattern in sync with the one in func_win32_libid.
3694    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3695    lt_cv_file_magic_cmd='$OBJDUMP -f'
3696  fi
3697  ;;
3698
3699cegcc*)
3700  # use the weaker test based on 'objdump'. See mingw*.
3701  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3702  lt_cv_file_magic_cmd='$OBJDUMP -f'
3703  ;;
3704
3705darwin* | rhapsody*)
3706  lt_cv_deplibs_check_method=pass_all
3707  ;;
3708
3709freebsd* | dragonfly*)
3710  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3711    case $host_cpu in
3712    i*86 )
3713      # Not sure whether the presence of OpenBSD here was a mistake.
3714      # Let's accept both of them until this is cleared up.
3715      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3716      lt_cv_file_magic_cmd=/usr/bin/file
3717      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3718      ;;
3719    esac
3720  else
3721    lt_cv_deplibs_check_method=pass_all
3722  fi
3723  ;;
3724
3725haiku*)
3726  lt_cv_deplibs_check_method=pass_all
3727  ;;
3728
3729hpux10.20* | hpux11*)
3730  lt_cv_file_magic_cmd=/usr/bin/file
3731  case $host_cpu in
3732  ia64*)
3733    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3734    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3735    ;;
3736  hppa*64*)
3737    [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]']
3738    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3739    ;;
3740  *)
3741    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3742    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3743    ;;
3744  esac
3745  ;;
3746
3747interix[[3-9]]*)
3748  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3749  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3750  ;;
3751
3752irix5* | irix6* | nonstopux*)
3753  case $LD in
3754  *-32|*"-32 ") libmagic=32-bit;;
3755  *-n32|*"-n32 ") libmagic=N32;;
3756  *-64|*"-64 ") libmagic=64-bit;;
3757  *) libmagic=never-match;;
3758  esac
3759  lt_cv_deplibs_check_method=pass_all
3760  ;;
3761
3762# This must be glibc/ELF.
3763linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3764  lt_cv_deplibs_check_method=pass_all
3765  ;;
3766
3767netbsd*)
3768  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3769    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3770  else
3771    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3772  fi
3773  ;;
3774
3775newos6*)
3776  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3777  lt_cv_file_magic_cmd=/usr/bin/file
3778  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3779  ;;
3780
3781*nto* | *qnx*)
3782  lt_cv_deplibs_check_method=pass_all
3783  ;;
3784
3785openbsd* | bitrig*)
3786  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3787    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3788  else
3789    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3790  fi
3791  ;;
3792
3793osf3* | osf4* | osf5*)
3794  lt_cv_deplibs_check_method=pass_all
3795  ;;
3796
3797rdos*)
3798  lt_cv_deplibs_check_method=pass_all
3799  ;;
3800
3801solaris*)
3802  lt_cv_deplibs_check_method=pass_all
3803  ;;
3804
3805sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3806  lt_cv_deplibs_check_method=pass_all
3807  ;;
3808
3809sysv4 | sysv4.3*)
3810  case $host_vendor in
3811  motorola)
3812    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]]'
3813    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3814    ;;
3815  ncr)
3816    lt_cv_deplibs_check_method=pass_all
3817    ;;
3818  sequent)
3819    lt_cv_file_magic_cmd='/bin/file'
3820    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3821    ;;
3822  sni)
3823    lt_cv_file_magic_cmd='/bin/file'
3824    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3825    lt_cv_file_magic_test_file=/lib/libc.so
3826    ;;
3827  siemens)
3828    lt_cv_deplibs_check_method=pass_all
3829    ;;
3830  pc)
3831    lt_cv_deplibs_check_method=pass_all
3832    ;;
3833  esac
3834  ;;
3835
3836tpf*)
3837  lt_cv_deplibs_check_method=pass_all
3838  ;;
3839os2*)
3840  lt_cv_deplibs_check_method=pass_all
3841  ;;
3842esac
3843])
3844
3845file_magic_glob=
3846want_nocaseglob=no
3847if test "$build" = "$host"; then
3848  case $host_os in
3849  mingw* | pw32*)
3850    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3851      want_nocaseglob=yes
3852    else
3853      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3854    fi
3855    ;;
3856  esac
3857fi
3858
3859file_magic_cmd=$lt_cv_file_magic_cmd
3860deplibs_check_method=$lt_cv_deplibs_check_method
3861test -z "$deplibs_check_method" && deplibs_check_method=unknown
3862
3863_LT_DECL([], [deplibs_check_method], [1],
3864    [Method to check whether dependent libraries are shared objects])
3865_LT_DECL([], [file_magic_cmd], [1],
3866    [Command to use when deplibs_check_method = "file_magic"])
3867_LT_DECL([], [file_magic_glob], [1],
3868    [How to find potential files when deplibs_check_method = "file_magic"])
3869_LT_DECL([], [want_nocaseglob], [1],
3870    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3871])# _LT_CHECK_MAGIC_METHOD
3872
3873
3874# LT_PATH_NM
3875# ----------
3876# find the pathname to a BSD- or MS-compatible name lister
3877AC_DEFUN([LT_PATH_NM],
3878[AC_REQUIRE([AC_PROG_CC])dnl
3879AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3880[if test -n "$NM"; then
3881  # Let the user override the test.
3882  lt_cv_path_NM=$NM
3883else
3884  lt_nm_to_check=${ac_tool_prefix}nm
3885  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3886    lt_nm_to_check="$lt_nm_to_check nm"
3887  fi
3888  for lt_tmp_nm in $lt_nm_to_check; do
3889    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3890    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3891      IFS=$lt_save_ifs
3892      test -z "$ac_dir" && ac_dir=.
3893      tmp_nm=$ac_dir/$lt_tmp_nm
3894      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3895	# Check to see if the nm accepts a BSD-compat flag.
3896	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3897	#   nm: unknown option "B" ignored
3898	# Tru64's nm complains that /dev/null is an invalid object file
3899	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3900	case $build_os in
3901	mingw*) lt_bad_file=conftest.nm/nofile ;;
3902	*) lt_bad_file=/dev/null ;;
3903	esac
3904	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3905	*$lt_bad_file* | *'Invalid file or object type'*)
3906	  lt_cv_path_NM="$tmp_nm -B"
3907	  break 2
3908	  ;;
3909	*)
3910	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3911	  */dev/null*)
3912	    lt_cv_path_NM="$tmp_nm -p"
3913	    break 2
3914	    ;;
3915	  *)
3916	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3917	    continue # so that we can try to find one that supports BSD flags
3918	    ;;
3919	  esac
3920	  ;;
3921	esac
3922      fi
3923    done
3924    IFS=$lt_save_ifs
3925  done
3926  : ${lt_cv_path_NM=no}
3927fi])
3928if test no != "$lt_cv_path_NM"; then
3929  NM=$lt_cv_path_NM
3930else
3931  # Didn't find any BSD compatible name lister, look for dumpbin.
3932  if test -n "$DUMPBIN"; then :
3933    # Let the user override the test.
3934  else
3935    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3936    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3937    *COFF*)
3938      DUMPBIN="$DUMPBIN -symbols -headers"
3939      ;;
3940    *)
3941      DUMPBIN=:
3942      ;;
3943    esac
3944  fi
3945  AC_SUBST([DUMPBIN])
3946  if test : != "$DUMPBIN"; then
3947    NM=$DUMPBIN
3948  fi
3949fi
3950test -z "$NM" && NM=nm
3951AC_SUBST([NM])
3952_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3953
3954AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3955  [lt_cv_nm_interface="BSD nm"
3956  echo "int some_variable = 0;" > conftest.$ac_ext
3957  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3958  (eval "$ac_compile" 2>conftest.err)
3959  cat conftest.err >&AS_MESSAGE_LOG_FD
3960  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3961  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3962  cat conftest.err >&AS_MESSAGE_LOG_FD
3963  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3964  cat conftest.out >&AS_MESSAGE_LOG_FD
3965  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3966    lt_cv_nm_interface="MS dumpbin"
3967  fi
3968  rm -f conftest*])
3969])# LT_PATH_NM
3970
3971# Old names:
3972AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3973AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3974dnl aclocal-1.4 backwards compatibility:
3975dnl AC_DEFUN([AM_PROG_NM], [])
3976dnl AC_DEFUN([AC_PROG_NM], [])
3977
3978# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3979# --------------------------------
3980# how to determine the name of the shared library
3981# associated with a specific link library.
3982#  -- PORTME fill in with the dynamic library characteristics
3983m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3984[m4_require([_LT_DECL_EGREP])
3985m4_require([_LT_DECL_OBJDUMP])
3986m4_require([_LT_DECL_DLLTOOL])
3987AC_CACHE_CHECK([how to associate runtime and link libraries],
3988lt_cv_sharedlib_from_linklib_cmd,
3989[lt_cv_sharedlib_from_linklib_cmd='unknown'
3990
3991case $host_os in
3992cygwin* | mingw* | pw32* | cegcc*)
3993  # two different shell functions defined in ltmain.sh;
3994  # decide which one to use based on capabilities of $DLLTOOL
3995  case `$DLLTOOL --help 2>&1` in
3996  *--identify-strict*)
3997    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3998    ;;
3999  *)
4000    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4001    ;;
4002  esac
4003  ;;
4004*)
4005  # fallback: assume linklib IS sharedlib
4006  lt_cv_sharedlib_from_linklib_cmd=$ECHO
4007  ;;
4008esac
4009])
4010sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4011test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4012
4013_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4014    [Command to associate shared and link libraries])
4015])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4016
4017
4018# _LT_PATH_MANIFEST_TOOL
4019# ----------------------
4020# locate the manifest tool
4021m4_defun([_LT_PATH_MANIFEST_TOOL],
4022[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4023test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4024AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4025  [lt_cv_path_mainfest_tool=no
4026  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4027  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4028  cat conftest.err >&AS_MESSAGE_LOG_FD
4029  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4030    lt_cv_path_mainfest_tool=yes
4031  fi
4032  rm -f conftest*])
4033if test yes != "$lt_cv_path_mainfest_tool"; then
4034  MANIFEST_TOOL=:
4035fi
4036_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4037])# _LT_PATH_MANIFEST_TOOL
4038
4039
4040# _LT_DLL_DEF_P([FILE])
4041# ---------------------
4042# True iff FILE is a Windows DLL '.def' file.
4043# Keep in sync with func_dll_def_p in the libtool script
4044AC_DEFUN([_LT_DLL_DEF_P],
4045[dnl
4046  test DEF = "`$SED -n dnl
4047    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
4048    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
4049    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
4050    -e q dnl                          Only consider the first "real" line
4051    $1`" dnl
4052])# _LT_DLL_DEF_P
4053
4054
4055# LT_LIB_M
4056# --------
4057# check for math library
4058AC_DEFUN([LT_LIB_M],
4059[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4060LIBM=
4061case $host in
4062*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4063  # These system don't have libm, or don't need it
4064  ;;
4065*-ncr-sysv4.3*)
4066  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
4067  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4068  ;;
4069*)
4070  AC_CHECK_LIB(m, cos, LIBM=-lm)
4071  ;;
4072esac
4073AC_SUBST([LIBM])
4074])# LT_LIB_M
4075
4076# Old name:
4077AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4078dnl aclocal-1.4 backwards compatibility:
4079dnl AC_DEFUN([AC_CHECK_LIBM], [])
4080
4081
4082# _LT_COMPILER_NO_RTTI([TAGNAME])
4083# -------------------------------
4084m4_defun([_LT_COMPILER_NO_RTTI],
4085[m4_require([_LT_TAG_COMPILER])dnl
4086
4087_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4088
4089if test yes = "$GCC"; then
4090  case $cc_basename in
4091  nvcc*)
4092    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4093  *)
4094    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4095  esac
4096
4097  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4098    lt_cv_prog_compiler_rtti_exceptions,
4099    [-fno-rtti -fno-exceptions], [],
4100    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4101fi
4102_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4103	[Compiler flag to turn off builtin functions])
4104])# _LT_COMPILER_NO_RTTI
4105
4106
4107# _LT_CMD_GLOBAL_SYMBOLS
4108# ----------------------
4109m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4110[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4111AC_REQUIRE([AC_PROG_CC])dnl
4112AC_REQUIRE([AC_PROG_AWK])dnl
4113AC_REQUIRE([LT_PATH_NM])dnl
4114AC_REQUIRE([LT_PATH_LD])dnl
4115m4_require([_LT_DECL_SED])dnl
4116m4_require([_LT_DECL_EGREP])dnl
4117m4_require([_LT_TAG_COMPILER])dnl
4118
4119# Check for command to grab the raw symbol name followed by C symbol from nm.
4120AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4121AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4122[
4123# These are sane defaults that work on at least a few old systems.
4124# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4125
4126# Character class describing NM global symbol codes.
4127symcode='[[BCDEGRST]]'
4128
4129# Regexp to match symbols that can be accessed directly from C.
4130sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4131
4132# Define system-specific variables.
4133case $host_os in
4134aix*)
4135  symcode='[[BCDT]]'
4136  ;;
4137cygwin* | mingw* | pw32* | cegcc*)
4138  symcode='[[ABCDGISTW]]'
4139  ;;
4140hpux*)
4141  if test ia64 = "$host_cpu"; then
4142    symcode='[[ABCDEGRST]]'
4143  fi
4144  ;;
4145irix* | nonstopux*)
4146  symcode='[[BCDEGRST]]'
4147  ;;
4148osf*)
4149  symcode='[[BCDEGQRST]]'
4150  ;;
4151solaris*)
4152  symcode='[[BDRT]]'
4153  ;;
4154sco3.2v5*)
4155  symcode='[[DT]]'
4156  ;;
4157sysv4.2uw2*)
4158  symcode='[[DT]]'
4159  ;;
4160sysv5* | sco5v6* | unixware* | OpenUNIX*)
4161  symcode='[[ABDT]]'
4162  ;;
4163sysv4)
4164  symcode='[[DFNSTU]]'
4165  ;;
4166esac
4167
4168# If we're using GNU nm, then use its standard symbol codes.
4169case `$NM -V 2>&1` in
4170*GNU* | *'with BFD'*)
4171  symcode='[[ABCDGIRSTW]]' ;;
4172esac
4173
4174if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4175  # Gets list of data symbols to import.
4176  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
4177  # Adjust the below global symbol transforms to fixup imported variables.
4178  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
4179  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
4180  lt_c_name_lib_hook="\
4181  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
4182  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
4183else
4184  # Disable hooks by default.
4185  lt_cv_sys_global_symbol_to_import=
4186  lt_cdecl_hook=
4187  lt_c_name_hook=
4188  lt_c_name_lib_hook=
4189fi
4190
4191# Transform an extracted symbol line into a proper C declaration.
4192# Some systems (esp. on ia64) link data and code symbols differently,
4193# so use this general approach.
4194lt_cv_sys_global_symbol_to_cdecl="sed -n"\
4195$lt_cdecl_hook\
4196" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
4197" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4198
4199# Transform an extracted symbol line into symbol name and symbol address
4200lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
4201$lt_c_name_hook\
4202" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4203" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
4204
4205# Transform an extracted symbol line into symbol name with lib prefix and
4206# symbol address.
4207lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4208$lt_c_name_lib_hook\
4209" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4210" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
4211" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
4212
4213# Handle CRLF in mingw tool chain
4214opt_cr=
4215case $build_os in
4216mingw*)
4217  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4218  ;;
4219esac
4220
4221# Try without a prefix underscore, then with it.
4222for ac_symprfx in "" "_"; do
4223
4224  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4225  symxfrm="\\1 $ac_symprfx\\2 \\2"
4226
4227  # Write the raw and C identifiers.
4228  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4229    # Fake it for dumpbin and say T for any non-static function,
4230    # D for any global variable and I for any imported variable.
4231    # Also find C++ and __fastcall symbols from MSVC++,
4232    # which start with @ or ?.
4233    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4234"     {last_section=section; section=\$ 3};"\
4235"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4236"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4237"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4238"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4239"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4240"     \$ 0!~/External *\|/{next};"\
4241"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4242"     {if(hide[section]) next};"\
4243"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4244"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4245"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4246"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4247"     ' prfx=^$ac_symprfx]"
4248  else
4249    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4250  fi
4251  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4252
4253  # Check to see that the pipe works correctly.
4254  pipe_works=no
4255
4256  rm -f conftest*
4257  cat > conftest.$ac_ext <<_LT_EOF
4258#ifdef __cplusplus
4259extern "C" {
4260#endif
4261char nm_test_var;
4262void nm_test_func(void);
4263void nm_test_func(void){}
4264#ifdef __cplusplus
4265}
4266#endif
4267int main(){nm_test_var='a';nm_test_func();return(0);}
4268_LT_EOF
4269
4270  if AC_TRY_EVAL(ac_compile); then
4271    # Now try to grab the symbols.
4272    nlist=conftest.nm
4273    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4274      # Try sorting and uniquifying the output.
4275      if sort "$nlist" | uniq > "$nlist"T; then
4276	mv -f "$nlist"T "$nlist"
4277      else
4278	rm -f "$nlist"T
4279      fi
4280
4281      # Make sure that we snagged all the symbols we need.
4282      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4283	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4284	  cat <<_LT_EOF > conftest.$ac_ext
4285/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4286#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4287/* DATA imports from DLLs on WIN32 can't be const, because runtime
4288   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4289# define LT@&t@_DLSYM_CONST
4290#elif defined __osf__
4291/* This system does not cope well with relocations in const data.  */
4292# define LT@&t@_DLSYM_CONST
4293#else
4294# define LT@&t@_DLSYM_CONST const
4295#endif
4296
4297#ifdef __cplusplus
4298extern "C" {
4299#endif
4300
4301_LT_EOF
4302	  # Now generate the symbol file.
4303	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4304
4305	  cat <<_LT_EOF >> conftest.$ac_ext
4306
4307/* The mapping between symbol names and symbols.  */
4308LT@&t@_DLSYM_CONST struct {
4309  const char *name;
4310  void       *address;
4311}
4312lt__PROGRAM__LTX_preloaded_symbols[[]] =
4313{
4314  { "@PROGRAM@", (void *) 0 },
4315_LT_EOF
4316	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4317	  cat <<\_LT_EOF >> conftest.$ac_ext
4318  {0, (void *) 0}
4319};
4320
4321/* This works around a problem in FreeBSD linker */
4322#ifdef FREEBSD_WORKAROUND
4323static const void *lt_preloaded_setup() {
4324  return lt__PROGRAM__LTX_preloaded_symbols;
4325}
4326#endif
4327
4328#ifdef __cplusplus
4329}
4330#endif
4331_LT_EOF
4332	  # Now try linking the two files.
4333	  mv conftest.$ac_objext conftstm.$ac_objext
4334	  lt_globsym_save_LIBS=$LIBS
4335	  lt_globsym_save_CFLAGS=$CFLAGS
4336	  LIBS=conftstm.$ac_objext
4337	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4338	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4339	    pipe_works=yes
4340	  fi
4341	  LIBS=$lt_globsym_save_LIBS
4342	  CFLAGS=$lt_globsym_save_CFLAGS
4343	else
4344	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4345	fi
4346      else
4347	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4348      fi
4349    else
4350      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4351    fi
4352  else
4353    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4354    cat conftest.$ac_ext >&5
4355  fi
4356  rm -rf conftest* conftst*
4357
4358  # Do not use the global_symbol_pipe unless it works.
4359  if test yes = "$pipe_works"; then
4360    break
4361  else
4362    lt_cv_sys_global_symbol_pipe=
4363  fi
4364done
4365])
4366if test -z "$lt_cv_sys_global_symbol_pipe"; then
4367  lt_cv_sys_global_symbol_to_cdecl=
4368fi
4369if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4370  AC_MSG_RESULT(failed)
4371else
4372  AC_MSG_RESULT(ok)
4373fi
4374
4375# Response file support.
4376if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4377  nm_file_list_spec='@'
4378elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4379  nm_file_list_spec='@'
4380fi
4381
4382_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4383    [Take the output of nm and produce a listing of raw symbols and C names])
4384_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4385    [Transform the output of nm in a proper C declaration])
4386_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4387    [Transform the output of nm into a list of symbols to manually relocate])
4388_LT_DECL([global_symbol_to_c_name_address],
4389    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4390    [Transform the output of nm in a C name address pair])
4391_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4392    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4393    [Transform the output of nm in a C name address pair when lib prefix is needed])
4394_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4395    [The name lister interface])
4396_LT_DECL([], [nm_file_list_spec], [1],
4397    [Specify filename containing input files for $NM])
4398]) # _LT_CMD_GLOBAL_SYMBOLS
4399
4400
4401# _LT_COMPILER_PIC([TAGNAME])
4402# ---------------------------
4403m4_defun([_LT_COMPILER_PIC],
4404[m4_require([_LT_TAG_COMPILER])dnl
4405_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4406_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4407_LT_TAGVAR(lt_prog_compiler_static, $1)=
4408
4409m4_if([$1], [CXX], [
4410  # C++ specific cases for pic, static, wl, etc.
4411  if test yes = "$GXX"; then
4412    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4413    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4414
4415    case $host_os in
4416    aix*)
4417      # All AIX code is PIC.
4418      if test ia64 = "$host_cpu"; then
4419	# AIX 5 now supports IA64 processor
4420	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4421      fi
4422      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4423      ;;
4424
4425    amigaos*)
4426      case $host_cpu in
4427      powerpc)
4428            # see comment about AmigaOS4 .so support
4429            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4430        ;;
4431      m68k)
4432            # FIXME: we need at least 68020 code to build shared libraries, but
4433            # adding the '-m68020' flag to GCC prevents building anything better,
4434            # like '-m68040'.
4435            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4436        ;;
4437      esac
4438      ;;
4439
4440    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4441      # PIC is the default for these OSes.
4442      ;;
4443    mingw* | cygwin* | os2* | pw32* | cegcc*)
4444      # This hack is so that the source file can tell whether it is being
4445      # built for inclusion in a dll (and should export symbols for example).
4446      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4447      # (--disable-auto-import) libraries
4448      m4_if([$1], [GCJ], [],
4449	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4450      case $host_os in
4451      os2*)
4452	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4453	;;
4454      esac
4455      ;;
4456    darwin* | rhapsody*)
4457      # PIC is the default on this platform
4458      # Common symbols not allowed in MH_DYLIB files
4459      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4460      ;;
4461    *djgpp*)
4462      # DJGPP does not support shared libraries at all
4463      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4464      ;;
4465    haiku*)
4466      # PIC is the default for Haiku.
4467      # The "-static" flag exists, but is broken.
4468      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4469      ;;
4470    interix[[3-9]]*)
4471      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4472      # Instead, we relocate shared libraries at runtime.
4473      ;;
4474    sysv4*MP*)
4475      if test -d /usr/nec; then
4476	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4477      fi
4478      ;;
4479    hpux*)
4480      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4481      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4482      # sets the default TLS model and affects inlining.
4483      case $host_cpu in
4484      hppa*64*)
4485	;;
4486      *)
4487	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4488	;;
4489      esac
4490      ;;
4491    *qnx* | *nto*)
4492      # QNX uses GNU C++, but need to define -shared option too, otherwise
4493      # it will coredump.
4494      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4495      ;;
4496    *)
4497      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4498      ;;
4499    esac
4500  else
4501    case $host_os in
4502      aix[[4-9]]*)
4503	# All AIX code is PIC.
4504	if test ia64 = "$host_cpu"; then
4505	  # AIX 5 now supports IA64 processor
4506	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4507	else
4508	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4509	fi
4510	;;
4511      chorus*)
4512	case $cc_basename in
4513	cxch68*)
4514	  # Green Hills C++ Compiler
4515	  # _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"
4516	  ;;
4517	esac
4518	;;
4519      mingw* | cygwin* | os2* | pw32* | cegcc*)
4520	# This hack is so that the source file can tell whether it is being
4521	# built for inclusion in a dll (and should export symbols for example).
4522	m4_if([$1], [GCJ], [],
4523	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4524	;;
4525      dgux*)
4526	case $cc_basename in
4527	  ec++*)
4528	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4529	    ;;
4530	  ghcx*)
4531	    # Green Hills C++ Compiler
4532	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4533	    ;;
4534	  *)
4535	    ;;
4536	esac
4537	;;
4538      freebsd* | dragonfly*)
4539	# FreeBSD uses GNU C++
4540	;;
4541      hpux9* | hpux10* | hpux11*)
4542	case $cc_basename in
4543	  CC*)
4544	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4545	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4546	    if test ia64 != "$host_cpu"; then
4547	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4548	    fi
4549	    ;;
4550	  aCC*)
4551	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4552	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4553	    case $host_cpu in
4554	    hppa*64*|ia64*)
4555	      # +Z the default
4556	      ;;
4557	    *)
4558	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4559	      ;;
4560	    esac
4561	    ;;
4562	  *)
4563	    ;;
4564	esac
4565	;;
4566      interix*)
4567	# This is c89, which is MS Visual C++ (no shared libs)
4568	# Anyone wants to do a port?
4569	;;
4570      irix5* | irix6* | nonstopux*)
4571	case $cc_basename in
4572	  CC*)
4573	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4574	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4575	    # CC pic flag -KPIC is the default.
4576	    ;;
4577	  *)
4578	    ;;
4579	esac
4580	;;
4581      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4582	case $cc_basename in
4583	  KCC*)
4584	    # KAI C++ Compiler
4585	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4586	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4587	    ;;
4588	  ecpc* )
4589	    # old Intel C++ for x86_64, which still supported -KPIC.
4590	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4591	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4592	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4593	    ;;
4594	  icpc* )
4595	    # Intel C++, used to be incompatible with GCC.
4596	    # ICC 10 doesn't accept -KPIC any more.
4597	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4598	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4599	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4600	    ;;
4601	  pgCC* | pgcpp*)
4602	    # Portland Group C++ compiler
4603	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4604	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4605	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4606	    ;;
4607	  cxx*)
4608	    # Compaq C++
4609	    # Make sure the PIC flag is empty.  It appears that all Alpha
4610	    # Linux and Compaq Tru64 Unix objects are PIC.
4611	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4612	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4613	    ;;
4614	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4615	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4616	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4617	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4618	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4619	    ;;
4620	  *)
4621	    case `$CC -V 2>&1 | sed 5q` in
4622	    *Sun\ C*)
4623	      # Sun C++ 5.9
4624	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4625	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4626	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4627	      ;;
4628	    esac
4629	    ;;
4630	esac
4631	;;
4632      lynxos*)
4633	;;
4634      m88k*)
4635	;;
4636      mvs*)
4637	case $cc_basename in
4638	  cxx*)
4639	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4640	    ;;
4641	  *)
4642	    ;;
4643	esac
4644	;;
4645      netbsd*)
4646	;;
4647      *qnx* | *nto*)
4648        # QNX uses GNU C++, but need to define -shared option too, otherwise
4649        # it will coredump.
4650        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4651        ;;
4652      osf3* | osf4* | osf5*)
4653	case $cc_basename in
4654	  KCC*)
4655	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4656	    ;;
4657	  RCC*)
4658	    # Rational C++ 2.4.1
4659	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4660	    ;;
4661	  cxx*)
4662	    # Digital/Compaq C++
4663	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4664	    # Make sure the PIC flag is empty.  It appears that all Alpha
4665	    # Linux and Compaq Tru64 Unix objects are PIC.
4666	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4667	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4668	    ;;
4669	  *)
4670	    ;;
4671	esac
4672	;;
4673      psos*)
4674	;;
4675      solaris*)
4676	case $cc_basename in
4677	  CC* | sunCC*)
4678	    # Sun C++ 4.2, 5.x and Centerline C++
4679	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4680	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4681	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4682	    ;;
4683	  gcx*)
4684	    # Green Hills C++ Compiler
4685	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4686	    ;;
4687	  *)
4688	    ;;
4689	esac
4690	;;
4691      sunos4*)
4692	case $cc_basename in
4693	  CC*)
4694	    # Sun C++ 4.x
4695	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4696	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4697	    ;;
4698	  lcc*)
4699	    # Lucid
4700	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4701	    ;;
4702	  *)
4703	    ;;
4704	esac
4705	;;
4706      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4707	case $cc_basename in
4708	  CC*)
4709	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4710	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4711	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4712	    ;;
4713	esac
4714	;;
4715      tandem*)
4716	case $cc_basename in
4717	  NCC*)
4718	    # NonStop-UX NCC 3.20
4719	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4720	    ;;
4721	  *)
4722	    ;;
4723	esac
4724	;;
4725      vxworks*)
4726	;;
4727      *)
4728	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4729	;;
4730    esac
4731  fi
4732],
4733[
4734  if test yes = "$GCC"; then
4735    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4736    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4737
4738    case $host_os in
4739      aix*)
4740      # All AIX code is PIC.
4741      if test ia64 = "$host_cpu"; then
4742	# AIX 5 now supports IA64 processor
4743	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4744      fi
4745      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4746      ;;
4747
4748    amigaos*)
4749      case $host_cpu in
4750      powerpc)
4751            # see comment about AmigaOS4 .so support
4752            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4753        ;;
4754      m68k)
4755            # FIXME: we need at least 68020 code to build shared libraries, but
4756            # adding the '-m68020' flag to GCC prevents building anything better,
4757            # like '-m68040'.
4758            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4759        ;;
4760      esac
4761      ;;
4762
4763    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4764      # PIC is the default for these OSes.
4765      ;;
4766
4767    mingw* | cygwin* | pw32* | os2* | cegcc*)
4768      # This hack is so that the source file can tell whether it is being
4769      # built for inclusion in a dll (and should export symbols for example).
4770      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4771      # (--disable-auto-import) libraries
4772      m4_if([$1], [GCJ], [],
4773	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4774      case $host_os in
4775      os2*)
4776	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4777	;;
4778      esac
4779      ;;
4780
4781    darwin* | rhapsody*)
4782      # PIC is the default on this platform
4783      # Common symbols not allowed in MH_DYLIB files
4784      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4785      ;;
4786
4787    haiku*)
4788      # PIC is the default for Haiku.
4789      # The "-static" flag exists, but is broken.
4790      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4791      ;;
4792
4793    hpux*)
4794      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4795      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4796      # sets the default TLS model and affects inlining.
4797      case $host_cpu in
4798      hppa*64*)
4799	# +Z the default
4800	;;
4801      *)
4802	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4803	;;
4804      esac
4805      ;;
4806
4807    interix[[3-9]]*)
4808      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4809      # Instead, we relocate shared libraries at runtime.
4810      ;;
4811
4812    msdosdjgpp*)
4813      # Just because we use GCC doesn't mean we suddenly get shared libraries
4814      # on systems that don't support them.
4815      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4816      enable_shared=no
4817      ;;
4818
4819    *nto* | *qnx*)
4820      # QNX uses GNU C++, but need to define -shared option too, otherwise
4821      # it will coredump.
4822      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4823      ;;
4824
4825    sysv4*MP*)
4826      if test -d /usr/nec; then
4827	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4828      fi
4829      ;;
4830
4831    *)
4832      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4833      ;;
4834    esac
4835
4836    case $cc_basename in
4837    nvcc*) # Cuda Compiler Driver 2.2
4838      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4839      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4840        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4841      fi
4842      ;;
4843    esac
4844  else
4845    # PORTME Check for flag to pass linker flags through the system compiler.
4846    case $host_os in
4847    aix*)
4848      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4849      if test ia64 = "$host_cpu"; then
4850	# AIX 5 now supports IA64 processor
4851	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4852      else
4853	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4854      fi
4855      ;;
4856
4857    darwin* | rhapsody*)
4858      # PIC is the default on this platform
4859      # Common symbols not allowed in MH_DYLIB files
4860      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4861      case $cc_basename in
4862      nagfor*)
4863        # NAG Fortran compiler
4864        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4865        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4866        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4867        ;;
4868      esac
4869      ;;
4870
4871    mingw* | cygwin* | pw32* | os2* | cegcc*)
4872      # This hack is so that the source file can tell whether it is being
4873      # built for inclusion in a dll (and should export symbols for example).
4874      m4_if([$1], [GCJ], [],
4875	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4876      case $host_os in
4877      os2*)
4878	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4879	;;
4880      esac
4881      ;;
4882
4883    hpux9* | hpux10* | hpux11*)
4884      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4885      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4886      # not for PA HP-UX.
4887      case $host_cpu in
4888      hppa*64*|ia64*)
4889	# +Z the default
4890	;;
4891      *)
4892	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4893	;;
4894      esac
4895      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4896      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4897      ;;
4898
4899    irix5* | irix6* | nonstopux*)
4900      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4901      # PIC (with -KPIC) is the default.
4902      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4903      ;;
4904
4905    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4906      case $cc_basename in
4907      # old Intel for x86_64, which still supported -KPIC.
4908      ecc*)
4909	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4910	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4911	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4912        ;;
4913      # icc used to be incompatible with GCC.
4914      # ICC 10 doesn't accept -KPIC any more.
4915      icc* | ifort*)
4916	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4917	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4918	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4919        ;;
4920      # Lahey Fortran 8.1.
4921      lf95*)
4922	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4923	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4924	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4925	;;
4926      nagfor*)
4927	# NAG Fortran compiler
4928	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4929	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4930	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4931	;;
4932      tcc*)
4933	# Fabrice Bellard et al's Tiny C Compiler
4934	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4935	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4936	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4937	;;
4938      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4939        # Portland Group compilers (*not* the Pentium gcc compiler,
4940	# which looks to be a dead project)
4941	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4942	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4943	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4944        ;;
4945      ccc*)
4946        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4947        # All Alpha code is PIC.
4948        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4949        ;;
4950      xl* | bgxl* | bgf* | mpixl*)
4951	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4952	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4953	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4954	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4955	;;
4956      *)
4957	case `$CC -V 2>&1 | sed 5q` in
4958	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4959	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4960	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4961	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4962	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4963	  ;;
4964	*Sun\ F* | *Sun*Fortran*)
4965	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4966	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4967	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4968	  ;;
4969	*Sun\ C*)
4970	  # Sun C 5.9
4971	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4972	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4973	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4974	  ;;
4975        *Intel*\ [[CF]]*Compiler*)
4976	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4977	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4978	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4979	  ;;
4980	*Portland\ Group*)
4981	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4982	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4983	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4984	  ;;
4985	esac
4986	;;
4987      esac
4988      ;;
4989
4990    newsos6)
4991      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4992      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4993      ;;
4994
4995    *nto* | *qnx*)
4996      # QNX uses GNU C++, but need to define -shared option too, otherwise
4997      # it will coredump.
4998      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4999      ;;
5000
5001    osf3* | osf4* | osf5*)
5002      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5003      # All OSF/1 code is PIC.
5004      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5005      ;;
5006
5007    rdos*)
5008      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5009      ;;
5010
5011    solaris*)
5012      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5013      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5014      case $cc_basename in
5015      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5016	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5017      *)
5018	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5019      esac
5020      ;;
5021
5022    sunos4*)
5023      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5024      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5025      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5026      ;;
5027
5028    sysv4 | sysv4.2uw2* | sysv4.3*)
5029      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5030      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5031      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5032      ;;
5033
5034    sysv4*MP*)
5035      if test -d /usr/nec; then
5036	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5037	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5038      fi
5039      ;;
5040
5041    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5042      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5043      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5044      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5045      ;;
5046
5047    unicos*)
5048      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5049      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5050      ;;
5051
5052    uts4*)
5053      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5054      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5055      ;;
5056
5057    *)
5058      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5059      ;;
5060    esac
5061  fi
5062])
5063case $host_os in
5064  # For platforms that do not support PIC, -DPIC is meaningless:
5065  *djgpp*)
5066    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5067    ;;
5068  *)
5069    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5070    ;;
5071esac
5072
5073AC_CACHE_CHECK([for $compiler option to produce PIC],
5074  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5075  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5076_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5077
5078#
5079# Check to make sure the PIC flag actually works.
5080#
5081if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5082  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5083    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5084    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5085    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5086     "" | " "*) ;;
5087     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5088     esac],
5089    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5090     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5091fi
5092_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5093	[Additional compiler flags for building library objects])
5094
5095_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5096	[How to pass a linker flag through the compiler])
5097#
5098# Check to make sure the static flag actually works.
5099#
5100wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5101_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5102  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5103  $lt_tmp_static_flag,
5104  [],
5105  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5106_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5107	[Compiler flag to prevent dynamic linking])
5108])# _LT_COMPILER_PIC
5109
5110
5111# _LT_LINKER_SHLIBS([TAGNAME])
5112# ----------------------------
5113# See if the linker supports building shared libraries.
5114m4_defun([_LT_LINKER_SHLIBS],
5115[AC_REQUIRE([LT_PATH_LD])dnl
5116AC_REQUIRE([LT_PATH_NM])dnl
5117m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5118m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5119m4_require([_LT_DECL_EGREP])dnl
5120m4_require([_LT_DECL_SED])dnl
5121m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5122m4_require([_LT_TAG_COMPILER])dnl
5123AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5124m4_if([$1], [CXX], [
5125  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5126  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5127  case $host_os in
5128  aix[[4-9]]*)
5129    # If we're using GNU nm, then we don't want the "-C" option.
5130    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5131    # Without the "-l" option, or with the "-B" option, AIX nm treats
5132    # weak defined symbols like other global defined symbols, whereas
5133    # GNU nm marks them as "W".
5134    # While the 'weak' keyword is ignored in the Export File, we need
5135    # it in the Import File for the 'aix-soname' feature, so we have
5136    # to replace the "-B" option with "-P" for AIX nm.
5137    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5138      _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'
5139    else
5140      _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'
5141    fi
5142    ;;
5143  pw32*)
5144    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
5145    ;;
5146  cygwin* | mingw* | cegcc*)
5147    case $cc_basename in
5148    cl*)
5149      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5150      ;;
5151    *)
5152      _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'
5153      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5154      ;;
5155    esac
5156    ;;
5157  *)
5158    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5159    ;;
5160  esac
5161], [
5162  runpath_var=
5163  _LT_TAGVAR(allow_undefined_flag, $1)=
5164  _LT_TAGVAR(always_export_symbols, $1)=no
5165  _LT_TAGVAR(archive_cmds, $1)=
5166  _LT_TAGVAR(archive_expsym_cmds, $1)=
5167  _LT_TAGVAR(compiler_needs_object, $1)=no
5168  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5169  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5170  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5171  _LT_TAGVAR(hardcode_automatic, $1)=no
5172  _LT_TAGVAR(hardcode_direct, $1)=no
5173  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5174  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5175  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5176  _LT_TAGVAR(hardcode_minus_L, $1)=no
5177  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5178  _LT_TAGVAR(inherit_rpath, $1)=no
5179  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5180  _LT_TAGVAR(module_cmds, $1)=
5181  _LT_TAGVAR(module_expsym_cmds, $1)=
5182  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5183  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5184  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5185  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5186  # include_expsyms should be a list of space-separated symbols to be *always*
5187  # included in the symbol list
5188  _LT_TAGVAR(include_expsyms, $1)=
5189  # exclude_expsyms can be an extended regexp of symbols to exclude
5190  # it will be wrapped by ' (' and ')$', so one must not match beginning or
5191  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
5192  # as well as any symbol that contains 'd'.
5193  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5194  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5195  # platforms (ab)use it in PIC code, but their linkers get confused if
5196  # the symbol is explicitly referenced.  Since portable code cannot
5197  # rely on this symbol name, it's probably fine to never include it in
5198  # preloaded symbol tables.
5199  # Exclude shared library initialization/finalization symbols.
5200dnl Note also adjust exclude_expsyms for C++ above.
5201  extract_expsyms_cmds=
5202
5203  case $host_os in
5204  cygwin* | mingw* | pw32* | cegcc*)
5205    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5206    # When not using gcc, we currently assume that we are using
5207    # Microsoft Visual C++.
5208    if test yes != "$GCC"; then
5209      with_gnu_ld=no
5210    fi
5211    ;;
5212  interix*)
5213    # we just hope/assume this is gcc and not c89 (= MSVC++)
5214    with_gnu_ld=yes
5215    ;;
5216  openbsd* | bitrig*)
5217    with_gnu_ld=no
5218    ;;
5219  esac
5220
5221  _LT_TAGVAR(ld_shlibs, $1)=yes
5222
5223  # On some targets, GNU ld is compatible enough with the native linker
5224  # that we're better off using the native interface for both.
5225  lt_use_gnu_ld_interface=no
5226  if test yes = "$with_gnu_ld"; then
5227    case $host_os in
5228      aix*)
5229	# The AIX port of GNU ld has always aspired to compatibility
5230	# with the native linker.  However, as the warning in the GNU ld
5231	# block says, versions before 2.19.5* couldn't really create working
5232	# shared libraries, regardless of the interface used.
5233	case `$LD -v 2>&1` in
5234	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5235	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5236	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5237	  *)
5238	    lt_use_gnu_ld_interface=yes
5239	    ;;
5240	esac
5241	;;
5242      *)
5243	lt_use_gnu_ld_interface=yes
5244	;;
5245    esac
5246  fi
5247
5248  if test yes = "$lt_use_gnu_ld_interface"; then
5249    # If archive_cmds runs LD, not CC, wlarc should be empty
5250    wlarc='$wl'
5251
5252    # Set some defaults for GNU ld with shared library support. These
5253    # are reset later if shared libraries are not supported. Putting them
5254    # here allows them to be overridden if necessary.
5255    runpath_var=LD_RUN_PATH
5256    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5257    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5258    # ancient GNU ld didn't support --whole-archive et. al.
5259    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5260      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5261    else
5262      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5263    fi
5264    supports_anon_versioning=no
5265    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5266      *GNU\ gold*) supports_anon_versioning=yes ;;
5267      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5268      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5269      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5270      *\ 2.11.*) ;; # other 2.11 versions
5271      *) supports_anon_versioning=yes ;;
5272    esac
5273
5274    # See if GNU ld supports shared libraries.
5275    case $host_os in
5276    aix[[3-9]]*)
5277      # On AIX/PPC, the GNU linker is very broken
5278      if test ia64 != "$host_cpu"; then
5279	_LT_TAGVAR(ld_shlibs, $1)=no
5280	cat <<_LT_EOF 1>&2
5281
5282*** Warning: the GNU linker, at least up to release 2.19, is reported
5283*** to be unable to reliably create shared libraries on AIX.
5284*** Therefore, libtool is disabling shared libraries support.  If you
5285*** really care for shared libraries, you may want to install binutils
5286*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5287*** You will then need to restart the configuration process.
5288
5289_LT_EOF
5290      fi
5291      ;;
5292
5293    amigaos*)
5294      case $host_cpu in
5295      powerpc)
5296            # see comment about AmigaOS4 .so support
5297            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5298            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5299        ;;
5300      m68k)
5301            _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)'
5302            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5303            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5304        ;;
5305      esac
5306      ;;
5307
5308    beos*)
5309      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5310	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5311	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5312	# support --undefined.  This deserves some investigation.  FIXME
5313	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5314      else
5315	_LT_TAGVAR(ld_shlibs, $1)=no
5316      fi
5317      ;;
5318
5319    cygwin* | mingw* | pw32* | cegcc*)
5320      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5321      # as there is no search path for DLLs.
5322      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5323      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5324      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5325      _LT_TAGVAR(always_export_symbols, $1)=no
5326      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5327      _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'
5328      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5329
5330      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5331        _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'
5332	# If the export-symbols file already is a .def file, use it as
5333	# is; otherwise, prepend EXPORTS...
5334	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5335          cp $export_symbols $output_objdir/$soname.def;
5336        else
5337          echo EXPORTS > $output_objdir/$soname.def;
5338          cat $export_symbols >> $output_objdir/$soname.def;
5339        fi~
5340        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5341      else
5342	_LT_TAGVAR(ld_shlibs, $1)=no
5343      fi
5344      ;;
5345
5346    haiku*)
5347      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5348      _LT_TAGVAR(link_all_deplibs, $1)=yes
5349      ;;
5350
5351    os2*)
5352      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5353      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5354      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5355      shrext_cmds=.dll
5356      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5357	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5358	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5359	$ECHO EXPORTS >> $output_objdir/$libname.def~
5360	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5361	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5362	emximp -o $lib $output_objdir/$libname.def'
5363      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5364	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5365	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5366	$ECHO EXPORTS >> $output_objdir/$libname.def~
5367	prefix_cmds="$SED"~
5368	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5369	  prefix_cmds="$prefix_cmds -e 1d";
5370	fi~
5371	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5372	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5373	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5374	emximp -o $lib $output_objdir/$libname.def'
5375      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5376      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5377      ;;
5378
5379    interix[[3-9]]*)
5380      _LT_TAGVAR(hardcode_direct, $1)=no
5381      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5382      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5383      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5384      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5385      # Instead, shared libraries are loaded at an image base (0x10000000 by
5386      # default) and relocated if they conflict, which is a slow very memory
5387      # consuming and fragmenting process.  To avoid this, we pick a random,
5388      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5389      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5390      _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'
5391      _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'
5392      ;;
5393
5394    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5395      tmp_diet=no
5396      if test linux-dietlibc = "$host_os"; then
5397	case $cc_basename in
5398	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5399	esac
5400      fi
5401      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5402	 && test no = "$tmp_diet"
5403      then
5404	tmp_addflag=' $pic_flag'
5405	tmp_sharedflag='-shared'
5406	case $cc_basename,$host_cpu in
5407        pgcc*)				# Portland Group C compiler
5408	  _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'
5409	  tmp_addflag=' $pic_flag'
5410	  ;;
5411	pgf77* | pgf90* | pgf95* | pgfortran*)
5412					# Portland Group f77 and f90 compilers
5413	  _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'
5414	  tmp_addflag=' $pic_flag -Mnomain' ;;
5415	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5416	  tmp_addflag=' -i_dynamic' ;;
5417	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5418	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5419	ifc* | ifort*)			# Intel Fortran compiler
5420	  tmp_addflag=' -nofor_main' ;;
5421	lf95*)				# Lahey Fortran 8.1
5422	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5423	  tmp_sharedflag='--shared' ;;
5424        nagfor*)                        # NAGFOR 5.3
5425          tmp_sharedflag='-Wl,-shared' ;;
5426	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5427	  tmp_sharedflag='-qmkshrobj'
5428	  tmp_addflag= ;;
5429	nvcc*)	# Cuda Compiler Driver 2.2
5430	  _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'
5431	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5432	  ;;
5433	esac
5434	case `$CC -V 2>&1 | sed 5q` in
5435	*Sun\ C*)			# Sun C 5.9
5436	  _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'
5437	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5438	  tmp_sharedflag='-G' ;;
5439	*Sun\ F*)			# Sun Fortran 8.3
5440	  tmp_sharedflag='-G' ;;
5441	esac
5442	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5443
5444        if test yes = "$supports_anon_versioning"; then
5445          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5446            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5447            echo "local: *; };" >> $output_objdir/$libname.ver~
5448            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5449        fi
5450
5451	case $cc_basename in
5452	tcc*)
5453	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5454	  ;;
5455	xlf* | bgf* | bgxlf* | mpixlf*)
5456	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5457	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5458	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5459	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5460	  if test yes = "$supports_anon_versioning"; then
5461	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5462              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5463              echo "local: *; };" >> $output_objdir/$libname.ver~
5464              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5465	  fi
5466	  ;;
5467	esac
5468      else
5469        _LT_TAGVAR(ld_shlibs, $1)=no
5470      fi
5471      ;;
5472
5473    netbsd*)
5474      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5475	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5476	wlarc=
5477      else
5478	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5479	_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'
5480      fi
5481      ;;
5482
5483    solaris*)
5484      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5485	_LT_TAGVAR(ld_shlibs, $1)=no
5486	cat <<_LT_EOF 1>&2
5487
5488*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5489*** create shared libraries on Solaris systems.  Therefore, libtool
5490*** is disabling shared libraries support.  We urge you to upgrade GNU
5491*** binutils to release 2.9.1 or newer.  Another option is to modify
5492*** your PATH or compiler configuration so that the native linker is
5493*** used, and then restart.
5494
5495_LT_EOF
5496      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5497	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5498	_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'
5499      else
5500	_LT_TAGVAR(ld_shlibs, $1)=no
5501      fi
5502      ;;
5503
5504    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5505      case `$LD -v 2>&1` in
5506        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5507	_LT_TAGVAR(ld_shlibs, $1)=no
5508	cat <<_LT_EOF 1>&2
5509
5510*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5511*** reliably create shared libraries on SCO systems.  Therefore, libtool
5512*** is disabling shared libraries support.  We urge you to upgrade GNU
5513*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5514*** your PATH or compiler configuration so that the native linker is
5515*** used, and then restart.
5516
5517_LT_EOF
5518	;;
5519	*)
5520	  # For security reasons, it is highly recommended that you always
5521	  # use absolute paths for naming shared libraries, and exclude the
5522	  # DT_RUNPATH tag from executables and libraries.  But doing so
5523	  # requires that you compile everything twice, which is a pain.
5524	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5525	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5526	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5527	    _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'
5528	  else
5529	    _LT_TAGVAR(ld_shlibs, $1)=no
5530	  fi
5531	;;
5532      esac
5533      ;;
5534
5535    sunos4*)
5536      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5537      wlarc=
5538      _LT_TAGVAR(hardcode_direct, $1)=yes
5539      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5540      ;;
5541
5542    *)
5543      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5544	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5545	_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'
5546      else
5547	_LT_TAGVAR(ld_shlibs, $1)=no
5548      fi
5549      ;;
5550    esac
5551
5552    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5553      runpath_var=
5554      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5555      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5556      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5557    fi
5558  else
5559    # PORTME fill in a description of your system's linker (not GNU ld)
5560    case $host_os in
5561    aix3*)
5562      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5563      _LT_TAGVAR(always_export_symbols, $1)=yes
5564      _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'
5565      # Note: this linker hardcodes the directories in LIBPATH if there
5566      # are no directories specified by -L.
5567      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5568      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5569	# Neither direct hardcoding nor static linking is supported with a
5570	# broken collect2.
5571	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5572      fi
5573      ;;
5574
5575    aix[[4-9]]*)
5576      if test ia64 = "$host_cpu"; then
5577	# On IA64, the linker does run time linking by default, so we don't
5578	# have to do anything special.
5579	aix_use_runtimelinking=no
5580	exp_sym_flag='-Bexport'
5581	no_entry_flag=
5582      else
5583	# If we're using GNU nm, then we don't want the "-C" option.
5584	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
5585	# Without the "-l" option, or with the "-B" option, AIX nm treats
5586	# weak defined symbols like other global defined symbols, whereas
5587	# GNU nm marks them as "W".
5588	# While the 'weak' keyword is ignored in the Export File, we need
5589	# it in the Import File for the 'aix-soname' feature, so we have
5590	# to replace the "-B" option with "-P" for AIX nm.
5591	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5592	  _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'
5593	else
5594	  _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'
5595	fi
5596	aix_use_runtimelinking=no
5597
5598	# Test if we are trying to use run time linking or normal
5599	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5600	# have runtime linking enabled, and use it for executables.
5601	# For shared libraries, we enable/disable runtime linking
5602	# depending on the kind of the shared library created -
5603	# when "with_aix_soname,aix_use_runtimelinking" is:
5604	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
5605	# "aix,yes"  lib.so          shared, rtl:yes, for executables
5606	#            lib.a           static archive
5607	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
5608	#            lib.a(lib.so.V) shared, rtl:no,  for executables
5609	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5610	#            lib.a(lib.so.V) shared, rtl:no
5611	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
5612	#            lib.a           static archive
5613	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5614	  for ld_flag in $LDFLAGS; do
5615	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5616	    aix_use_runtimelinking=yes
5617	    break
5618	  fi
5619	  done
5620	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5621	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
5622	    # so we don't have lib.a shared libs to link our executables.
5623	    # We have to force runtime linking in this case.
5624	    aix_use_runtimelinking=yes
5625	    LDFLAGS="$LDFLAGS -Wl,-brtl"
5626	  fi
5627	  ;;
5628	esac
5629
5630	exp_sym_flag='-bexport'
5631	no_entry_flag='-bnoentry'
5632      fi
5633
5634      # When large executables or shared objects are built, AIX ld can
5635      # have problems creating the table of contents.  If linking a library
5636      # or program results in "error TOC overflow" add -mminimal-toc to
5637      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5638      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5639
5640      _LT_TAGVAR(archive_cmds, $1)=''
5641      _LT_TAGVAR(hardcode_direct, $1)=yes
5642      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5643      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5644      _LT_TAGVAR(link_all_deplibs, $1)=yes
5645      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5646      case $with_aix_soname,$aix_use_runtimelinking in
5647      aix,*) ;; # traditional, no import file
5648      svr4,* | *,yes) # use import file
5649	# The Import File defines what to hardcode.
5650	_LT_TAGVAR(hardcode_direct, $1)=no
5651	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5652	;;
5653      esac
5654
5655      if test yes = "$GCC"; then
5656	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5657	# We only want to do this on AIX 4.2 and lower, the check
5658	# below for broken collect2 doesn't work under 4.3+
5659	  collect2name=`$CC -print-prog-name=collect2`
5660	  if test -f "$collect2name" &&
5661	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5662	  then
5663	  # We have reworked collect2
5664	  :
5665	  else
5666	  # We have old collect2
5667	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5668	  # It fails to find uninstalled libraries when the uninstalled
5669	  # path is not listed in the libpath.  Setting hardcode_minus_L
5670	  # to unsupported forces relinking
5671	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5672	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5673	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5674	  fi
5675	  ;;
5676	esac
5677	shared_flag='-shared'
5678	if test yes = "$aix_use_runtimelinking"; then
5679	  shared_flag="$shared_flag "'$wl-G'
5680	fi
5681	# Need to ensure runtime linking is disabled for the traditional
5682	# shared library, or the linker may eventually find shared libraries
5683	# /with/ Import File - we do not want to mix them.
5684	shared_flag_aix='-shared'
5685	shared_flag_svr4='-shared $wl-G'
5686      else
5687	# not using gcc
5688	if test ia64 = "$host_cpu"; then
5689	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5690	# chokes on -Wl,-G. The following line is correct:
5691	  shared_flag='-G'
5692	else
5693	  if test yes = "$aix_use_runtimelinking"; then
5694	    shared_flag='$wl-G'
5695	  else
5696	    shared_flag='$wl-bM:SRE'
5697	  fi
5698	  shared_flag_aix='$wl-bM:SRE'
5699	  shared_flag_svr4='$wl-G'
5700	fi
5701      fi
5702
5703      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5704      # It seems that -bexpall does not export symbols beginning with
5705      # underscore (_), so it is better to generate a list of symbols to export.
5706      _LT_TAGVAR(always_export_symbols, $1)=yes
5707      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5708	# Warning - without using the other runtime loading flags (-brtl),
5709	# -berok will link without error, but may produce a broken library.
5710	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5711        # Determine the default libpath from the value encoded in an
5712        # empty executable.
5713        _LT_SYS_MODULE_PATH_AIX([$1])
5714        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5715        _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
5716      else
5717	if test ia64 = "$host_cpu"; then
5718	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5719	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5720	  _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"
5721	else
5722	 # Determine the default libpath from the value encoded in an
5723	 # empty executable.
5724	 _LT_SYS_MODULE_PATH_AIX([$1])
5725	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5726	  # Warning - without using the other run time loading flags,
5727	  # -berok will link without error, but may produce a broken library.
5728	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5729	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5730	  if test yes = "$with_gnu_ld"; then
5731	    # We only use this code for GNU lds that support --whole-archive.
5732	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5733	  else
5734	    # Exported symbols can be pulled into shared objects from archives
5735	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5736	  fi
5737	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5738	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5739	  # -brtl affects multiple linker settings, -berok does not and is overridden later
5740	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5741	  if test svr4 != "$with_aix_soname"; then
5742	    # This is similar to how AIX traditionally builds its shared libraries.
5743	    _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'
5744	  fi
5745	  if test aix != "$with_aix_soname"; then
5746	    _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'
5747	  else
5748	    # used by -dlpreopen to get the symbols
5749	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
5750	  fi
5751	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5752	fi
5753      fi
5754      ;;
5755
5756    amigaos*)
5757      case $host_cpu in
5758      powerpc)
5759            # see comment about AmigaOS4 .so support
5760            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5761            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5762        ;;
5763      m68k)
5764            _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)'
5765            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5766            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5767        ;;
5768      esac
5769      ;;
5770
5771    bsdi[[45]]*)
5772      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5773      ;;
5774
5775    cygwin* | mingw* | pw32* | cegcc*)
5776      # When not using gcc, we currently assume that we are using
5777      # Microsoft Visual C++.
5778      # hardcode_libdir_flag_spec is actually meaningless, as there is
5779      # no search path for DLLs.
5780      case $cc_basename in
5781      cl*)
5782	# Native MSVC
5783	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5784	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5785	_LT_TAGVAR(always_export_symbols, $1)=yes
5786	_LT_TAGVAR(file_list_spec, $1)='@'
5787	# Tell ltmain to make .lib files, not .a files.
5788	libext=lib
5789	# Tell ltmain to make .dll files, not .so files.
5790	shrext_cmds=.dll
5791	# FIXME: Setting linknames here is a bad hack.
5792	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5793	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5794            cp "$export_symbols" "$output_objdir/$soname.def";
5795            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5796          else
5797            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5798          fi~
5799          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5800          linknames='
5801	# The linker will not automatically build a static lib if we build a DLL.
5802	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5803	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5804	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5805	_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'
5806	# Don't use ranlib
5807	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5808	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5809          lt_tool_outputfile="@TOOL_OUTPUT@"~
5810          case $lt_outputfile in
5811            *.exe|*.EXE) ;;
5812            *)
5813              lt_outputfile=$lt_outputfile.exe
5814              lt_tool_outputfile=$lt_tool_outputfile.exe
5815              ;;
5816          esac~
5817          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5818            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5819            $RM "$lt_outputfile.manifest";
5820          fi'
5821	;;
5822      *)
5823	# Assume MSVC wrapper
5824	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5825	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5826	# Tell ltmain to make .lib files, not .a files.
5827	libext=lib
5828	# Tell ltmain to make .dll files, not .so files.
5829	shrext_cmds=.dll
5830	# FIXME: Setting linknames here is a bad hack.
5831	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5832	# The linker will automatically build a .lib file if we build a DLL.
5833	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5834	# FIXME: Should let the user specify the lib program.
5835	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5836	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5837	;;
5838      esac
5839      ;;
5840
5841    darwin* | rhapsody*)
5842      _LT_DARWIN_LINKER_FEATURES($1)
5843      ;;
5844
5845    dgux*)
5846      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5847      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5848      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5849      ;;
5850
5851    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5852    # support.  Future versions do this automatically, but an explicit c++rt0.o
5853    # does not break anything, and helps significantly (at the cost of a little
5854    # extra space).
5855    freebsd2.2*)
5856      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5857      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5858      _LT_TAGVAR(hardcode_direct, $1)=yes
5859      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5860      ;;
5861
5862    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5863    freebsd2.*)
5864      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5865      _LT_TAGVAR(hardcode_direct, $1)=yes
5866      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5867      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5868      ;;
5869
5870    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5871    freebsd* | dragonfly*)
5872      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5873      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5874      _LT_TAGVAR(hardcode_direct, $1)=yes
5875      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5876      ;;
5877
5878    hpux9*)
5879      if test yes = "$GCC"; then
5880	_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'
5881      else
5882	_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'
5883      fi
5884      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5885      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5886      _LT_TAGVAR(hardcode_direct, $1)=yes
5887
5888      # hardcode_minus_L: Not really in the search PATH,
5889      # but as the default location of the library.
5890      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5891      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5892      ;;
5893
5894    hpux10*)
5895      if test yes,no = "$GCC,$with_gnu_ld"; then
5896	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5897      else
5898	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5899      fi
5900      if test no = "$with_gnu_ld"; then
5901	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5902	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5903	_LT_TAGVAR(hardcode_direct, $1)=yes
5904	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5905	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5906	# hardcode_minus_L: Not really in the search PATH,
5907	# but as the default location of the library.
5908	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5909      fi
5910      ;;
5911
5912    hpux11*)
5913      if test yes,no = "$GCC,$with_gnu_ld"; then
5914	case $host_cpu in
5915	hppa*64*)
5916	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5917	  ;;
5918	ia64*)
5919	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5920	  ;;
5921	*)
5922	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5923	  ;;
5924	esac
5925      else
5926	case $host_cpu in
5927	hppa*64*)
5928	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5929	  ;;
5930	ia64*)
5931	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5932	  ;;
5933	*)
5934	m4_if($1, [], [
5935	  # Older versions of the 11.00 compiler do not understand -b yet
5936	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5937	  _LT_LINKER_OPTION([if $CC understands -b],
5938	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5939	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5940	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5941	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5942	  ;;
5943	esac
5944      fi
5945      if test no = "$with_gnu_ld"; then
5946	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5947	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5948
5949	case $host_cpu in
5950	hppa*64*|ia64*)
5951	  _LT_TAGVAR(hardcode_direct, $1)=no
5952	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5953	  ;;
5954	*)
5955	  _LT_TAGVAR(hardcode_direct, $1)=yes
5956	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5957	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5958
5959	  # hardcode_minus_L: Not really in the search PATH,
5960	  # but as the default location of the library.
5961	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5962	  ;;
5963	esac
5964      fi
5965      ;;
5966
5967    irix5* | irix6* | nonstopux*)
5968      if test yes = "$GCC"; then
5969	_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'
5970	# Try to use the -exported_symbol ld option, if it does not
5971	# work, assume that -exports_file does not work either and
5972	# implicitly export all symbols.
5973	# This should be the same for all languages, so no per-tag cache variable.
5974	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5975	  [lt_cv_irix_exported_symbol],
5976	  [save_LDFLAGS=$LDFLAGS
5977	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5978	   AC_LINK_IFELSE(
5979	     [AC_LANG_SOURCE(
5980	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5981			      [C++], [[int foo (void) { return 0; }]],
5982			      [Fortran 77], [[
5983      subroutine foo
5984      end]],
5985			      [Fortran], [[
5986      subroutine foo
5987      end]])])],
5988	      [lt_cv_irix_exported_symbol=yes],
5989	      [lt_cv_irix_exported_symbol=no])
5990           LDFLAGS=$save_LDFLAGS])
5991	if test yes = "$lt_cv_irix_exported_symbol"; then
5992          _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'
5993	fi
5994      else
5995	_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'
5996	_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'
5997      fi
5998      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5999      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6000      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6001      _LT_TAGVAR(inherit_rpath, $1)=yes
6002      _LT_TAGVAR(link_all_deplibs, $1)=yes
6003      ;;
6004
6005    linux*)
6006      case $cc_basename in
6007      tcc*)
6008	# Fabrice Bellard et al's Tiny C Compiler
6009	_LT_TAGVAR(ld_shlibs, $1)=yes
6010	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6011	;;
6012      esac
6013      ;;
6014
6015    netbsd*)
6016      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6017	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6018      else
6019	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6020      fi
6021      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6022      _LT_TAGVAR(hardcode_direct, $1)=yes
6023      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6024      ;;
6025
6026    newsos6)
6027      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6028      _LT_TAGVAR(hardcode_direct, $1)=yes
6029      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6030      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6031      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6032      ;;
6033
6034    *nto* | *qnx*)
6035      ;;
6036
6037    openbsd* | bitrig*)
6038      if test -f /usr/libexec/ld.so; then
6039	_LT_TAGVAR(hardcode_direct, $1)=yes
6040	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6041	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6042	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6043	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6044	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
6045	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6046	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6047	else
6048	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6049	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6050	fi
6051      else
6052	_LT_TAGVAR(ld_shlibs, $1)=no
6053      fi
6054      ;;
6055
6056    os2*)
6057      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6058      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6059      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6060      shrext_cmds=.dll
6061      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6062	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6063	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6064	$ECHO EXPORTS >> $output_objdir/$libname.def~
6065	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6066	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6067	emximp -o $lib $output_objdir/$libname.def'
6068      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6069	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6070	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6071	$ECHO EXPORTS >> $output_objdir/$libname.def~
6072	prefix_cmds="$SED"~
6073	if test EXPORTS = "`$SED 1q $export_symbols`"; then
6074	  prefix_cmds="$prefix_cmds -e 1d";
6075	fi~
6076	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6077	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6078	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6079	emximp -o $lib $output_objdir/$libname.def'
6080      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6081      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6082      ;;
6083
6084    osf3*)
6085      if test yes = "$GCC"; then
6086	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
6087	_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'
6088      else
6089	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6090	_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'
6091      fi
6092      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6093      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6094      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6095      ;;
6096
6097    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6098      if test yes = "$GCC"; then
6099	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
6100	_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'
6101	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6102      else
6103	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6104	_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'
6105	_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~
6106          $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'
6107
6108	# Both c and cxx compiler support -rpath directly
6109	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6110      fi
6111      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6112      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6113      ;;
6114
6115    solaris*)
6116      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6117      if test yes = "$GCC"; then
6118	wlarc='$wl'
6119	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6120	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6121          $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'
6122      else
6123	case `$CC -V 2>&1` in
6124	*"Compilers 5.0"*)
6125	  wlarc=''
6126	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
6127	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6128            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6129	  ;;
6130	*)
6131	  wlarc='$wl'
6132	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6133	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6134            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6135	  ;;
6136	esac
6137      fi
6138      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6139      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6140      case $host_os in
6141      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6142      *)
6143	# The compiler driver will combine and reorder linker options,
6144	# but understands '-z linker_flag'.  GCC discards it without '$wl',
6145	# but is careful enough not to reorder.
6146	# Supported since Solaris 2.6 (maybe 2.5.1?)
6147	if test yes = "$GCC"; then
6148	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
6149	else
6150	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6151	fi
6152	;;
6153      esac
6154      _LT_TAGVAR(link_all_deplibs, $1)=yes
6155      ;;
6156
6157    sunos4*)
6158      if test sequent = "$host_vendor"; then
6159	# Use $CC to link under sequent, because it throws in some extra .o
6160	# files that make .init and .fini sections work.
6161	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6162      else
6163	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6164      fi
6165      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6166      _LT_TAGVAR(hardcode_direct, $1)=yes
6167      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6168      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6169      ;;
6170
6171    sysv4)
6172      case $host_vendor in
6173	sni)
6174	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6175	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6176	;;
6177	siemens)
6178	  ## LD is ld it makes a PLAMLIB
6179	  ## CC just makes a GrossModule.
6180	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6181	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6182	  _LT_TAGVAR(hardcode_direct, $1)=no
6183        ;;
6184	motorola)
6185	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6186	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6187	;;
6188      esac
6189      runpath_var='LD_RUN_PATH'
6190      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6191      ;;
6192
6193    sysv4.3*)
6194      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6195      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6196      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6197      ;;
6198
6199    sysv4*MP*)
6200      if test -d /usr/nec; then
6201	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6202	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6203	runpath_var=LD_RUN_PATH
6204	hardcode_runpath_var=yes
6205	_LT_TAGVAR(ld_shlibs, $1)=yes
6206      fi
6207      ;;
6208
6209    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6210      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6211      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6212      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6213      runpath_var='LD_RUN_PATH'
6214
6215      if test yes = "$GCC"; then
6216	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6217	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6218      else
6219	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6220	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6221      fi
6222      ;;
6223
6224    sysv5* | sco3.2v5* | sco5v6*)
6225      # Note: We CANNOT use -z defs as we might desire, because we do not
6226      # link with -lc, and that would cause any symbols used from libc to
6227      # always be unresolved, which means just about no library would
6228      # ever link correctly.  If we're not using GNU ld we use -z text
6229      # though, which does catch some bad symbols but isn't as heavy-handed
6230      # as -z defs.
6231      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6232      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6233      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6234      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6235      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6236      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6237      _LT_TAGVAR(link_all_deplibs, $1)=yes
6238      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6239      runpath_var='LD_RUN_PATH'
6240
6241      if test yes = "$GCC"; then
6242	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6243	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6244      else
6245	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6246	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6247      fi
6248      ;;
6249
6250    uts4*)
6251      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6252      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6253      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6254      ;;
6255
6256    *)
6257      _LT_TAGVAR(ld_shlibs, $1)=no
6258      ;;
6259    esac
6260
6261    if test sni = "$host_vendor"; then
6262      case $host in
6263      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6264	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6265	;;
6266      esac
6267    fi
6268  fi
6269])
6270AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6271test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6272
6273_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6274
6275_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6276_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6277_LT_DECL([], [extract_expsyms_cmds], [2],
6278    [The commands to extract the exported symbol list from a shared archive])
6279
6280#
6281# Do we need to explicitly link libc?
6282#
6283case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6284x|xyes)
6285  # Assume -lc should be added
6286  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6287
6288  if test yes,yes = "$GCC,$enable_shared"; then
6289    case $_LT_TAGVAR(archive_cmds, $1) in
6290    *'~'*)
6291      # FIXME: we may have to deal with multi-command sequences.
6292      ;;
6293    '$CC '*)
6294      # Test whether the compiler implicitly links with -lc since on some
6295      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6296      # to ld, don't add -lc before -lgcc.
6297      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6298	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6299	[$RM conftest*
6300	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6301
6302	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6303	  soname=conftest
6304	  lib=conftest
6305	  libobjs=conftest.$ac_objext
6306	  deplibs=
6307	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6308	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6309	  compiler_flags=-v
6310	  linker_flags=-v
6311	  verstring=
6312	  output_objdir=.
6313	  libname=conftest
6314	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6315	  _LT_TAGVAR(allow_undefined_flag, $1)=
6316	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6317	  then
6318	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6319	  else
6320	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6321	  fi
6322	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6323	else
6324	  cat conftest.err 1>&5
6325	fi
6326	$RM conftest*
6327	])
6328      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6329      ;;
6330    esac
6331  fi
6332  ;;
6333esac
6334
6335_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6336    [Whether or not to add -lc for building shared libraries])
6337_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6338    [enable_shared_with_static_runtimes], [0],
6339    [Whether or not to disallow shared libs when runtime libs are static])
6340_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6341    [Compiler flag to allow reflexive dlopens])
6342_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6343    [Compiler flag to generate shared objects directly from archives])
6344_LT_TAGDECL([], [compiler_needs_object], [1],
6345    [Whether the compiler copes with passing no objects directly])
6346_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6347    [Create an old-style archive from a shared archive])
6348_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6349    [Create a temporary old-style archive to link instead of a shared archive])
6350_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6351_LT_TAGDECL([], [archive_expsym_cmds], [2])
6352_LT_TAGDECL([], [module_cmds], [2],
6353    [Commands used to build a loadable module if different from building
6354    a shared archive.])
6355_LT_TAGDECL([], [module_expsym_cmds], [2])
6356_LT_TAGDECL([], [with_gnu_ld], [1],
6357    [Whether we are building with GNU ld or not])
6358_LT_TAGDECL([], [allow_undefined_flag], [1],
6359    [Flag that allows shared libraries with undefined symbols to be built])
6360_LT_TAGDECL([], [no_undefined_flag], [1],
6361    [Flag that enforces no undefined symbols])
6362_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6363    [Flag to hardcode $libdir into a binary during linking.
6364    This must work even if $libdir does not exist])
6365_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6366    [Whether we need a single "-rpath" flag with a separated argument])
6367_LT_TAGDECL([], [hardcode_direct], [0],
6368    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6369    DIR into the resulting binary])
6370_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6371    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6372    DIR into the resulting binary and the resulting library dependency is
6373    "absolute", i.e impossible to change by setting $shlibpath_var if the
6374    library is relocated])
6375_LT_TAGDECL([], [hardcode_minus_L], [0],
6376    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6377    into the resulting binary])
6378_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6379    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6380    into the resulting binary])
6381_LT_TAGDECL([], [hardcode_automatic], [0],
6382    [Set to "yes" if building a shared library automatically hardcodes DIR
6383    into the library and all subsequent libraries and executables linked
6384    against it])
6385_LT_TAGDECL([], [inherit_rpath], [0],
6386    [Set to yes if linker adds runtime paths of dependent libraries
6387    to runtime path list])
6388_LT_TAGDECL([], [link_all_deplibs], [0],
6389    [Whether libtool must link a program against all its dependency libraries])
6390_LT_TAGDECL([], [always_export_symbols], [0],
6391    [Set to "yes" if exported symbols are required])
6392_LT_TAGDECL([], [export_symbols_cmds], [2],
6393    [The commands to list exported symbols])
6394_LT_TAGDECL([], [exclude_expsyms], [1],
6395    [Symbols that should not be listed in the preloaded symbols])
6396_LT_TAGDECL([], [include_expsyms], [1],
6397    [Symbols that must always be exported])
6398_LT_TAGDECL([], [prelink_cmds], [2],
6399    [Commands necessary for linking programs (against libraries) with templates])
6400_LT_TAGDECL([], [postlink_cmds], [2],
6401    [Commands necessary for finishing linking programs])
6402_LT_TAGDECL([], [file_list_spec], [1],
6403    [Specify filename containing input files])
6404dnl FIXME: Not yet implemented
6405dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6406dnl    [Compiler flag to generate thread safe objects])
6407])# _LT_LINKER_SHLIBS
6408
6409
6410# _LT_LANG_C_CONFIG([TAG])
6411# ------------------------
6412# Ensure that the configuration variables for a C compiler are suitably
6413# defined.  These variables are subsequently used by _LT_CONFIG to write
6414# the compiler configuration to 'libtool'.
6415m4_defun([_LT_LANG_C_CONFIG],
6416[m4_require([_LT_DECL_EGREP])dnl
6417lt_save_CC=$CC
6418AC_LANG_PUSH(C)
6419
6420# Source file extension for C test sources.
6421ac_ext=c
6422
6423# Object file extension for compiled C test sources.
6424objext=o
6425_LT_TAGVAR(objext, $1)=$objext
6426
6427# Code to be used in simple compile tests
6428lt_simple_compile_test_code="int some_variable = 0;"
6429
6430# Code to be used in simple link tests
6431lt_simple_link_test_code='int main(){return(0);}'
6432
6433_LT_TAG_COMPILER
6434# Save the default compiler, since it gets overwritten when the other
6435# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6436compiler_DEFAULT=$CC
6437
6438# save warnings/boilerplate of simple test code
6439_LT_COMPILER_BOILERPLATE
6440_LT_LINKER_BOILERPLATE
6441
6442if test -n "$compiler"; then
6443  _LT_COMPILER_NO_RTTI($1)
6444  _LT_COMPILER_PIC($1)
6445  _LT_COMPILER_C_O($1)
6446  _LT_COMPILER_FILE_LOCKS($1)
6447  _LT_LINKER_SHLIBS($1)
6448  _LT_SYS_DYNAMIC_LINKER($1)
6449  _LT_LINKER_HARDCODE_LIBPATH($1)
6450  LT_SYS_DLOPEN_SELF
6451  _LT_CMD_STRIPLIB
6452
6453  # Report what library types will actually be built
6454  AC_MSG_CHECKING([if libtool supports shared libraries])
6455  AC_MSG_RESULT([$can_build_shared])
6456
6457  AC_MSG_CHECKING([whether to build shared libraries])
6458  test no = "$can_build_shared" && enable_shared=no
6459
6460  # On AIX, shared libraries and static libraries use the same namespace, and
6461  # are all built from PIC.
6462  case $host_os in
6463  aix3*)
6464    test yes = "$enable_shared" && enable_static=no
6465    if test -n "$RANLIB"; then
6466      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6467      postinstall_cmds='$RANLIB $lib'
6468    fi
6469    ;;
6470
6471  aix[[4-9]]*)
6472    if test ia64 != "$host_cpu"; then
6473      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6474      yes,aix,yes) ;;			# shared object as lib.so file only
6475      yes,svr4,*) ;;			# shared object as lib.so archive member only
6476      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6477      esac
6478    fi
6479    ;;
6480  esac
6481  AC_MSG_RESULT([$enable_shared])
6482
6483  AC_MSG_CHECKING([whether to build static libraries])
6484  # Make sure either enable_shared or enable_static is yes.
6485  test yes = "$enable_shared" || enable_static=yes
6486  AC_MSG_RESULT([$enable_static])
6487
6488  _LT_CONFIG($1)
6489fi
6490AC_LANG_POP
6491CC=$lt_save_CC
6492])# _LT_LANG_C_CONFIG
6493
6494
6495# _LT_LANG_CXX_CONFIG([TAG])
6496# --------------------------
6497# Ensure that the configuration variables for a C++ compiler are suitably
6498# defined.  These variables are subsequently used by _LT_CONFIG to write
6499# the compiler configuration to 'libtool'.
6500m4_defun([_LT_LANG_CXX_CONFIG],
6501[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6502m4_require([_LT_DECL_EGREP])dnl
6503m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6504if test -n "$CXX" && ( test no != "$CXX" &&
6505    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6506    (test g++ != "$CXX"))); then
6507  AC_PROG_CXXCPP
6508else
6509  _lt_caught_CXX_error=yes
6510fi
6511
6512AC_LANG_PUSH(C++)
6513_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6514_LT_TAGVAR(allow_undefined_flag, $1)=
6515_LT_TAGVAR(always_export_symbols, $1)=no
6516_LT_TAGVAR(archive_expsym_cmds, $1)=
6517_LT_TAGVAR(compiler_needs_object, $1)=no
6518_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6519_LT_TAGVAR(hardcode_direct, $1)=no
6520_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6521_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6522_LT_TAGVAR(hardcode_libdir_separator, $1)=
6523_LT_TAGVAR(hardcode_minus_L, $1)=no
6524_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6525_LT_TAGVAR(hardcode_automatic, $1)=no
6526_LT_TAGVAR(inherit_rpath, $1)=no
6527_LT_TAGVAR(module_cmds, $1)=
6528_LT_TAGVAR(module_expsym_cmds, $1)=
6529_LT_TAGVAR(link_all_deplibs, $1)=unknown
6530_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6531_LT_TAGVAR(reload_flag, $1)=$reload_flag
6532_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6533_LT_TAGVAR(no_undefined_flag, $1)=
6534_LT_TAGVAR(whole_archive_flag_spec, $1)=
6535_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6536
6537# Source file extension for C++ test sources.
6538ac_ext=cpp
6539
6540# Object file extension for compiled C++ test sources.
6541objext=o
6542_LT_TAGVAR(objext, $1)=$objext
6543
6544# No sense in running all these tests if we already determined that
6545# the CXX compiler isn't working.  Some variables (like enable_shared)
6546# are currently assumed to apply to all compilers on this platform,
6547# and will be corrupted by setting them based on a non-working compiler.
6548if test yes != "$_lt_caught_CXX_error"; then
6549  # Code to be used in simple compile tests
6550  lt_simple_compile_test_code="int some_variable = 0;"
6551
6552  # Code to be used in simple link tests
6553  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6554
6555  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6556  _LT_TAG_COMPILER
6557
6558  # save warnings/boilerplate of simple test code
6559  _LT_COMPILER_BOILERPLATE
6560  _LT_LINKER_BOILERPLATE
6561
6562  # Allow CC to be a program name with arguments.
6563  lt_save_CC=$CC
6564  lt_save_CFLAGS=$CFLAGS
6565  lt_save_LD=$LD
6566  lt_save_GCC=$GCC
6567  GCC=$GXX
6568  lt_save_with_gnu_ld=$with_gnu_ld
6569  lt_save_path_LD=$lt_cv_path_LD
6570  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6571    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6572  else
6573    $as_unset lt_cv_prog_gnu_ld
6574  fi
6575  if test -n "${lt_cv_path_LDCXX+set}"; then
6576    lt_cv_path_LD=$lt_cv_path_LDCXX
6577  else
6578    $as_unset lt_cv_path_LD
6579  fi
6580  test -z "${LDCXX+set}" || LD=$LDCXX
6581  CC=${CXX-"c++"}
6582  CFLAGS=$CXXFLAGS
6583  compiler=$CC
6584  _LT_TAGVAR(compiler, $1)=$CC
6585  _LT_CC_BASENAME([$compiler])
6586
6587  if test -n "$compiler"; then
6588    # We don't want -fno-exception when compiling C++ code, so set the
6589    # no_builtin_flag separately
6590    if test yes = "$GXX"; then
6591      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6592    else
6593      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6594    fi
6595
6596    if test yes = "$GXX"; then
6597      # Set up default GNU C++ configuration
6598
6599      LT_PATH_LD
6600
6601      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6602      # archiving commands below assume that GNU ld is being used.
6603      if test yes = "$with_gnu_ld"; then
6604        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6605        _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'
6606
6607        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6608        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6609
6610        # If archive_cmds runs LD, not CC, wlarc should be empty
6611        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6612        #     investigate it a little bit more. (MM)
6613        wlarc='$wl'
6614
6615        # ancient GNU ld didn't support --whole-archive et. al.
6616        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6617	  $GREP 'no-whole-archive' > /dev/null; then
6618          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6619        else
6620          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6621        fi
6622      else
6623        with_gnu_ld=no
6624        wlarc=
6625
6626        # A generic and very simple default shared library creation
6627        # command for GNU C++ for the case where it uses the native
6628        # linker, instead of GNU ld.  If possible, this setting should
6629        # overridden to take advantage of the native linker features on
6630        # the platform it is being used on.
6631        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6632      fi
6633
6634      # Commands to make compiler produce verbose output that lists
6635      # what "hidden" libraries, object files and flags are used when
6636      # linking a shared library.
6637      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6638
6639    else
6640      GXX=no
6641      with_gnu_ld=no
6642      wlarc=
6643    fi
6644
6645    # PORTME: fill in a description of your system's C++ link characteristics
6646    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6647    _LT_TAGVAR(ld_shlibs, $1)=yes
6648    case $host_os in
6649      aix3*)
6650        # FIXME: insert proper C++ library support
6651        _LT_TAGVAR(ld_shlibs, $1)=no
6652        ;;
6653      aix[[4-9]]*)
6654        if test ia64 = "$host_cpu"; then
6655          # On IA64, the linker does run time linking by default, so we don't
6656          # have to do anything special.
6657          aix_use_runtimelinking=no
6658          exp_sym_flag='-Bexport'
6659          no_entry_flag=
6660        else
6661          aix_use_runtimelinking=no
6662
6663          # Test if we are trying to use run time linking or normal
6664          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6665          # have runtime linking enabled, and use it for executables.
6666          # For shared libraries, we enable/disable runtime linking
6667          # depending on the kind of the shared library created -
6668          # when "with_aix_soname,aix_use_runtimelinking" is:
6669          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6670          # "aix,yes"  lib.so          shared, rtl:yes, for executables
6671          #            lib.a           static archive
6672          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
6673          #            lib.a(lib.so.V) shared, rtl:no,  for executables
6674          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6675          #            lib.a(lib.so.V) shared, rtl:no
6676          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6677          #            lib.a           static archive
6678          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6679	    for ld_flag in $LDFLAGS; do
6680	      case $ld_flag in
6681	      *-brtl*)
6682	        aix_use_runtimelinking=yes
6683	        break
6684	        ;;
6685	      esac
6686	    done
6687	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6688	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
6689	      # so we don't have lib.a shared libs to link our executables.
6690	      # We have to force runtime linking in this case.
6691	      aix_use_runtimelinking=yes
6692	      LDFLAGS="$LDFLAGS -Wl,-brtl"
6693	    fi
6694	    ;;
6695          esac
6696
6697          exp_sym_flag='-bexport'
6698          no_entry_flag='-bnoentry'
6699        fi
6700
6701        # When large executables or shared objects are built, AIX ld can
6702        # have problems creating the table of contents.  If linking a library
6703        # or program results in "error TOC overflow" add -mminimal-toc to
6704        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6705        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6706
6707        _LT_TAGVAR(archive_cmds, $1)=''
6708        _LT_TAGVAR(hardcode_direct, $1)=yes
6709        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6710        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6711        _LT_TAGVAR(link_all_deplibs, $1)=yes
6712        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6713        case $with_aix_soname,$aix_use_runtimelinking in
6714        aix,*) ;;	# no import file
6715        svr4,* | *,yes) # use import file
6716          # The Import File defines what to hardcode.
6717          _LT_TAGVAR(hardcode_direct, $1)=no
6718          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6719          ;;
6720        esac
6721
6722        if test yes = "$GXX"; then
6723          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6724          # We only want to do this on AIX 4.2 and lower, the check
6725          # below for broken collect2 doesn't work under 4.3+
6726	  collect2name=`$CC -print-prog-name=collect2`
6727	  if test -f "$collect2name" &&
6728	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6729	  then
6730	    # We have reworked collect2
6731	    :
6732	  else
6733	    # We have old collect2
6734	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6735	    # It fails to find uninstalled libraries when the uninstalled
6736	    # path is not listed in the libpath.  Setting hardcode_minus_L
6737	    # to unsupported forces relinking
6738	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6739	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6740	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6741	  fi
6742          esac
6743          shared_flag='-shared'
6744	  if test yes = "$aix_use_runtimelinking"; then
6745	    shared_flag=$shared_flag' $wl-G'
6746	  fi
6747	  # Need to ensure runtime linking is disabled for the traditional
6748	  # shared library, or the linker may eventually find shared libraries
6749	  # /with/ Import File - we do not want to mix them.
6750	  shared_flag_aix='-shared'
6751	  shared_flag_svr4='-shared $wl-G'
6752        else
6753          # not using gcc
6754          if test ia64 = "$host_cpu"; then
6755	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6756	  # chokes on -Wl,-G. The following line is correct:
6757	  shared_flag='-G'
6758          else
6759	    if test yes = "$aix_use_runtimelinking"; then
6760	      shared_flag='$wl-G'
6761	    else
6762	      shared_flag='$wl-bM:SRE'
6763	    fi
6764	    shared_flag_aix='$wl-bM:SRE'
6765	    shared_flag_svr4='$wl-G'
6766          fi
6767        fi
6768
6769        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6770        # It seems that -bexpall does not export symbols beginning with
6771        # underscore (_), so it is better to generate a list of symbols to
6772	# export.
6773        _LT_TAGVAR(always_export_symbols, $1)=yes
6774	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6775          # Warning - without using the other runtime loading flags (-brtl),
6776          # -berok will link without error, but may produce a broken library.
6777          # The "-G" linker flag allows undefined symbols.
6778          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6779          # Determine the default libpath from the value encoded in an empty
6780          # executable.
6781          _LT_SYS_MODULE_PATH_AIX([$1])
6782          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6783
6784          _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
6785        else
6786          if test ia64 = "$host_cpu"; then
6787	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6788	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6789	    _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"
6790          else
6791	    # Determine the default libpath from the value encoded in an
6792	    # empty executable.
6793	    _LT_SYS_MODULE_PATH_AIX([$1])
6794	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6795	    # Warning - without using the other run time loading flags,
6796	    # -berok will link without error, but may produce a broken library.
6797	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6798	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6799	    if test yes = "$with_gnu_ld"; then
6800	      # We only use this code for GNU lds that support --whole-archive.
6801	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6802	    else
6803	      # Exported symbols can be pulled into shared objects from archives
6804	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6805	    fi
6806	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6807	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6808	    # -brtl affects multiple linker settings, -berok does not and is overridden later
6809	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6810	    if test svr4 != "$with_aix_soname"; then
6811	      # This is similar to how AIX traditionally builds its shared
6812	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6813	      _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'
6814	    fi
6815	    if test aix != "$with_aix_soname"; then
6816	      _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'
6817	    else
6818	      # used by -dlpreopen to get the symbols
6819	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6820	    fi
6821	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6822          fi
6823        fi
6824        ;;
6825
6826      beos*)
6827	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6828	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6829	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6830	  # support --undefined.  This deserves some investigation.  FIXME
6831	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6832	else
6833	  _LT_TAGVAR(ld_shlibs, $1)=no
6834	fi
6835	;;
6836
6837      chorus*)
6838        case $cc_basename in
6839          *)
6840	  # FIXME: insert proper C++ library support
6841	  _LT_TAGVAR(ld_shlibs, $1)=no
6842	  ;;
6843        esac
6844        ;;
6845
6846      cygwin* | mingw* | pw32* | cegcc*)
6847	case $GXX,$cc_basename in
6848	,cl* | no,cl*)
6849	  # Native MSVC
6850	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6851	  # no search path for DLLs.
6852	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6853	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6854	  _LT_TAGVAR(always_export_symbols, $1)=yes
6855	  _LT_TAGVAR(file_list_spec, $1)='@'
6856	  # Tell ltmain to make .lib files, not .a files.
6857	  libext=lib
6858	  # Tell ltmain to make .dll files, not .so files.
6859	  shrext_cmds=.dll
6860	  # FIXME: Setting linknames here is a bad hack.
6861	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6862	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6863              cp "$export_symbols" "$output_objdir/$soname.def";
6864              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6865            else
6866              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6867            fi~
6868            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6869            linknames='
6870	  # The linker will not automatically build a static lib if we build a DLL.
6871	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6872	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6873	  # Don't use ranlib
6874	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6875	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6876            lt_tool_outputfile="@TOOL_OUTPUT@"~
6877            case $lt_outputfile in
6878              *.exe|*.EXE) ;;
6879              *)
6880                lt_outputfile=$lt_outputfile.exe
6881                lt_tool_outputfile=$lt_tool_outputfile.exe
6882                ;;
6883            esac~
6884            func_to_tool_file "$lt_outputfile"~
6885            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6886              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6887              $RM "$lt_outputfile.manifest";
6888            fi'
6889	  ;;
6890	*)
6891	  # g++
6892	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6893	  # as there is no search path for DLLs.
6894	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6895	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6896	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6897	  _LT_TAGVAR(always_export_symbols, $1)=no
6898	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6899
6900	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6901	    _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'
6902	    # If the export-symbols file already is a .def file, use it as
6903	    # is; otherwise, prepend EXPORTS...
6904	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6905              cp $export_symbols $output_objdir/$soname.def;
6906            else
6907              echo EXPORTS > $output_objdir/$soname.def;
6908              cat $export_symbols >> $output_objdir/$soname.def;
6909            fi~
6910            $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'
6911	  else
6912	    _LT_TAGVAR(ld_shlibs, $1)=no
6913	  fi
6914	  ;;
6915	esac
6916	;;
6917      darwin* | rhapsody*)
6918        _LT_DARWIN_LINKER_FEATURES($1)
6919	;;
6920
6921      os2*)
6922	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6923	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6924	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6925	shrext_cmds=.dll
6926	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6927	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6928	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6929	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6930	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6931	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6932	  emximp -o $lib $output_objdir/$libname.def'
6933	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6934	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6935	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6936	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6937	  prefix_cmds="$SED"~
6938	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
6939	    prefix_cmds="$prefix_cmds -e 1d";
6940	  fi~
6941	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6942	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6943	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6944	  emximp -o $lib $output_objdir/$libname.def'
6945	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6946	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6947	;;
6948
6949      dgux*)
6950        case $cc_basename in
6951          ec++*)
6952	    # FIXME: insert proper C++ library support
6953	    _LT_TAGVAR(ld_shlibs, $1)=no
6954	    ;;
6955          ghcx*)
6956	    # Green Hills C++ Compiler
6957	    # FIXME: insert proper C++ library support
6958	    _LT_TAGVAR(ld_shlibs, $1)=no
6959	    ;;
6960          *)
6961	    # FIXME: insert proper C++ library support
6962	    _LT_TAGVAR(ld_shlibs, $1)=no
6963	    ;;
6964        esac
6965        ;;
6966
6967      freebsd2.*)
6968        # C++ shared libraries reported to be fairly broken before
6969	# switch to ELF
6970        _LT_TAGVAR(ld_shlibs, $1)=no
6971        ;;
6972
6973      freebsd-elf*)
6974        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6975        ;;
6976
6977      freebsd* | dragonfly*)
6978        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6979        # conventions
6980        _LT_TAGVAR(ld_shlibs, $1)=yes
6981        ;;
6982
6983      haiku*)
6984        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6985        _LT_TAGVAR(link_all_deplibs, $1)=yes
6986        ;;
6987
6988      hpux9*)
6989        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6990        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6991        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6992        _LT_TAGVAR(hardcode_direct, $1)=yes
6993        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6994				             # but as the default
6995				             # location of the library.
6996
6997        case $cc_basename in
6998          CC*)
6999            # FIXME: insert proper C++ library support
7000            _LT_TAGVAR(ld_shlibs, $1)=no
7001            ;;
7002          aCC*)
7003            _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'
7004            # Commands to make compiler produce verbose output that lists
7005            # what "hidden" libraries, object files and flags are used when
7006            # linking a shared library.
7007            #
7008            # There doesn't appear to be a way to prevent this compiler from
7009            # explicitly linking system object files so we need to strip them
7010            # from the output so that they don't get included in the library
7011            # dependencies.
7012            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"'
7013            ;;
7014          *)
7015            if test yes = "$GXX"; then
7016              _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'
7017            else
7018              # FIXME: insert proper C++ library support
7019              _LT_TAGVAR(ld_shlibs, $1)=no
7020            fi
7021            ;;
7022        esac
7023        ;;
7024
7025      hpux10*|hpux11*)
7026        if test no = "$with_gnu_ld"; then
7027	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7028	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7029
7030          case $host_cpu in
7031            hppa*64*|ia64*)
7032              ;;
7033            *)
7034	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7035              ;;
7036          esac
7037        fi
7038        case $host_cpu in
7039          hppa*64*|ia64*)
7040            _LT_TAGVAR(hardcode_direct, $1)=no
7041            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7042            ;;
7043          *)
7044            _LT_TAGVAR(hardcode_direct, $1)=yes
7045            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7046            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7047					         # but as the default
7048					         # location of the library.
7049            ;;
7050        esac
7051
7052        case $cc_basename in
7053          CC*)
7054	    # FIXME: insert proper C++ library support
7055	    _LT_TAGVAR(ld_shlibs, $1)=no
7056	    ;;
7057          aCC*)
7058	    case $host_cpu in
7059	      hppa*64*)
7060	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7061	        ;;
7062	      ia64*)
7063	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7064	        ;;
7065	      *)
7066	        _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'
7067	        ;;
7068	    esac
7069	    # Commands to make compiler produce verbose output that lists
7070	    # what "hidden" libraries, object files and flags are used when
7071	    # linking a shared library.
7072	    #
7073	    # There doesn't appear to be a way to prevent this compiler from
7074	    # explicitly linking system object files so we need to strip them
7075	    # from the output so that they don't get included in the library
7076	    # dependencies.
7077	    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"'
7078	    ;;
7079          *)
7080	    if test yes = "$GXX"; then
7081	      if test no = "$with_gnu_ld"; then
7082	        case $host_cpu in
7083	          hppa*64*)
7084	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7085	            ;;
7086	          ia64*)
7087	            _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'
7088	            ;;
7089	          *)
7090	            _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'
7091	            ;;
7092	        esac
7093	      fi
7094	    else
7095	      # FIXME: insert proper C++ library support
7096	      _LT_TAGVAR(ld_shlibs, $1)=no
7097	    fi
7098	    ;;
7099        esac
7100        ;;
7101
7102      interix[[3-9]]*)
7103	_LT_TAGVAR(hardcode_direct, $1)=no
7104	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7105	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7106	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7107	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7108	# Instead, shared libraries are loaded at an image base (0x10000000 by
7109	# default) and relocated if they conflict, which is a slow very memory
7110	# consuming and fragmenting process.  To avoid this, we pick a random,
7111	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7112	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7113	_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'
7114	_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'
7115	;;
7116      irix5* | irix6*)
7117        case $cc_basename in
7118          CC*)
7119	    # SGI C++
7120	    _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'
7121
7122	    # Archives containing C++ object files must be created using
7123	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7124	    # necessary to make sure instantiated templates are included
7125	    # in the archive.
7126	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7127	    ;;
7128          *)
7129	    if test yes = "$GXX"; then
7130	      if test no = "$with_gnu_ld"; then
7131	        _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'
7132	      else
7133	        _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'
7134	      fi
7135	    fi
7136	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7137	    ;;
7138        esac
7139        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7140        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7141        _LT_TAGVAR(inherit_rpath, $1)=yes
7142        ;;
7143
7144      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7145        case $cc_basename in
7146          KCC*)
7147	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7148
7149	    # KCC will only create a shared library if the output file
7150	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7151	    # to its proper name (with version) after linking.
7152	    _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'
7153	    _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'
7154	    # Commands to make compiler produce verbose output that lists
7155	    # what "hidden" libraries, object files and flags are used when
7156	    # linking a shared library.
7157	    #
7158	    # There doesn't appear to be a way to prevent this compiler from
7159	    # explicitly linking system object files so we need to strip them
7160	    # from the output so that they don't get included in the library
7161	    # dependencies.
7162	    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"'
7163
7164	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7165	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7166
7167	    # Archives containing C++ object files must be created using
7168	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7169	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7170	    ;;
7171	  icpc* | ecpc* )
7172	    # Intel C++
7173	    with_gnu_ld=yes
7174	    # version 8.0 and above of icpc choke on multiply defined symbols
7175	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7176	    # earlier do not add the objects themselves.
7177	    case `$CC -V 2>&1` in
7178	      *"Version 7."*)
7179	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7180		_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'
7181		;;
7182	      *)  # Version 8.0 or newer
7183	        tmp_idyn=
7184	        case $host_cpu in
7185		  ia64*) tmp_idyn=' -i_dynamic';;
7186		esac
7187	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7188		_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'
7189		;;
7190	    esac
7191	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7192	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7193	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7194	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7195	    ;;
7196          pgCC* | pgcpp*)
7197            # Portland Group C++ compiler
7198	    case `$CC -V` in
7199	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7200	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7201               rm -rf $tpldir~
7202               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7203               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7204	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7205                rm -rf $tpldir~
7206                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7207                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7208                $RANLIB $oldlib'
7209	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7210                rm -rf $tpldir~
7211                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7212                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7213	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7214                rm -rf $tpldir~
7215                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7216                $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'
7217	      ;;
7218	    *) # Version 6 and above use weak symbols
7219	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7220	      _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'
7221	      ;;
7222	    esac
7223
7224	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7225	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7226	    _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'
7227            ;;
7228	  cxx*)
7229	    # Compaq C++
7230	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7231	    _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'
7232
7233	    runpath_var=LD_RUN_PATH
7234	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7235	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7236
7237	    # Commands to make compiler produce verbose output that lists
7238	    # what "hidden" libraries, object files and flags are used when
7239	    # linking a shared library.
7240	    #
7241	    # There doesn't appear to be a way to prevent this compiler from
7242	    # explicitly linking system object files so we need to strip them
7243	    # from the output so that they don't get included in the library
7244	    # dependencies.
7245	    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'
7246	    ;;
7247	  xl* | mpixl* | bgxl*)
7248	    # IBM XL 8.0 on PPC, with GNU ld
7249	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7250	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7251	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7252	    if test yes = "$supports_anon_versioning"; then
7253	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7254                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7255                echo "local: *; };" >> $output_objdir/$libname.ver~
7256                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7257	    fi
7258	    ;;
7259	  *)
7260	    case `$CC -V 2>&1 | sed 5q` in
7261	    *Sun\ C*)
7262	      # Sun C++ 5.9
7263	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7264	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7265	      _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'
7266	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7267	      _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'
7268	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7269
7270	      # Not sure whether something based on
7271	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7272	      # would be better.
7273	      output_verbose_link_cmd='func_echo_all'
7274
7275	      # Archives containing C++ object files must be created using
7276	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7277	      # necessary to make sure instantiated templates are included
7278	      # in the archive.
7279	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7280	      ;;
7281	    esac
7282	    ;;
7283	esac
7284	;;
7285
7286      lynxos*)
7287        # FIXME: insert proper C++ library support
7288	_LT_TAGVAR(ld_shlibs, $1)=no
7289	;;
7290
7291      m88k*)
7292        # FIXME: insert proper C++ library support
7293        _LT_TAGVAR(ld_shlibs, $1)=no
7294	;;
7295
7296      mvs*)
7297        case $cc_basename in
7298          cxx*)
7299	    # FIXME: insert proper C++ library support
7300	    _LT_TAGVAR(ld_shlibs, $1)=no
7301	    ;;
7302	  *)
7303	    # FIXME: insert proper C++ library support
7304	    _LT_TAGVAR(ld_shlibs, $1)=no
7305	    ;;
7306	esac
7307	;;
7308
7309      netbsd*)
7310        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7311	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7312	  wlarc=
7313	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7314	  _LT_TAGVAR(hardcode_direct, $1)=yes
7315	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7316	fi
7317	# Workaround some broken pre-1.5 toolchains
7318	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7319	;;
7320
7321      *nto* | *qnx*)
7322        _LT_TAGVAR(ld_shlibs, $1)=yes
7323	;;
7324
7325      openbsd* | bitrig*)
7326	if test -f /usr/libexec/ld.so; then
7327	  _LT_TAGVAR(hardcode_direct, $1)=yes
7328	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7329	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7330	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7331	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7332	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7333	    _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'
7334	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7335	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7336	  fi
7337	  output_verbose_link_cmd=func_echo_all
7338	else
7339	  _LT_TAGVAR(ld_shlibs, $1)=no
7340	fi
7341	;;
7342
7343      osf3* | osf4* | osf5*)
7344        case $cc_basename in
7345          KCC*)
7346	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7347
7348	    # KCC will only create a shared library if the output file
7349	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7350	    # to its proper name (with version) after linking.
7351	    _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'
7352
7353	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7354	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7355
7356	    # Archives containing C++ object files must be created using
7357	    # the KAI C++ compiler.
7358	    case $host in
7359	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7360	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7361	    esac
7362	    ;;
7363          RCC*)
7364	    # Rational C++ 2.4.1
7365	    # FIXME: insert proper C++ library support
7366	    _LT_TAGVAR(ld_shlibs, $1)=no
7367	    ;;
7368          cxx*)
7369	    case $host in
7370	      osf3*)
7371	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7372	        _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'
7373	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7374		;;
7375	      *)
7376	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7377	        _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'
7378	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7379                  echo "-hidden">> $lib.exp~
7380                  $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~
7381                  $RM $lib.exp'
7382	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7383		;;
7384	    esac
7385
7386	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7387
7388	    # Commands to make compiler produce verbose output that lists
7389	    # what "hidden" libraries, object files and flags are used when
7390	    # linking a shared library.
7391	    #
7392	    # There doesn't appear to be a way to prevent this compiler from
7393	    # explicitly linking system object files so we need to strip them
7394	    # from the output so that they don't get included in the library
7395	    # dependencies.
7396	    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"'
7397	    ;;
7398	  *)
7399	    if test yes,no = "$GXX,$with_gnu_ld"; then
7400	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7401	      case $host in
7402	        osf3*)
7403	          _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'
7404		  ;;
7405	        *)
7406	          _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'
7407		  ;;
7408	      esac
7409
7410	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7411	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7412
7413	      # Commands to make compiler produce verbose output that lists
7414	      # what "hidden" libraries, object files and flags are used when
7415	      # linking a shared library.
7416	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7417
7418	    else
7419	      # FIXME: insert proper C++ library support
7420	      _LT_TAGVAR(ld_shlibs, $1)=no
7421	    fi
7422	    ;;
7423        esac
7424        ;;
7425
7426      psos*)
7427        # FIXME: insert proper C++ library support
7428        _LT_TAGVAR(ld_shlibs, $1)=no
7429        ;;
7430
7431      sunos4*)
7432        case $cc_basename in
7433          CC*)
7434	    # Sun C++ 4.x
7435	    # FIXME: insert proper C++ library support
7436	    _LT_TAGVAR(ld_shlibs, $1)=no
7437	    ;;
7438          lcc*)
7439	    # Lucid
7440	    # FIXME: insert proper C++ library support
7441	    _LT_TAGVAR(ld_shlibs, $1)=no
7442	    ;;
7443          *)
7444	    # FIXME: insert proper C++ library support
7445	    _LT_TAGVAR(ld_shlibs, $1)=no
7446	    ;;
7447        esac
7448        ;;
7449
7450      solaris*)
7451        case $cc_basename in
7452          CC* | sunCC*)
7453	    # Sun C++ 4.2, 5.x and Centerline C++
7454            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7455	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7456	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7457	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7458              $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'
7459
7460	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7461	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7462	    case $host_os in
7463	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7464	      *)
7465		# The compiler driver will combine and reorder linker options,
7466		# but understands '-z linker_flag'.
7467	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7468		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7469	        ;;
7470	    esac
7471	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7472
7473	    output_verbose_link_cmd='func_echo_all'
7474
7475	    # Archives containing C++ object files must be created using
7476	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7477	    # necessary to make sure instantiated templates are included
7478	    # in the archive.
7479	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7480	    ;;
7481          gcx*)
7482	    # Green Hills C++ Compiler
7483	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7484
7485	    # The C++ compiler must be used to create the archive.
7486	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7487	    ;;
7488          *)
7489	    # GNU C++ compiler with Solaris linker
7490	    if test yes,no = "$GXX,$with_gnu_ld"; then
7491	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7492	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7493	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7494	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7495                  $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'
7496
7497	        # Commands to make compiler produce verbose output that lists
7498	        # what "hidden" libraries, object files and flags are used when
7499	        # linking a shared library.
7500	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7501	      else
7502	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
7503	        # platform.
7504	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7505	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7506                  $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'
7507
7508	        # Commands to make compiler produce verbose output that lists
7509	        # what "hidden" libraries, object files and flags are used when
7510	        # linking a shared library.
7511	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7512	      fi
7513
7514	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7515	      case $host_os in
7516		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7517		*)
7518		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7519		  ;;
7520	      esac
7521	    fi
7522	    ;;
7523        esac
7524        ;;
7525
7526    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7527      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7528      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7529      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7530      runpath_var='LD_RUN_PATH'
7531
7532      case $cc_basename in
7533        CC*)
7534	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7535	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7536	  ;;
7537	*)
7538	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7539	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7540	  ;;
7541      esac
7542      ;;
7543
7544      sysv5* | sco3.2v5* | sco5v6*)
7545	# Note: We CANNOT use -z defs as we might desire, because we do not
7546	# link with -lc, and that would cause any symbols used from libc to
7547	# always be unresolved, which means just about no library would
7548	# ever link correctly.  If we're not using GNU ld we use -z text
7549	# though, which does catch some bad symbols but isn't as heavy-handed
7550	# as -z defs.
7551	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7552	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7553	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7554	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7555	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7556	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7557	_LT_TAGVAR(link_all_deplibs, $1)=yes
7558	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7559	runpath_var='LD_RUN_PATH'
7560
7561	case $cc_basename in
7562          CC*)
7563	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7564	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7565	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7566              '"$_LT_TAGVAR(old_archive_cmds, $1)"
7567	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7568              '"$_LT_TAGVAR(reload_cmds, $1)"
7569	    ;;
7570	  *)
7571	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7572	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7573	    ;;
7574	esac
7575      ;;
7576
7577      tandem*)
7578        case $cc_basename in
7579          NCC*)
7580	    # NonStop-UX NCC 3.20
7581	    # FIXME: insert proper C++ library support
7582	    _LT_TAGVAR(ld_shlibs, $1)=no
7583	    ;;
7584          *)
7585	    # FIXME: insert proper C++ library support
7586	    _LT_TAGVAR(ld_shlibs, $1)=no
7587	    ;;
7588        esac
7589        ;;
7590
7591      vxworks*)
7592        # FIXME: insert proper C++ library support
7593        _LT_TAGVAR(ld_shlibs, $1)=no
7594        ;;
7595
7596      *)
7597        # FIXME: insert proper C++ library support
7598        _LT_TAGVAR(ld_shlibs, $1)=no
7599        ;;
7600    esac
7601
7602    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7603    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7604
7605    _LT_TAGVAR(GCC, $1)=$GXX
7606    _LT_TAGVAR(LD, $1)=$LD
7607
7608    ## CAVEAT EMPTOR:
7609    ## There is no encapsulation within the following macros, do not change
7610    ## the running order or otherwise move them around unless you know exactly
7611    ## what you are doing...
7612    _LT_SYS_HIDDEN_LIBDEPS($1)
7613    _LT_COMPILER_PIC($1)
7614    _LT_COMPILER_C_O($1)
7615    _LT_COMPILER_FILE_LOCKS($1)
7616    _LT_LINKER_SHLIBS($1)
7617    _LT_SYS_DYNAMIC_LINKER($1)
7618    _LT_LINKER_HARDCODE_LIBPATH($1)
7619
7620    _LT_CONFIG($1)
7621  fi # test -n "$compiler"
7622
7623  CC=$lt_save_CC
7624  CFLAGS=$lt_save_CFLAGS
7625  LDCXX=$LD
7626  LD=$lt_save_LD
7627  GCC=$lt_save_GCC
7628  with_gnu_ld=$lt_save_with_gnu_ld
7629  lt_cv_path_LDCXX=$lt_cv_path_LD
7630  lt_cv_path_LD=$lt_save_path_LD
7631  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7632  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7633fi # test yes != "$_lt_caught_CXX_error"
7634
7635AC_LANG_POP
7636])# _LT_LANG_CXX_CONFIG
7637
7638
7639# _LT_FUNC_STRIPNAME_CNF
7640# ----------------------
7641# func_stripname_cnf prefix suffix name
7642# strip PREFIX and SUFFIX off of NAME.
7643# PREFIX and SUFFIX must not contain globbing or regex special
7644# characters, hashes, percent signs, but SUFFIX may contain a leading
7645# dot (in which case that matches only a dot).
7646#
7647# This function is identical to the (non-XSI) version of func_stripname,
7648# except this one can be used by m4 code that may be executed by configure,
7649# rather than the libtool script.
7650m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7651AC_REQUIRE([_LT_DECL_SED])
7652AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7653func_stripname_cnf ()
7654{
7655  case @S|@2 in
7656  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7657  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7658  esac
7659} # func_stripname_cnf
7660])# _LT_FUNC_STRIPNAME_CNF
7661
7662
7663# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7664# ---------------------------------
7665# Figure out "hidden" library dependencies from verbose
7666# compiler output when linking a shared library.
7667# Parse the compiler output and extract the necessary
7668# objects, libraries and library flags.
7669m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7670[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7671AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7672# Dependencies to place before and after the object being linked:
7673_LT_TAGVAR(predep_objects, $1)=
7674_LT_TAGVAR(postdep_objects, $1)=
7675_LT_TAGVAR(predeps, $1)=
7676_LT_TAGVAR(postdeps, $1)=
7677_LT_TAGVAR(compiler_lib_search_path, $1)=
7678
7679dnl we can't use the lt_simple_compile_test_code here,
7680dnl because it contains code intended for an executable,
7681dnl not a library.  It's possible we should let each
7682dnl tag define a new lt_????_link_test_code variable,
7683dnl but it's only used here...
7684m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7685int a;
7686void foo (void) { a = 0; }
7687_LT_EOF
7688], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7689class Foo
7690{
7691public:
7692  Foo (void) { a = 0; }
7693private:
7694  int a;
7695};
7696_LT_EOF
7697], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7698      subroutine foo
7699      implicit none
7700      integer*4 a
7701      a=0
7702      return
7703      end
7704_LT_EOF
7705], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7706      subroutine foo
7707      implicit none
7708      integer a
7709      a=0
7710      return
7711      end
7712_LT_EOF
7713], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7714public class foo {
7715  private int a;
7716  public void bar (void) {
7717    a = 0;
7718  }
7719};
7720_LT_EOF
7721], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7722package foo
7723func foo() {
7724}
7725_LT_EOF
7726])
7727
7728_lt_libdeps_save_CFLAGS=$CFLAGS
7729case "$CC $CFLAGS " in #(
7730*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7731*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7732*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7733esac
7734
7735dnl Parse the compiler output and extract the necessary
7736dnl objects, libraries and library flags.
7737if AC_TRY_EVAL(ac_compile); then
7738  # Parse the compiler output and extract the necessary
7739  # objects, libraries and library flags.
7740
7741  # Sentinel used to keep track of whether or not we are before
7742  # the conftest object file.
7743  pre_test_object_deps_done=no
7744
7745  for p in `eval "$output_verbose_link_cmd"`; do
7746    case $prev$p in
7747
7748    -L* | -R* | -l*)
7749       # Some compilers place space between "-{L,R}" and the path.
7750       # Remove the space.
7751       if test x-L = "$p" ||
7752          test x-R = "$p"; then
7753	 prev=$p
7754	 continue
7755       fi
7756
7757       # Expand the sysroot to ease extracting the directories later.
7758       if test -z "$prev"; then
7759         case $p in
7760         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7761         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7762         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7763         esac
7764       fi
7765       case $p in
7766       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7767       esac
7768       if test no = "$pre_test_object_deps_done"; then
7769	 case $prev in
7770	 -L | -R)
7771	   # Internal compiler library paths should come after those
7772	   # provided the user.  The postdeps already come after the
7773	   # user supplied libs so there is no need to process them.
7774	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7775	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7776	   else
7777	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7778	   fi
7779	   ;;
7780	 # The "-l" case would never come before the object being
7781	 # linked, so don't bother handling this case.
7782	 esac
7783       else
7784	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7785	   _LT_TAGVAR(postdeps, $1)=$prev$p
7786	 else
7787	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7788	 fi
7789       fi
7790       prev=
7791       ;;
7792
7793    *.lto.$objext) ;; # Ignore GCC LTO objects
7794    *.$objext)
7795       # This assumes that the test object file only shows up
7796       # once in the compiler output.
7797       if test "$p" = "conftest.$objext"; then
7798	 pre_test_object_deps_done=yes
7799	 continue
7800       fi
7801
7802       if test no = "$pre_test_object_deps_done"; then
7803	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7804	   _LT_TAGVAR(predep_objects, $1)=$p
7805	 else
7806	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7807	 fi
7808       else
7809	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7810	   _LT_TAGVAR(postdep_objects, $1)=$p
7811	 else
7812	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7813	 fi
7814       fi
7815       ;;
7816
7817    *) ;; # Ignore the rest.
7818
7819    esac
7820  done
7821
7822  # Clean up.
7823  rm -f a.out a.exe
7824else
7825  echo "libtool.m4: error: problem compiling $1 test program"
7826fi
7827
7828$RM -f confest.$objext
7829CFLAGS=$_lt_libdeps_save_CFLAGS
7830
7831# PORTME: override above test on systems where it is broken
7832m4_if([$1], [CXX],
7833[case $host_os in
7834interix[[3-9]]*)
7835  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7836  # hack all around it, let's just trust "g++" to DTRT.
7837  _LT_TAGVAR(predep_objects,$1)=
7838  _LT_TAGVAR(postdep_objects,$1)=
7839  _LT_TAGVAR(postdeps,$1)=
7840  ;;
7841esac
7842])
7843
7844case " $_LT_TAGVAR(postdeps, $1) " in
7845*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7846esac
7847 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7848if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7849 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7850fi
7851_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7852    [The directories searched by this compiler when creating a shared library])
7853_LT_TAGDECL([], [predep_objects], [1],
7854    [Dependencies to place before and after the objects being linked to
7855    create a shared library])
7856_LT_TAGDECL([], [postdep_objects], [1])
7857_LT_TAGDECL([], [predeps], [1])
7858_LT_TAGDECL([], [postdeps], [1])
7859_LT_TAGDECL([], [compiler_lib_search_path], [1],
7860    [The library search path used internally by the compiler when linking
7861    a shared library])
7862])# _LT_SYS_HIDDEN_LIBDEPS
7863
7864
7865# _LT_LANG_F77_CONFIG([TAG])
7866# --------------------------
7867# Ensure that the configuration variables for a Fortran 77 compiler are
7868# suitably defined.  These variables are subsequently used by _LT_CONFIG
7869# to write the compiler configuration to 'libtool'.
7870m4_defun([_LT_LANG_F77_CONFIG],
7871[AC_LANG_PUSH(Fortran 77)
7872if test -z "$F77" || test no = "$F77"; then
7873  _lt_disable_F77=yes
7874fi
7875
7876_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7877_LT_TAGVAR(allow_undefined_flag, $1)=
7878_LT_TAGVAR(always_export_symbols, $1)=no
7879_LT_TAGVAR(archive_expsym_cmds, $1)=
7880_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7881_LT_TAGVAR(hardcode_direct, $1)=no
7882_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7883_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7884_LT_TAGVAR(hardcode_libdir_separator, $1)=
7885_LT_TAGVAR(hardcode_minus_L, $1)=no
7886_LT_TAGVAR(hardcode_automatic, $1)=no
7887_LT_TAGVAR(inherit_rpath, $1)=no
7888_LT_TAGVAR(module_cmds, $1)=
7889_LT_TAGVAR(module_expsym_cmds, $1)=
7890_LT_TAGVAR(link_all_deplibs, $1)=unknown
7891_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7892_LT_TAGVAR(reload_flag, $1)=$reload_flag
7893_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7894_LT_TAGVAR(no_undefined_flag, $1)=
7895_LT_TAGVAR(whole_archive_flag_spec, $1)=
7896_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7897
7898# Source file extension for f77 test sources.
7899ac_ext=f
7900
7901# Object file extension for compiled f77 test sources.
7902objext=o
7903_LT_TAGVAR(objext, $1)=$objext
7904
7905# No sense in running all these tests if we already determined that
7906# the F77 compiler isn't working.  Some variables (like enable_shared)
7907# are currently assumed to apply to all compilers on this platform,
7908# and will be corrupted by setting them based on a non-working compiler.
7909if test yes != "$_lt_disable_F77"; then
7910  # Code to be used in simple compile tests
7911  lt_simple_compile_test_code="\
7912      subroutine t
7913      return
7914      end
7915"
7916
7917  # Code to be used in simple link tests
7918  lt_simple_link_test_code="\
7919      program t
7920      end
7921"
7922
7923  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7924  _LT_TAG_COMPILER
7925
7926  # save warnings/boilerplate of simple test code
7927  _LT_COMPILER_BOILERPLATE
7928  _LT_LINKER_BOILERPLATE
7929
7930  # Allow CC to be a program name with arguments.
7931  lt_save_CC=$CC
7932  lt_save_GCC=$GCC
7933  lt_save_CFLAGS=$CFLAGS
7934  CC=${F77-"f77"}
7935  CFLAGS=$FFLAGS
7936  compiler=$CC
7937  _LT_TAGVAR(compiler, $1)=$CC
7938  _LT_CC_BASENAME([$compiler])
7939  GCC=$G77
7940  if test -n "$compiler"; then
7941    AC_MSG_CHECKING([if libtool supports shared libraries])
7942    AC_MSG_RESULT([$can_build_shared])
7943
7944    AC_MSG_CHECKING([whether to build shared libraries])
7945    test no = "$can_build_shared" && enable_shared=no
7946
7947    # On AIX, shared libraries and static libraries use the same namespace, and
7948    # are all built from PIC.
7949    case $host_os in
7950      aix3*)
7951        test yes = "$enable_shared" && enable_static=no
7952        if test -n "$RANLIB"; then
7953          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7954          postinstall_cmds='$RANLIB $lib'
7955        fi
7956        ;;
7957      aix[[4-9]]*)
7958	if test ia64 != "$host_cpu"; then
7959	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7960	  yes,aix,yes) ;;		# shared object as lib.so file only
7961	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7962	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7963	  esac
7964	fi
7965        ;;
7966    esac
7967    AC_MSG_RESULT([$enable_shared])
7968
7969    AC_MSG_CHECKING([whether to build static libraries])
7970    # Make sure either enable_shared or enable_static is yes.
7971    test yes = "$enable_shared" || enable_static=yes
7972    AC_MSG_RESULT([$enable_static])
7973
7974    _LT_TAGVAR(GCC, $1)=$G77
7975    _LT_TAGVAR(LD, $1)=$LD
7976
7977    ## CAVEAT EMPTOR:
7978    ## There is no encapsulation within the following macros, do not change
7979    ## the running order or otherwise move them around unless you know exactly
7980    ## what you are doing...
7981    _LT_COMPILER_PIC($1)
7982    _LT_COMPILER_C_O($1)
7983    _LT_COMPILER_FILE_LOCKS($1)
7984    _LT_LINKER_SHLIBS($1)
7985    _LT_SYS_DYNAMIC_LINKER($1)
7986    _LT_LINKER_HARDCODE_LIBPATH($1)
7987
7988    _LT_CONFIG($1)
7989  fi # test -n "$compiler"
7990
7991  GCC=$lt_save_GCC
7992  CC=$lt_save_CC
7993  CFLAGS=$lt_save_CFLAGS
7994fi # test yes != "$_lt_disable_F77"
7995
7996AC_LANG_POP
7997])# _LT_LANG_F77_CONFIG
7998
7999
8000# _LT_LANG_FC_CONFIG([TAG])
8001# -------------------------
8002# Ensure that the configuration variables for a Fortran compiler are
8003# suitably defined.  These variables are subsequently used by _LT_CONFIG
8004# to write the compiler configuration to 'libtool'.
8005m4_defun([_LT_LANG_FC_CONFIG],
8006[AC_LANG_PUSH(Fortran)
8007
8008if test -z "$FC" || test no = "$FC"; then
8009  _lt_disable_FC=yes
8010fi
8011
8012_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8013_LT_TAGVAR(allow_undefined_flag, $1)=
8014_LT_TAGVAR(always_export_symbols, $1)=no
8015_LT_TAGVAR(archive_expsym_cmds, $1)=
8016_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8017_LT_TAGVAR(hardcode_direct, $1)=no
8018_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8019_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8020_LT_TAGVAR(hardcode_libdir_separator, $1)=
8021_LT_TAGVAR(hardcode_minus_L, $1)=no
8022_LT_TAGVAR(hardcode_automatic, $1)=no
8023_LT_TAGVAR(inherit_rpath, $1)=no
8024_LT_TAGVAR(module_cmds, $1)=
8025_LT_TAGVAR(module_expsym_cmds, $1)=
8026_LT_TAGVAR(link_all_deplibs, $1)=unknown
8027_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8028_LT_TAGVAR(reload_flag, $1)=$reload_flag
8029_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8030_LT_TAGVAR(no_undefined_flag, $1)=
8031_LT_TAGVAR(whole_archive_flag_spec, $1)=
8032_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8033
8034# Source file extension for fc test sources.
8035ac_ext=${ac_fc_srcext-f}
8036
8037# Object file extension for compiled fc test sources.
8038objext=o
8039_LT_TAGVAR(objext, $1)=$objext
8040
8041# No sense in running all these tests if we already determined that
8042# the FC compiler isn't working.  Some variables (like enable_shared)
8043# are currently assumed to apply to all compilers on this platform,
8044# and will be corrupted by setting them based on a non-working compiler.
8045if test yes != "$_lt_disable_FC"; then
8046  # Code to be used in simple compile tests
8047  lt_simple_compile_test_code="\
8048      subroutine t
8049      return
8050      end
8051"
8052
8053  # Code to be used in simple link tests
8054  lt_simple_link_test_code="\
8055      program t
8056      end
8057"
8058
8059  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8060  _LT_TAG_COMPILER
8061
8062  # save warnings/boilerplate of simple test code
8063  _LT_COMPILER_BOILERPLATE
8064  _LT_LINKER_BOILERPLATE
8065
8066  # Allow CC to be a program name with arguments.
8067  lt_save_CC=$CC
8068  lt_save_GCC=$GCC
8069  lt_save_CFLAGS=$CFLAGS
8070  CC=${FC-"f95"}
8071  CFLAGS=$FCFLAGS
8072  compiler=$CC
8073  GCC=$ac_cv_fc_compiler_gnu
8074
8075  _LT_TAGVAR(compiler, $1)=$CC
8076  _LT_CC_BASENAME([$compiler])
8077
8078  if test -n "$compiler"; then
8079    AC_MSG_CHECKING([if libtool supports shared libraries])
8080    AC_MSG_RESULT([$can_build_shared])
8081
8082    AC_MSG_CHECKING([whether to build shared libraries])
8083    test no = "$can_build_shared" && enable_shared=no
8084
8085    # On AIX, shared libraries and static libraries use the same namespace, and
8086    # are all built from PIC.
8087    case $host_os in
8088      aix3*)
8089        test yes = "$enable_shared" && enable_static=no
8090        if test -n "$RANLIB"; then
8091          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8092          postinstall_cmds='$RANLIB $lib'
8093        fi
8094        ;;
8095      aix[[4-9]]*)
8096	if test ia64 != "$host_cpu"; then
8097	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
8098	  yes,aix,yes) ;;		# shared object as lib.so file only
8099	  yes,svr4,*) ;;		# shared object as lib.so archive member only
8100	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
8101	  esac
8102	fi
8103        ;;
8104    esac
8105    AC_MSG_RESULT([$enable_shared])
8106
8107    AC_MSG_CHECKING([whether to build static libraries])
8108    # Make sure either enable_shared or enable_static is yes.
8109    test yes = "$enable_shared" || enable_static=yes
8110    AC_MSG_RESULT([$enable_static])
8111
8112    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
8113    _LT_TAGVAR(LD, $1)=$LD
8114
8115    ## CAVEAT EMPTOR:
8116    ## There is no encapsulation within the following macros, do not change
8117    ## the running order or otherwise move them around unless you know exactly
8118    ## what you are doing...
8119    _LT_SYS_HIDDEN_LIBDEPS($1)
8120    _LT_COMPILER_PIC($1)
8121    _LT_COMPILER_C_O($1)
8122    _LT_COMPILER_FILE_LOCKS($1)
8123    _LT_LINKER_SHLIBS($1)
8124    _LT_SYS_DYNAMIC_LINKER($1)
8125    _LT_LINKER_HARDCODE_LIBPATH($1)
8126
8127    _LT_CONFIG($1)
8128  fi # test -n "$compiler"
8129
8130  GCC=$lt_save_GCC
8131  CC=$lt_save_CC
8132  CFLAGS=$lt_save_CFLAGS
8133fi # test yes != "$_lt_disable_FC"
8134
8135AC_LANG_POP
8136])# _LT_LANG_FC_CONFIG
8137
8138
8139# _LT_LANG_GCJ_CONFIG([TAG])
8140# --------------------------
8141# Ensure that the configuration variables for the GNU Java Compiler compiler
8142# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8143# to write the compiler configuration to 'libtool'.
8144m4_defun([_LT_LANG_GCJ_CONFIG],
8145[AC_REQUIRE([LT_PROG_GCJ])dnl
8146AC_LANG_SAVE
8147
8148# Source file extension for Java test sources.
8149ac_ext=java
8150
8151# Object file extension for compiled Java test sources.
8152objext=o
8153_LT_TAGVAR(objext, $1)=$objext
8154
8155# Code to be used in simple compile tests
8156lt_simple_compile_test_code="class foo {}"
8157
8158# Code to be used in simple link tests
8159lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8160
8161# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8162_LT_TAG_COMPILER
8163
8164# save warnings/boilerplate of simple test code
8165_LT_COMPILER_BOILERPLATE
8166_LT_LINKER_BOILERPLATE
8167
8168# Allow CC to be a program name with arguments.
8169lt_save_CC=$CC
8170lt_save_CFLAGS=$CFLAGS
8171lt_save_GCC=$GCC
8172GCC=yes
8173CC=${GCJ-"gcj"}
8174CFLAGS=$GCJFLAGS
8175compiler=$CC
8176_LT_TAGVAR(compiler, $1)=$CC
8177_LT_TAGVAR(LD, $1)=$LD
8178_LT_CC_BASENAME([$compiler])
8179
8180# GCJ did not exist at the time GCC didn't implicitly link libc in.
8181_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8182
8183_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8184_LT_TAGVAR(reload_flag, $1)=$reload_flag
8185_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8186
8187if test -n "$compiler"; then
8188  _LT_COMPILER_NO_RTTI($1)
8189  _LT_COMPILER_PIC($1)
8190  _LT_COMPILER_C_O($1)
8191  _LT_COMPILER_FILE_LOCKS($1)
8192  _LT_LINKER_SHLIBS($1)
8193  _LT_LINKER_HARDCODE_LIBPATH($1)
8194
8195  _LT_CONFIG($1)
8196fi
8197
8198AC_LANG_RESTORE
8199
8200GCC=$lt_save_GCC
8201CC=$lt_save_CC
8202CFLAGS=$lt_save_CFLAGS
8203])# _LT_LANG_GCJ_CONFIG
8204
8205
8206# _LT_LANG_GO_CONFIG([TAG])
8207# --------------------------
8208# Ensure that the configuration variables for the GNU Go compiler
8209# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8210# to write the compiler configuration to 'libtool'.
8211m4_defun([_LT_LANG_GO_CONFIG],
8212[AC_REQUIRE([LT_PROG_GO])dnl
8213AC_LANG_SAVE
8214
8215# Source file extension for Go test sources.
8216ac_ext=go
8217
8218# Object file extension for compiled Go test sources.
8219objext=o
8220_LT_TAGVAR(objext, $1)=$objext
8221
8222# Code to be used in simple compile tests
8223lt_simple_compile_test_code="package main; func main() { }"
8224
8225# Code to be used in simple link tests
8226lt_simple_link_test_code='package main; func main() { }'
8227
8228# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8229_LT_TAG_COMPILER
8230
8231# save warnings/boilerplate of simple test code
8232_LT_COMPILER_BOILERPLATE
8233_LT_LINKER_BOILERPLATE
8234
8235# Allow CC to be a program name with arguments.
8236lt_save_CC=$CC
8237lt_save_CFLAGS=$CFLAGS
8238lt_save_GCC=$GCC
8239GCC=yes
8240CC=${GOC-"gccgo"}
8241CFLAGS=$GOFLAGS
8242compiler=$CC
8243_LT_TAGVAR(compiler, $1)=$CC
8244_LT_TAGVAR(LD, $1)=$LD
8245_LT_CC_BASENAME([$compiler])
8246
8247# Go did not exist at the time GCC didn't implicitly link libc in.
8248_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8249
8250_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8251_LT_TAGVAR(reload_flag, $1)=$reload_flag
8252_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8253
8254if test -n "$compiler"; then
8255  _LT_COMPILER_NO_RTTI($1)
8256  _LT_COMPILER_PIC($1)
8257  _LT_COMPILER_C_O($1)
8258  _LT_COMPILER_FILE_LOCKS($1)
8259  _LT_LINKER_SHLIBS($1)
8260  _LT_LINKER_HARDCODE_LIBPATH($1)
8261
8262  _LT_CONFIG($1)
8263fi
8264
8265AC_LANG_RESTORE
8266
8267GCC=$lt_save_GCC
8268CC=$lt_save_CC
8269CFLAGS=$lt_save_CFLAGS
8270])# _LT_LANG_GO_CONFIG
8271
8272
8273# _LT_LANG_RC_CONFIG([TAG])
8274# -------------------------
8275# Ensure that the configuration variables for the Windows resource compiler
8276# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8277# to write the compiler configuration to 'libtool'.
8278m4_defun([_LT_LANG_RC_CONFIG],
8279[AC_REQUIRE([LT_PROG_RC])dnl
8280AC_LANG_SAVE
8281
8282# Source file extension for RC test sources.
8283ac_ext=rc
8284
8285# Object file extension for compiled RC test sources.
8286objext=o
8287_LT_TAGVAR(objext, $1)=$objext
8288
8289# Code to be used in simple compile tests
8290lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8291
8292# Code to be used in simple link tests
8293lt_simple_link_test_code=$lt_simple_compile_test_code
8294
8295# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8296_LT_TAG_COMPILER
8297
8298# save warnings/boilerplate of simple test code
8299_LT_COMPILER_BOILERPLATE
8300_LT_LINKER_BOILERPLATE
8301
8302# Allow CC to be a program name with arguments.
8303lt_save_CC=$CC
8304lt_save_CFLAGS=$CFLAGS
8305lt_save_GCC=$GCC
8306GCC=
8307CC=${RC-"windres"}
8308CFLAGS=
8309compiler=$CC
8310_LT_TAGVAR(compiler, $1)=$CC
8311_LT_CC_BASENAME([$compiler])
8312_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8313
8314if test -n "$compiler"; then
8315  :
8316  _LT_CONFIG($1)
8317fi
8318
8319GCC=$lt_save_GCC
8320AC_LANG_RESTORE
8321CC=$lt_save_CC
8322CFLAGS=$lt_save_CFLAGS
8323])# _LT_LANG_RC_CONFIG
8324
8325
8326# LT_PROG_GCJ
8327# -----------
8328AC_DEFUN([LT_PROG_GCJ],
8329[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8330  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8331    [AC_CHECK_TOOL(GCJ, gcj,)
8332      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8333      AC_SUBST(GCJFLAGS)])])[]dnl
8334])
8335
8336# Old name:
8337AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8338dnl aclocal-1.4 backwards compatibility:
8339dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8340
8341
8342# LT_PROG_GO
8343# ----------
8344AC_DEFUN([LT_PROG_GO],
8345[AC_CHECK_TOOL(GOC, gccgo,)
8346])
8347
8348
8349# LT_PROG_RC
8350# ----------
8351AC_DEFUN([LT_PROG_RC],
8352[AC_CHECK_TOOL(RC, windres,)
8353])
8354
8355# Old name:
8356AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8357dnl aclocal-1.4 backwards compatibility:
8358dnl AC_DEFUN([LT_AC_PROG_RC], [])
8359
8360
8361# _LT_DECL_EGREP
8362# --------------
8363# If we don't have a new enough Autoconf to choose the best grep
8364# available, choose the one first in the user's PATH.
8365m4_defun([_LT_DECL_EGREP],
8366[AC_REQUIRE([AC_PROG_EGREP])dnl
8367AC_REQUIRE([AC_PROG_FGREP])dnl
8368test -z "$GREP" && GREP=grep
8369_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8370_LT_DECL([], [EGREP], [1], [An ERE matcher])
8371_LT_DECL([], [FGREP], [1], [A literal string matcher])
8372dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8373AC_SUBST([GREP])
8374])
8375
8376
8377# _LT_DECL_OBJDUMP
8378# --------------
8379# If we don't have a new enough Autoconf to choose the best objdump
8380# available, choose the one first in the user's PATH.
8381m4_defun([_LT_DECL_OBJDUMP],
8382[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8383test -z "$OBJDUMP" && OBJDUMP=objdump
8384_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8385AC_SUBST([OBJDUMP])
8386])
8387
8388# _LT_DECL_DLLTOOL
8389# ----------------
8390# Ensure DLLTOOL variable is set.
8391m4_defun([_LT_DECL_DLLTOOL],
8392[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8393test -z "$DLLTOOL" && DLLTOOL=dlltool
8394_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8395AC_SUBST([DLLTOOL])
8396])
8397
8398# _LT_DECL_SED
8399# ------------
8400# Check for a fully-functional sed program, that truncates
8401# as few characters as possible.  Prefer GNU sed if found.
8402m4_defun([_LT_DECL_SED],
8403[AC_PROG_SED
8404test -z "$SED" && SED=sed
8405Xsed="$SED -e 1s/^X//"
8406_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8407_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8408    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8409])# _LT_DECL_SED
8410
8411m4_ifndef([AC_PROG_SED], [
8412# NOTE: This macro has been submitted for inclusion into   #
8413#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8414#  a released version of Autoconf we should remove this    #
8415#  macro and use it instead.                               #
8416
8417m4_defun([AC_PROG_SED],
8418[AC_MSG_CHECKING([for a sed that does not truncate output])
8419AC_CACHE_VAL(lt_cv_path_SED,
8420[# Loop through the user's path and test for sed and gsed.
8421# Then use that list of sed's as ones to test for truncation.
8422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8423for as_dir in $PATH
8424do
8425  IFS=$as_save_IFS
8426  test -z "$as_dir" && as_dir=.
8427  for lt_ac_prog in sed gsed; do
8428    for ac_exec_ext in '' $ac_executable_extensions; do
8429      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8430        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8431      fi
8432    done
8433  done
8434done
8435IFS=$as_save_IFS
8436lt_ac_max=0
8437lt_ac_count=0
8438# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8439# along with /bin/sed that truncates output.
8440for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8441  test ! -f "$lt_ac_sed" && continue
8442  cat /dev/null > conftest.in
8443  lt_ac_count=0
8444  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8445  # Check for GNU sed and select it if it is found.
8446  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8447    lt_cv_path_SED=$lt_ac_sed
8448    break
8449  fi
8450  while true; do
8451    cat conftest.in conftest.in >conftest.tmp
8452    mv conftest.tmp conftest.in
8453    cp conftest.in conftest.nl
8454    echo >>conftest.nl
8455    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8456    cmp -s conftest.out conftest.nl || break
8457    # 10000 chars as input seems more than enough
8458    test 10 -lt "$lt_ac_count" && break
8459    lt_ac_count=`expr $lt_ac_count + 1`
8460    if test "$lt_ac_count" -gt "$lt_ac_max"; then
8461      lt_ac_max=$lt_ac_count
8462      lt_cv_path_SED=$lt_ac_sed
8463    fi
8464  done
8465done
8466])
8467SED=$lt_cv_path_SED
8468AC_SUBST([SED])
8469AC_MSG_RESULT([$SED])
8470])#AC_PROG_SED
8471])#m4_ifndef
8472
8473# Old name:
8474AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8475dnl aclocal-1.4 backwards compatibility:
8476dnl AC_DEFUN([LT_AC_PROG_SED], [])
8477
8478
8479# _LT_CHECK_SHELL_FEATURES
8480# ------------------------
8481# Find out whether the shell is Bourne or XSI compatible,
8482# or has some other useful features.
8483m4_defun([_LT_CHECK_SHELL_FEATURES],
8484[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8485  lt_unset=unset
8486else
8487  lt_unset=false
8488fi
8489_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8490
8491# test EBCDIC or ASCII
8492case `echo X|tr X '\101'` in
8493 A) # ASCII based system
8494    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8495  lt_SP2NL='tr \040 \012'
8496  lt_NL2SP='tr \015\012 \040\040'
8497  ;;
8498 *) # EBCDIC based system
8499  lt_SP2NL='tr \100 \n'
8500  lt_NL2SP='tr \r\n \100\100'
8501  ;;
8502esac
8503_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8504_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8505])# _LT_CHECK_SHELL_FEATURES
8506
8507
8508# _LT_PATH_CONVERSION_FUNCTIONS
8509# -----------------------------
8510# Determine what file name conversion functions should be used by
8511# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8512# for certain cross-compile configurations and native mingw.
8513m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8514[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8515AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8516AC_MSG_CHECKING([how to convert $build file names to $host format])
8517AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8518[case $host in
8519  *-*-mingw* )
8520    case $build in
8521      *-*-mingw* ) # actually msys
8522        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8523        ;;
8524      *-*-cygwin* )
8525        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8526        ;;
8527      * ) # otherwise, assume *nix
8528        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8529        ;;
8530    esac
8531    ;;
8532  *-*-cygwin* )
8533    case $build in
8534      *-*-mingw* ) # actually msys
8535        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8536        ;;
8537      *-*-cygwin* )
8538        lt_cv_to_host_file_cmd=func_convert_file_noop
8539        ;;
8540      * ) # otherwise, assume *nix
8541        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8542        ;;
8543    esac
8544    ;;
8545  * ) # unhandled hosts (and "normal" native builds)
8546    lt_cv_to_host_file_cmd=func_convert_file_noop
8547    ;;
8548esac
8549])
8550to_host_file_cmd=$lt_cv_to_host_file_cmd
8551AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8552_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8553         [0], [convert $build file names to $host format])dnl
8554
8555AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8556AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8557[#assume ordinary cross tools, or native build.
8558lt_cv_to_tool_file_cmd=func_convert_file_noop
8559case $host in
8560  *-*-mingw* )
8561    case $build in
8562      *-*-mingw* ) # actually msys
8563        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8564        ;;
8565    esac
8566    ;;
8567esac
8568])
8569to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8570AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8571_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8572         [0], [convert $build files to toolchain format])dnl
8573])# _LT_PATH_CONVERSION_FUNCTIONS
8574
8575# Helper functions for option handling.                    -*- Autoconf -*-
8576#
8577#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
8578#   Foundation, Inc.
8579#   Written by Gary V. Vaughan, 2004
8580#
8581# This file is free software; the Free Software Foundation gives
8582# unlimited permission to copy and/or distribute it, with or without
8583# modifications, as long as this notice is preserved.
8584
8585# serial 8 ltoptions.m4
8586
8587# This is to help aclocal find these macros, as it can't see m4_define.
8588AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8589
8590
8591# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8592# ------------------------------------------
8593m4_define([_LT_MANGLE_OPTION],
8594[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8595
8596
8597# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8598# ---------------------------------------
8599# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8600# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8601# saved as a flag.
8602m4_define([_LT_SET_OPTION],
8603[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8604m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8605        _LT_MANGLE_DEFUN([$1], [$2]),
8606    [m4_warning([Unknown $1 option '$2'])])[]dnl
8607])
8608
8609
8610# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8611# ------------------------------------------------------------
8612# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8613m4_define([_LT_IF_OPTION],
8614[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8615
8616
8617# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8618# -------------------------------------------------------
8619# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8620# are set.
8621m4_define([_LT_UNLESS_OPTIONS],
8622[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8623	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8624		      [m4_define([$0_found])])])[]dnl
8625m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8626])[]dnl
8627])
8628
8629
8630# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8631# ----------------------------------------
8632# OPTION-LIST is a space-separated list of Libtool options associated
8633# with MACRO-NAME.  If any OPTION has a matching handler declared with
8634# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8635# the unknown option and exit.
8636m4_defun([_LT_SET_OPTIONS],
8637[# Set options
8638m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8639    [_LT_SET_OPTION([$1], _LT_Option)])
8640
8641m4_if([$1],[LT_INIT],[
8642  dnl
8643  dnl Simply set some default values (i.e off) if boolean options were not
8644  dnl specified:
8645  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8646  ])
8647  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8648  ])
8649  dnl
8650  dnl If no reference was made to various pairs of opposing options, then
8651  dnl we run the default mode handler for the pair.  For example, if neither
8652  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
8653  dnl archives by default:
8654  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8655  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8656  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8657  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8658		   [_LT_ENABLE_FAST_INSTALL])
8659  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
8660		   [_LT_WITH_AIX_SONAME([aix])])
8661  ])
8662])# _LT_SET_OPTIONS
8663
8664
8665
8666# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8667# -----------------------------------------
8668m4_define([_LT_MANGLE_DEFUN],
8669[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8670
8671
8672# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8673# -----------------------------------------------
8674m4_define([LT_OPTION_DEFINE],
8675[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8676])# LT_OPTION_DEFINE
8677
8678
8679# dlopen
8680# ------
8681LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8682])
8683
8684AU_DEFUN([AC_LIBTOOL_DLOPEN],
8685[_LT_SET_OPTION([LT_INIT], [dlopen])
8686AC_DIAGNOSE([obsolete],
8687[$0: Remove this warning and the call to _LT_SET_OPTION when you
8688put the 'dlopen' option into LT_INIT's first parameter.])
8689])
8690
8691dnl aclocal-1.4 backwards compatibility:
8692dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8693
8694
8695# win32-dll
8696# ---------
8697# Declare package support for building win32 dll's.
8698LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8699[enable_win32_dll=yes
8700
8701case $host in
8702*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8703  AC_CHECK_TOOL(AS, as, false)
8704  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8705  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8706  ;;
8707esac
8708
8709test -z "$AS" && AS=as
8710_LT_DECL([], [AS],      [1], [Assembler program])dnl
8711
8712test -z "$DLLTOOL" && DLLTOOL=dlltool
8713_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8714
8715test -z "$OBJDUMP" && OBJDUMP=objdump
8716_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8717])# win32-dll
8718
8719AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8720[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8721_LT_SET_OPTION([LT_INIT], [win32-dll])
8722AC_DIAGNOSE([obsolete],
8723[$0: Remove this warning and the call to _LT_SET_OPTION when you
8724put the 'win32-dll' option into LT_INIT's first parameter.])
8725])
8726
8727dnl aclocal-1.4 backwards compatibility:
8728dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8729
8730
8731# _LT_ENABLE_SHARED([DEFAULT])
8732# ----------------------------
8733# implement the --enable-shared flag, and supports the 'shared' and
8734# 'disable-shared' LT_INIT options.
8735# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8736m4_define([_LT_ENABLE_SHARED],
8737[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8738AC_ARG_ENABLE([shared],
8739    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8740	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8741    [p=${PACKAGE-default}
8742    case $enableval in
8743    yes) enable_shared=yes ;;
8744    no) enable_shared=no ;;
8745    *)
8746      enable_shared=no
8747      # Look at the argument we got.  We use all the common list separators.
8748      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8749      for pkg in $enableval; do
8750	IFS=$lt_save_ifs
8751	if test "X$pkg" = "X$p"; then
8752	  enable_shared=yes
8753	fi
8754      done
8755      IFS=$lt_save_ifs
8756      ;;
8757    esac],
8758    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8759
8760    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8761	[Whether or not to build shared libraries])
8762])# _LT_ENABLE_SHARED
8763
8764LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8765LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8766
8767# Old names:
8768AC_DEFUN([AC_ENABLE_SHARED],
8769[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8770])
8771
8772AC_DEFUN([AC_DISABLE_SHARED],
8773[_LT_SET_OPTION([LT_INIT], [disable-shared])
8774])
8775
8776AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8777AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8778
8779dnl aclocal-1.4 backwards compatibility:
8780dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8781dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8782
8783
8784
8785# _LT_ENABLE_STATIC([DEFAULT])
8786# ----------------------------
8787# implement the --enable-static flag, and support the 'static' and
8788# 'disable-static' LT_INIT options.
8789# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8790m4_define([_LT_ENABLE_STATIC],
8791[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8792AC_ARG_ENABLE([static],
8793    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8794	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8795    [p=${PACKAGE-default}
8796    case $enableval in
8797    yes) enable_static=yes ;;
8798    no) enable_static=no ;;
8799    *)
8800     enable_static=no
8801      # Look at the argument we got.  We use all the common list separators.
8802      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8803      for pkg in $enableval; do
8804	IFS=$lt_save_ifs
8805	if test "X$pkg" = "X$p"; then
8806	  enable_static=yes
8807	fi
8808      done
8809      IFS=$lt_save_ifs
8810      ;;
8811    esac],
8812    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8813
8814    _LT_DECL([build_old_libs], [enable_static], [0],
8815	[Whether or not to build static libraries])
8816])# _LT_ENABLE_STATIC
8817
8818LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8819LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8820
8821# Old names:
8822AC_DEFUN([AC_ENABLE_STATIC],
8823[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8824])
8825
8826AC_DEFUN([AC_DISABLE_STATIC],
8827[_LT_SET_OPTION([LT_INIT], [disable-static])
8828])
8829
8830AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8831AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8832
8833dnl aclocal-1.4 backwards compatibility:
8834dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8835dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8836
8837
8838
8839# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8840# ----------------------------------
8841# implement the --enable-fast-install flag, and support the 'fast-install'
8842# and 'disable-fast-install' LT_INIT options.
8843# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8844m4_define([_LT_ENABLE_FAST_INSTALL],
8845[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8846AC_ARG_ENABLE([fast-install],
8847    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8848    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8849    [p=${PACKAGE-default}
8850    case $enableval in
8851    yes) enable_fast_install=yes ;;
8852    no) enable_fast_install=no ;;
8853    *)
8854      enable_fast_install=no
8855      # Look at the argument we got.  We use all the common list separators.
8856      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8857      for pkg in $enableval; do
8858	IFS=$lt_save_ifs
8859	if test "X$pkg" = "X$p"; then
8860	  enable_fast_install=yes
8861	fi
8862      done
8863      IFS=$lt_save_ifs
8864      ;;
8865    esac],
8866    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8867
8868_LT_DECL([fast_install], [enable_fast_install], [0],
8869	 [Whether or not to optimize for fast installation])dnl
8870])# _LT_ENABLE_FAST_INSTALL
8871
8872LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8873LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8874
8875# Old names:
8876AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8877[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8878AC_DIAGNOSE([obsolete],
8879[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8880the 'fast-install' option into LT_INIT's first parameter.])
8881])
8882
8883AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8884[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8885AC_DIAGNOSE([obsolete],
8886[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8887the 'disable-fast-install' option into LT_INIT's first parameter.])
8888])
8889
8890dnl aclocal-1.4 backwards compatibility:
8891dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8892dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8893
8894
8895# _LT_WITH_AIX_SONAME([DEFAULT])
8896# ----------------------------------
8897# implement the --with-aix-soname flag, and support the `aix-soname=aix'
8898# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
8899# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
8900m4_define([_LT_WITH_AIX_SONAME],
8901[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
8902shared_archive_member_spec=
8903case $host,$enable_shared in
8904power*-*-aix[[5-9]]*,yes)
8905  AC_MSG_CHECKING([which variant of shared library versioning to provide])
8906  AC_ARG_WITH([aix-soname],
8907    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
8908      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
8909    [case $withval in
8910    aix|svr4|both)
8911      ;;
8912    *)
8913      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
8914      ;;
8915    esac
8916    lt_cv_with_aix_soname=$with_aix_soname],
8917    [AC_CACHE_VAL([lt_cv_with_aix_soname],
8918      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
8919    with_aix_soname=$lt_cv_with_aix_soname])
8920  AC_MSG_RESULT([$with_aix_soname])
8921  if test aix != "$with_aix_soname"; then
8922    # For the AIX way of multilib, we name the shared archive member
8923    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
8924    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
8925    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
8926    # the AIX toolchain works better with OBJECT_MODE set (default 32).
8927    if test 64 = "${OBJECT_MODE-32}"; then
8928      shared_archive_member_spec=shr_64
8929    else
8930      shared_archive_member_spec=shr
8931    fi
8932  fi
8933  ;;
8934*)
8935  with_aix_soname=aix
8936  ;;
8937esac
8938
8939_LT_DECL([], [shared_archive_member_spec], [0],
8940    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
8941])# _LT_WITH_AIX_SONAME
8942
8943LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
8944LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
8945LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
8946
8947
8948# _LT_WITH_PIC([MODE])
8949# --------------------
8950# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
8951# LT_INIT options.
8952# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
8953m4_define([_LT_WITH_PIC],
8954[AC_ARG_WITH([pic],
8955    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
8956	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8957    [lt_p=${PACKAGE-default}
8958    case $withval in
8959    yes|no) pic_mode=$withval ;;
8960    *)
8961      pic_mode=default
8962      # Look at the argument we got.  We use all the common list separators.
8963      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8964      for lt_pkg in $withval; do
8965	IFS=$lt_save_ifs
8966	if test "X$lt_pkg" = "X$lt_p"; then
8967	  pic_mode=yes
8968	fi
8969      done
8970      IFS=$lt_save_ifs
8971      ;;
8972    esac],
8973    [pic_mode=m4_default([$1], [default])])
8974
8975_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8976])# _LT_WITH_PIC
8977
8978LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8979LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8980
8981# Old name:
8982AU_DEFUN([AC_LIBTOOL_PICMODE],
8983[_LT_SET_OPTION([LT_INIT], [pic-only])
8984AC_DIAGNOSE([obsolete],
8985[$0: Remove this warning and the call to _LT_SET_OPTION when you
8986put the 'pic-only' option into LT_INIT's first parameter.])
8987])
8988
8989dnl aclocal-1.4 backwards compatibility:
8990dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8991
8992
8993m4_define([_LTDL_MODE], [])
8994LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8995		 [m4_define([_LTDL_MODE], [nonrecursive])])
8996LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8997		 [m4_define([_LTDL_MODE], [recursive])])
8998LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8999		 [m4_define([_LTDL_MODE], [subproject])])
9000
9001m4_define([_LTDL_TYPE], [])
9002LT_OPTION_DEFINE([LTDL_INIT], [installable],
9003		 [m4_define([_LTDL_TYPE], [installable])])
9004LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9005		 [m4_define([_LTDL_TYPE], [convenience])])
9006
9007# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9008#
9009# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
9010# Foundation, Inc.
9011# Written by Gary V. Vaughan, 2004
9012#
9013# This file is free software; the Free Software Foundation gives
9014# unlimited permission to copy and/or distribute it, with or without
9015# modifications, as long as this notice is preserved.
9016
9017# serial 6 ltsugar.m4
9018
9019# This is to help aclocal find these macros, as it can't see m4_define.
9020AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9021
9022
9023# lt_join(SEP, ARG1, [ARG2...])
9024# -----------------------------
9025# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9026# associated separator.
9027# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9028# versions in m4sugar had bugs.
9029m4_define([lt_join],
9030[m4_if([$#], [1], [],
9031       [$#], [2], [[$2]],
9032       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9033m4_define([_lt_join],
9034[m4_if([$#$2], [2], [],
9035       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9036
9037
9038# lt_car(LIST)
9039# lt_cdr(LIST)
9040# ------------
9041# Manipulate m4 lists.
9042# These macros are necessary as long as will still need to support
9043# Autoconf-2.59, which quotes differently.
9044m4_define([lt_car], [[$1]])
9045m4_define([lt_cdr],
9046[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9047       [$#], 1, [],
9048       [m4_dquote(m4_shift($@))])])
9049m4_define([lt_unquote], $1)
9050
9051
9052# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9053# ------------------------------------------
9054# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
9055# Note that neither SEPARATOR nor STRING are expanded; they are appended
9056# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9057# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9058# than defined and empty).
9059#
9060# This macro is needed until we can rely on Autoconf 2.62, since earlier
9061# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9062m4_define([lt_append],
9063[m4_define([$1],
9064	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9065
9066
9067
9068# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9069# ----------------------------------------------------------
9070# Produce a SEP delimited list of all paired combinations of elements of
9071# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9072# has the form PREFIXmINFIXSUFFIXn.
9073# Needed until we can rely on m4_combine added in Autoconf 2.62.
9074m4_define([lt_combine],
9075[m4_if(m4_eval([$# > 3]), [1],
9076       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9077[[m4_foreach([_Lt_prefix], [$2],
9078	     [m4_foreach([_Lt_suffix],
9079		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9080	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9081
9082
9083# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9084# -----------------------------------------------------------------------
9085# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9086# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9087m4_define([lt_if_append_uniq],
9088[m4_ifdef([$1],
9089	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9090		 [lt_append([$1], [$2], [$3])$4],
9091		 [$5])],
9092	  [lt_append([$1], [$2], [$3])$4])])
9093
9094
9095# lt_dict_add(DICT, KEY, VALUE)
9096# -----------------------------
9097m4_define([lt_dict_add],
9098[m4_define([$1($2)], [$3])])
9099
9100
9101# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9102# --------------------------------------------
9103m4_define([lt_dict_add_subkey],
9104[m4_define([$1($2:$3)], [$4])])
9105
9106
9107# lt_dict_fetch(DICT, KEY, [SUBKEY])
9108# ----------------------------------
9109m4_define([lt_dict_fetch],
9110[m4_ifval([$3],
9111	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9112    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9113
9114
9115# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9116# -----------------------------------------------------------------
9117m4_define([lt_if_dict_fetch],
9118[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9119	[$5],
9120    [$6])])
9121
9122
9123# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9124# --------------------------------------------------------------
9125m4_define([lt_dict_filter],
9126[m4_if([$5], [], [],
9127  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9128           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9129		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9130])
9131
9132# ltversion.m4 -- version numbers			-*- Autoconf -*-
9133#
9134#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
9135#   Written by Scott James Remnant, 2004
9136#
9137# This file is free software; the Free Software Foundation gives
9138# unlimited permission to copy and/or distribute it, with or without
9139# modifications, as long as this notice is preserved.
9140
9141# @configure_input@
9142
9143# serial 4171 ltversion.m4
9144# This file is part of GNU Libtool
9145
9146m4_define([LT_PACKAGE_VERSION], [2.4.5])
9147m4_define([LT_PACKAGE_REVISION], [2.4.5])
9148
9149AC_DEFUN([LTVERSION_VERSION],
9150[macro_version='2.4.5'
9151macro_revision='2.4.5'
9152_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9153_LT_DECL(, macro_revision, 0)
9154])
9155
9156# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9157#
9158#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
9159#   Foundation, Inc.
9160#   Written by Scott James Remnant, 2004.
9161#
9162# This file is free software; the Free Software Foundation gives
9163# unlimited permission to copy and/or distribute it, with or without
9164# modifications, as long as this notice is preserved.
9165
9166# serial 5 lt~obsolete.m4
9167
9168# These exist entirely to fool aclocal when bootstrapping libtool.
9169#
9170# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
9171# which have later been changed to m4_define as they aren't part of the
9172# exported API, or moved to Autoconf or Automake where they belong.
9173#
9174# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9175# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9176# using a macro with the same name in our local m4/libtool.m4 it'll
9177# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9178# and doesn't know about Autoconf macros at all.)
9179#
9180# So we provide this file, which has a silly filename so it's always
9181# included after everything else.  This provides aclocal with the
9182# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9183# because those macros already exist, or will be overwritten later.
9184# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9185#
9186# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9187# Yes, that means every name once taken will need to remain here until
9188# we give up compatibility with versions before 1.7, at which point
9189# we need to keep only those names which we still refer to.
9190
9191# This is to help aclocal find these macros, as it can't see m4_define.
9192AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9193
9194m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9195m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9196m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9197m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9198m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9199m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9200m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9201m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9202m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9203m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9204m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9205m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9206m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9207m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9208m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9209m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9210m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9211m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9212m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9213m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9214m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9215m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9216m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9217m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9218m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9219m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9220m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9221m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9222m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9223m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9224m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9225m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9226m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9227m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9228m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9229m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9230m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9231m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9232m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9233m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9234m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9235m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9236m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9237m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9238m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9239m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9240m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9241m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9242m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9243m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9244m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9245m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9246m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9247m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9248m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9249m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9250m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9251m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9252m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9253m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9254m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9255
9256# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9257# serial 1 (pkg-config-0.24)
9258#
9259# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9260#
9261# This program is free software; you can redistribute it and/or modify
9262# it under the terms of the GNU General Public License as published by
9263# the Free Software Foundation; either version 2 of the License, or
9264# (at your option) any later version.
9265#
9266# This program is distributed in the hope that it will be useful, but
9267# WITHOUT ANY WARRANTY; without even the implied warranty of
9268# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9269# General Public License for more details.
9270#
9271# You should have received a copy of the GNU General Public License
9272# along with this program; if not, write to the Free Software
9273# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9274#
9275# As a special exception to the GNU General Public License, if you
9276# distribute this file as part of a program that contains a
9277# configuration script generated by Autoconf, you may include it under
9278# the same distribution terms that you use for the rest of that program.
9279
9280# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9281# ----------------------------------
9282AC_DEFUN([PKG_PROG_PKG_CONFIG],
9283[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9284m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9285m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9286AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9287AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9288AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9289
9290if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9291	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9292fi
9293if test -n "$PKG_CONFIG"; then
9294	_pkg_min_version=m4_default([$1], [0.9.0])
9295	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9296	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9297		AC_MSG_RESULT([yes])
9298	else
9299		AC_MSG_RESULT([no])
9300		PKG_CONFIG=""
9301	fi
9302fi[]dnl
9303])# PKG_PROG_PKG_CONFIG
9304
9305# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9306#
9307# Check to see whether a particular set of modules exists.  Similar
9308# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9309#
9310# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9311# only at the first occurence in configure.ac, so if the first place
9312# it's called might be skipped (such as if it is within an "if", you
9313# have to call PKG_CHECK_EXISTS manually
9314# --------------------------------------------------------------
9315AC_DEFUN([PKG_CHECK_EXISTS],
9316[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9317if test -n "$PKG_CONFIG" && \
9318    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9319  m4_default([$2], [:])
9320m4_ifvaln([$3], [else
9321  $3])dnl
9322fi])
9323
9324# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9325# ---------------------------------------------
9326m4_define([_PKG_CONFIG],
9327[if test -n "$$1"; then
9328    pkg_cv_[]$1="$$1"
9329 elif test -n "$PKG_CONFIG"; then
9330    PKG_CHECK_EXISTS([$3],
9331                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9332		      test "x$?" != "x0" && pkg_failed=yes ],
9333		     [pkg_failed=yes])
9334 else
9335    pkg_failed=untried
9336fi[]dnl
9337])# _PKG_CONFIG
9338
9339# _PKG_SHORT_ERRORS_SUPPORTED
9340# -----------------------------
9341AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9342[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9343if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9344        _pkg_short_errors_supported=yes
9345else
9346        _pkg_short_errors_supported=no
9347fi[]dnl
9348])# _PKG_SHORT_ERRORS_SUPPORTED
9349
9350
9351# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9352# [ACTION-IF-NOT-FOUND])
9353#
9354#
9355# Note that if there is a possibility the first call to
9356# PKG_CHECK_MODULES might not happen, you should be sure to include an
9357# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9358#
9359#
9360# --------------------------------------------------------------
9361AC_DEFUN([PKG_CHECK_MODULES],
9362[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9363AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9364AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9365
9366pkg_failed=no
9367AC_MSG_CHECKING([for $1])
9368
9369_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9370_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9371
9372m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9373and $1[]_LIBS to avoid the need to call pkg-config.
9374See the pkg-config man page for more details.])
9375
9376if test $pkg_failed = yes; then
9377   	AC_MSG_RESULT([no])
9378        _PKG_SHORT_ERRORS_SUPPORTED
9379        if test $_pkg_short_errors_supported = yes; then
9380	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9381        else
9382	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9383        fi
9384	# Put the nasty error message in config.log where it belongs
9385	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9386
9387	m4_default([$4], [AC_MSG_ERROR(
9388[Package requirements ($2) were not met:
9389
9390$$1_PKG_ERRORS
9391
9392Consider adjusting the PKG_CONFIG_PATH environment variable if you
9393installed software in a non-standard prefix.
9394
9395_PKG_TEXT])[]dnl
9396        ])
9397elif test $pkg_failed = untried; then
9398     	AC_MSG_RESULT([no])
9399	m4_default([$4], [AC_MSG_FAILURE(
9400[The pkg-config script could not be found or is too old.  Make sure it
9401is in your PATH or set the PKG_CONFIG environment variable to the full
9402path to pkg-config.
9403
9404_PKG_TEXT
9405
9406To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9407        ])
9408else
9409	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9410	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9411        AC_MSG_RESULT([yes])
9412	$3
9413fi[]dnl
9414])# PKG_CHECK_MODULES
9415
9416
9417# PKG_INSTALLDIR(DIRECTORY)
9418# -------------------------
9419# Substitutes the variable pkgconfigdir as the location where a module
9420# should install pkg-config .pc files. By default the directory is
9421# $libdir/pkgconfig, but the default can be changed by passing
9422# DIRECTORY. The user can override through the --with-pkgconfigdir
9423# parameter.
9424AC_DEFUN([PKG_INSTALLDIR],
9425[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
9426m4_pushdef([pkg_description],
9427    [pkg-config installation directory @<:@]pkg_default[@:>@])
9428AC_ARG_WITH([pkgconfigdir],
9429    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
9430    [with_pkgconfigdir=]pkg_default)
9431AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
9432m4_popdef([pkg_default])
9433m4_popdef([pkg_description])
9434]) dnl PKG_INSTALLDIR
9435
9436
9437# PKG_NOARCH_INSTALLDIR(DIRECTORY)
9438# -------------------------
9439# Substitutes the variable noarch_pkgconfigdir as the location where a
9440# module should install arch-independent pkg-config .pc files. By
9441# default the directory is $datadir/pkgconfig, but the default can be
9442# changed by passing DIRECTORY. The user can override through the
9443# --with-noarch-pkgconfigdir parameter.
9444AC_DEFUN([PKG_NOARCH_INSTALLDIR],
9445[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
9446m4_pushdef([pkg_description],
9447    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
9448AC_ARG_WITH([noarch-pkgconfigdir],
9449    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
9450    [with_noarch_pkgconfigdir=]pkg_default)
9451AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
9452m4_popdef([pkg_default])
9453m4_popdef([pkg_description])
9454]) dnl PKG_NOARCH_INSTALLDIR
9455
9456
9457# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
9458# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9459# -------------------------------------------
9460# Retrieves the value of the pkg-config variable for the given module.
9461AC_DEFUN([PKG_CHECK_VAR],
9462[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9463AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
9464
9465_PKG_CONFIG([$1], [variable="][$3]["], [$2])
9466AS_VAR_COPY([$1], [pkg_cv_][$1])
9467
9468AS_VAR_IF([$1], [""], [$5], [$4])dnl
9469])# PKG_CHECK_VAR
9470
9471# Copyright (C) 2002-2014 Free Software Foundation, Inc.
9472#
9473# This file is free software; the Free Software Foundation
9474# gives unlimited permission to copy and/or distribute it,
9475# with or without modifications, as long as this notice is preserved.
9476
9477# AM_AUTOMAKE_VERSION(VERSION)
9478# ----------------------------
9479# Automake X.Y traces this macro to ensure aclocal.m4 has been
9480# generated from the m4 files accompanying Automake X.Y.
9481# (This private macro should not be called outside this file.)
9482AC_DEFUN([AM_AUTOMAKE_VERSION],
9483[am__api_version='1.15'
9484dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9485dnl require some minimum version.  Point them to the right macro.
9486m4_if([$1], [1.15], [],
9487      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9488])
9489
9490# _AM_AUTOCONF_VERSION(VERSION)
9491# -----------------------------
9492# aclocal traces this macro to find the Autoconf version.
9493# This is a private macro too.  Using m4_define simplifies
9494# the logic in aclocal, which can simply ignore this definition.
9495m4_define([_AM_AUTOCONF_VERSION], [])
9496
9497# AM_SET_CURRENT_AUTOMAKE_VERSION
9498# -------------------------------
9499# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9500# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9501AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9502[AM_AUTOMAKE_VERSION([1.15])dnl
9503m4_ifndef([AC_AUTOCONF_VERSION],
9504  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9505_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9506
9507# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9508
9509# Copyright (C) 2001-2014 Free Software Foundation, Inc.
9510#
9511# This file is free software; the Free Software Foundation
9512# gives unlimited permission to copy and/or distribute it,
9513# with or without modifications, as long as this notice is preserved.
9514
9515# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9516# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
9517# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
9518#
9519# Of course, Automake must honor this variable whenever it calls a
9520# tool from the auxiliary directory.  The problem is that $srcdir (and
9521# therefore $ac_aux_dir as well) can be either absolute or relative,
9522# depending on how configure is run.  This is pretty annoying, since
9523# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9524# source directory, any form will work fine, but in subdirectories a
9525# relative path needs to be adjusted first.
9526#
9527# $ac_aux_dir/missing
9528#    fails when called from a subdirectory if $ac_aux_dir is relative
9529# $top_srcdir/$ac_aux_dir/missing
9530#    fails if $ac_aux_dir is absolute,
9531#    fails when called from a subdirectory in a VPATH build with
9532#          a relative $ac_aux_dir
9533#
9534# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9535# are both prefixed by $srcdir.  In an in-source build this is usually
9536# harmless because $srcdir is '.', but things will broke when you
9537# start a VPATH build or use an absolute $srcdir.
9538#
9539# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9540# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9541#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9542# and then we would define $MISSING as
9543#   MISSING="\${SHELL} $am_aux_dir/missing"
9544# This will work as long as MISSING is not called from configure, because
9545# unfortunately $(top_srcdir) has no meaning in configure.
9546# However there are other variables, like CC, which are often used in
9547# configure, and could therefore not use this "fixed" $ac_aux_dir.
9548#
9549# Another solution, used here, is to always expand $ac_aux_dir to an
9550# absolute PATH.  The drawback is that using absolute paths prevent a
9551# configured tree to be moved without reconfiguration.
9552
9553AC_DEFUN([AM_AUX_DIR_EXPAND],
9554[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
9555# Expand $ac_aux_dir to an absolute path.
9556am_aux_dir=`cd "$ac_aux_dir" && pwd`
9557])
9558
9559# AM_CONDITIONAL                                            -*- Autoconf -*-
9560
9561# Copyright (C) 1997-2014 Free Software Foundation, Inc.
9562#
9563# This file is free software; the Free Software Foundation
9564# gives unlimited permission to copy and/or distribute it,
9565# with or without modifications, as long as this notice is preserved.
9566
9567# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9568# -------------------------------------
9569# Define a conditional.
9570AC_DEFUN([AM_CONDITIONAL],
9571[AC_PREREQ([2.52])dnl
9572 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9573       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9574AC_SUBST([$1_TRUE])dnl
9575AC_SUBST([$1_FALSE])dnl
9576_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9577_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9578m4_define([_AM_COND_VALUE_$1], [$2])dnl
9579if $2; then
9580  $1_TRUE=
9581  $1_FALSE='#'
9582else
9583  $1_TRUE='#'
9584  $1_FALSE=
9585fi
9586AC_CONFIG_COMMANDS_PRE(
9587[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9588  AC_MSG_ERROR([[conditional "$1" was never defined.
9589Usually this means the macro was only invoked conditionally.]])
9590fi])])
9591
9592# Copyright (C) 1999-2014 Free Software Foundation, Inc.
9593#
9594# This file is free software; the Free Software Foundation
9595# gives unlimited permission to copy and/or distribute it,
9596# with or without modifications, as long as this notice is preserved.
9597
9598
9599# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
9600# written in clear, in which case automake, when reading aclocal.m4,
9601# will think it sees a *use*, and therefore will trigger all it's
9602# C support machinery.  Also note that it means that autoscan, seeing
9603# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9604
9605
9606# _AM_DEPENDENCIES(NAME)
9607# ----------------------
9608# See how the compiler implements dependency checking.
9609# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
9610# We try a few techniques and use that to set a single cache variable.
9611#
9612# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9613# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9614# dependency, and given that the user is not expected to run this macro,
9615# just rely on AC_PROG_CC.
9616AC_DEFUN([_AM_DEPENDENCIES],
9617[AC_REQUIRE([AM_SET_DEPDIR])dnl
9618AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9619AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9620AC_REQUIRE([AM_DEP_TRACK])dnl
9621
9622m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
9623      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
9624      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9625      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
9626      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
9627      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9628                    [depcc="$$1"   am_compiler_list=])
9629
9630AC_CACHE_CHECK([dependency style of $depcc],
9631               [am_cv_$1_dependencies_compiler_type],
9632[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9633  # We make a subdir and do the tests there.  Otherwise we can end up
9634  # making bogus files that we don't know about and never remove.  For
9635  # instance it was reported that on HP-UX the gcc test will end up
9636  # making a dummy file named 'D' -- because '-MD' means "put the output
9637  # in D".
9638  rm -rf conftest.dir
9639  mkdir conftest.dir
9640  # Copy depcomp to subdir because otherwise we won't find it if we're
9641  # using a relative directory.
9642  cp "$am_depcomp" conftest.dir
9643  cd conftest.dir
9644  # We will build objects and dependencies in a subdirectory because
9645  # it helps to detect inapplicable dependency modes.  For instance
9646  # both Tru64's cc and ICC support -MD to output dependencies as a
9647  # side effect of compilation, but ICC will put the dependencies in
9648  # the current directory while Tru64 will put them in the object
9649  # directory.
9650  mkdir sub
9651
9652  am_cv_$1_dependencies_compiler_type=none
9653  if test "$am_compiler_list" = ""; then
9654     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9655  fi
9656  am__universal=false
9657  m4_case([$1], [CC],
9658    [case " $depcc " in #(
9659     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9660     esac],
9661    [CXX],
9662    [case " $depcc " in #(
9663     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9664     esac])
9665
9666  for depmode in $am_compiler_list; do
9667    # Setup a source with many dependencies, because some compilers
9668    # like to wrap large dependency lists on column 80 (with \), and
9669    # we should not choose a depcomp mode which is confused by this.
9670    #
9671    # We need to recreate these files for each test, as the compiler may
9672    # overwrite some of them when testing with obscure command lines.
9673    # This happens at least with the AIX C compiler.
9674    : > sub/conftest.c
9675    for i in 1 2 3 4 5 6; do
9676      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9677      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
9678      # Solaris 10 /bin/sh.
9679      echo '/* dummy */' > sub/conftst$i.h
9680    done
9681    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9682
9683    # We check with '-c' and '-o' for the sake of the "dashmstdout"
9684    # mode.  It turns out that the SunPro C++ compiler does not properly
9685    # handle '-M -o', and we need to detect this.  Also, some Intel
9686    # versions had trouble with output in subdirs.
9687    am__obj=sub/conftest.${OBJEXT-o}
9688    am__minus_obj="-o $am__obj"
9689    case $depmode in
9690    gcc)
9691      # This depmode causes a compiler race in universal mode.
9692      test "$am__universal" = false || continue
9693      ;;
9694    nosideeffect)
9695      # After this tag, mechanisms are not by side-effect, so they'll
9696      # only be used when explicitly requested.
9697      if test "x$enable_dependency_tracking" = xyes; then
9698	continue
9699      else
9700	break
9701      fi
9702      ;;
9703    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
9704      # This compiler won't grok '-c -o', but also, the minuso test has
9705      # not run yet.  These depmodes are late enough in the game, and
9706      # so weak that their functioning should not be impacted.
9707      am__obj=conftest.${OBJEXT-o}
9708      am__minus_obj=
9709      ;;
9710    none) break ;;
9711    esac
9712    if depmode=$depmode \
9713       source=sub/conftest.c object=$am__obj \
9714       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9715       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9716         >/dev/null 2>conftest.err &&
9717       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9718       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9719       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9720       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9721      # icc doesn't choke on unknown options, it will just issue warnings
9722      # or remarks (even with -Werror).  So we grep stderr for any message
9723      # that says an option was ignored or not supported.
9724      # When given -MP, icc 7.0 and 7.1 complain thusly:
9725      #   icc: Command line warning: ignoring option '-M'; no argument required
9726      # The diagnosis changed in icc 8.0:
9727      #   icc: Command line remark: option '-MP' not supported
9728      if (grep 'ignoring option' conftest.err ||
9729          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9730        am_cv_$1_dependencies_compiler_type=$depmode
9731        break
9732      fi
9733    fi
9734  done
9735
9736  cd ..
9737  rm -rf conftest.dir
9738else
9739  am_cv_$1_dependencies_compiler_type=none
9740fi
9741])
9742AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9743AM_CONDITIONAL([am__fastdep$1], [
9744  test "x$enable_dependency_tracking" != xno \
9745  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9746])
9747
9748
9749# AM_SET_DEPDIR
9750# -------------
9751# Choose a directory name for dependency files.
9752# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
9753AC_DEFUN([AM_SET_DEPDIR],
9754[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9755AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9756])
9757
9758
9759# AM_DEP_TRACK
9760# ------------
9761AC_DEFUN([AM_DEP_TRACK],
9762[AC_ARG_ENABLE([dependency-tracking], [dnl
9763AS_HELP_STRING(
9764  [--enable-dependency-tracking],
9765  [do not reject slow dependency extractors])
9766AS_HELP_STRING(
9767  [--disable-dependency-tracking],
9768  [speeds up one-time build])])
9769if test "x$enable_dependency_tracking" != xno; then
9770  am_depcomp="$ac_aux_dir/depcomp"
9771  AMDEPBACKSLASH='\'
9772  am__nodep='_no'
9773fi
9774AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9775AC_SUBST([AMDEPBACKSLASH])dnl
9776_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9777AC_SUBST([am__nodep])dnl
9778_AM_SUBST_NOTMAKE([am__nodep])dnl
9779])
9780
9781# Generate code to set up dependency tracking.              -*- Autoconf -*-
9782
9783# Copyright (C) 1999-2014 Free Software Foundation, Inc.
9784#
9785# This file is free software; the Free Software Foundation
9786# gives unlimited permission to copy and/or distribute it,
9787# with or without modifications, as long as this notice is preserved.
9788
9789
9790# _AM_OUTPUT_DEPENDENCY_COMMANDS
9791# ------------------------------
9792AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9793[{
9794  # Older Autoconf quotes --file arguments for eval, but not when files
9795  # are listed without --file.  Let's play safe and only enable the eval
9796  # if we detect the quoting.
9797  case $CONFIG_FILES in
9798  *\'*) eval set x "$CONFIG_FILES" ;;
9799  *)   set x $CONFIG_FILES ;;
9800  esac
9801  shift
9802  for mf
9803  do
9804    # Strip MF so we end up with the name of the file.
9805    mf=`echo "$mf" | sed -e 's/:.*$//'`
9806    # Check whether this is an Automake generated Makefile or not.
9807    # We used to match only the files named 'Makefile.in', but
9808    # some people rename them; so instead we look at the file content.
9809    # Grep'ing the first line is not enough: some people post-process
9810    # each Makefile.in and add a new line on top of each file to say so.
9811    # Grep'ing the whole file is not good either: AIX grep has a line
9812    # limit of 2048, but all sed's we know have understand at least 4000.
9813    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9814      dirpart=`AS_DIRNAME("$mf")`
9815    else
9816      continue
9817    fi
9818    # Extract the definition of DEPDIR, am__include, and am__quote
9819    # from the Makefile without running 'make'.
9820    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9821    test -z "$DEPDIR" && continue
9822    am__include=`sed -n 's/^am__include = //p' < "$mf"`
9823    test -z "$am__include" && continue
9824    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9825    # Find all dependency output files, they are included files with
9826    # $(DEPDIR) in their names.  We invoke sed twice because it is the
9827    # simplest approach to changing $(DEPDIR) to its actual value in the
9828    # expansion.
9829    for file in `sed -n "
9830      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9831	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
9832      # Make sure the directory exists.
9833      test -f "$dirpart/$file" && continue
9834      fdir=`AS_DIRNAME(["$file"])`
9835      AS_MKDIR_P([$dirpart/$fdir])
9836      # echo "creating $dirpart/$file"
9837      echo '# dummy' > "$dirpart/$file"
9838    done
9839  done
9840}
9841])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9842
9843
9844# AM_OUTPUT_DEPENDENCY_COMMANDS
9845# -----------------------------
9846# This macro should only be invoked once -- use via AC_REQUIRE.
9847#
9848# This code is only required when automatic dependency tracking
9849# is enabled.  FIXME.  This creates each '.P' file that we will
9850# need in order to bootstrap the dependency handling code.
9851AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9852[AC_CONFIG_COMMANDS([depfiles],
9853     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9854     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9855])
9856
9857# Do all the work for Automake.                             -*- Autoconf -*-
9858
9859# Copyright (C) 1996-2014 Free Software Foundation, Inc.
9860#
9861# This file is free software; the Free Software Foundation
9862# gives unlimited permission to copy and/or distribute it,
9863# with or without modifications, as long as this notice is preserved.
9864
9865# This macro actually does too much.  Some checks are only needed if
9866# your package does certain things.  But this isn't really a big deal.
9867
9868dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
9869m4_define([AC_PROG_CC],
9870m4_defn([AC_PROG_CC])
9871[_AM_PROG_CC_C_O
9872])
9873
9874# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9875# AM_INIT_AUTOMAKE([OPTIONS])
9876# -----------------------------------------------
9877# The call with PACKAGE and VERSION arguments is the old style
9878# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9879# and VERSION should now be passed to AC_INIT and removed from
9880# the call to AM_INIT_AUTOMAKE.
9881# We support both call styles for the transition.  After
9882# the next Automake release, Autoconf can make the AC_INIT
9883# arguments mandatory, and then we can depend on a new Autoconf
9884# release and drop the old call support.
9885AC_DEFUN([AM_INIT_AUTOMAKE],
9886[AC_PREREQ([2.65])dnl
9887dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9888dnl the ones we care about.
9889m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9890AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9891AC_REQUIRE([AC_PROG_INSTALL])dnl
9892if test "`cd $srcdir && pwd`" != "`pwd`"; then
9893  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9894  # is not polluted with repeated "-I."
9895  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9896  # test to see if srcdir already configured
9897  if test -f $srcdir/config.status; then
9898    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9899  fi
9900fi
9901
9902# test whether we have cygpath
9903if test -z "$CYGPATH_W"; then
9904  if (cygpath --version) >/dev/null 2>/dev/null; then
9905    CYGPATH_W='cygpath -w'
9906  else
9907    CYGPATH_W=echo
9908  fi
9909fi
9910AC_SUBST([CYGPATH_W])
9911
9912# Define the identity of the package.
9913dnl Distinguish between old-style and new-style calls.
9914m4_ifval([$2],
9915[AC_DIAGNOSE([obsolete],
9916             [$0: two- and three-arguments forms are deprecated.])
9917m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9918 AC_SUBST([PACKAGE], [$1])dnl
9919 AC_SUBST([VERSION], [$2])],
9920[_AM_SET_OPTIONS([$1])dnl
9921dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9922m4_if(
9923  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
9924  [ok:ok],,
9925  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9926 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9927 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9928
9929_AM_IF_OPTION([no-define],,
9930[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
9931 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
9932
9933# Some tools Automake needs.
9934AC_REQUIRE([AM_SANITY_CHECK])dnl
9935AC_REQUIRE([AC_ARG_PROGRAM])dnl
9936AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
9937AM_MISSING_PROG([AUTOCONF], [autoconf])
9938AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
9939AM_MISSING_PROG([AUTOHEADER], [autoheader])
9940AM_MISSING_PROG([MAKEINFO], [makeinfo])
9941AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9942AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9943AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9944# For better backward compatibility.  To be removed once Automake 1.9.x
9945# dies out for good.  For more background, see:
9946# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
9947# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
9948AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
9949# We need awk for the "check" target (and possibly the TAP driver).  The
9950# system "awk" is bad on some platforms.
9951AC_REQUIRE([AC_PROG_AWK])dnl
9952AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9953AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9954_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9955	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9956			     [_AM_PROG_TAR([v7])])])
9957_AM_IF_OPTION([no-dependencies],,
9958[AC_PROVIDE_IFELSE([AC_PROG_CC],
9959		  [_AM_DEPENDENCIES([CC])],
9960		  [m4_define([AC_PROG_CC],
9961			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
9962AC_PROVIDE_IFELSE([AC_PROG_CXX],
9963		  [_AM_DEPENDENCIES([CXX])],
9964		  [m4_define([AC_PROG_CXX],
9965			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
9966AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9967		  [_AM_DEPENDENCIES([OBJC])],
9968		  [m4_define([AC_PROG_OBJC],
9969			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
9970AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
9971		  [_AM_DEPENDENCIES([OBJCXX])],
9972		  [m4_define([AC_PROG_OBJCXX],
9973			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
9974])
9975AC_REQUIRE([AM_SILENT_RULES])dnl
9976dnl The testsuite driver may need to know about EXEEXT, so add the
9977dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
9978dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
9979AC_CONFIG_COMMANDS_PRE(dnl
9980[m4_provide_if([_AM_COMPILER_EXEEXT],
9981  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9982
9983# POSIX will say in a future version that running "rm -f" with no argument
9984# is OK; and we want to be able to make that assumption in our Makefile
9985# recipes.  So use an aggressive probe to check that the usage we want is
9986# actually supported "in the wild" to an acceptable degree.
9987# See automake bug#10828.
9988# To make any issue more visible, cause the running configure to be aborted
9989# by default if the 'rm' program in use doesn't match our expectations; the
9990# user can still override this though.
9991if rm -f && rm -fr && rm -rf; then : OK; else
9992  cat >&2 <<'END'
9993Oops!
9994
9995Your 'rm' program seems unable to run without file operands specified
9996on the command line, even when the '-f' option is present.  This is contrary
9997to the behaviour of most rm programs out there, and not conforming with
9998the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
9999
10000Please tell bug-automake@gnu.org about your system, including the value
10001of your $PATH and any error possibly output before this message.  This
10002can help us improve future automake versions.
10003
10004END
10005  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
10006    echo 'Configuration will proceed anyway, since you have set the' >&2
10007    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
10008    echo >&2
10009  else
10010    cat >&2 <<'END'
10011Aborting the configuration process, to ensure you take notice of the issue.
10012
10013You can download and install GNU coreutils to get an 'rm' implementation
10014that behaves properly: <http://www.gnu.org/software/coreutils/>.
10015
10016If you want to complete the configuration process using your problematic
10017'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
10018to "yes", and re-run configure.
10019
10020END
10021    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
10022  fi
10023fi
10024dnl The trailing newline in this macro's definition is deliberate, for
10025dnl backward compatibility and to allow trailing 'dnl'-style comments
10026dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
10027])
10028
10029dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10030dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10031dnl mangled by Autoconf and run in a shell conditional statement.
10032m4_define([_AC_COMPILER_EXEEXT],
10033m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10034
10035# When config.status generates a header, we must update the stamp-h file.
10036# This file resides in the same directory as the config header
10037# that is generated.  The stamp files are numbered to have different names.
10038
10039# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10040# loop where config.status creates the headers, so we can generate
10041# our stamp files there.
10042AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10043[# Compute $1's index in $config_headers.
10044_am_arg=$1
10045_am_stamp_count=1
10046for _am_header in $config_headers :; do
10047  case $_am_header in
10048    $_am_arg | $_am_arg:* )
10049      break ;;
10050    * )
10051      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10052  esac
10053done
10054echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10055
10056# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10057#
10058# This file is free software; the Free Software Foundation
10059# gives unlimited permission to copy and/or distribute it,
10060# with or without modifications, as long as this notice is preserved.
10061
10062# AM_PROG_INSTALL_SH
10063# ------------------
10064# Define $install_sh.
10065AC_DEFUN([AM_PROG_INSTALL_SH],
10066[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10067if test x"${install_sh+set}" != xset; then
10068  case $am_aux_dir in
10069  *\ * | *\	*)
10070    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10071  *)
10072    install_sh="\${SHELL} $am_aux_dir/install-sh"
10073  esac
10074fi
10075AC_SUBST([install_sh])])
10076
10077# Copyright (C) 2003-2014 Free Software Foundation, Inc.
10078#
10079# This file is free software; the Free Software Foundation
10080# gives unlimited permission to copy and/or distribute it,
10081# with or without modifications, as long as this notice is preserved.
10082
10083# Check whether the underlying file-system supports filenames
10084# with a leading dot.  For instance MS-DOS doesn't.
10085AC_DEFUN([AM_SET_LEADING_DOT],
10086[rm -rf .tst 2>/dev/null
10087mkdir .tst 2>/dev/null
10088if test -d .tst; then
10089  am__leading_dot=.
10090else
10091  am__leading_dot=_
10092fi
10093rmdir .tst 2>/dev/null
10094AC_SUBST([am__leading_dot])])
10095
10096# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10097# From Jim Meyering
10098
10099# Copyright (C) 1996-2014 Free Software Foundation, Inc.
10100#
10101# This file is free software; the Free Software Foundation
10102# gives unlimited permission to copy and/or distribute it,
10103# with or without modifications, as long as this notice is preserved.
10104
10105# AM_MAINTAINER_MODE([DEFAULT-MODE])
10106# ----------------------------------
10107# Control maintainer-specific portions of Makefiles.
10108# Default is to disable them, unless 'enable' is passed literally.
10109# For symmetry, 'disable' may be passed as well.  Anyway, the user
10110# can override the default with the --enable/--disable switch.
10111AC_DEFUN([AM_MAINTAINER_MODE],
10112[m4_case(m4_default([$1], [disable]),
10113       [enable], [m4_define([am_maintainer_other], [disable])],
10114       [disable], [m4_define([am_maintainer_other], [enable])],
10115       [m4_define([am_maintainer_other], [enable])
10116        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10117AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10118  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10119  AC_ARG_ENABLE([maintainer-mode],
10120    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
10121      am_maintainer_other[ make rules and dependencies not useful
10122      (and sometimes confusing) to the casual installer])],
10123    [USE_MAINTAINER_MODE=$enableval],
10124    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10125  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10126  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10127  MAINT=$MAINTAINER_MODE_TRUE
10128  AC_SUBST([MAINT])dnl
10129]
10130)
10131
10132# Check to see how 'make' treats includes.	            -*- Autoconf -*-
10133
10134# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10135#
10136# This file is free software; the Free Software Foundation
10137# gives unlimited permission to copy and/or distribute it,
10138# with or without modifications, as long as this notice is preserved.
10139
10140# AM_MAKE_INCLUDE()
10141# -----------------
10142# Check to see how make treats includes.
10143AC_DEFUN([AM_MAKE_INCLUDE],
10144[am_make=${MAKE-make}
10145cat > confinc << 'END'
10146am__doit:
10147	@echo this is the am__doit target
10148.PHONY: am__doit
10149END
10150# If we don't find an include directive, just comment out the code.
10151AC_MSG_CHECKING([for style of include used by $am_make])
10152am__include="#"
10153am__quote=
10154_am_result=none
10155# First try GNU make style include.
10156echo "include confinc" > confmf
10157# Ignore all kinds of additional output from 'make'.
10158case `$am_make -s -f confmf 2> /dev/null` in #(
10159*the\ am__doit\ target*)
10160  am__include=include
10161  am__quote=
10162  _am_result=GNU
10163  ;;
10164esac
10165# Now try BSD make style include.
10166if test "$am__include" = "#"; then
10167   echo '.include "confinc"' > confmf
10168   case `$am_make -s -f confmf 2> /dev/null` in #(
10169   *the\ am__doit\ target*)
10170     am__include=.include
10171     am__quote="\""
10172     _am_result=BSD
10173     ;;
10174   esac
10175fi
10176AC_SUBST([am__include])
10177AC_SUBST([am__quote])
10178AC_MSG_RESULT([$_am_result])
10179rm -f confinc confmf
10180])
10181
10182# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10183
10184# Copyright (C) 1997-2014 Free Software Foundation, Inc.
10185#
10186# This file is free software; the Free Software Foundation
10187# gives unlimited permission to copy and/or distribute it,
10188# with or without modifications, as long as this notice is preserved.
10189
10190# AM_MISSING_PROG(NAME, PROGRAM)
10191# ------------------------------
10192AC_DEFUN([AM_MISSING_PROG],
10193[AC_REQUIRE([AM_MISSING_HAS_RUN])
10194$1=${$1-"${am_missing_run}$2"}
10195AC_SUBST($1)])
10196
10197# AM_MISSING_HAS_RUN
10198# ------------------
10199# Define MISSING if not defined so far and test if it is modern enough.
10200# If it is, set am_missing_run to use it, otherwise, to nothing.
10201AC_DEFUN([AM_MISSING_HAS_RUN],
10202[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10203AC_REQUIRE_AUX_FILE([missing])dnl
10204if test x"${MISSING+set}" != xset; then
10205  case $am_aux_dir in
10206  *\ * | *\	*)
10207    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10208  *)
10209    MISSING="\${SHELL} $am_aux_dir/missing" ;;
10210  esac
10211fi
10212# Use eval to expand $SHELL
10213if eval "$MISSING --is-lightweight"; then
10214  am_missing_run="$MISSING "
10215else
10216  am_missing_run=
10217  AC_MSG_WARN(['missing' script is too old or missing])
10218fi
10219])
10220
10221# Helper functions for option handling.                     -*- Autoconf -*-
10222
10223# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10224#
10225# This file is free software; the Free Software Foundation
10226# gives unlimited permission to copy and/or distribute it,
10227# with or without modifications, as long as this notice is preserved.
10228
10229# _AM_MANGLE_OPTION(NAME)
10230# -----------------------
10231AC_DEFUN([_AM_MANGLE_OPTION],
10232[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10233
10234# _AM_SET_OPTION(NAME)
10235# --------------------
10236# Set option NAME.  Presently that only means defining a flag for this option.
10237AC_DEFUN([_AM_SET_OPTION],
10238[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
10239
10240# _AM_SET_OPTIONS(OPTIONS)
10241# ------------------------
10242# OPTIONS is a space-separated list of Automake options.
10243AC_DEFUN([_AM_SET_OPTIONS],
10244[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10245
10246# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10247# -------------------------------------------
10248# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10249AC_DEFUN([_AM_IF_OPTION],
10250[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10251
10252# Copyright (C) 1999-2014 Free Software Foundation, Inc.
10253#
10254# This file is free software; the Free Software Foundation
10255# gives unlimited permission to copy and/or distribute it,
10256# with or without modifications, as long as this notice is preserved.
10257
10258# _AM_PROG_CC_C_O
10259# ---------------
10260# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
10261# to automatically call this.
10262AC_DEFUN([_AM_PROG_CC_C_O],
10263[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10264AC_REQUIRE_AUX_FILE([compile])dnl
10265AC_LANG_PUSH([C])dnl
10266AC_CACHE_CHECK(
10267  [whether $CC understands -c and -o together],
10268  [am_cv_prog_cc_c_o],
10269  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
10270  # Make sure it works both with $CC and with simple cc.
10271  # Following AC_PROG_CC_C_O, we do the test twice because some
10272  # compilers refuse to overwrite an existing .o file with -o,
10273  # though they will create one.
10274  am_cv_prog_cc_c_o=yes
10275  for am_i in 1 2; do
10276    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
10277         && test -f conftest2.$ac_objext; then
10278      : OK
10279    else
10280      am_cv_prog_cc_c_o=no
10281      break
10282    fi
10283  done
10284  rm -f core conftest*
10285  unset am_i])
10286if test "$am_cv_prog_cc_c_o" != yes; then
10287   # Losing compiler, so override with the script.
10288   # FIXME: It is wrong to rewrite CC.
10289   # But if we don't then we get into trouble of one sort or another.
10290   # A longer-term fix would be to have automake use am__CC in this case,
10291   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10292   CC="$am_aux_dir/compile $CC"
10293fi
10294AC_LANG_POP([C])])
10295
10296# For backward compatibility.
10297AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
10298
10299# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10300#
10301# This file is free software; the Free Software Foundation
10302# gives unlimited permission to copy and/or distribute it,
10303# with or without modifications, as long as this notice is preserved.
10304
10305# AM_RUN_LOG(COMMAND)
10306# -------------------
10307# Run COMMAND, save the exit status in ac_status, and log it.
10308# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
10309AC_DEFUN([AM_RUN_LOG],
10310[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
10311   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
10312   ac_status=$?
10313   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10314   (exit $ac_status); }])
10315
10316# Check to make sure that the build environment is sane.    -*- Autoconf -*-
10317
10318# Copyright (C) 1996-2014 Free Software Foundation, Inc.
10319#
10320# This file is free software; the Free Software Foundation
10321# gives unlimited permission to copy and/or distribute it,
10322# with or without modifications, as long as this notice is preserved.
10323
10324# AM_SANITY_CHECK
10325# ---------------
10326AC_DEFUN([AM_SANITY_CHECK],
10327[AC_MSG_CHECKING([whether build environment is sane])
10328# Reject unsafe characters in $srcdir or the absolute working directory
10329# name.  Accept space and tab only in the latter.
10330am_lf='
10331'
10332case `pwd` in
10333  *[[\\\"\#\$\&\'\`$am_lf]]*)
10334    AC_MSG_ERROR([unsafe absolute working directory name]);;
10335esac
10336case $srcdir in
10337  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
10338    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10339esac
10340
10341# Do 'set' in a subshell so we don't clobber the current shell's
10342# arguments.  Must try -L first in case configure is actually a
10343# symlink; some systems play weird games with the mod time of symlinks
10344# (eg FreeBSD returns the mod time of the symlink's containing
10345# directory).
10346if (
10347   am_has_slept=no
10348   for am_try in 1 2; do
10349     echo "timestamp, slept: $am_has_slept" > conftest.file
10350     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10351     if test "$[*]" = "X"; then
10352	# -L didn't work.
10353	set X `ls -t "$srcdir/configure" conftest.file`
10354     fi
10355     if test "$[*]" != "X $srcdir/configure conftest.file" \
10356	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
10357
10358	# If neither matched, then we have a broken ls.  This can happen
10359	# if, for instance, CONFIG_SHELL is bash and it inherits a
10360	# broken ls alias from the environment.  This has actually
10361	# happened.  Such a system could not be considered "sane".
10362	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10363  alias in your environment])
10364     fi
10365     if test "$[2]" = conftest.file || test $am_try -eq 2; then
10366       break
10367     fi
10368     # Just in case.
10369     sleep 1
10370     am_has_slept=yes
10371   done
10372   test "$[2]" = conftest.file
10373   )
10374then
10375   # Ok.
10376   :
10377else
10378   AC_MSG_ERROR([newly created file is older than distributed files!
10379Check your system clock])
10380fi
10381AC_MSG_RESULT([yes])
10382# If we didn't sleep, we still need to ensure time stamps of config.status and
10383# generated files are strictly newer.
10384am_sleep_pid=
10385if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10386  ( sleep 1 ) &
10387  am_sleep_pid=$!
10388fi
10389AC_CONFIG_COMMANDS_PRE(
10390  [AC_MSG_CHECKING([that generated files are newer than configure])
10391   if test -n "$am_sleep_pid"; then
10392     # Hide warnings about reused PIDs.
10393     wait $am_sleep_pid 2>/dev/null
10394   fi
10395   AC_MSG_RESULT([done])])
10396rm -f conftest.file
10397])
10398
10399# Copyright (C) 2009-2014 Free Software Foundation, Inc.
10400#
10401# This file is free software; the Free Software Foundation
10402# gives unlimited permission to copy and/or distribute it,
10403# with or without modifications, as long as this notice is preserved.
10404
10405# AM_SILENT_RULES([DEFAULT])
10406# --------------------------
10407# Enable less verbose build rules; with the default set to DEFAULT
10408# ("yes" being less verbose, "no" or empty being verbose).
10409AC_DEFUN([AM_SILENT_RULES],
10410[AC_ARG_ENABLE([silent-rules], [dnl
10411AS_HELP_STRING(
10412  [--enable-silent-rules],
10413  [less verbose build output (undo: "make V=1")])
10414AS_HELP_STRING(
10415  [--disable-silent-rules],
10416  [verbose build output (undo: "make V=0")])dnl
10417])
10418case $enable_silent_rules in @%:@ (((
10419  yes) AM_DEFAULT_VERBOSITY=0;;
10420   no) AM_DEFAULT_VERBOSITY=1;;
10421    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10422esac
10423dnl
10424dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
10425dnl do not support nested variable expansions.
10426dnl See automake bug#9928 and bug#10237.
10427am_make=${MAKE-make}
10428AC_CACHE_CHECK([whether $am_make supports nested variables],
10429   [am_cv_make_support_nested_variables],
10430   [if AS_ECHO([['TRUE=$(BAR$(V))
10431BAR0=false
10432BAR1=true
10433V=1
10434am__doit:
10435	@$(TRUE)
10436.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10437  am_cv_make_support_nested_variables=yes
10438else
10439  am_cv_make_support_nested_variables=no
10440fi])
10441if test $am_cv_make_support_nested_variables = yes; then
10442  dnl Using '$V' instead of '$(V)' breaks IRIX make.
10443  AM_V='$(V)'
10444  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10445else
10446  AM_V=$AM_DEFAULT_VERBOSITY
10447  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10448fi
10449AC_SUBST([AM_V])dnl
10450AM_SUBST_NOTMAKE([AM_V])dnl
10451AC_SUBST([AM_DEFAULT_V])dnl
10452AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10453AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10454AM_BACKSLASH='\'
10455AC_SUBST([AM_BACKSLASH])dnl
10456_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10457])
10458
10459# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10460#
10461# This file is free software; the Free Software Foundation
10462# gives unlimited permission to copy and/or distribute it,
10463# with or without modifications, as long as this notice is preserved.
10464
10465# AM_PROG_INSTALL_STRIP
10466# ---------------------
10467# One issue with vendor 'install' (even GNU) is that you can't
10468# specify the program used to strip binaries.  This is especially
10469# annoying in cross-compiling environments, where the build's strip
10470# is unlikely to handle the host's binaries.
10471# Fortunately install-sh will honor a STRIPPROG variable, so we
10472# always use install-sh in "make install-strip", and initialize
10473# STRIPPROG with the value of the STRIP variable (set by the user).
10474AC_DEFUN([AM_PROG_INSTALL_STRIP],
10475[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10476# Installed binaries are usually stripped using 'strip' when the user
10477# run "make install-strip".  However 'strip' might not be the right
10478# tool to use in cross-compilation environments, therefore Automake
10479# will honor the 'STRIP' environment variable to overrule this program.
10480dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
10481if test "$cross_compiling" != no; then
10482  AC_CHECK_TOOL([STRIP], [strip], :)
10483fi
10484INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10485AC_SUBST([INSTALL_STRIP_PROGRAM])])
10486
10487# Copyright (C) 2006-2014 Free Software Foundation, Inc.
10488#
10489# This file is free software; the Free Software Foundation
10490# gives unlimited permission to copy and/or distribute it,
10491# with or without modifications, as long as this notice is preserved.
10492
10493# _AM_SUBST_NOTMAKE(VARIABLE)
10494# ---------------------------
10495# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10496# This macro is traced by Automake.
10497AC_DEFUN([_AM_SUBST_NOTMAKE])
10498
10499# AM_SUBST_NOTMAKE(VARIABLE)
10500# --------------------------
10501# Public sister of _AM_SUBST_NOTMAKE.
10502AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10503
10504# Check how to create a tarball.                            -*- Autoconf -*-
10505
10506# Copyright (C) 2004-2014 Free Software Foundation, Inc.
10507#
10508# This file is free software; the Free Software Foundation
10509# gives unlimited permission to copy and/or distribute it,
10510# with or without modifications, as long as this notice is preserved.
10511
10512# _AM_PROG_TAR(FORMAT)
10513# --------------------
10514# Check how to create a tarball in format FORMAT.
10515# FORMAT should be one of 'v7', 'ustar', or 'pax'.
10516#
10517# Substitute a variable $(am__tar) that is a command
10518# writing to stdout a FORMAT-tarball containing the directory
10519# $tardir.
10520#     tardir=directory && $(am__tar) > result.tar
10521#
10522# Substitute a variable $(am__untar) that extract such
10523# a tarball read from stdin.
10524#     $(am__untar) < result.tar
10525#
10526AC_DEFUN([_AM_PROG_TAR],
10527[# Always define AMTAR for backward compatibility.  Yes, it's still used
10528# in the wild :-(  We should find a proper way to deprecate it ...
10529AC_SUBST([AMTAR], ['$${TAR-tar}'])
10530
10531# We'll loop over all known methods to create a tar archive until one works.
10532_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10533
10534m4_if([$1], [v7],
10535  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10536
10537  [m4_case([$1],
10538    [ustar],
10539     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
10540      # There is notably a 21 bits limit for the UID and the GID.  In fact,
10541      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
10542      # and bug#13588).
10543      am_max_uid=2097151 # 2^21 - 1
10544      am_max_gid=$am_max_uid
10545      # The $UID and $GID variables are not portable, so we need to resort
10546      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
10547      # below are definitely unexpected, so allow the users to see them
10548      # (that is, avoid stderr redirection).
10549      am_uid=`id -u || echo unknown`
10550      am_gid=`id -g || echo unknown`
10551      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
10552      if test $am_uid -le $am_max_uid; then
10553         AC_MSG_RESULT([yes])
10554      else
10555         AC_MSG_RESULT([no])
10556         _am_tools=none
10557      fi
10558      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
10559      if test $am_gid -le $am_max_gid; then
10560         AC_MSG_RESULT([yes])
10561      else
10562        AC_MSG_RESULT([no])
10563        _am_tools=none
10564      fi],
10565
10566  [pax],
10567    [],
10568
10569  [m4_fatal([Unknown tar format])])
10570
10571  AC_MSG_CHECKING([how to create a $1 tar archive])
10572
10573  # Go ahead even if we have the value already cached.  We do so because we
10574  # need to set the values for the 'am__tar' and 'am__untar' variables.
10575  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10576
10577  for _am_tool in $_am_tools; do
10578    case $_am_tool in
10579    gnutar)
10580      for _am_tar in tar gnutar gtar; do
10581        AM_RUN_LOG([$_am_tar --version]) && break
10582      done
10583      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10584      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10585      am__untar="$_am_tar -xf -"
10586      ;;
10587    plaintar)
10588      # Must skip GNU tar: if it does not support --format= it doesn't create
10589      # ustar tarball either.
10590      (tar --version) >/dev/null 2>&1 && continue
10591      am__tar='tar chf - "$$tardir"'
10592      am__tar_='tar chf - "$tardir"'
10593      am__untar='tar xf -'
10594      ;;
10595    pax)
10596      am__tar='pax -L -x $1 -w "$$tardir"'
10597      am__tar_='pax -L -x $1 -w "$tardir"'
10598      am__untar='pax -r'
10599      ;;
10600    cpio)
10601      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10602      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10603      am__untar='cpio -i -H $1 -d'
10604      ;;
10605    none)
10606      am__tar=false
10607      am__tar_=false
10608      am__untar=false
10609      ;;
10610    esac
10611
10612    # If the value was cached, stop now.  We just wanted to have am__tar
10613    # and am__untar set.
10614    test -n "${am_cv_prog_tar_$1}" && break
10615
10616    # tar/untar a dummy directory, and stop if the command works.
10617    rm -rf conftest.dir
10618    mkdir conftest.dir
10619    echo GrepMe > conftest.dir/file
10620    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10621    rm -rf conftest.dir
10622    if test -s conftest.tar; then
10623      AM_RUN_LOG([$am__untar <conftest.tar])
10624      AM_RUN_LOG([cat conftest.dir/file])
10625      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10626    fi
10627  done
10628  rm -rf conftest.dir
10629
10630  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10631  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10632
10633AC_SUBST([am__tar])
10634AC_SUBST([am__untar])
10635]) # _AM_PROG_TAR
10636
10637dnl $Id$
10638dnl
10639dnl Copyright (c) 2002-2006
10640dnl         The Xfce development team. All rights reserved.
10641dnl
10642dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
10643dnl
10644dnl This program is free software; you can redistribute it and/or modify
10645dnl it under the terms of the GNU General Public License as published by
10646dnl the Free Software Foundation; either version 2 of the License, or
10647dnl (at your option) any later version.
10648dnl
10649dnl This program is distributed in the hope that it will be useful,
10650dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10651dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10652dnl GNU General Public License for more details.
10653dnl
10654dnl You should have received a copy of the GNU General Public License along
10655dnl with this program; if not, write to the Free Software Foundation, Inc.,
10656dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
10657dnl
10658dnl xdt-depends
10659dnl -----------
10660dnl  Contains M4 macros to check for software dependencies.
10661dnl  Partly based on prior work of the XDG contributors.
10662dnl
10663
10664
10665
10666dnl We need recent a autoconf version
10667AC_PREREQ([2.53])
10668
10669
10670
10671dnl XDT_PROG_PKG_CONFIG()
10672dnl
10673dnl Checks for the freedesktop.org pkg-config
10674dnl utility and sets the PKG_CONFIG environment
10675dnl variable to the full path if found.
10676dnl
10677AC_DEFUN([XDT_PROG_PKG_CONFIG],
10678[
10679  # minimum supported version of pkg-config
10680  xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0
10681
10682  m4_ifdef([PKG_PROG_PKG_CONFIG],
10683    [
10684      PKG_PROG_PKG_CONFIG([$xdt_cv_PKG_CONFIG_MIN_VERSION])
10685
10686      if test x"$PKG_CONFIG" = x""; then
10687        echo
10688        echo "*** Your version of pkg-config is too old. You need atleast"
10689        echo "*** pkg-config $xdt_cv_PKG_CONFIG_MIN_VERSION or newer. You can download pkg-config"
10690        echo "*** from the freedesktop.org software repository at"
10691        echo "***"
10692        echo "***    http://www.freedesktop.org/software/pkgconfig"
10693        echo "***"
10694        exit 1;
10695      fi
10696    ],
10697    [
10698      echo
10699      echo "*** The pkg-config utility could not be found on your system."
10700      echo "*** Make sure it is in your path, or set the PKG_CONFIG"
10701      echo "*** environment variable to the full path to pkg-config."
10702      echo "*** You can download pkg-config from the freedesktop.org"
10703      echo "*** software repository at"
10704      echo "***"
10705      echo "***    http://www.freedesktop.org/software/pkgconfig"
10706      echo "***"
10707      exit 1
10708    ])
10709])
10710
10711
10712
10713dnl XDT_CHECK_PACKAGE(varname, package, version, [action-if], [action-if-not])
10714dnl
10715dnl Checks if "package" >= "version" is installed on the
10716dnl target system, using the pkg-config utility. If the
10717dnl dependency is met, "varname"_CFLAGS, "varname"_LIBS,
10718dnl "varname"_VERSION and "varname"_REQUIRED_VERSION
10719dnl will be set and marked for substition.
10720dnl
10721dnl "varname"_REQUIRED_VERSION will be set to the value of
10722dnl "version". This is mostly useful to automatically
10723dnl place the correct version information into the RPM
10724dnl .spec file.
10725dnl
10726dnl In addition, if the dependency is met, "action-if" will
10727dnl be executed if given.
10728dnl
10729dnl If the package check fails, "action-if-not" will be
10730dnl executed. If this parameter isn't specified, a diagnostic
10731dnl message will be printed and the configure script will
10732dnl be terminated with exit code 1.
10733dnl
10734AC_DEFUN([XDT_CHECK_PACKAGE],
10735[
10736  XDT_PROG_PKG_CONFIG()
10737
10738  AC_MSG_CHECKING([for $2 >= $3])
10739  if $PKG_CONFIG "--atleast-version=$3" "$2" >/dev/null 2>&1; then
10740    $1_VERSION=`$PKG_CONFIG --modversion "$2"`
10741    AC_MSG_RESULT([$$1_VERSION])
10742
10743    AC_MSG_CHECKING([$1_CFLAGS])
10744    $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
10745    AC_MSG_RESULT([$$1_CFLAGS])
10746
10747    AC_MSG_CHECKING([$1_LIBS])
10748    $1_LIBS=`$PKG_CONFIG --libs "$2"`
10749    AC_MSG_RESULT([$$1_LIBS])
10750
10751    $1_REQUIRED_VERSION=$3
10752
10753    AC_SUBST([$1_VERSION])
10754    AC_SUBST([$1_CFLAGS])
10755    AC_SUBST([$1_LIBS])
10756    AC_SUBST([$1_REQUIRED_VERSION])
10757
10758    ifelse([$4], , , [$4])
10759  elif $PKG_CONFIG --exists "$2" >/dev/null 2>&1; then
10760    xdt_cv_version=`$PKG_CONFIG --modversion "$2"`
10761    AC_MSG_RESULT([found, but $xdt_cv_version])
10762
10763    ifelse([$5], ,
10764    [
10765      echo "*** The required package $2 was found on your system,"
10766      echo "*** but the installed version ($xdt_cv_version) is too old."
10767      echo "*** Please upgrade $2 to atleast version $3, or adjust"
10768      echo "*** the PKG_CONFIG_PATH environment variable if you installed"
10769      echo "*** the new version of the package in a nonstandard prefix so"
10770      echo "*** pkg-config is able to find it."
10771      exit 1
10772    ], [$5])
10773  else
10774    AC_MSG_RESULT([not found])
10775
10776    ifelse([$5], ,
10777    [
10778      echo "*** The required package $2 was not found on your system."
10779      echo "*** Please install $2 (atleast version $3) or adjust"
10780      echo "*** the PKG_CONFIG_PATH environment variable if you"
10781      echo "*** installed the package in a nonstandard prefix so that"
10782      echo "*** pkg-config is able to find it."
10783      exit 1
10784    ], [$5])
10785  fi
10786])
10787
10788
10789
10790dnl XDT_CHECK_OPTIONAL_PACKAGE(varname, package, version, optionname, helpstring, [default])
10791dnl
10792dnl Checks for an optional dependency on "package" >= "version". "default"
10793dnl can be "yes" or "no" (defaults to "yes" if not specified) and controls
10794dnl whether configure should check this dependency by default, or only if
10795dnl the user explicitly enables it using a command line switch.
10796dnl
10797dnl This macro automatically adds a commandline switch based on the "optionname"
10798dnl parameter (--enable-optionname/--disable-optionname), which allows the
10799dnl user to explicitly control whether this optional dependency should be
10800dnl enabled or not. The "helpstring" parameter gives a brief(!) description
10801dnl about this dependency.
10802dnl
10803dnl If the user chose to enable this dependency and the required package
10804dnl was found, this macro defines the variable "varname"_FOUND and sets it
10805dnl to the string "yes", in addition to the 4 variables set by XDT_CHECK_PACKAGE.
10806dnl But "varname"_FOUND will not be marked for substition. Furthermore,
10807dnl a CPP define HAVE_"varname" will be placed in config.h (or added to
10808dnl the cc command line, depending on your configure.ac) and set to
10809dnl 1.
10810dnl
10811AC_DEFUN([XDT_CHECK_OPTIONAL_PACKAGE],
10812[
10813  AC_REQUIRE([XDT_PROG_PKG_CONFIG])
10814
10815  AC_ARG_ENABLE([$4],
10816AC_HELP_STRING([--enable-$4], [Enable checking for $5 (default=m4_default([$6], [yes]))])
10817AC_HELP_STRING([--disable-$4], [Disable checking for $5]),
10818    [xdt_cv_$1_check=$enableval], [xdt_cv_$1_check=m4_default([$6], [yes])])
10819
10820  if test x"$xdt_cv_$1_check" = x"yes"; then
10821    if $PKG_CONFIG --exists "$2 >= $3" >/dev/null 2>&1; then
10822      XDT_CHECK_PACKAGE([$1], [$2], [$3],
10823      [
10824        AC_DEFINE([HAVE_$1], [1], [Define if $2 >= $3 present])
10825        $1_FOUND="yes"
10826      ])
10827    else
10828      AC_MSG_CHECKING([for optional package $2 >= $3])
10829      AC_MSG_RESULT([not found])
10830    fi
10831  else
10832    AC_MSG_CHECKING([for optional package $2])
10833    AC_MSG_RESULT([disabled])
10834  fi
10835
10836  AM_CONDITIONAL([HAVE_$1], [test x"$$1_FOUND" = x"yes"])
10837])
10838
10839
10840
10841dnl XDT_CHECK_LIBX11()
10842dnl
10843dnl Executes various checks for X11. Sets LIBX11_CFLAGS, LIBX11_LDFLAGS
10844dnl and LIBX11_LIBS (and marks them for substitution). In addition
10845dnl HAVE_LIBX11 is set to 1 in config.h, if the X window system and
10846dnl the development files are detected on the target system.
10847dnl
10848AC_DEFUN([XDT_CHECK_LIBX11],
10849[
10850  AC_REQUIRE([AC_PATH_XTRA])
10851
10852  LIBX11_CFLAGS= LIBX11_LDFLAGS= LIBX11_LIBS=
10853  if test x"$no_x" != x"yes"; then
10854    AC_CHECK_LIB([X11], [main],
10855    [
10856      AC_DEFINE([HAVE_LIBX11], [1], [Define if libX11 is available])
10857      LIBX11_CFLAGS="$X_CFLAGS"
10858      for option in $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS; do
10859      	case "$option" in
10860        -L*)
10861          path=`echo $option | sed 's/^-L//'`
10862          if test x"$path" != x""; then
10863            LIBX11_LDFLAGS="$LIBX11_LDFLAGS -L$path"
10864          fi
10865          ;;
10866        *)
10867          LIBX11_LIBS="$LIBX11_LIBS $option"
10868          ;;
10869        esac
10870      done
10871      if ! echo $LIBX11_LIBS | grep -- '-lX11' >/dev/null; then
10872        LIBX11_LIBS="$LIBX11_LIBS -lX11"
10873      fi
10874    ], [], [$X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS])
10875  fi
10876  AC_SUBST([LIBX11_CFLAGS])
10877  AC_SUBST([LIBX11_LDFLAGS])
10878  AC_SUBST([LIBX11_LIBS])
10879])
10880
10881
10882
10883dnl XDT_CHECK_LIBX11_REQUIRE()
10884dnl
10885dnl Similar to XDT_CHECK_LIBX11(), but terminates with an error if
10886dnl the X window system and development files aren't detected on the
10887dnl target system.
10888dnl
10889AC_DEFUN([XDT_CHECK_LIBX11_REQUIRE],
10890[
10891  AC_REQUIRE([XDT_CHECK_LIBX11])
10892
10893  if test x"$no_x" = x"yes"; then
10894    AC_MSG_ERROR([X Window system libraries and header files are required])
10895  fi
10896])
10897
10898
10899
10900dnl XDT_CHECK_LIBSM()
10901dnl
10902dnl Checks whether the session management library is present on the
10903dnl target system, and sets LIBSM_CFLAGS, LIBSM_LDFLAGS and LIBSM_LIBS
10904dnl properly. In addition, HAVE_LIBSM will be set to 1 in config.h
10905dnl if libSM is detected.
10906dnl
10907AC_DEFUN([XDT_CHECK_LIBSM],
10908[
10909  AC_REQUIRE([XDT_CHECK_LIBX11])
10910
10911  LIBSM_CFLAGS= LIBSM_LDFLAGS= LIBSM_LIBS=
10912  if test x"$no_x" != x"yes"; then
10913    AC_CHECK_LIB([SM], [SmcSaveYourselfDone],
10914    [
10915      AC_DEFINE([HAVE_LIBSM], [1], [Define if libSM is available])
10916      LIBSM_CFLAGS="$LIBX11_CFLAGS"
10917      LIBSM_LDFLAGS="$LIBX11_LDFLAGS"
10918      LIBSM_LIBS="$LIBX11_LIBS"
10919      if ! echo $LIBSM_LIBS | grep -- '-lSM' >/dev/null; then
10920        LIBSM_LIBS="$LIBSM_LIBS -lSM -lICE"
10921      fi
10922    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lICE])
10923  fi
10924  AC_SUBST([LIBSM_CFLAGS])
10925  AC_SUBST([LIBSM_LDFLAGS])
10926  AC_SUBST([LIBSM_LIBS])
10927])
10928
10929
10930
10931dnl XDT_CHECK_LIBXPM()
10932dnl
10933dnl Checks if the Xpm library is present on the target system, and
10934dnl sets LIBXPM_CFLAGS, LIBXPM_LDFLAGS and LIBXPM_LIBS. In addition,
10935dnl HAVE_LIBXPM will be set to 1 in config.h if libXpm is detected.
10936dnl
10937AC_DEFUN([XDT_CHECK_LIBXPM],
10938[
10939  AC_REQUIRE([XDT_CHECK_LIBX11])
10940
10941  LIBXPM_CFLAGS= LIBXPM_LDFLAGS= LIBXPM_LIBS=
10942  if test "$no_x" != "yes"; then
10943    AC_CHECK_LIB([Xpm], [main],
10944    [
10945      AC_DEFINE([HAVE_LIBXPM], [1], [Define if libXpm is available])
10946      LIBXPM_CFLAGS="$LIBX11_CFLAGS"
10947      LIBXPM_LDFLAGS="$LIBX11_LDFLAGS"
10948      LIBXPM_LIBS="$LIBX11_LIBS"
10949      if ! echo $LIBXPM_LIBS | grep -- '-lXpm' >/dev/null; then
10950        LIBXPM_LIBS="$LIBXPM_LIBS -lXpm"
10951      fi
10952    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lXpm])
10953  fi
10954  AC_SUBST([LIBXPM_CFLAGS])
10955  AC_SUBST([LIBXPM_LDFLAGS])
10956  AC_SUBST([LIBXPM_LIBS])
10957])
10958
10959
10960
10961dnl XDT_CHECK_LIBXPM_REQUIRE()
10962dnl
10963dnl Similar to XDT_CHECK_LIBXPM(), but fails if the Xpm library isn't
10964dnl present on the target system.
10965dnl
10966AC_DEFUN([XDT_CHECK_LIBXPM_REQUIRE],
10967[
10968  AC_REQUIRE([XDT_CHECK_LIBX11_REQUIRE])
10969  AC_REQUIRE([XDT_CHECK_LIBXPM])
10970
10971  if test x"$LIBXPM_LIBS" = x""; then
10972    AC_MSG_ERROR([The Xpm library was not found on your system])
10973  fi
10974])
10975
10976
10977dnl $Id$
10978dnl
10979dnl Copyright (c) 2002-2006
10980dnl         The Xfce development team. All rights reserved.
10981dnl
10982dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
10983dnl
10984dnl This program is free software; you can redistribute it and/or modify
10985dnl it under the terms of the GNU General Public License as published by
10986dnl the Free Software Foundation; either version 2 of the License, or
10987dnl (at your option) any later version.
10988dnl
10989dnl This program is distributed in the hope that it will be useful,
10990dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10991dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10992dnl GNU General Public License for more details.
10993dnl
10994dnl You should have received a copy of the GNU General Public License along
10995dnl with this program; if not, write to the Free Software Foundation, Inc.,
10996dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
10997dnl
10998dnl xdt-depends
10999dnl -----------
11000dnl  Contains M4 macros to check for software dependencies.
11001dnl  Partly based on prior work of the XDG contributors.
11002dnl
11003
11004
11005
11006dnl We need recent a autoconf version
11007AC_PREREQ([2.53])
11008
11009
11010dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS)
11011dnl
11012dnl For each token in FLAGS, checks to be sure the compiler supports
11013dnl the flag, and if so, adds each one to VAR.
11014dnl
11015AC_DEFUN([XDT_SUPPORTED_FLAGS],
11016[
11017  for flag in $2; do
11018    AC_MSG_CHECKING([if $CC supports $flag])
11019    saved_CFLAGS="$CFLAGS"
11020    CFLAGS="$CFLAGS $flag"
11021    AC_COMPILE_IFELSE([ ], [flag_supported=yes], [flag_supported=no])
11022    CFLAGS="$saved_CFLAGS"
11023    AC_MSG_RESULT([$flag_supported])
11024
11025    if test "x$flag_supported" = "xyes"; then
11026      $1="$$1 $flag"
11027    fi
11028  done
11029])
11030
11031
11032
11033dnl XDT_FEATURE_DEBUG(default_level=minimum)
11034dnl
11035AC_DEFUN([XDT_FEATURE_DEBUG],
11036[
11037  dnl weird indentation to keep output indentation correct
11038  AC_ARG_ENABLE([debug],
11039                AC_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],
11040                               [Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@])
11041AC_HELP_STRING([--disable-debug], [Include no debugging support]),
11042                [enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])])
11043
11044  AC_MSG_CHECKING([whether to build with debugging support])
11045  if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
11046    AC_DEFINE([DEBUG], [1], [Define for debugging support])
11047
11048    xdt_cv_additional_CFLAGS="-DXFCE_DISABLE_DEPRECATED \
11049                              -Wall -Wextra \
11050                              -Wno-missing-field-initializers \
11051                              -Wno-unused-parameter -Wold-style-definition \
11052                              -Wdeclaration-after-statement \
11053                              -Wmissing-declarations \
11054                              -Wmissing-noreturn -Wshadow -Wpointer-arith \
11055                              -Wcast-align -Wformat-security \
11056                              -Winit-self -Wmissing-include-dirs -Wundef \
11057                              -Wmissing-format-attribute -Wnested-externs"
11058    CPPFLAGS="$CPPFLAGS"
11059
11060    if test x`uname` = x"Linux"; then
11061      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -fstack-protector"
11062    fi
11063
11064    dnl # signal.h inline is crapy on openbsd
11065    if test x`uname` != x"OpenBSD"; then
11066      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -Wredundant-decls"
11067    fi
11068
11069    if test x"$enable_debug" = x"full"; then
11070      AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
11071      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g -Werror"
11072      CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG"
11073      AC_MSG_RESULT([full])
11074    else
11075      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -g"
11076      AC_MSG_RESULT([yes])
11077    fi
11078
11079    XDT_SUPPORTED_FLAGS([supported_CFLAGS], [$xdt_cv_additional_CFLAGS])
11080
11081    ifelse([$CXX], , , [
11082      dnl FIXME: should test on c++ compiler, but the following line causes
11083      dnl        autoconf errors for projects that don't check for a
11084      dnl        c++ compiler at all.
11085      dnl AC_LANG_PUSH([C++])
11086      dnl XDT_SUPPORTED_FLAGS([supported_CXXFLAGS], [$xdt_cv_additional_CFLAGS])
11087      dnl AC_LANG_POP()
11088      dnl        instead, just use supported_CFLAGS...
11089      supported_CXXFLAGS="$supported_CFLAGS"
11090    ])
11091
11092    CFLAGS="$CFLAGS $supported_CFLAGS"
11093    CXXFLAGS="$CXXFLAGS $supported_CXXFLAGS"
11094  else
11095    CPPFLAGS="$CPPFLAGS -DNDEBUG"
11096
11097    if test x"$enable_debug" = x"no"; then
11098      CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT"
11099      AC_MSG_RESULT([no])
11100    else
11101      AC_MSG_RESULT([minimum])
11102    fi
11103  fi
11104])
11105
11106
11107dnl XDT_FEATURE_VISIBILITY()
11108dnl
11109dnl Checks to see if the compiler supports the 'visibility' attribute
11110dnl If so, adds -DHAVE_GNUC_VISIBILTY to CPPFLAGS.  Also sets the
11111dnl automake conditional HAVE_GNUC_VISIBILITY.
11112dnl
11113AC_DEFUN([XDT_FEATURE_VISIBILITY],
11114[
11115  AC_ARG_ENABLE([visibility],
11116                AC_HELP_STRING([--disable-visibility],
11117                               [Don't use ELF visibility attributes]),
11118                [enable_visibility=$enableval], [enable_visibility=yes])
11119  have_gnuc_visibility=no
11120  if test "x$enable_visibility" != "xno"; then
11121    XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
11122    saved_CFLAGS="$CFLAGS"
11123    CFLAGS="$CFLAGS $xdt_vis_test_cflags"
11124    AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
11125    AC_COMPILE_IFELSE(AC_LANG_SOURCE(
11126    [
11127      void test_default (void);
11128      void test_hidden (void);
11129
11130      void __attribute__ ((visibility("default"))) test_default (void) {}
11131      void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
11132
11133      int main (int argc, char **argv) {
11134        test_default ();
11135        test_hidden ();
11136        return 0;
11137      }
11138    ]),
11139    [
11140      have_gnuc_visibility=yes
11141      AC_MSG_RESULT([yes])
11142    ],
11143    [
11144      AC_MSG_RESULT([no])
11145    ])
11146    CFLAGS="$saved_CFLAGS"
11147  fi
11148
11149  if test "x$have_gnuc_visibility" = "xyes"; then
11150    CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
11151    xdt_vis_hidden_cflags=""
11152    XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-xldscope=hidden])
11153    if test "x$xdt_vis_hidden_cflags" = "x"; then
11154      XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-fvisibility=hidden])
11155    fi
11156    CFLAGS="$CFLAGS $xdt_vis_hidden_cflags"
11157  fi
11158
11159  AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])
11160])
11161
11162dnl XDT_FEATURE_LINKER_OPTS
11163dnl
11164dnl Checks for and enables any special linker optimizations.
11165dnl
11166AC_DEFUN([XDT_FEATURE_LINKER_OPTS],
11167[
11168  AC_ARG_ENABLE([linker-opts],
11169                AC_HELP_STRING([--disable-linker-opts],
11170                               [Disable linker optimizations]),
11171                [enable_linker_opts=$enableval], [enable_linker_opts=yes])
11172
11173  if test "x$enable_linker_opts" != "xno"; then
11174    if test x`uname` != x"OpenBSD"; then
11175      AC_MSG_CHECKING([whether $LD accepts --as-needed])
11176      case `$LD --as-needed -v 2>&1 </dev/null` in
11177      *GNU* | *'with BFD'*)
11178        LDFLAGS="$LDFLAGS -Wl,--as-needed"
11179        AC_MSG_RESULT([yes])
11180        ;;
11181      *)
11182        AC_MSG_RESULT([no])
11183        ;;
11184      esac
11185    fi
11186    AC_MSG_CHECKING([whether $LD accepts -O1])
11187    case `$LD -O1 -v 2>&1 </dev/null` in
11188    *GNU* | *'with BFD'*)
11189      LDFLAGS="$LDFLAGS -Wl,-O1"
11190      AC_MSG_RESULT([yes])
11191      ;;
11192    *)
11193      AC_MSG_RESULT([no])
11194      ;;
11195    esac
11196  fi
11197])
11198
11199