ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/aclocal.m4
(Generate patch)

Comparing libeio/aclocal.m4 (file contents):
Revision 1.1 by root, Sun May 11 00:06:25 2008 UTC vs.
Revision 1.2 by root, Fri Jan 7 22:00:39 2011 UTC

1# generated automatically by aclocal 1.7.9 -*- Autoconf -*- 1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2 2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# Free Software Foundation, Inc. 4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved. 7# with or without modifications, as long as this notice is preserved.
8 8
9# This program is distributed in the hope that it will be useful, 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 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE. 12# PARTICULAR PURPOSE.
13 13
14# Do all the work for Automake. -*- Autoconf -*- 14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
17[m4_warning([this file was generated for autoconf 2.67.
18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
15 21
16# This macro actually does too much some checks are only needed if 22# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
17# your package does certain things. But this isn't really a big deal. 23#
18
19# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 24# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
20# Free Software Foundation, Inc. 25# 2006, 2007, 2008 Free Software Foundation, Inc.
26# Written by Gordon Matzigkeit, 1996
27#
28# This file is free software; the Free Software Foundation gives
29# unlimited permission to copy and/or distribute it, with or without
30# modifications, as long as this notice is preserved.
21 31
32m4_define([_LT_COPYING], [dnl
33# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
34# 2006, 2007, 2008 Free Software Foundation, Inc.
35# Written by Gordon Matzigkeit, 1996
36#
37# This file is part of GNU Libtool.
38#
22# This program is free software; you can redistribute it and/or modify 39# GNU Libtool is free software; you can redistribute it and/or
23# it under the terms of the GNU General Public License as published by 40# modify it under the terms of the GNU General Public License as
24# the Free Software Foundation; either version 2, or (at your option) 41# published by the Free Software Foundation; either version 2 of
25# any later version. 42# the License, or (at your option) any later version.
26 43#
44# As a special exception to the GNU General Public License,
45# if you distribute this file as part of a program or library that
46# is built using GNU Libtool, you may include this file under the
47# same distribution terms that you use for the rest of that program.
48#
27# This program is distributed in the hope that it will be useful, 49# GNU Libtool is distributed in the hope that it will be useful,
28# but WITHOUT ANY WARRANTY; without even the implied warranty of 50# but WITHOUT ANY WARRANTY; without even the implied warranty of
29# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 51# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30# GNU General Public License for more details. 52# GNU General Public License for more details.
31 53#
32# You should have received a copy of the GNU General Public License 54# You should have received a copy of the GNU General Public License
33# along with this program; if not, write to the Free Software 55# along with GNU Libtool; see the file COPYING. If not, a copy
34# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 56# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
35# 02111-1307, USA. 57# obtained by writing to the Free Software Foundation, Inc.,
36 58# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
37# serial 10
38
39AC_PREREQ([2.54])
40
41# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
42# the ones we care about.
43m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
44
45# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46# AM_INIT_AUTOMAKE([OPTIONS])
47# -----------------------------------------------
48# The call with PACKAGE and VERSION arguments is the old style
49# call (pre autoconf-2.50), which is being phased out. PACKAGE
50# and VERSION should now be passed to AC_INIT and removed from
51# the call to AM_INIT_AUTOMAKE.
52# We support both call styles for the transition. After
53# the next Automake release, Autoconf can make the AC_INIT
54# arguments mandatory, and then we can depend on a new Autoconf
55# release and drop the old call support.
56AC_DEFUN([AM_INIT_AUTOMAKE],
57[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58 AC_REQUIRE([AC_PROG_INSTALL])dnl
59# test to see if srcdir already configured
60if test "`cd $srcdir && pwd`" != "`pwd`" &&
61 test -f $srcdir/config.status; then
62 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
63fi
64
65# test whether we have cygpath
66if test -z "$CYGPATH_W"; then
67 if (cygpath --version) >/dev/null 2>/dev/null; then
68 CYGPATH_W='cygpath -w'
69 else
70 CYGPATH_W=echo
71 fi
72fi
73AC_SUBST([CYGPATH_W])
74
75# Define the identity of the package.
76dnl Distinguish between old-style and new-style calls.
77m4_ifval([$2],
78[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79 AC_SUBST([PACKAGE], [$1])dnl
80 AC_SUBST([VERSION], [$2])],
81[_AM_SET_OPTIONS([$1])dnl
82 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
84
85_AM_IF_OPTION([no-define],,
86[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
88
89# Some tools Automake needs.
90AC_REQUIRE([AM_SANITY_CHECK])dnl
91AC_REQUIRE([AC_ARG_PROGRAM])dnl
92AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93AM_MISSING_PROG(AUTOCONF, autoconf)
94AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95AM_MISSING_PROG(AUTOHEADER, autoheader)
96AM_MISSING_PROG(MAKEINFO, makeinfo)
97AM_MISSING_PROG(AMTAR, tar)
98AM_PROG_INSTALL_SH
99AM_PROG_INSTALL_STRIP
100# We need awk for the "check" target. The system "awk" is bad on
101# some platforms.
102AC_REQUIRE([AC_PROG_AWK])dnl
103AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104AC_REQUIRE([AM_SET_LEADING_DOT])dnl
105
106_AM_IF_OPTION([no-dependencies],,
107[AC_PROVIDE_IFELSE([AC_PROG_CC],
108 [_AM_DEPENDENCIES(CC)],
109 [define([AC_PROG_CC],
110 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111AC_PROVIDE_IFELSE([AC_PROG_CXX],
112 [_AM_DEPENDENCIES(CXX)],
113 [define([AC_PROG_CXX],
114 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
115]) 59])
60
61# serial 56 LT_INIT
62
63
64# LT_PREREQ(VERSION)
65# ------------------
66# Complain and exit if this libtool version is less that VERSION.
67m4_defun([LT_PREREQ],
68[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
69 [m4_default([$3],
70 [m4_fatal([Libtool version $1 or higher is required],
71 63)])],
72 [$2])])
73
74
75# _LT_CHECK_BUILDDIR
76# ------------------
77# Complain if the absolute build directory name contains unusual characters
78m4_defun([_LT_CHECK_BUILDDIR],
79[case `pwd` in
80 *\ * | *\ *)
81 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
82esac
116]) 83])
117 84
118 85
119# When config.status generates a header, we must update the stamp-h file. 86# LT_INIT([OPTIONS])
120# This file resides in the same directory as the config header
121# that is generated. The stamp files are numbered to have different names.
122
123# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124# loop where config.status creates the headers, so we can generate
125# our stamp files there.
126AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127[# Compute $1's index in $config_headers.
128_am_stamp_count=1
129for _am_header in $config_headers :; do
130 case $_am_header in
131 $1 | $1:* )
132 break ;;
133 * )
134 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135 esac
136done
137echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
138
139# Copyright 2002 Free Software Foundation, Inc.
140
141# This program is free software; you can redistribute it and/or modify
142# it under the terms of the GNU General Public License as published by
143# the Free Software Foundation; either version 2, or (at your option)
144# any later version.
145
146# This program is distributed in the hope that it will be useful,
147# but WITHOUT ANY WARRANTY; without even the implied warranty of
148# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149# GNU General Public License for more details.
150
151# You should have received a copy of the GNU General Public License
152# along with this program; if not, write to the Free Software
153# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
154
155# AM_AUTOMAKE_VERSION(VERSION)
156# ----------------------------
157# Automake X.Y traces this macro to ensure aclocal.m4 has been
158# generated from the m4 files accompanying Automake X.Y.
159AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
160
161# AM_SET_CURRENT_AUTOMAKE_VERSION
162# -------------------------------
163# Call AM_AUTOMAKE_VERSION so it can be traced.
164# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166 [AM_AUTOMAKE_VERSION([1.7.9])])
167
168# Helper functions for option handling. -*- Autoconf -*-
169
170# Copyright 2001, 2002 Free Software Foundation, Inc.
171
172# This program is free software; you can redistribute it and/or modify
173# it under the terms of the GNU General Public License as published by
174# the Free Software Foundation; either version 2, or (at your option)
175# any later version.
176
177# This program is distributed in the hope that it will be useful,
178# but WITHOUT ANY WARRANTY; without even the implied warranty of
179# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
180# GNU General Public License for more details.
181
182# You should have received a copy of the GNU General Public License
183# along with this program; if not, write to the Free Software
184# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
185# 02111-1307, USA.
186
187# serial 2
188
189# _AM_MANGLE_OPTION(NAME)
190# -----------------------
191AC_DEFUN([_AM_MANGLE_OPTION],
192[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
193
194# _AM_SET_OPTION(NAME)
195# ------------------------------
196# Set option NAME. Presently that only means defining a flag for this option.
197AC_DEFUN([_AM_SET_OPTION],
198[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
199
200# _AM_SET_OPTIONS(OPTIONS)
201# ----------------------------------
202# OPTIONS is a space-separated list of Automake options.
203AC_DEFUN([_AM_SET_OPTIONS],
204[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
205
206# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207# -------------------------------------------
208# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209AC_DEFUN([_AM_IF_OPTION],
210[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
211
212#
213# Check to make sure that the build environment is sane.
214#
215
216# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
217
218# This program is free software; you can redistribute it and/or modify
219# it under the terms of the GNU General Public License as published by
220# the Free Software Foundation; either version 2, or (at your option)
221# any later version.
222
223# This program is distributed in the hope that it will be useful,
224# but WITHOUT ANY WARRANTY; without even the implied warranty of
225# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
226# GNU General Public License for more details.
227
228# You should have received a copy of the GNU General Public License
229# along with this program; if not, write to the Free Software
230# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
231# 02111-1307, USA.
232
233# serial 3
234
235# AM_SANITY_CHECK
236# ---------------
237AC_DEFUN([AM_SANITY_CHECK],
238[AC_MSG_CHECKING([whether build environment is sane])
239# Just in case
240sleep 1
241echo timestamp > conftest.file
242# Do `set' in a subshell so we don't clobber the current shell's
243# arguments. Must try -L first in case configure is actually a
244# symlink; some systems play weird games with the mod time of symlinks
245# (eg FreeBSD returns the mod time of the symlink's containing
246# directory).
247if (
248 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249 if test "$[*]" = "X"; then
250 # -L didn't work.
251 set X `ls -t $srcdir/configure conftest.file`
252 fi
253 rm -f conftest.file
254 if test "$[*]" != "X $srcdir/configure conftest.file" \
255 && test "$[*]" != "X conftest.file $srcdir/configure"; then
256
257 # If neither matched, then we have a broken ls. This can happen
258 # if, for instance, CONFIG_SHELL is bash and it inherits a
259 # broken ls alias from the environment. This has actually
260 # happened. Such a system could not be considered "sane".
261 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
262alias in your environment])
263 fi
264
265 test "$[2]" = conftest.file
266 )
267then
268 # Ok.
269 :
270else
271 AC_MSG_ERROR([newly created file is older than distributed files!
272Check your system clock])
273fi
274AC_MSG_RESULT(yes)])
275
276# -*- Autoconf -*-
277
278
279# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
280
281# This program is free software; you can redistribute it and/or modify
282# it under the terms of the GNU General Public License as published by
283# the Free Software Foundation; either version 2, or (at your option)
284# any later version.
285
286# This program is distributed in the hope that it will be useful,
287# but WITHOUT ANY WARRANTY; without even the implied warranty of
288# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
289# GNU General Public License for more details.
290
291# You should have received a copy of the GNU General Public License
292# along with this program; if not, write to the Free Software
293# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
294# 02111-1307, USA.
295
296# serial 3
297
298# AM_MISSING_PROG(NAME, PROGRAM)
299# ------------------------------
300AC_DEFUN([AM_MISSING_PROG],
301[AC_REQUIRE([AM_MISSING_HAS_RUN])
302$1=${$1-"${am_missing_run}$2"}
303AC_SUBST($1)])
304
305
306# AM_MISSING_HAS_RUN
307# ------------------ 87# ------------------
308# Define MISSING if not defined so far and test if it supports --run. 88AC_DEFUN([LT_INIT],
309# If it does, set am_missing_run to use it, otherwise, to nothing. 89[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
310AC_DEFUN([AM_MISSING_HAS_RUN], 90AC_BEFORE([$0], [LT_LANG])dnl
311[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 91AC_BEFORE([$0], [LT_OUTPUT])dnl
312test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313# Use eval to expand $SHELL
314if eval "$MISSING --run true"; then
315 am_missing_run="$MISSING --run "
316else
317 am_missing_run=
318 AC_MSG_WARN([`missing' script is too old or missing])
319fi
320])
321
322# AM_AUX_DIR_EXPAND
323
324# Copyright 2001 Free Software Foundation, Inc.
325
326# This program is free software; you can redistribute it and/or modify
327# it under the terms of the GNU General Public License as published by
328# the Free Software Foundation; either version 2, or (at your option)
329# any later version.
330
331# This program is distributed in the hope that it will be useful,
332# but WITHOUT ANY WARRANTY; without even the implied warranty of
333# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
334# GNU General Public License for more details.
335
336# You should have received a copy of the GNU General Public License
337# along with this program; if not, write to the Free Software
338# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
339# 02111-1307, USA.
340
341# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
343# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
344#
345# Of course, Automake must honor this variable whenever it calls a
346# tool from the auxiliary directory. The problem is that $srcdir (and
347# therefore $ac_aux_dir as well) can be either absolute or relative,
348# depending on how configure is run. This is pretty annoying, since
349# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350# source directory, any form will work fine, but in subdirectories a
351# relative path needs to be adjusted first.
352#
353# $ac_aux_dir/missing
354# fails when called from a subdirectory if $ac_aux_dir is relative
355# $top_srcdir/$ac_aux_dir/missing
356# fails if $ac_aux_dir is absolute,
357# fails when called from a subdirectory in a VPATH build with
358# a relative $ac_aux_dir
359#
360# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361# are both prefixed by $srcdir. In an in-source build this is usually
362# harmless because $srcdir is `.', but things will broke when you
363# start a VPATH build or use an absolute $srcdir.
364#
365# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
367# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368# and then we would define $MISSING as
369# MISSING="\${SHELL} $am_aux_dir/missing"
370# This will work as long as MISSING is not called from configure, because
371# unfortunately $(top_srcdir) has no meaning in configure.
372# However there are other variables, like CC, which are often used in
373# configure, and could therefore not use this "fixed" $ac_aux_dir.
374#
375# Another solution, used here, is to always expand $ac_aux_dir to an
376# absolute PATH. The drawback is that using absolute paths prevent a
377# configured tree to be moved without reconfiguration.
378
379# Rely on autoconf to set up CDPATH properly.
380AC_PREREQ([2.50])
381
382AC_DEFUN([AM_AUX_DIR_EXPAND], [
383# expand $ac_aux_dir to an absolute path
384am_aux_dir=`cd $ac_aux_dir && pwd`
385])
386
387# AM_PROG_INSTALL_SH
388# ------------------
389# Define $install_sh.
390
391# Copyright 2001 Free Software Foundation, Inc.
392
393# This program is free software; you can redistribute it and/or modify
394# it under the terms of the GNU General Public License as published by
395# the Free Software Foundation; either version 2, or (at your option)
396# any later version.
397
398# This program is distributed in the hope that it will be useful,
399# but WITHOUT ANY WARRANTY; without even the implied warranty of
400# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
401# GNU General Public License for more details.
402
403# You should have received a copy of the GNU General Public License
404# along with this program; if not, write to the Free Software
405# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406# 02111-1307, USA.
407
408AC_DEFUN([AM_PROG_INSTALL_SH],
409[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410install_sh=${install_sh-"$am_aux_dir/install-sh"}
411AC_SUBST(install_sh)])
412
413# AM_PROG_INSTALL_STRIP
414
415# Copyright 2001 Free Software Foundation, Inc.
416
417# This program is free software; you can redistribute it and/or modify
418# it under the terms of the GNU General Public License as published by
419# the Free Software Foundation; either version 2, or (at your option)
420# any later version.
421
422# This program is distributed in the hope that it will be useful,
423# but WITHOUT ANY WARRANTY; without even the implied warranty of
424# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
425# GNU General Public License for more details.
426
427# You should have received a copy of the GNU General Public License
428# along with this program; if not, write to the Free Software
429# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
430# 02111-1307, USA.
431
432# One issue with vendor `install' (even GNU) is that you can't
433# specify the program used to strip binaries. This is especially
434# annoying in cross-compiling environments, where the build's strip
435# is unlikely to handle the host's binaries.
436# Fortunately install-sh will honor a STRIPPROG variable, so we
437# always use install-sh in `make install-strip', and initialize
438# STRIPPROG with the value of the STRIP variable (set by the user).
439AC_DEFUN([AM_PROG_INSTALL_STRIP],
440[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441# Installed binaries are usually stripped using `strip' when the user
442# run `make install-strip'. However `strip' might not be the right
443# tool to use in cross-compilation environments, therefore Automake
444# will honor the `STRIP' environment variable to overrule this program.
445dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446if test "$cross_compiling" != no; then
447 AC_CHECK_TOOL([STRIP], [strip], :)
448fi
449INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450AC_SUBST([INSTALL_STRIP_PROGRAM])])
451
452# -*- Autoconf -*-
453# Copyright (C) 2003 Free Software Foundation, Inc.
454
455# This program is free software; you can redistribute it and/or modify
456# it under the terms of the GNU General Public License as published by
457# the Free Software Foundation; either version 2, or (at your option)
458# any later version.
459
460# This program is distributed in the hope that it will be useful,
461# but WITHOUT ANY WARRANTY; without even the implied warranty of
462# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
463# GNU General Public License for more details.
464
465# You should have received a copy of the GNU General Public License
466# along with this program; if not, write to the Free Software
467# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
468# 02111-1307, USA.
469
470# serial 1
471
472# Check whether the underlying file-system supports filenames
473# with a leading dot. For instance MS-DOS doesn't.
474AC_DEFUN([AM_SET_LEADING_DOT],
475[rm -rf .tst 2>/dev/null
476mkdir .tst 2>/dev/null
477if test -d .tst; then
478 am__leading_dot=.
479else
480 am__leading_dot=_
481fi
482rmdir .tst 2>/dev/null
483AC_SUBST([am__leading_dot])])
484
485# serial 5 -*- Autoconf -*-
486
487# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
488
489# This program is free software; you can redistribute it and/or modify
490# it under the terms of the GNU General Public License as published by
491# the Free Software Foundation; either version 2, or (at your option)
492# any later version.
493
494# This program is distributed in the hope that it will be useful,
495# but WITHOUT ANY WARRANTY; without even the implied warranty of
496# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
497# GNU General Public License for more details.
498
499# You should have received a copy of the GNU General Public License
500# along with this program; if not, write to the Free Software
501# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
502# 02111-1307, USA.
503
504
505# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506# written in clear, in which case automake, when reading aclocal.m4,
507# will think it sees a *use*, and therefore will trigger all it's
508# C support machinery. Also note that it means that autoscan, seeing
509# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
510
511
512
513# _AM_DEPENDENCIES(NAME)
514# ----------------------
515# See how the compiler implements dependency checking.
516# NAME is "CC", "CXX", "GCJ", or "OBJC".
517# We try a few techniques and use that to set a single cache variable.
518#
519# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521# dependency, and given that the user is not expected to run this macro,
522# just rely on AC_PROG_CC.
523AC_DEFUN([_AM_DEPENDENCIES],
524[AC_REQUIRE([AM_SET_DEPDIR])dnl
525AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527AC_REQUIRE([AM_DEP_TRACK])dnl
528
529ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
530 [$1], CXX, [depcc="$CXX" am_compiler_list=],
531 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
533 [depcc="$$1" am_compiler_list=])
534
535AC_CACHE_CHECK([dependency style of $depcc],
536 [am_cv_$1_dependencies_compiler_type],
537[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538 # We make a subdir and do the tests there. Otherwise we can end up
539 # making bogus files that we don't know about and never remove. For
540 # instance it was reported that on HP-UX the gcc test will end up
541 # making a dummy file named `D' -- because `-MD' means `put the output
542 # in D'.
543 mkdir conftest.dir
544 # Copy depcomp to subdir because otherwise we won't find it if we're
545 # using a relative directory.
546 cp "$am_depcomp" conftest.dir
547 cd conftest.dir
548 # We will build objects and dependencies in a subdirectory because
549 # it helps to detect inapplicable dependency modes. For instance
550 # both Tru64's cc and ICC support -MD to output dependencies as a
551 # side effect of compilation, but ICC will put the dependencies in
552 # the current directory while Tru64 will put them in the object
553 # directory.
554 mkdir sub
555
556 am_cv_$1_dependencies_compiler_type=none
557 if test "$am_compiler_list" = ""; then
558 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
559 fi
560 for depmode in $am_compiler_list; do
561 # Setup a source with many dependencies, because some compilers
562 # like to wrap large dependency lists on column 80 (with \), and
563 # we should not choose a depcomp mode which is confused by this.
564 #
565 # We need to recreate these files for each test, as the compiler may
566 # overwrite some of them when testing with obscure command lines.
567 # This happens at least with the AIX C compiler.
568 : > sub/conftest.c
569 for i in 1 2 3 4 5 6; do
570 echo '#include "conftst'$i'.h"' >> sub/conftest.c
571 : > sub/conftst$i.h
572 done
573 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
574
575 case $depmode in
576 nosideeffect)
577 # after this tag, mechanisms are not by side-effect, so they'll
578 # only be used when explicitly requested
579 if test "x$enable_dependency_tracking" = xyes; then
580 continue
581 else
582 break
583 fi
584 ;;
585 none) break ;;
586 esac
587 # We check with `-c' and `-o' for the sake of the "dashmstdout"
588 # mode. It turns out that the SunPro C++ compiler does not properly
589 # handle `-M -o', and we need to detect this.
590 if depmode=$depmode \
591 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
592 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
593 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
594 >/dev/null 2>conftest.err &&
595 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
596 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598 # icc doesn't choke on unknown options, it will just issue warnings
599 # (even with -Werror). So we grep stderr for any message
600 # that says an option was ignored.
601 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
602 am_cv_$1_dependencies_compiler_type=$depmode
603 break
604 fi
605 fi
606 done
607
608 cd ..
609 rm -rf conftest.dir
610else
611 am_cv_$1_dependencies_compiler_type=none
612fi
613])
614AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615AM_CONDITIONAL([am__fastdep$1], [
616 test "x$enable_dependency_tracking" != xno \
617 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
618])
619
620
621# AM_SET_DEPDIR
622# -------------
623# Choose a directory name for dependency files.
624# This macro is AC_REQUIREd in _AM_DEPENDENCIES
625AC_DEFUN([AM_SET_DEPDIR],
626[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
628])
629
630
631# AM_DEP_TRACK
632# ------------
633AC_DEFUN([AM_DEP_TRACK],
634[AC_ARG_ENABLE(dependency-tracking,
635[ --disable-dependency-tracking Speeds up one-time builds
636 --enable-dependency-tracking Do not reject slow dependency extractors])
637if test "x$enable_dependency_tracking" != xno; then
638 am_depcomp="$ac_aux_dir/depcomp"
639 AMDEPBACKSLASH='\'
640fi
641AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642AC_SUBST([AMDEPBACKSLASH])
643])
644
645# Generate code to set up dependency tracking. -*- Autoconf -*-
646
647# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
648
649# This program is free software; you can redistribute it and/or modify
650# it under the terms of the GNU General Public License as published by
651# the Free Software Foundation; either version 2, or (at your option)
652# any later version.
653
654# This program is distributed in the hope that it will be useful,
655# but WITHOUT ANY WARRANTY; without even the implied warranty of
656# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
657# GNU General Public License for more details.
658
659# You should have received a copy of the GNU General Public License
660# along with this program; if not, write to the Free Software
661# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
662# 02111-1307, USA.
663
664#serial 2
665
666# _AM_OUTPUT_DEPENDENCY_COMMANDS
667# ------------------------------
668AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
669[for mf in $CONFIG_FILES; do
670 # Strip MF so we end up with the name of the file.
671 mf=`echo "$mf" | sed -e 's/:.*$//'`
672 # Check whether this is an Automake generated Makefile or not.
673 # We used to match only the files named `Makefile.in', but
674 # some people rename them; so instead we look at the file content.
675 # Grep'ing the first line is not enough: some people post-process
676 # each Makefile.in and add a new line on top of each file to say so.
677 # So let's grep whole file.
678 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
679 dirpart=`AS_DIRNAME("$mf")`
680 else
681 continue
682 fi
683 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684 # Extract the definition of DEP_FILES from the Makefile without
685 # running `make'.
686 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
687 test -z "$DEPDIR" && continue
688 # When using ansi2knr, U may be empty or an underscore; expand it
689 U=`sed -n -e '/^U = / s///p' < "$mf"`
690 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691 # We invoke sed twice because it is the simplest approach to
692 # changing $(DEPDIR) to its actual value in the expansion.
693 for file in `sed -n -e '
694 /^DEP_FILES = .*\\\\$/ {
695 s/^DEP_FILES = //
696 :loop
697 s/\\\\$//
698 p
699 n
700 /\\\\$/ b loop
701 p
702 }
703 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
704 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705 # Make sure the directory exists.
706 test -f "$dirpart/$file" && continue
707 fdir=`AS_DIRNAME(["$file"])`
708 AS_MKDIR_P([$dirpart/$fdir])
709 # echo "creating $dirpart/$file"
710 echo '# dummy' > "$dirpart/$file"
711 done
712done
713])# _AM_OUTPUT_DEPENDENCY_COMMANDS
714
715
716# AM_OUTPUT_DEPENDENCY_COMMANDS
717# -----------------------------
718# This macro should only be invoked once -- use via AC_REQUIRE.
719#
720# This code is only required when automatic dependency tracking
721# is enabled. FIXME. This creates each `.P' file that we will
722# need in order to bootstrap the dependency handling code.
723AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
724[AC_CONFIG_COMMANDS([depfiles],
725 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
726 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
727])
728
729# Check to see how 'make' treats includes. -*- Autoconf -*-
730
731# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
732
733# This program is free software; you can redistribute it and/or modify
734# it under the terms of the GNU General Public License as published by
735# the Free Software Foundation; either version 2, or (at your option)
736# any later version.
737
738# This program is distributed in the hope that it will be useful,
739# but WITHOUT ANY WARRANTY; without even the implied warranty of
740# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
741# GNU General Public License for more details.
742
743# You should have received a copy of the GNU General Public License
744# along with this program; if not, write to the Free Software
745# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
746# 02111-1307, USA.
747
748# serial 2
749
750# AM_MAKE_INCLUDE()
751# -----------------
752# Check to see how make treats includes.
753AC_DEFUN([AM_MAKE_INCLUDE],
754[am_make=${MAKE-make}
755cat > confinc << 'END'
756am__doit:
757 @echo done
758.PHONY: am__doit
759END
760# If we don't find an include directive, just comment out the code.
761AC_MSG_CHECKING([for style of include used by $am_make])
762am__include="#"
763am__quote=
764_am_result=none
765# First try GNU make style include.
766echo "include confinc" > confmf
767# We grep out `Entering directory' and `Leaving directory'
768# messages which can occur if `w' ends up in MAKEFLAGS.
769# In particular we don't look at `^make:' because GNU make might
770# be invoked under some other name (usually "gmake"), in which
771# case it prints its new name instead of `make'.
772if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
773 am__include=include
774 am__quote=
775 _am_result=GNU
776fi
777# Now try BSD make style include.
778if test "$am__include" = "#"; then
779 echo '.include "confinc"' > confmf
780 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
781 am__include=.include
782 am__quote="\""
783 _am_result=BSD
784 fi
785fi
786AC_SUBST([am__include])
787AC_SUBST([am__quote])
788AC_MSG_RESULT([$_am_result])
789rm -f confinc confmf
790])
791
792# AM_CONDITIONAL -*- Autoconf -*-
793
794# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
795
796# This program is free software; you can redistribute it and/or modify
797# it under the terms of the GNU General Public License as published by
798# the Free Software Foundation; either version 2, or (at your option)
799# any later version.
800
801# This program is distributed in the hope that it will be useful,
802# but WITHOUT ANY WARRANTY; without even the implied warranty of
803# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
804# GNU General Public License for more details.
805
806# You should have received a copy of the GNU General Public License
807# along with this program; if not, write to the Free Software
808# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
809# 02111-1307, USA.
810
811# serial 5
812
813AC_PREREQ(2.52)
814
815# AM_CONDITIONAL(NAME, SHELL-CONDITION)
816# -------------------------------------
817# Define a conditional.
818AC_DEFUN([AM_CONDITIONAL],
819[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
820 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821AC_SUBST([$1_TRUE])
822AC_SUBST([$1_FALSE])
823if $2; then
824 $1_TRUE=
825 $1_FALSE='#'
826else
827 $1_TRUE='#'
828 $1_FALSE=
829fi
830AC_CONFIG_COMMANDS_PRE(
831[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832 AC_MSG_ERROR([conditional "$1" was never defined.
833Usually this means the macro was only invoked conditionally.])
834fi])])
835
836# Add --enable-maintainer-mode option to configure.
837# From Jim Meyering
838
839# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
840
841# This program is free software; you can redistribute it and/or modify
842# it under the terms of the GNU General Public License as published by
843# the Free Software Foundation; either version 2, or (at your option)
844# any later version.
845
846# This program is distributed in the hope that it will be useful,
847# but WITHOUT ANY WARRANTY; without even the implied warranty of
848# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
849# GNU General Public License for more details.
850
851# You should have received a copy of the GNU General Public License
852# along with this program; if not, write to the Free Software
853# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
854# 02111-1307, USA.
855
856# serial 2
857
858AC_DEFUN([AM_MAINTAINER_MODE],
859[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
860 dnl maintainer-mode is disabled by default
861 AC_ARG_ENABLE(maintainer-mode,
862[ --enable-maintainer-mode enable make rules and dependencies not useful
863 (and sometimes confusing) to the casual installer],
864 USE_MAINTAINER_MODE=$enableval,
865 USE_MAINTAINER_MODE=no)
866 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
867 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
868 MAINT=$MAINTAINER_MODE_TRUE
869 AC_SUBST(MAINT)dnl
870]
871)
872
873AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
874
875# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
876
877# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
878
879
880# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
881# -----------------------------------------------------------
882# If this macro is not defined by Autoconf, define it here.
883m4_ifdef([AC_PROVIDE_IFELSE],
884 [],
885 [m4_define([AC_PROVIDE_IFELSE],
886 [m4_ifdef([AC_PROVIDE_$1],
887 [$2], [$3])])])
888
889
890# AC_PROG_LIBTOOL
891# ---------------
892AC_DEFUN([AC_PROG_LIBTOOL],
893[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
894dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
895dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
896 AC_PROVIDE_IFELSE([AC_PROG_CXX],
897 [AC_LIBTOOL_CXX],
898 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
899 ])])
900dnl And a similar setup for Fortran 77 support
901 AC_PROVIDE_IFELSE([AC_PROG_F77],
902 [AC_LIBTOOL_F77],
903 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
904])])
905
906dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
907dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
908dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
909 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
910 [AC_LIBTOOL_GCJ],
911 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
912 [AC_LIBTOOL_GCJ],
913 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
914 [AC_LIBTOOL_GCJ],
915 [ifdef([AC_PROG_GCJ],
916 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
917 ifdef([A][M_PROG_GCJ],
918 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
919 ifdef([LT_AC_PROG_GCJ],
920 [define([LT_AC_PROG_GCJ],
921 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
922])])# AC_PROG_LIBTOOL
923
924
925# _AC_PROG_LIBTOOL
926# ----------------
927AC_DEFUN([_AC_PROG_LIBTOOL],
928[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
929AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 92AC_BEFORE([$0], [LTDL_INIT])dnl
930AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 93m4_require([_LT_CHECK_BUILDDIR])dnl
931AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 94
95dnl Autoconf doesn't catch unexpanded LT_ macros by default:
96m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
97m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
98dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
99dnl unless we require an AC_DEFUNed macro:
100AC_REQUIRE([LTOPTIONS_VERSION])dnl
101AC_REQUIRE([LTSUGAR_VERSION])dnl
102AC_REQUIRE([LTVERSION_VERSION])dnl
103AC_REQUIRE([LTOBSOLETE_VERSION])dnl
104m4_require([_LT_PROG_LTMAIN])dnl
105
106dnl Parse OPTIONS
107_LT_SET_OPTIONS([$0], [$1])
932 108
933# This can be used to rebuild libtool when needed 109# This can be used to rebuild libtool when needed
934LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 110LIBTOOL_DEPS="$ltmain"
935 111
936# Always use our own libtool. 112# Always use our own libtool.
937LIBTOOL='$(SHELL) $(top_builddir)/libtool' 113LIBTOOL='$(SHELL) $(top_builddir)/libtool'
938AC_SUBST(LIBTOOL)dnl 114AC_SUBST(LIBTOOL)dnl
939 115
940# Prevent multiple expansion 116_LT_SETUP
117
118# Only expand once:
119m4_define([LT_INIT])
120])# LT_INIT
121
122# Old names:
123AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
124AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
125dnl aclocal-1.4 backwards compatibility:
941define([AC_PROG_LIBTOOL], []) 126dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
942])# _AC_PROG_LIBTOOL 127dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
943 128
944 129
945# AC_LIBTOOL_SETUP 130# _LT_CC_BASENAME(CC)
946# ---------------- 131# -------------------
947AC_DEFUN([AC_LIBTOOL_SETUP], 132# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
948[AC_PREREQ(2.50)dnl 133m4_defun([_LT_CC_BASENAME],
949AC_REQUIRE([AC_ENABLE_SHARED])dnl 134[for cc_temp in $1""; do
950AC_REQUIRE([AC_ENABLE_STATIC])dnl 135 case $cc_temp in
951AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 136 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
137 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
138 \-*) ;;
139 *) break;;
140 esac
141done
142cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
143])
144
145
146# _LT_FILEUTILS_DEFAULTS
147# ----------------------
148# It is okay to use these file commands and assume they have been set
149# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
150m4_defun([_LT_FILEUTILS_DEFAULTS],
151[: ${CP="cp -f"}
152: ${MV="mv -f"}
153: ${RM="rm -f"}
154])# _LT_FILEUTILS_DEFAULTS
155
156
157# _LT_SETUP
158# ---------
159m4_defun([_LT_SETUP],
952AC_REQUIRE([AC_CANONICAL_HOST])dnl 160[AC_REQUIRE([AC_CANONICAL_HOST])dnl
953AC_REQUIRE([AC_CANONICAL_BUILD])dnl 161AC_REQUIRE([AC_CANONICAL_BUILD])dnl
162_LT_DECL([], [host_alias], [0], [The host system])dnl
163_LT_DECL([], [host], [0])dnl
164_LT_DECL([], [host_os], [0])dnl
165dnl
166_LT_DECL([], [build_alias], [0], [The build system])dnl
167_LT_DECL([], [build], [0])dnl
168_LT_DECL([], [build_os], [0])dnl
169dnl
954AC_REQUIRE([AC_PROG_CC])dnl 170AC_REQUIRE([AC_PROG_CC])dnl
955AC_REQUIRE([AC_PROG_LD])dnl 171AC_REQUIRE([LT_PATH_LD])dnl
956AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
957AC_REQUIRE([AC_PROG_NM])dnl 172AC_REQUIRE([LT_PATH_NM])dnl
958 173dnl
959AC_REQUIRE([AC_PROG_LN_S])dnl 174AC_REQUIRE([AC_PROG_LN_S])dnl
960AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 175test -z "$LN_S" && LN_S="ln -s"
961# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 176_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
962AC_REQUIRE([AC_OBJEXT])dnl
963AC_REQUIRE([AC_EXEEXT])dnl
964dnl 177dnl
178AC_REQUIRE([LT_CMD_MAX_LEN])dnl
179_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
180_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
181dnl
182m4_require([_LT_FILEUTILS_DEFAULTS])dnl
183m4_require([_LT_CHECK_SHELL_FEATURES])dnl
184m4_require([_LT_CMD_RELOAD])dnl
185m4_require([_LT_CHECK_MAGIC_METHOD])dnl
186m4_require([_LT_CMD_OLD_ARCHIVE])dnl
187m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
965 188
966AC_LIBTOOL_SYS_MAX_CMD_LEN 189_LT_CONFIG_LIBTOOL_INIT([
967AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 190# See if we are running on zsh, and set the options which allow our
968AC_LIBTOOL_OBJDIR 191# commands through without removal of \ escapes INIT.
192if test -n "\${ZSH_VERSION+set}" ; then
193 setopt NO_GLOB_SUBST
194fi
195])
196if test -n "${ZSH_VERSION+set}" ; then
197 setopt NO_GLOB_SUBST
198fi
969 199
970AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 200_LT_CHECK_OBJDIR
201
202m4_require([_LT_TAG_COMPILER])dnl
971_LT_AC_PROG_ECHO_BACKSLASH 203_LT_PROG_ECHO_BACKSLASH
972 204
973case $host_os in 205case $host_os in
974aix3*) 206aix3*)
975 # AIX sometimes has problems with the GCC collect2 program. For some 207 # AIX sometimes has problems with the GCC collect2 program. For some
976 # reason, if we set the COLLECT_NAMES environment variable, the problems 208 # reason, if we set the COLLECT_NAMES environment variable, the problems
982 ;; 214 ;;
983esac 215esac
984 216
985# Sed substitution that helps us do robust quoting. It backslashifies 217# Sed substitution that helps us do robust quoting. It backslashifies
986# metacharacters that are still active within double-quoted strings. 218# metacharacters that are still active within double-quoted strings.
987Xsed='sed -e 1s/^X//'
988[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 219sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
989 220
990# Same as above, but do not quote variable references. 221# Same as above, but do not quote variable references.
991[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 222double_quote_subst='s/\([["`\\]]\)/\\\1/g'
992 223
993# Sed substitution to delay expansion of an escaped shell variable in a 224# Sed substitution to delay expansion of an escaped shell variable in a
994# double_quote_subst'ed string. 225# double_quote_subst'ed string.
995delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 226delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
996 227
228# Sed substitution to delay expansion of an escaped single quote.
229delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
230
997# Sed substitution to avoid accidental globbing in evaled expressions 231# Sed substitution to avoid accidental globbing in evaled expressions
998no_glob_subst='s/\*/\\\*/g' 232no_glob_subst='s/\*/\\\*/g'
999 233
1000# Constants:
1001rm="rm -f"
1002
1003# Global variables: 234# Global variables:
1004default_ofile=libtool 235ofile=libtool
1005can_build_shared=yes 236can_build_shared=yes
1006 237
1007# All known linkers require a `.a' archive for static linking (except MSVC, 238# All known linkers require a `.a' archive for static linking (except MSVC,
1008# which needs '.lib'). 239# which needs '.lib').
1009libext=a 240libext=a
1010ltmain="$ac_aux_dir/ltmain.sh" 241
1011ofile="$default_ofile"
1012with_gnu_ld="$lt_cv_prog_gnu_ld" 242with_gnu_ld="$lt_cv_prog_gnu_ld"
1013
1014AC_CHECK_TOOL(AR, ar, false)
1015AC_CHECK_TOOL(RANLIB, ranlib, :)
1016AC_CHECK_TOOL(STRIP, strip, :)
1017 243
1018old_CC="$CC" 244old_CC="$CC"
1019old_CFLAGS="$CFLAGS" 245old_CFLAGS="$CFLAGS"
1020 246
1021# Set sane defaults for various variables 247# Set sane defaults for various variables
1022test -z "$AR" && AR=ar
1023test -z "$AR_FLAGS" && AR_FLAGS=cru
1024test -z "$AS" && AS=as
1025test -z "$CC" && CC=cc 248test -z "$CC" && CC=cc
1026test -z "$LTCC" && LTCC=$CC 249test -z "$LTCC" && LTCC=$CC
1027test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 250test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1028test -z "$DLLTOOL" && DLLTOOL=dlltool
1029test -z "$LD" && LD=ld 251test -z "$LD" && LD=ld
1030test -z "$LN_S" && LN_S="ln -s" 252test -z "$ac_objext" && ac_objext=o
253
254_LT_CC_BASENAME([$compiler])
255
256# Only perform the check for file, if the check method requires it
1031test -z "$MAGIC_CMD" && MAGIC_CMD=file 257test -z "$MAGIC_CMD" && MAGIC_CMD=file
1032test -z "$NM" && NM=nm 258case $deplibs_check_method in
1033test -z "$SED" && SED=sed 259file_magic*)
1034test -z "$OBJDUMP" && OBJDUMP=objdump 260 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
261 _LT_PATH_MAGIC
262 fi
263 ;;
264esac
265
266# Use C for the default configuration in the libtool script
267LT_SUPPORTED_TAG([CC])
268_LT_LANG_C_CONFIG
269_LT_LANG_DEFAULT_CONFIG
270_LT_CONFIG_COMMANDS
271])# _LT_SETUP
272
273
274# _LT_PROG_LTMAIN
275# ---------------
276# Note that this code is called both from `configure', and `config.status'
277# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
278# `config.status' has no value for ac_aux_dir unless we are using Automake,
279# so we pass a copy along to make sure it has a sensible value anyway.
280m4_defun([_LT_PROG_LTMAIN],
281[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
282_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
283ltmain="$ac_aux_dir/ltmain.sh"
284])# _LT_PROG_LTMAIN
285
286
287
288# So that we can recreate a full libtool script including additional
289# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
290# in macros and then make a single call at the end using the `libtool'
291# label.
292
293
294# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
295# ----------------------------------------
296# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
297m4_define([_LT_CONFIG_LIBTOOL_INIT],
298[m4_ifval([$1],
299 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
300 [$1
301])])])
302
303# Initialize.
304m4_define([_LT_OUTPUT_LIBTOOL_INIT])
305
306
307# _LT_CONFIG_LIBTOOL([COMMANDS])
308# ------------------------------
309# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
310m4_define([_LT_CONFIG_LIBTOOL],
311[m4_ifval([$1],
312 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
313 [$1
314])])])
315
316# Initialize.
317m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
318
319
320# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
321# -----------------------------------------------------
322m4_defun([_LT_CONFIG_SAVE_COMMANDS],
323[_LT_CONFIG_LIBTOOL([$1])
324_LT_CONFIG_LIBTOOL_INIT([$2])
325])
326
327
328# _LT_FORMAT_COMMENT([COMMENT])
329# -----------------------------
330# Add leading comment marks to the start of each line, and a trailing
331# full-stop to the whole comment if one is not present already.
332m4_define([_LT_FORMAT_COMMENT],
333[m4_ifval([$1], [
334m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
335 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
336)])
337
338
339
340
341
342# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
343# -------------------------------------------------------------------
344# CONFIGNAME is the name given to the value in the libtool script.
345# VARNAME is the (base) name used in the configure script.
346# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
347# VARNAME. Any other value will be used directly.
348m4_define([_LT_DECL],
349[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
350 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
351 [m4_ifval([$1], [$1], [$2])])
352 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
353 m4_ifval([$4],
354 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
355 lt_dict_add_subkey([lt_decl_dict], [$2],
356 [tagged?], [m4_ifval([$5], [yes], [no])])])
357])
358
359
360# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
361# --------------------------------------------------------
362m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
363
364
365# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
366# ------------------------------------------------
367m4_define([lt_decl_tag_varnames],
368[_lt_decl_filter([tagged?], [yes], $@)])
369
370
371# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
372# ---------------------------------------------------------
373m4_define([_lt_decl_filter],
374[m4_case([$#],
375 [0], [m4_fatal([$0: too few arguments: $#])],
376 [1], [m4_fatal([$0: too few arguments: $#: $1])],
377 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
378 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
379 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
380])
381
382
383# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
384# --------------------------------------------------
385m4_define([lt_decl_quote_varnames],
386[_lt_decl_filter([value], [1], $@)])
387
388
389# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
390# ---------------------------------------------------
391m4_define([lt_decl_dquote_varnames],
392[_lt_decl_filter([value], [2], $@)])
393
394
395# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
396# ---------------------------------------------------
397m4_define([lt_decl_varnames_tagged],
398[m4_assert([$# <= 2])dnl
399_$0(m4_quote(m4_default([$1], [[, ]])),
400 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
401 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
402m4_define([_lt_decl_varnames_tagged],
403[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
404
405
406# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
407# ------------------------------------------------
408m4_define([lt_decl_all_varnames],
409[_$0(m4_quote(m4_default([$1], [[, ]])),
410 m4_if([$2], [],
411 m4_quote(lt_decl_varnames),
412 m4_quote(m4_shift($@))))[]dnl
413])
414m4_define([_lt_decl_all_varnames],
415[lt_join($@, lt_decl_varnames_tagged([$1],
416 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
417])
418
419
420# _LT_CONFIG_STATUS_DECLARE([VARNAME])
421# ------------------------------------
422# Quote a variable value, and forward it to `config.status' so that its
423# declaration there will have the same value as in `configure'. VARNAME
424# must have a single quote delimited value for this to work.
425m4_define([_LT_CONFIG_STATUS_DECLARE],
426[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
427
428
429# _LT_CONFIG_STATUS_DECLARATIONS
430# ------------------------------
431# We delimit libtool config variables with single quotes, so when
432# we write them to config.status, we have to be sure to quote all
433# embedded single quotes properly. In configure, this macro expands
434# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
435#
436# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
437m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
438[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
439 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
440
441
442# _LT_LIBTOOL_TAGS
443# ----------------
444# Output comment and list of tags supported by the script
445m4_defun([_LT_LIBTOOL_TAGS],
446[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
447available_tags="_LT_TAGS"dnl
448])
449
450
451# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
452# -----------------------------------
453# Extract the dictionary values for VARNAME (optionally with TAG) and
454# expand to a commented shell variable setting:
455#
456# # Some comment about what VAR is for.
457# visible_name=$lt_internal_name
458m4_define([_LT_LIBTOOL_DECLARE],
459[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
460 [description])))[]dnl
461m4_pushdef([_libtool_name],
462 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
463m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
464 [0], [_libtool_name=[$]$1],
465 [1], [_libtool_name=$lt_[]$1],
466 [2], [_libtool_name=$lt_[]$1],
467 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
468m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
469])
470
471
472# _LT_LIBTOOL_CONFIG_VARS
473# -----------------------
474# Produce commented declarations of non-tagged libtool config variables
475# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
476# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
477# section) are produced by _LT_LIBTOOL_TAG_VARS.
478m4_defun([_LT_LIBTOOL_CONFIG_VARS],
479[m4_foreach([_lt_var],
480 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
481 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
482
483
484# _LT_LIBTOOL_TAG_VARS(TAG)
485# -------------------------
486m4_define([_LT_LIBTOOL_TAG_VARS],
487[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
488 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
489
490
491# _LT_TAGVAR(VARNAME, [TAGNAME])
492# ------------------------------
493m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
494
495
496# _LT_CONFIG_COMMANDS
497# -------------------
498# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
499# variables for single and double quote escaping we saved from calls
500# to _LT_DECL, we can put quote escaped variables declarations
501# into `config.status', and then the shell code to quote escape them in
502# for loops in `config.status'. Finally, any additional code accumulated
503# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
504m4_defun([_LT_CONFIG_COMMANDS],
505[AC_PROVIDE_IFELSE([LT_OUTPUT],
506 dnl If the libtool generation code has been placed in $CONFIG_LT,
507 dnl instead of duplicating it all over again into config.status,
508 dnl then we will have config.status run $CONFIG_LT later, so it
509 dnl needs to know what name is stored there:
510 [AC_CONFIG_COMMANDS([libtool],
511 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
512 dnl If the libtool generation code is destined for config.status,
513 dnl expand the accumulated commands and init code now:
514 [AC_CONFIG_COMMANDS([libtool],
515 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
516])#_LT_CONFIG_COMMANDS
517
518
519# Initialize.
520m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
521[
522
523# The HP-UX ksh and POSIX shell print the target directory to stdout
524# if CDPATH is set.
525(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
526
527sed_quote_subst='$sed_quote_subst'
528double_quote_subst='$double_quote_subst'
529delay_variable_subst='$delay_variable_subst'
530_LT_CONFIG_STATUS_DECLARATIONS
531LTCC='$LTCC'
532LTCFLAGS='$LTCFLAGS'
533compiler='$compiler_DEFAULT'
534
535# Quote evaled strings.
536for var in lt_decl_all_varnames([[ \
537]], lt_decl_quote_varnames); do
538 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
539 *[[\\\\\\\`\\"\\\$]]*)
540 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
541 ;;
542 *)
543 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
544 ;;
545 esac
546done
547
548# Double-quote double-evaled strings.
549for var in lt_decl_all_varnames([[ \
550]], lt_decl_dquote_varnames); do
551 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
552 *[[\\\\\\\`\\"\\\$]]*)
553 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
554 ;;
555 *)
556 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
557 ;;
558 esac
559done
560
561# Fix-up fallback echo if it was mangled by the above quoting rules.
562case \$lt_ECHO in
563*'\\\[$]0 --fallback-echo"')dnl "
564 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
565 ;;
566esac
567
568_LT_OUTPUT_LIBTOOL_INIT
569])
570
571
572# LT_OUTPUT
573# ---------
574# This macro allows early generation of the libtool script (before
575# AC_OUTPUT is called), incase it is used in configure for compilation
576# tests.
577AC_DEFUN([LT_OUTPUT],
578[: ${CONFIG_LT=./config.lt}
579AC_MSG_NOTICE([creating $CONFIG_LT])
580cat >"$CONFIG_LT" <<_LTEOF
581#! $SHELL
582# Generated by $as_me.
583# Run this file to recreate a libtool stub with the current configuration.
584
585lt_cl_silent=false
586SHELL=\${CONFIG_SHELL-$SHELL}
587_LTEOF
588
589cat >>"$CONFIG_LT" <<\_LTEOF
590AS_SHELL_SANITIZE
591_AS_PREPARE
592
593exec AS_MESSAGE_FD>&1
594exec AS_MESSAGE_LOG_FD>>config.log
595{
596 echo
597 AS_BOX([Running $as_me.])
598} >&AS_MESSAGE_LOG_FD
599
600lt_cl_help="\
601\`$as_me' creates a local libtool stub from the current configuration,
602for use in further configure time tests before the real libtool is
603generated.
604
605Usage: $[0] [[OPTIONS]]
606
607 -h, --help print this help, then exit
608 -V, --version print version number, then exit
609 -q, --quiet do not print progress messages
610 -d, --debug don't remove temporary files
611
612Report bugs to <bug-libtool@gnu.org>."
613
614lt_cl_version="\
615m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
616m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
617configured by $[0], generated by m4_PACKAGE_STRING.
618
619Copyright (C) 2008 Free Software Foundation, Inc.
620This config.lt script is free software; the Free Software Foundation
621gives unlimited permision to copy, distribute and modify it."
622
623while test $[#] != 0
624do
625 case $[1] in
626 --version | --v* | -V )
627 echo "$lt_cl_version"; exit 0 ;;
628 --help | --h* | -h )
629 echo "$lt_cl_help"; exit 0 ;;
630 --debug | --d* | -d )
631 debug=: ;;
632 --quiet | --q* | --silent | --s* | -q )
633 lt_cl_silent=: ;;
634
635 -*) AC_MSG_ERROR([unrecognized option: $[1]
636Try \`$[0] --help' for more information.]) ;;
637
638 *) AC_MSG_ERROR([unrecognized argument: $[1]
639Try \`$[0] --help' for more information.]) ;;
640 esac
641 shift
642done
643
644if $lt_cl_silent; then
645 exec AS_MESSAGE_FD>/dev/null
646fi
647_LTEOF
648
649cat >>"$CONFIG_LT" <<_LTEOF
650_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
651_LTEOF
652
653cat >>"$CONFIG_LT" <<\_LTEOF
654AC_MSG_NOTICE([creating $ofile])
655_LT_OUTPUT_LIBTOOL_COMMANDS
656AS_EXIT(0)
657_LTEOF
658chmod +x "$CONFIG_LT"
659
660# configure is writing to config.log, but config.lt does its own redirection,
661# appending to config.log, which fails on DOS, as config.log is still kept
662# open by configure. Here we exec the FD to /dev/null, effectively closing
663# config.log, so it can be properly (re)opened and appended to by config.lt.
664if test "$no_create" != yes; then
665 lt_cl_success=:
666 test "$silent" = yes &&
667 lt_config_lt_args="$lt_config_lt_args --quiet"
668 exec AS_MESSAGE_LOG_FD>/dev/null
669 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
670 exec AS_MESSAGE_LOG_FD>>config.log
671 $lt_cl_success || AS_EXIT(1)
672fi
673])# LT_OUTPUT
674
675
676# _LT_CONFIG(TAG)
677# ---------------
678# If TAG is the built-in tag, create an initial libtool script with a
679# default configuration from the untagged config vars. Otherwise add code
680# to config.status for appending the configuration named by TAG from the
681# matching tagged config vars.
682m4_defun([_LT_CONFIG],
683[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
684_LT_CONFIG_SAVE_COMMANDS([
685 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
686 m4_if(_LT_TAG, [C], [
687 # See if we are running on zsh, and set the options which allow our
688 # commands through without removal of \ escapes.
689 if test -n "${ZSH_VERSION+set}" ; then
690 setopt NO_GLOB_SUBST
691 fi
692
693 cfgfile="${ofile}T"
694 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
695 $RM "$cfgfile"
696
697 cat <<_LT_EOF >> "$cfgfile"
698#! $SHELL
699
700# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
701# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
702# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
703# NOTE: Changes made to this file will be lost: look at ltmain.sh.
704#
705_LT_COPYING
706_LT_LIBTOOL_TAGS
707
708# ### BEGIN LIBTOOL CONFIG
709_LT_LIBTOOL_CONFIG_VARS
710_LT_LIBTOOL_TAG_VARS
711# ### END LIBTOOL CONFIG
712
713_LT_EOF
714
715 case $host_os in
716 aix3*)
717 cat <<\_LT_EOF >> "$cfgfile"
718# AIX sometimes has problems with the GCC collect2 program. For some
719# reason, if we set the COLLECT_NAMES environment variable, the problems
720# vanish in a puff of smoke.
721if test "X${COLLECT_NAMES+set}" != Xset; then
722 COLLECT_NAMES=
723 export COLLECT_NAMES
724fi
725_LT_EOF
726 ;;
727 esac
728
729 _LT_PROG_LTMAIN
730
731 # We use sed instead of cat because bash on DJGPP gets confused if
732 # if finds mixed CR/LF and LF-only lines. Since sed operates in
733 # text mode, it properly converts lines to CR/LF. This bash problem
734 # is reportedly fixed, but why not run on old versions too?
735 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
736 || (rm -f "$cfgfile"; exit 1)
737
738 _LT_PROG_XSI_SHELLFNS
739
740 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
741 || (rm -f "$cfgfile"; exit 1)
742
743 mv -f "$cfgfile" "$ofile" ||
744 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
745 chmod +x "$ofile"
746],
747[cat <<_LT_EOF >> "$ofile"
748
749dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
750dnl in a comment (ie after a #).
751# ### BEGIN LIBTOOL TAG CONFIG: $1
752_LT_LIBTOOL_TAG_VARS(_LT_TAG)
753# ### END LIBTOOL TAG CONFIG: $1
754_LT_EOF
755])dnl /m4_if
756],
757[m4_if([$1], [], [
758 PACKAGE='$PACKAGE'
759 VERSION='$VERSION'
760 TIMESTAMP='$TIMESTAMP'
761 RM='$RM'
762 ofile='$ofile'], [])
763])dnl /_LT_CONFIG_SAVE_COMMANDS
764])# _LT_CONFIG
765
766
767# LT_SUPPORTED_TAG(TAG)
768# ---------------------
769# Trace this macro to discover what tags are supported by the libtool
770# --tag option, using:
771# autoconf --trace 'LT_SUPPORTED_TAG:$1'
772AC_DEFUN([LT_SUPPORTED_TAG], [])
773
774
775# C support is built-in for now
776m4_define([_LT_LANG_C_enabled], [])
777m4_define([_LT_TAGS], [])
778
779
780# LT_LANG(LANG)
781# -------------
782# Enable libtool support for the given language if not already enabled.
783AC_DEFUN([LT_LANG],
784[AC_BEFORE([$0], [LT_OUTPUT])dnl
785m4_case([$1],
786 [C], [_LT_LANG(C)],
787 [C++], [_LT_LANG(CXX)],
788 [Java], [_LT_LANG(GCJ)],
789 [Fortran 77], [_LT_LANG(F77)],
790 [Fortran], [_LT_LANG(FC)],
791 [Windows Resource], [_LT_LANG(RC)],
792 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
793 [_LT_LANG($1)],
794 [m4_fatal([$0: unsupported language: "$1"])])])dnl
795])# LT_LANG
796
797
798# _LT_LANG(LANGNAME)
799# ------------------
800m4_defun([_LT_LANG],
801[m4_ifdef([_LT_LANG_]$1[_enabled], [],
802 [LT_SUPPORTED_TAG([$1])dnl
803 m4_append([_LT_TAGS], [$1 ])dnl
804 m4_define([_LT_LANG_]$1[_enabled], [])dnl
805 _LT_LANG_$1_CONFIG($1)])dnl
806])# _LT_LANG
807
808
809# _LT_LANG_DEFAULT_CONFIG
810# -----------------------
811m4_defun([_LT_LANG_DEFAULT_CONFIG],
812[AC_PROVIDE_IFELSE([AC_PROG_CXX],
813 [LT_LANG(CXX)],
814 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
815
816AC_PROVIDE_IFELSE([AC_PROG_F77],
817 [LT_LANG(F77)],
818 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
819
820AC_PROVIDE_IFELSE([AC_PROG_FC],
821 [LT_LANG(FC)],
822 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
823
824dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
825dnl pulling things in needlessly.
826AC_PROVIDE_IFELSE([AC_PROG_GCJ],
827 [LT_LANG(GCJ)],
828 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
829 [LT_LANG(GCJ)],
830 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
831 [LT_LANG(GCJ)],
832 [m4_ifdef([AC_PROG_GCJ],
833 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
834 m4_ifdef([A][M_PROG_GCJ],
835 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
836 m4_ifdef([LT_PROG_GCJ],
837 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
838
839AC_PROVIDE_IFELSE([LT_PROG_RC],
840 [LT_LANG(RC)],
841 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
842])# _LT_LANG_DEFAULT_CONFIG
843
844# Obsolete macros:
845AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
846AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
847AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
848AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
849dnl aclocal-1.4 backwards compatibility:
850dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
851dnl AC_DEFUN([AC_LIBTOOL_F77], [])
852dnl AC_DEFUN([AC_LIBTOOL_FC], [])
853dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
854
855
856# _LT_TAG_COMPILER
857# ----------------
858m4_defun([_LT_TAG_COMPILER],
859[AC_REQUIRE([AC_PROG_CC])dnl
860
861_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
862_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
863_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
864_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
865
866# If no C compiler was specified, use CC.
867LTCC=${LTCC-"$CC"}
868
869# If no C compiler flags were specified, use CFLAGS.
870LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
871
872# Allow CC to be a program name with arguments.
873compiler=$CC
874])# _LT_TAG_COMPILER
875
876
877# _LT_COMPILER_BOILERPLATE
878# ------------------------
879# Check for compiler boilerplate output or warnings with
880# the simple compiler test code.
881m4_defun([_LT_COMPILER_BOILERPLATE],
882[m4_require([_LT_DECL_SED])dnl
883ac_outfile=conftest.$ac_objext
884echo "$lt_simple_compile_test_code" >conftest.$ac_ext
885eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
886_lt_compiler_boilerplate=`cat conftest.err`
887$RM conftest*
888])# _LT_COMPILER_BOILERPLATE
889
890
891# _LT_LINKER_BOILERPLATE
892# ----------------------
893# Check for linker boilerplate output or warnings with
894# the simple link test code.
895m4_defun([_LT_LINKER_BOILERPLATE],
896[m4_require([_LT_DECL_SED])dnl
897ac_outfile=conftest.$ac_objext
898echo "$lt_simple_link_test_code" >conftest.$ac_ext
899eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
900_lt_linker_boilerplate=`cat conftest.err`
901$RM -r conftest*
902])# _LT_LINKER_BOILERPLATE
903
904# _LT_REQUIRED_DARWIN_CHECKS
905# -------------------------
906m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
907 case $host_os in
908 rhapsody* | darwin*)
909 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
910 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
911 AC_CHECK_TOOL([LIPO], [lipo], [:])
912 AC_CHECK_TOOL([OTOOL], [otool], [:])
913 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
914 _LT_DECL([], [DSYMUTIL], [1],
915 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
916 _LT_DECL([], [NMEDIT], [1],
917 [Tool to change global to local symbols on Mac OS X])
918 _LT_DECL([], [LIPO], [1],
919 [Tool to manipulate fat objects and archives on Mac OS X])
920 _LT_DECL([], [OTOOL], [1],
921 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
922 _LT_DECL([], [OTOOL64], [1],
923 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
924
925 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
926 [lt_cv_apple_cc_single_mod=no
927 if test -z "${LT_MULTI_MODULE}"; then
928 # By default we will add the -single_module flag. You can override
929 # by either setting the environment variable LT_MULTI_MODULE
930 # non-empty at configure time, or by adding -multi_module to the
931 # link flags.
932 rm -rf libconftest.dylib*
933 echo "int foo(void){return 1;}" > conftest.c
934 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
935-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
936 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
937 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
938 _lt_result=$?
939 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
940 lt_cv_apple_cc_single_mod=yes
941 else
942 cat conftest.err >&AS_MESSAGE_LOG_FD
943 fi
944 rm -rf libconftest.dylib*
945 rm -f conftest.*
946 fi])
947 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
948 [lt_cv_ld_exported_symbols_list],
949 [lt_cv_ld_exported_symbols_list=no
950 save_LDFLAGS=$LDFLAGS
951 echo "_main" > conftest.sym
952 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
953 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
954 [lt_cv_ld_exported_symbols_list=yes],
955 [lt_cv_ld_exported_symbols_list=no])
956 LDFLAGS="$save_LDFLAGS"
957 ])
958 case $host_os in
959 rhapsody* | darwin1.[[012]])
960 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
961 darwin1.*)
962 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
963 darwin*) # darwin 5.x on
964 # if running on 10.5 or later, the deployment target defaults
965 # to the OS version, if on x86, and 10.4, the deployment
966 # target defaults to 10.4. Don't you love it?
967 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
968 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
969 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
970 10.[[012]]*)
971 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
972 10.*)
973 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
974 esac
975 ;;
976 esac
977 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
978 _lt_dar_single_mod='$single_module'
979 fi
980 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
981 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
982 else
983 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984 fi
985 if test "$DSYMUTIL" != ":"; then
986 _lt_dsymutil='~$DSYMUTIL $lib || :'
987 else
988 _lt_dsymutil=
989 fi
990 ;;
991 esac
992])
993
994
995# _LT_DARWIN_LINKER_FEATURES
996# --------------------------
997# Checks for linker and compiler features on darwin
998m4_defun([_LT_DARWIN_LINKER_FEATURES],
999[
1000 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1001 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1002 _LT_TAGVAR(hardcode_direct, $1)=no
1003 _LT_TAGVAR(hardcode_automatic, $1)=yes
1004 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1005 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1006 _LT_TAGVAR(link_all_deplibs, $1)=yes
1007 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1008 case $cc_basename in
1009 ifort*) _lt_dar_can_shared=yes ;;
1010 *) _lt_dar_can_shared=$GCC ;;
1011 esac
1012 if test "$_lt_dar_can_shared" = "yes"; then
1013 output_verbose_link_cmd=echo
1014 _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}"
1015 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1016 _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}"
1017 _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}"
1018 m4_if([$1], [CXX],
1019[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1020 _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}"
1021 _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}"
1022 fi
1023],[])
1024 else
1025 _LT_TAGVAR(ld_shlibs, $1)=no
1026 fi
1027])
1028
1029# _LT_SYS_MODULE_PATH_AIX
1030# -----------------------
1031# Links a minimal program and checks the executable
1032# for the system default hardcoded library path. In most cases,
1033# this is /usr/lib:/lib, but when the MPI compilers are used
1034# the location of the communication and MPI libs are included too.
1035# If we don't find anything, use the default library path according
1036# to the aix ld manual.
1037m4_defun([_LT_SYS_MODULE_PATH_AIX],
1038[m4_require([_LT_DECL_SED])dnl
1039AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040lt_aix_libpath_sed='
1041 /Import File Strings/,/^$/ {
1042 /^0/ {
1043 s/^0 *\(.*\)$/\1/
1044 p
1045 }
1046 }'
1047aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1048# Check for a 64-bit object if we didn't find anything.
1049if test -z "$aix_libpath"; then
1050 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051fi],[])
1052if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1053])# _LT_SYS_MODULE_PATH_AIX
1054
1055
1056# _LT_SHELL_INIT(ARG)
1057# -------------------
1058m4_define([_LT_SHELL_INIT],
1059[ifdef([AC_DIVERSION_NOTICE],
1060 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1061 [AC_DIVERT_PUSH(NOTICE)])
1062$1
1063AC_DIVERT_POP
1064])# _LT_SHELL_INIT
1065
1066
1067# _LT_PROG_ECHO_BACKSLASH
1068# -----------------------
1069# Add some code to the start of the generated configure script which
1070# will find an echo command which doesn't interpret backslashes.
1071m4_defun([_LT_PROG_ECHO_BACKSLASH],
1072[_LT_SHELL_INIT([
1073# Check that we are running under the correct shell.
1074SHELL=${CONFIG_SHELL-/bin/sh}
1075
1076case X$lt_ECHO in
1077X*--fallback-echo)
1078 # Remove one level of quotation (which was required for Make).
1079 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1080 ;;
1081esac
1082
1083ECHO=${lt_ECHO-echo}
1084if test "X[$]1" = X--no-reexec; then
1085 # Discard the --no-reexec flag, and continue.
1086 shift
1087elif test "X[$]1" = X--fallback-echo; then
1088 # Avoid inline document here, it may be left over
1089 :
1090elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091 # Yippee, $ECHO works!
1092 :
1093else
1094 # Restart under the correct shell.
1095 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1096fi
1097
1098if test "X[$]1" = X--fallback-echo; then
1099 # used as fallback echo
1100 shift
1101 cat <<_LT_EOF
1102[$]*
1103_LT_EOF
1104 exit 0
1105fi
1106
1107# The HP-UX ksh and POSIX shell print the target directory to stdout
1108# if CDPATH is set.
1109(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1110
1111if test -z "$lt_ECHO"; then
1112 if test "X${echo_test_string+set}" != Xset; then
1113 # find a string as large as possible, as long as the shell can cope with it
1114 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1118 then
1119 break
1120 fi
1121 done
1122 fi
1123
1124 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126 test "X$echo_testing_string" = "X$echo_test_string"; then
1127 :
1128 else
1129 # The Solaris, AIX, and Digital Unix default echo programs unquote
1130 # backslashes. This makes it impossible to quote backslashes using
1131 # echo "$something" | sed 's/\\/\\\\/g'
1132 #
1133 # So, first we look for a working echo in the user's PATH.
1134
1135 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136 for dir in $PATH /usr/ucb; do
1137 IFS="$lt_save_ifs"
1138 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141 test "X$echo_testing_string" = "X$echo_test_string"; then
1142 ECHO="$dir/echo"
1143 break
1144 fi
1145 done
1146 IFS="$lt_save_ifs"
1147
1148 if test "X$ECHO" = Xecho; then
1149 # We didn't find a better echo, so look for alternatives.
1150 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152 test "X$echo_testing_string" = "X$echo_test_string"; then
1153 # This shell has a builtin print -r that does the trick.
1154 ECHO='print -r'
1155 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156 test "X$CONFIG_SHELL" != X/bin/ksh; then
1157 # If we have ksh, try running configure again with it.
1158 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159 export ORIGINAL_CONFIG_SHELL
1160 CONFIG_SHELL=/bin/ksh
1161 export CONFIG_SHELL
1162 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1163 else
1164 # Try using printf.
1165 ECHO='printf %s\n'
1166 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168 test "X$echo_testing_string" = "X$echo_test_string"; then
1169 # Cool, printf works
1170 :
1171 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172 test "X$echo_testing_string" = 'X\t' &&
1173 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174 test "X$echo_testing_string" = "X$echo_test_string"; then
1175 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1176 export CONFIG_SHELL
1177 SHELL="$CONFIG_SHELL"
1178 export SHELL
1179 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181 test "X$echo_testing_string" = 'X\t' &&
1182 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183 test "X$echo_testing_string" = "X$echo_test_string"; then
1184 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1185 else
1186 # maybe with a smaller string...
1187 prev=:
1188
1189 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1191 then
1192 break
1193 fi
1194 prev="$cmd"
1195 done
1196
1197 if test "$prev" != 'sed 50q "[$]0"'; then
1198 echo_test_string=`eval $prev`
1199 export echo_test_string
1200 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1201 else
1202 # Oops. We lost completely, so just stick with echo.
1203 ECHO=echo
1204 fi
1205 fi
1206 fi
1207 fi
1208 fi
1209fi
1210
1211# Copy echo and quote the copy suitably for passing to libtool from
1212# the Makefile, instead of quoting the original, which is used later.
1213lt_ECHO=$ECHO
1214if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1216fi
1217
1218AC_SUBST(lt_ECHO)
1219])
1220_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221_LT_DECL([], [ECHO], [1],
1222 [An echo program that does not interpret backslashes])
1223])# _LT_PROG_ECHO_BACKSLASH
1224
1225
1226# _LT_ENABLE_LOCK
1227# ---------------
1228m4_defun([_LT_ENABLE_LOCK],
1229[AC_ARG_ENABLE([libtool-lock],
1230 [AS_HELP_STRING([--disable-libtool-lock],
1231 [avoid locking (might break parallel builds)])])
1232test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1233
1234# Some flags need to be propagated to the compiler or linker for good
1235# libtool support.
1236case $host in
1237ia64-*-hpux*)
1238 # Find out which ABI we are using.
1239 echo 'int i;' > conftest.$ac_ext
1240 if AC_TRY_EVAL(ac_compile); then
1241 case `/usr/bin/file conftest.$ac_objext` in
1242 *ELF-32*)
1243 HPUX_IA64_MODE="32"
1244 ;;
1245 *ELF-64*)
1246 HPUX_IA64_MODE="64"
1247 ;;
1248 esac
1249 fi
1250 rm -rf conftest*
1251 ;;
1252*-*-irix6*)
1253 # Find out which ABI we are using.
1254 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1255 if AC_TRY_EVAL(ac_compile); then
1256 if test "$lt_cv_prog_gnu_ld" = yes; then
1257 case `/usr/bin/file conftest.$ac_objext` in
1258 *32-bit*)
1259 LD="${LD-ld} -melf32bsmip"
1260 ;;
1261 *N32*)
1262 LD="${LD-ld} -melf32bmipn32"
1263 ;;
1264 *64-bit*)
1265 LD="${LD-ld} -melf64bmip"
1266 ;;
1267 esac
1268 else
1269 case `/usr/bin/file conftest.$ac_objext` in
1270 *32-bit*)
1271 LD="${LD-ld} -32"
1272 ;;
1273 *N32*)
1274 LD="${LD-ld} -n32"
1275 ;;
1276 *64-bit*)
1277 LD="${LD-ld} -64"
1278 ;;
1279 esac
1280 fi
1281 fi
1282 rm -rf conftest*
1283 ;;
1284
1285x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1286s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1287 # Find out which ABI we are using.
1288 echo 'int i;' > conftest.$ac_ext
1289 if AC_TRY_EVAL(ac_compile); then
1290 case `/usr/bin/file conftest.o` in
1291 *32-bit*)
1292 case $host in
1293 x86_64-*kfreebsd*-gnu)
1294 LD="${LD-ld} -m elf_i386_fbsd"
1295 ;;
1296 x86_64-*linux*)
1297 LD="${LD-ld} -m elf_i386"
1298 ;;
1299 ppc64-*linux*|powerpc64-*linux*)
1300 LD="${LD-ld} -m elf32ppclinux"
1301 ;;
1302 s390x-*linux*)
1303 LD="${LD-ld} -m elf_s390"
1304 ;;
1305 sparc64-*linux*)
1306 LD="${LD-ld} -m elf32_sparc"
1307 ;;
1308 esac
1309 ;;
1310 *64-bit*)
1311 case $host in
1312 x86_64-*kfreebsd*-gnu)
1313 LD="${LD-ld} -m elf_x86_64_fbsd"
1314 ;;
1315 x86_64-*linux*)
1316 LD="${LD-ld} -m elf_x86_64"
1317 ;;
1318 ppc*-*linux*|powerpc*-*linux*)
1319 LD="${LD-ld} -m elf64ppc"
1320 ;;
1321 s390*-*linux*|s390*-*tpf*)
1322 LD="${LD-ld} -m elf64_s390"
1323 ;;
1324 sparc*-*linux*)
1325 LD="${LD-ld} -m elf64_sparc"
1326 ;;
1327 esac
1328 ;;
1329 esac
1330 fi
1331 rm -rf conftest*
1332 ;;
1333
1334*-*-sco3.2v5*)
1335 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1336 SAVE_CFLAGS="$CFLAGS"
1337 CFLAGS="$CFLAGS -belf"
1338 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1339 [AC_LANG_PUSH(C)
1340 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1341 AC_LANG_POP])
1342 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1343 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1344 CFLAGS="$SAVE_CFLAGS"
1345 fi
1346 ;;
1347sparc*-*solaris*)
1348 # Find out which ABI we are using.
1349 echo 'int i;' > conftest.$ac_ext
1350 if AC_TRY_EVAL(ac_compile); then
1351 case `/usr/bin/file conftest.o` in
1352 *64-bit*)
1353 case $lt_cv_prog_gnu_ld in
1354 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1355 *)
1356 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1357 LD="${LD-ld} -64"
1358 fi
1359 ;;
1360 esac
1361 ;;
1362 esac
1363 fi
1364 rm -rf conftest*
1365 ;;
1366esac
1367
1368need_locks="$enable_libtool_lock"
1369])# _LT_ENABLE_LOCK
1370
1371
1372# _LT_CMD_OLD_ARCHIVE
1373# -------------------
1374m4_defun([_LT_CMD_OLD_ARCHIVE],
1375[AC_CHECK_TOOL(AR, ar, false)
1376test -z "$AR" && AR=ar
1377test -z "$AR_FLAGS" && AR_FLAGS=cru
1378_LT_DECL([], [AR], [1], [The archiver])
1379_LT_DECL([], [AR_FLAGS], [1])
1380
1381AC_CHECK_TOOL(STRIP, strip, :)
1382test -z "$STRIP" && STRIP=:
1383_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1384
1385AC_CHECK_TOOL(RANLIB, ranlib, :)
1035test -z "$RANLIB" && RANLIB=: 1386test -z "$RANLIB" && RANLIB=:
1036test -z "$STRIP" && STRIP=: 1387_LT_DECL([], [RANLIB], [1],
1037test -z "$ac_objext" && ac_objext=o 1388 [Commands used to install an old-style archive])
1038 1389
1039# Determine commands to create old-style static archives. 1390# Determine commands to create old-style static archives.
1040old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 1391old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1041old_postinstall_cmds='chmod 644 $oldlib' 1392old_postinstall_cmds='chmod 644 $oldlib'
1042old_postuninstall_cmds= 1393old_postuninstall_cmds=
1043 1394
1044if test -n "$RANLIB"; then 1395if test -n "$RANLIB"; then
1045 case $host_os in 1396 case $host_os in
1050 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1401 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1051 ;; 1402 ;;
1052 esac 1403 esac
1053 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1404 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1054fi 1405fi
1406_LT_DECL([], [old_postinstall_cmds], [2])
1407_LT_DECL([], [old_postuninstall_cmds], [2])
1408_LT_TAGDECL([], [old_archive_cmds], [2],
1409 [Commands used to build an old-style archive])
1410])# _LT_CMD_OLD_ARCHIVE
1055 1411
1056_LT_CC_BASENAME([$compiler])
1057 1412
1058# Only perform the check for file, if the check method requires it
1059case $deplibs_check_method in
1060file_magic*)
1061 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1062 AC_PATH_MAGIC
1063 fi
1064 ;;
1065esac
1066
1067AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1068AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1069enable_win32_dll=yes, enable_win32_dll=no)
1070
1071AC_ARG_ENABLE([libtool-lock],
1072 [AC_HELP_STRING([--disable-libtool-lock],
1073 [avoid locking (might break parallel builds)])])
1074test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1075
1076AC_ARG_WITH([pic],
1077 [AC_HELP_STRING([--with-pic],
1078 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1079 [pic_mode="$withval"],
1080 [pic_mode=default])
1081test -z "$pic_mode" && pic_mode=default
1082
1083# Use C for the default configuration in the libtool script
1084tagname=
1085AC_LIBTOOL_LANG_C_CONFIG
1086_LT_AC_TAGCONFIG
1087])# AC_LIBTOOL_SETUP
1088
1089
1090# _LT_AC_SYS_COMPILER
1091# -------------------
1092AC_DEFUN([_LT_AC_SYS_COMPILER],
1093[AC_REQUIRE([AC_PROG_CC])dnl
1094
1095# If no C compiler was specified, use CC.
1096LTCC=${LTCC-"$CC"}
1097
1098# If no C compiler flags were specified, use CFLAGS.
1099LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1100
1101# Allow CC to be a program name with arguments.
1102compiler=$CC
1103])# _LT_AC_SYS_COMPILER
1104
1105
1106# _LT_CC_BASENAME(CC)
1107# -------------------
1108# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1109AC_DEFUN([_LT_CC_BASENAME],
1110[for cc_temp in $1""; do
1111 case $cc_temp in
1112 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1113 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1114 \-*) ;;
1115 *) break;;
1116 esac
1117done
1118cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1119])
1120
1121
1122# _LT_COMPILER_BOILERPLATE
1123# ------------------------
1124# Check for compiler boilerplate output or warnings with
1125# the simple compiler test code.
1126AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1127[ac_outfile=conftest.$ac_objext
1128printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1129eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1130_lt_compiler_boilerplate=`cat conftest.err`
1131$rm conftest*
1132])# _LT_COMPILER_BOILERPLATE
1133
1134
1135# _LT_LINKER_BOILERPLATE
1136# ----------------------
1137# Check for linker boilerplate output or warnings with
1138# the simple link test code.
1139AC_DEFUN([_LT_LINKER_BOILERPLATE],
1140[ac_outfile=conftest.$ac_objext
1141printf "$lt_simple_link_test_code" >conftest.$ac_ext
1142eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1143_lt_linker_boilerplate=`cat conftest.err`
1144$rm conftest*
1145])# _LT_LINKER_BOILERPLATE
1146
1147
1148# _LT_AC_SYS_LIBPATH_AIX
1149# ----------------------
1150# Links a minimal program and checks the executable
1151# for the system default hardcoded library path. In most cases,
1152# this is /usr/lib:/lib, but when the MPI compilers are used
1153# the location of the communication and MPI libs are included too.
1154# If we don't find anything, use the default library path according
1155# to the aix ld manual.
1156AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1157[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1158aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1159}'`
1160# Check for a 64-bit object if we didn't find anything.
1161if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1162}'`; fi],[])
1163if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1164])# _LT_AC_SYS_LIBPATH_AIX
1165
1166
1167# _LT_AC_SHELL_INIT(ARG)
1168# ----------------------
1169AC_DEFUN([_LT_AC_SHELL_INIT],
1170[ifdef([AC_DIVERSION_NOTICE],
1171 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1172 [AC_DIVERT_PUSH(NOTICE)])
1173$1
1174AC_DIVERT_POP
1175])# _LT_AC_SHELL_INIT
1176
1177
1178# _LT_AC_PROG_ECHO_BACKSLASH
1179# --------------------------
1180# Add some code to the start of the generated configure script which
1181# will find an echo command which doesn't interpret backslashes.
1182AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1183[_LT_AC_SHELL_INIT([
1184# Check that we are running under the correct shell.
1185SHELL=${CONFIG_SHELL-/bin/sh}
1186
1187case X$ECHO in
1188X*--fallback-echo)
1189 # Remove one level of quotation (which was required for Make).
1190 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1191 ;;
1192esac
1193
1194echo=${ECHO-echo}
1195if test "X[$]1" = X--no-reexec; then
1196 # Discard the --no-reexec flag, and continue.
1197 shift
1198elif test "X[$]1" = X--fallback-echo; then
1199 # Avoid inline document here, it may be left over
1200 :
1201elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1202 # Yippee, $echo works!
1203 :
1204else
1205 # Restart under the correct shell.
1206 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1207fi
1208
1209if test "X[$]1" = X--fallback-echo; then
1210 # used as fallback echo
1211 shift
1212 cat <<EOF
1213[$]*
1214EOF
1215 exit 0
1216fi
1217
1218# The HP-UX ksh and POSIX shell print the target directory to stdout
1219# if CDPATH is set.
1220(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1221
1222if test -z "$ECHO"; then
1223if test "X${echo_test_string+set}" != Xset; then
1224# find a string as large as possible, as long as the shell can cope with it
1225 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1226 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1227 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1228 echo_test_string=`eval $cmd` &&
1229 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1230 then
1231 break
1232 fi
1233 done
1234fi
1235
1236if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1237 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1238 test "X$echo_testing_string" = "X$echo_test_string"; then
1239 :
1240else
1241 # The Solaris, AIX, and Digital Unix default echo programs unquote
1242 # backslashes. This makes it impossible to quote backslashes using
1243 # echo "$something" | sed 's/\\/\\\\/g'
1244 #
1245 # So, first we look for a working echo in the user's PATH.
1246
1247 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1248 for dir in $PATH /usr/ucb; do
1249 IFS="$lt_save_ifs"
1250 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1251 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1252 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1253 test "X$echo_testing_string" = "X$echo_test_string"; then
1254 echo="$dir/echo"
1255 break
1256 fi
1257 done
1258 IFS="$lt_save_ifs"
1259
1260 if test "X$echo" = Xecho; then
1261 # We didn't find a better echo, so look for alternatives.
1262 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1263 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1264 test "X$echo_testing_string" = "X$echo_test_string"; then
1265 # This shell has a builtin print -r that does the trick.
1266 echo='print -r'
1267 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1268 test "X$CONFIG_SHELL" != X/bin/ksh; then
1269 # If we have ksh, try running configure again with it.
1270 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1271 export ORIGINAL_CONFIG_SHELL
1272 CONFIG_SHELL=/bin/ksh
1273 export CONFIG_SHELL
1274 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1275 else
1276 # Try using printf.
1277 echo='printf %s\n'
1278 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1279 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1280 test "X$echo_testing_string" = "X$echo_test_string"; then
1281 # Cool, printf works
1282 :
1283 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1284 test "X$echo_testing_string" = 'X\t' &&
1285 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1286 test "X$echo_testing_string" = "X$echo_test_string"; then
1287 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1288 export CONFIG_SHELL
1289 SHELL="$CONFIG_SHELL"
1290 export SHELL
1291 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1292 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1293 test "X$echo_testing_string" = 'X\t' &&
1294 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1295 test "X$echo_testing_string" = "X$echo_test_string"; then
1296 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1297 else
1298 # maybe with a smaller string...
1299 prev=:
1300
1301 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1302 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1303 then
1304 break
1305 fi
1306 prev="$cmd"
1307 done
1308
1309 if test "$prev" != 'sed 50q "[$]0"'; then
1310 echo_test_string=`eval $prev`
1311 export echo_test_string
1312 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1313 else
1314 # Oops. We lost completely, so just stick with echo.
1315 echo=echo
1316 fi
1317 fi
1318 fi
1319 fi
1320fi
1321fi
1322
1323# Copy echo and quote the copy suitably for passing to libtool from
1324# the Makefile, instead of quoting the original, which is used later.
1325ECHO=$echo
1326if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1327 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1328fi
1329
1330AC_SUBST(ECHO)
1331])])# _LT_AC_PROG_ECHO_BACKSLASH
1332
1333
1334# _LT_AC_LOCK
1335# -----------
1336AC_DEFUN([_LT_AC_LOCK],
1337[AC_ARG_ENABLE([libtool-lock],
1338 [AC_HELP_STRING([--disable-libtool-lock],
1339 [avoid locking (might break parallel builds)])])
1340test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1341
1342# Some flags need to be propagated to the compiler or linker for good
1343# libtool support.
1344case $host in
1345ia64-*-hpux*)
1346 # Find out which ABI we are using.
1347 echo 'int i;' > conftest.$ac_ext
1348 if AC_TRY_EVAL(ac_compile); then
1349 case `/usr/bin/file conftest.$ac_objext` in
1350 *ELF-32*)
1351 HPUX_IA64_MODE="32"
1352 ;;
1353 *ELF-64*)
1354 HPUX_IA64_MODE="64"
1355 ;;
1356 esac
1357 fi
1358 rm -rf conftest*
1359 ;;
1360*-*-irix6*)
1361 # Find out which ABI we are using.
1362 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1363 if AC_TRY_EVAL(ac_compile); then
1364 if test "$lt_cv_prog_gnu_ld" = yes; then
1365 case `/usr/bin/file conftest.$ac_objext` in
1366 *32-bit*)
1367 LD="${LD-ld} -melf32bsmip"
1368 ;;
1369 *N32*)
1370 LD="${LD-ld} -melf32bmipn32"
1371 ;;
1372 *64-bit*)
1373 LD="${LD-ld} -melf64bmip"
1374 ;;
1375 esac
1376 else
1377 case `/usr/bin/file conftest.$ac_objext` in
1378 *32-bit*)
1379 LD="${LD-ld} -32"
1380 ;;
1381 *N32*)
1382 LD="${LD-ld} -n32"
1383 ;;
1384 *64-bit*)
1385 LD="${LD-ld} -64"
1386 ;;
1387 esac
1388 fi
1389 fi
1390 rm -rf conftest*
1391 ;;
1392
1393x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1394 # Find out which ABI we are using.
1395 echo 'int i;' > conftest.$ac_ext
1396 if AC_TRY_EVAL(ac_compile); then
1397 case `/usr/bin/file conftest.o` in
1398 *32-bit*)
1399 case $host in
1400 x86_64-*linux*)
1401 LD="${LD-ld} -m elf_i386"
1402 ;;
1403 ppc64-*linux*|powerpc64-*linux*)
1404 LD="${LD-ld} -m elf32ppclinux"
1405 ;;
1406 s390x-*linux*)
1407 LD="${LD-ld} -m elf_s390"
1408 ;;
1409 sparc64-*linux*)
1410 LD="${LD-ld} -m elf32_sparc"
1411 ;;
1412 esac
1413 ;;
1414 *64-bit*)
1415 case $host in
1416 x86_64-*linux*)
1417 LD="${LD-ld} -m elf_x86_64"
1418 ;;
1419 ppc*-*linux*|powerpc*-*linux*)
1420 LD="${LD-ld} -m elf64ppc"
1421 ;;
1422 s390*-*linux*)
1423 LD="${LD-ld} -m elf64_s390"
1424 ;;
1425 sparc*-*linux*)
1426 LD="${LD-ld} -m elf64_sparc"
1427 ;;
1428 esac
1429 ;;
1430 esac
1431 fi
1432 rm -rf conftest*
1433 ;;
1434
1435*-*-sco3.2v5*)
1436 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1437 SAVE_CFLAGS="$CFLAGS"
1438 CFLAGS="$CFLAGS -belf"
1439 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1440 [AC_LANG_PUSH(C)
1441 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1442 AC_LANG_POP])
1443 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1444 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1445 CFLAGS="$SAVE_CFLAGS"
1446 fi
1447 ;;
1448sparc*-*solaris*)
1449 # Find out which ABI we are using.
1450 echo 'int i;' > conftest.$ac_ext
1451 if AC_TRY_EVAL(ac_compile); then
1452 case `/usr/bin/file conftest.o` in
1453 *64-bit*)
1454 case $lt_cv_prog_gnu_ld in
1455 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1456 *) LD="${LD-ld} -64" ;;
1457 esac
1458 ;;
1459 esac
1460 fi
1461 rm -rf conftest*
1462 ;;
1463
1464AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1465[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1466 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1467 AC_CHECK_TOOL(AS, as, false)
1468 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1469 ;;
1470 ])
1471esac
1472
1473need_locks="$enable_libtool_lock"
1474
1475])# _LT_AC_LOCK
1476
1477
1478# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1413# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1479# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1414# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1480# ---------------------------------------------------------------- 1415# ----------------------------------------------------------------
1481# Check whether the given compiler option works 1416# Check whether the given compiler option works
1482AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 1417AC_DEFUN([_LT_COMPILER_OPTION],
1483[AC_REQUIRE([LT_AC_PROG_SED]) 1418[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1419m4_require([_LT_DECL_SED])dnl
1484AC_CACHE_CHECK([$1], [$2], 1420AC_CACHE_CHECK([$1], [$2],
1485 [$2=no 1421 [$2=no
1486 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1422 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1487 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1423 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1488 lt_compiler_flag="$3" 1424 lt_compiler_flag="$3"
1489 # Insert the option either (1) after the last *FLAGS variable, or 1425 # Insert the option either (1) after the last *FLAGS variable, or
1490 # (2) before a word containing "conftest.", or (3) at the end. 1426 # (2) before a word containing "conftest.", or (3) at the end.
1491 # Note that $ac_compile itself does not contain backslashes and begins 1427 # Note that $ac_compile itself does not contain backslashes and begins
1492 # with a dollar sign (not a hyphen), so the echo should work correctly. 1428 # with a dollar sign (not a hyphen), so the echo should work correctly.
1501 cat conftest.err >&AS_MESSAGE_LOG_FD 1437 cat conftest.err >&AS_MESSAGE_LOG_FD
1502 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1438 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1503 if (exit $ac_status) && test -s "$ac_outfile"; then 1439 if (exit $ac_status) && test -s "$ac_outfile"; then
1504 # The compiler can only warn and ignore the option if not recognized 1440 # The compiler can only warn and ignore the option if not recognized
1505 # So say no if there are warnings other than the usual output. 1441 # So say no if there are warnings other than the usual output.
1506 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 1442 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1507 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1443 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1508 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1444 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1509 $2=yes 1445 $2=yes
1510 fi 1446 fi
1511 fi 1447 fi
1512 $rm conftest* 1448 $RM conftest*
1513]) 1449])
1514 1450
1515if test x"[$]$2" = xyes; then 1451if test x"[$]$2" = xyes; then
1516 ifelse([$5], , :, [$5]) 1452 m4_if([$5], , :, [$5])
1517else 1453else
1518 ifelse([$6], , :, [$6]) 1454 m4_if([$6], , :, [$6])
1519fi 1455fi
1520])# AC_LIBTOOL_COMPILER_OPTION 1456])# _LT_COMPILER_OPTION
1521 1457
1458# Old name:
1459AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1460dnl aclocal-1.4 backwards compatibility:
1461dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1522 1462
1463
1523# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1464# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1524# [ACTION-SUCCESS], [ACTION-FAILURE]) 1465# [ACTION-SUCCESS], [ACTION-FAILURE])
1525# ------------------------------------------------------------ 1466# ----------------------------------------------------
1526# Check whether the given compiler option works 1467# Check whether the given linker option works
1527AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 1468AC_DEFUN([_LT_LINKER_OPTION],
1469[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1470m4_require([_LT_DECL_SED])dnl
1528[AC_CACHE_CHECK([$1], [$2], 1471AC_CACHE_CHECK([$1], [$2],
1529 [$2=no 1472 [$2=no
1530 save_LDFLAGS="$LDFLAGS" 1473 save_LDFLAGS="$LDFLAGS"
1531 LDFLAGS="$LDFLAGS $3" 1474 LDFLAGS="$LDFLAGS $3"
1532 printf "$lt_simple_link_test_code" > conftest.$ac_ext 1475 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1533 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1476 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1534 # The linker can only warn and ignore the option if not recognized 1477 # The linker can only warn and ignore the option if not recognized
1535 # So say no if there are warnings 1478 # So say no if there are warnings
1536 if test -s conftest.err; then 1479 if test -s conftest.err; then
1537 # Append any errors to the config.log. 1480 # Append any errors to the config.log.
1538 cat conftest.err 1>&AS_MESSAGE_LOG_FD 1481 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1539 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 1482 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1540 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1483 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1541 if diff conftest.exp conftest.er2 >/dev/null; then 1484 if diff conftest.exp conftest.er2 >/dev/null; then
1542 $2=yes 1485 $2=yes
1543 fi 1486 fi
1544 else 1487 else
1545 $2=yes 1488 $2=yes
1546 fi 1489 fi
1547 fi 1490 fi
1548 $rm conftest* 1491 $RM -r conftest*
1549 LDFLAGS="$save_LDFLAGS" 1492 LDFLAGS="$save_LDFLAGS"
1550]) 1493])
1551 1494
1552if test x"[$]$2" = xyes; then 1495if test x"[$]$2" = xyes; then
1553 ifelse([$4], , :, [$4]) 1496 m4_if([$4], , :, [$4])
1554else 1497else
1555 ifelse([$5], , :, [$5]) 1498 m4_if([$5], , :, [$5])
1556fi 1499fi
1557])# AC_LIBTOOL_LINKER_OPTION 1500])# _LT_LINKER_OPTION
1558 1501
1502# Old name:
1503AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1504dnl aclocal-1.4 backwards compatibility:
1505dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1559 1506
1560# AC_LIBTOOL_SYS_MAX_CMD_LEN 1507
1561# -------------------------- 1508# LT_CMD_MAX_LEN
1562AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 1509#---------------
1510AC_DEFUN([LT_CMD_MAX_LEN],
1511[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1563[# find the maximum length of command line arguments 1512# find the maximum length of command line arguments
1564AC_MSG_CHECKING([the maximum length of command line arguments]) 1513AC_MSG_CHECKING([the maximum length of command line arguments])
1565AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1514AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1566 i=0 1515 i=0
1567 teststring="ABCD" 1516 teststring="ABCD"
1568 1517
1580 # no limit to the length of command line arguments. 1529 # no limit to the length of command line arguments.
1581 # Libtool will interpret -1 as no limit whatsoever 1530 # Libtool will interpret -1 as no limit whatsoever
1582 lt_cv_sys_max_cmd_len=-1; 1531 lt_cv_sys_max_cmd_len=-1;
1583 ;; 1532 ;;
1584 1533
1585 cygwin* | mingw*) 1534 cygwin* | mingw* | cegcc*)
1586 # On Win9x/ME, this test blows up -- it succeeds, but takes 1535 # On Win9x/ME, this test blows up -- it succeeds, but takes
1587 # about 5 minutes as the teststring grows exponentially. 1536 # about 5 minutes as the teststring grows exponentially.
1588 # Worse, since 9x/ME are not pre-emptively multitasking, 1537 # Worse, since 9x/ME are not pre-emptively multitasking,
1589 # you end up with a "frozen" computer, even though with patience 1538 # you end up with a "frozen" computer, even though with patience
1590 # the test eventually succeeds (with a max line length of 256k). 1539 # the test eventually succeeds (with a max line length of 256k).
1635 lt_cv_sys_max_cmd_len=102400 1584 lt_cv_sys_max_cmd_len=102400
1636 ;; 1585 ;;
1637 sysv5* | sco5v6* | sysv4.2uw2*) 1586 sysv5* | sco5v6* | sysv4.2uw2*)
1638 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1587 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1639 if test -n "$kargmax"; then 1588 if test -n "$kargmax"; then
1640 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1589 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1641 else 1590 else
1642 lt_cv_sys_max_cmd_len=32768 1591 lt_cv_sys_max_cmd_len=32768
1643 fi 1592 fi
1644 ;; 1593 ;;
1645 *) 1594 *)
1595 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1596 if test -n "$lt_cv_sys_max_cmd_len"; then
1597 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1598 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1599 else
1600 # Make teststring a little bigger before we do anything with it.
1601 # a 1K string should be a reasonable start.
1602 for i in 1 2 3 4 5 6 7 8 ; do
1603 teststring=$teststring$teststring
1604 done
1605 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1646 # If test is not a shell built-in, we'll probably end up computing a 1606 # If test is not a shell built-in, we'll probably end up computing a
1647 # maximum length that is only half of the actual maximum length, but 1607 # maximum length that is only half of the actual maximum length, but
1648 # we can't tell. 1608 # we can't tell.
1649 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1650 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 1609 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1651 = "XX$teststring") >/dev/null 2>&1 && 1610 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1652 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1653 lt_cv_sys_max_cmd_len=$new_result &&
1654 test $i != 17 # 1/2 MB should be enough 1611 test $i != 17 # 1/2 MB should be enough
1655 do 1612 do
1656 i=`expr $i + 1` 1613 i=`expr $i + 1`
1657 teststring=$teststring$teststring 1614 teststring=$teststring$teststring
1658 done 1615 done
1616 # Only check the string length outside the loop.
1617 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1659 teststring= 1618 teststring=
1660 # Add a significant safety factor because C++ compilers can tack on massive 1619 # Add a significant safety factor because C++ compilers can tack on
1661 # amounts of additional arguments before passing them to the linker. 1620 # massive amounts of additional arguments before passing them to the
1662 # It appears as though 1/2 is a usable value. 1621 # linker. It appears as though 1/2 is a usable value.
1663 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1622 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1623 fi
1664 ;; 1624 ;;
1665 esac 1625 esac
1666]) 1626])
1667if test -n $lt_cv_sys_max_cmd_len ; then 1627if test -n $lt_cv_sys_max_cmd_len ; then
1668 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1628 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1669else 1629else
1670 AC_MSG_RESULT(none) 1630 AC_MSG_RESULT(none)
1671fi 1631fi
1672])# AC_LIBTOOL_SYS_MAX_CMD_LEN 1632max_cmd_len=$lt_cv_sys_max_cmd_len
1633_LT_DECL([], [max_cmd_len], [0],
1634 [What is the maximum length of a command?])
1635])# LT_CMD_MAX_LEN
1673 1636
1637# Old name:
1638AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1639dnl aclocal-1.4 backwards compatibility:
1640dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1674 1641
1675# _LT_AC_CHECK_DLFCN 1642
1643# _LT_HEADER_DLFCN
1676# ------------------ 1644# ----------------
1677AC_DEFUN([_LT_AC_CHECK_DLFCN], 1645m4_defun([_LT_HEADER_DLFCN],
1678[AC_CHECK_HEADERS(dlfcn.h)dnl 1646[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1679])# _LT_AC_CHECK_DLFCN 1647])# _LT_HEADER_DLFCN
1680 1648
1681 1649
1682# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1650# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1683# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1651# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1684# --------------------------------------------------------------------- 1652# ----------------------------------------------------------------
1685AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 1653m4_defun([_LT_TRY_DLOPEN_SELF],
1686[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1654[m4_require([_LT_HEADER_DLFCN])dnl
1687if test "$cross_compiling" = yes; then : 1655if test "$cross_compiling" = yes; then :
1688 [$4] 1656 [$4]
1689else 1657else
1690 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1658 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1691 lt_status=$lt_dlunknown 1659 lt_status=$lt_dlunknown
1692 cat > conftest.$ac_ext <<EOF 1660 cat > conftest.$ac_ext <<_LT_EOF
1693[#line __oline__ "configure" 1661[#line __oline__ "configure"
1694#include "confdefs.h" 1662#include "confdefs.h"
1695 1663
1696#if HAVE_DLFCN_H 1664#if HAVE_DLFCN_H
1697#include <dlfcn.h> 1665#include <dlfcn.h>
1729# endif 1697# endif
1730# endif 1698# endif
1731# endif 1699# endif
1732#endif 1700#endif
1733 1701
1734#ifdef __cplusplus
1735extern "C" void exit (int);
1736#endif
1737
1738void fnord() { int i=42;} 1702void fnord() { int i=42;}
1739int main () 1703int main ()
1740{ 1704{
1741 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1705 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1742 int status = $lt_dlunknown; 1706 int status = $lt_dlunknown;
1748 /* dlclose (self); */ 1712 /* dlclose (self); */
1749 } 1713 }
1750 else 1714 else
1751 puts (dlerror ()); 1715 puts (dlerror ());
1752 1716
1753 exit (status); 1717 return status;
1754}] 1718}]
1755EOF 1719_LT_EOF
1756 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1720 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1757 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1721 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1758 lt_status=$? 1722 lt_status=$?
1759 case x$lt_status in 1723 case x$lt_status in
1760 x$lt_dlno_uscore) $1 ;; 1724 x$lt_dlno_uscore) $1 ;;
1765 # compilation failed 1729 # compilation failed
1766 $3 1730 $3
1767 fi 1731 fi
1768fi 1732fi
1769rm -fr conftest* 1733rm -fr conftest*
1770])# _LT_AC_TRY_DLOPEN_SELF 1734])# _LT_TRY_DLOPEN_SELF
1771 1735
1772 1736
1773# AC_LIBTOOL_DLOPEN_SELF 1737# LT_SYS_DLOPEN_SELF
1774# ---------------------- 1738# ------------------
1775AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1739AC_DEFUN([LT_SYS_DLOPEN_SELF],
1776[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1740[m4_require([_LT_HEADER_DLFCN])dnl
1777if test "x$enable_dlopen" != xyes; then 1741if test "x$enable_dlopen" != xyes; then
1778 enable_dlopen=unknown 1742 enable_dlopen=unknown
1779 enable_dlopen_self=unknown 1743 enable_dlopen_self=unknown
1780 enable_dlopen_self_static=unknown 1744 enable_dlopen_self_static=unknown
1781else 1745else
1787 lt_cv_dlopen="load_add_on" 1751 lt_cv_dlopen="load_add_on"
1788 lt_cv_dlopen_libs= 1752 lt_cv_dlopen_libs=
1789 lt_cv_dlopen_self=yes 1753 lt_cv_dlopen_self=yes
1790 ;; 1754 ;;
1791 1755
1792 mingw* | pw32*) 1756 mingw* | pw32* | cegcc*)
1793 lt_cv_dlopen="LoadLibrary" 1757 lt_cv_dlopen="LoadLibrary"
1794 lt_cv_dlopen_libs= 1758 lt_cv_dlopen_libs=
1795 ;; 1759 ;;
1796 1760
1797 cygwin*) 1761 cygwin*)
1798 lt_cv_dlopen="dlopen" 1762 lt_cv_dlopen="dlopen"
1799 lt_cv_dlopen_libs= 1763 lt_cv_dlopen_libs=
1800 ;; 1764 ;;
1801 1765
1802 darwin*) 1766 darwin*)
1803 # if libdl is installed we need to link against it 1767 # if libdl is installed we need to link against it
1804 AC_CHECK_LIB([dl], [dlopen], 1768 AC_CHECK_LIB([dl], [dlopen],
1805 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1769 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1806 lt_cv_dlopen="dyld" 1770 lt_cv_dlopen="dyld"
1807 lt_cv_dlopen_libs= 1771 lt_cv_dlopen_libs=
1808 lt_cv_dlopen_self=yes 1772 lt_cv_dlopen_self=yes
1809 ]) 1773 ])
1810 ;; 1774 ;;
1811 1775
1812 *) 1776 *)
1813 AC_CHECK_FUNC([shl_load], 1777 AC_CHECK_FUNC([shl_load],
1814 [lt_cv_dlopen="shl_load"], 1778 [lt_cv_dlopen="shl_load"],
1815 [AC_CHECK_LIB([dld], [shl_load], 1779 [AC_CHECK_LIB([dld], [shl_load],
1816 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 1780 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1817 [AC_CHECK_FUNC([dlopen], 1781 [AC_CHECK_FUNC([dlopen],
1818 [lt_cv_dlopen="dlopen"], 1782 [lt_cv_dlopen="dlopen"],
1819 [AC_CHECK_LIB([dl], [dlopen], 1783 [AC_CHECK_LIB([dl], [dlopen],
1820 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1784 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1821 [AC_CHECK_LIB([svld], [dlopen], 1785 [AC_CHECK_LIB([svld], [dlopen],
1822 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1786 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1823 [AC_CHECK_LIB([dld], [dld_link], 1787 [AC_CHECK_LIB([dld], [dld_link],
1824 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 1788 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1825 ]) 1789 ])
1826 ]) 1790 ])
1827 ]) 1791 ])
1828 ]) 1792 ])
1829 ]) 1793 ])
1847 save_LIBS="$LIBS" 1811 save_LIBS="$LIBS"
1848 LIBS="$lt_cv_dlopen_libs $LIBS" 1812 LIBS="$lt_cv_dlopen_libs $LIBS"
1849 1813
1850 AC_CACHE_CHECK([whether a program can dlopen itself], 1814 AC_CACHE_CHECK([whether a program can dlopen itself],
1851 lt_cv_dlopen_self, [dnl 1815 lt_cv_dlopen_self, [dnl
1852 _LT_AC_TRY_DLOPEN_SELF( 1816 _LT_TRY_DLOPEN_SELF(
1853 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1817 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1854 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1818 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1855 ]) 1819 ])
1856 1820
1857 if test "x$lt_cv_dlopen_self" = xyes; then 1821 if test "x$lt_cv_dlopen_self" = xyes; then
1858 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1822 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1859 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1823 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1860 lt_cv_dlopen_self_static, [dnl 1824 lt_cv_dlopen_self_static, [dnl
1861 _LT_AC_TRY_DLOPEN_SELF( 1825 _LT_TRY_DLOPEN_SELF(
1862 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1826 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1863 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1827 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1864 ]) 1828 ])
1865 fi 1829 fi
1866 1830
1878 case $lt_cv_dlopen_self_static in 1842 case $lt_cv_dlopen_self_static in
1879 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1843 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1880 *) enable_dlopen_self_static=unknown ;; 1844 *) enable_dlopen_self_static=unknown ;;
1881 esac 1845 esac
1882fi 1846fi
1883])# AC_LIBTOOL_DLOPEN_SELF 1847_LT_DECL([dlopen_support], [enable_dlopen], [0],
1848 [Whether dlopen is supported])
1849_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1850 [Whether dlopen of programs is supported])
1851_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1852 [Whether dlopen of statically linked programs is supported])
1853])# LT_SYS_DLOPEN_SELF
1884 1854
1855# Old name:
1856AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1857dnl aclocal-1.4 backwards compatibility:
1858dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1885 1859
1886# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1860
1861# _LT_COMPILER_C_O([TAGNAME])
1887# --------------------------------- 1862# ---------------------------
1888# Check to see if options -c and -o are simultaneously supported by compiler 1863# Check to see if options -c and -o are simultaneously supported by compiler.
1889AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1864# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1890[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1865m4_defun([_LT_COMPILER_C_O],
1866[m4_require([_LT_DECL_SED])dnl
1867m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1868m4_require([_LT_TAG_COMPILER])dnl
1891AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1869AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1892 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1870 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1893 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1871 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1894 $rm -r conftest 2>/dev/null 1872 $RM -r conftest 2>/dev/null
1895 mkdir conftest 1873 mkdir conftest
1896 cd conftest 1874 cd conftest
1897 mkdir out 1875 mkdir out
1898 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1876 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1899 1877
1900 lt_compiler_flag="-o out/conftest2.$ac_objext" 1878 lt_compiler_flag="-o out/conftest2.$ac_objext"
1901 # Insert the option either (1) after the last *FLAGS variable, or 1879 # Insert the option either (1) after the last *FLAGS variable, or
1902 # (2) before a word containing "conftest.", or (3) at the end. 1880 # (2) before a word containing "conftest.", or (3) at the end.
1903 # Note that $ac_compile itself does not contain backslashes and begins 1881 # Note that $ac_compile itself does not contain backslashes and begins
1913 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1891 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1914 if (exit $ac_status) && test -s out/conftest2.$ac_objext 1892 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1915 then 1893 then
1916 # The compiler can only warn and ignore the option if not recognized 1894 # The compiler can only warn and ignore the option if not recognized
1917 # So say no if there are warnings 1895 # So say no if there are warnings
1918 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1896 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1919 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1897 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1920 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1898 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1921 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1899 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1922 fi 1900 fi
1923 fi 1901 fi
1924 chmod u+w . 2>&AS_MESSAGE_LOG_FD 1902 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1925 $rm conftest* 1903 $RM conftest*
1926 # SGI C++ compiler will create directory out/ii_files/ for 1904 # SGI C++ compiler will create directory out/ii_files/ for
1927 # template instantiation 1905 # template instantiation
1928 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1906 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1929 $rm out/* && rmdir out 1907 $RM out/* && rmdir out
1930 cd .. 1908 cd ..
1931 rmdir conftest 1909 $RM -r conftest
1932 $rm conftest* 1910 $RM conftest*
1933]) 1911])
1934])# AC_LIBTOOL_PROG_CC_C_O 1912_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1913 [Does compiler simultaneously support -c and -o options?])
1914])# _LT_COMPILER_C_O
1935 1915
1936 1916
1937# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1917# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1938# ----------------------------------------- 1918# ----------------------------------
1939# Check to see if we can do hard links to lock some files if needed 1919# Check to see if we can do hard links to lock some files if needed
1940AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1920m4_defun([_LT_COMPILER_FILE_LOCKS],
1941[AC_REQUIRE([_LT_AC_LOCK])dnl 1921[m4_require([_LT_ENABLE_LOCK])dnl
1922m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1923_LT_COMPILER_C_O([$1])
1942 1924
1943hard_links="nottested" 1925hard_links="nottested"
1944if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1926if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1945 # do not overwrite the value of need_locks provided by the user 1927 # do not overwrite the value of need_locks provided by the user
1946 AC_MSG_CHECKING([if we can lock with hard links]) 1928 AC_MSG_CHECKING([if we can lock with hard links])
1947 hard_links=yes 1929 hard_links=yes
1948 $rm conftest* 1930 $RM conftest*
1949 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1931 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1950 touch conftest.a 1932 touch conftest.a
1951 ln conftest.a conftest.b 2>&5 || hard_links=no 1933 ln conftest.a conftest.b 2>&5 || hard_links=no
1952 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1934 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1953 AC_MSG_RESULT([$hard_links]) 1935 AC_MSG_RESULT([$hard_links])
1956 need_locks=warn 1938 need_locks=warn
1957 fi 1939 fi
1958else 1940else
1959 need_locks=no 1941 need_locks=no
1960fi 1942fi
1961])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1943_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1944])# _LT_COMPILER_FILE_LOCKS
1962 1945
1963 1946
1964# AC_LIBTOOL_OBJDIR 1947# _LT_CHECK_OBJDIR
1965# ----------------- 1948# ----------------
1966AC_DEFUN([AC_LIBTOOL_OBJDIR], 1949m4_defun([_LT_CHECK_OBJDIR],
1967[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1950[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1968[rm -f .libs 2>/dev/null 1951[rm -f .libs 2>/dev/null
1969mkdir .libs 2>/dev/null 1952mkdir .libs 2>/dev/null
1970if test -d .libs; then 1953if test -d .libs; then
1971 lt_cv_objdir=.libs 1954 lt_cv_objdir=.libs
1973 # MS-DOS does not allow filenames that begin with a dot. 1956 # MS-DOS does not allow filenames that begin with a dot.
1974 lt_cv_objdir=_libs 1957 lt_cv_objdir=_libs
1975fi 1958fi
1976rmdir .libs 2>/dev/null]) 1959rmdir .libs 2>/dev/null])
1977objdir=$lt_cv_objdir 1960objdir=$lt_cv_objdir
1978])# AC_LIBTOOL_OBJDIR 1961_LT_DECL([], [objdir], [0],
1962 [The name of the directory that contains temporary libtool files])dnl
1963m4_pattern_allow([LT_OBJDIR])dnl
1964AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1965 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1966])# _LT_CHECK_OBJDIR
1979 1967
1980 1968
1981# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1969# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1982# ---------------------------------------------- 1970# --------------------------------------
1983# Check hardcoding attributes. 1971# Check hardcoding attributes.
1984AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1972m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1985[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1973[AC_MSG_CHECKING([how to hardcode library paths into programs])
1986_LT_AC_TAGVAR(hardcode_action, $1)= 1974_LT_TAGVAR(hardcode_action, $1)=
1987if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1975if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1988 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1976 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1989 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1977 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1990 1978
1991 # We can hardcode non-existant directories. 1979 # We can hardcode non-existent directories.
1992 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1980 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1993 # If the only mechanism to avoid hardcoding is shlibpath_var, we 1981 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1994 # have to relink, otherwise we might link with an installed library 1982 # have to relink, otherwise we might link with an installed library
1995 # when we should be linking with a yet-to-be-installed one 1983 # when we should be linking with a yet-to-be-installed one
1996 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1984 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1997 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1985 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1998 # Linking always hardcodes the temporary library directory. 1986 # Linking always hardcodes the temporary library directory.
1999 _LT_AC_TAGVAR(hardcode_action, $1)=relink 1987 _LT_TAGVAR(hardcode_action, $1)=relink
2000 else 1988 else
2001 # We can link without hardcoding, and we can hardcode nonexisting dirs. 1989 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2002 _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1990 _LT_TAGVAR(hardcode_action, $1)=immediate
2003 fi 1991 fi
2004else 1992else
2005 # We cannot hardcode anything, or else we can only hardcode existing 1993 # We cannot hardcode anything, or else we can only hardcode existing
2006 # directories. 1994 # directories.
2007 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1995 _LT_TAGVAR(hardcode_action, $1)=unsupported
2008fi 1996fi
2009AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1997AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2010 1998
2011if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1999if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2000 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2012 # Fast installation is not supported 2001 # Fast installation is not supported
2013 enable_fast_install=no 2002 enable_fast_install=no
2014elif test "$shlibpath_overrides_runpath" = yes || 2003elif test "$shlibpath_overrides_runpath" = yes ||
2015 test "$enable_shared" = no; then 2004 test "$enable_shared" = no; then
2016 # Fast installation is not necessary 2005 # Fast installation is not necessary
2017 enable_fast_install=needless 2006 enable_fast_install=needless
2018fi 2007fi
2019])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 2008_LT_TAGDECL([], [hardcode_action], [0],
2009 [How to hardcode a shared library path into an executable])
2010])# _LT_LINKER_HARDCODE_LIBPATH
2020 2011
2021 2012
2022# AC_LIBTOOL_SYS_LIB_STRIP 2013# _LT_CMD_STRIPLIB
2023# ------------------------ 2014# ----------------
2024AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 2015m4_defun([_LT_CMD_STRIPLIB],
2016[m4_require([_LT_DECL_EGREP])
2025[striplib= 2017striplib=
2026old_striplib= 2018old_striplib=
2027AC_MSG_CHECKING([whether stripping libraries is possible]) 2019AC_MSG_CHECKING([whether stripping libraries is possible])
2028if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 2020if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2029 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2021 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2030 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2022 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2031 AC_MSG_RESULT([yes]) 2023 AC_MSG_RESULT([yes])
2032else 2024else
2033# FIXME - insert some real tests, host_os isn't really good enough 2025# FIXME - insert some real tests, host_os isn't really good enough
2034 case $host_os in 2026 case $host_os in
2035 darwin*) 2027 darwin*)
2036 if test -n "$STRIP" ; then 2028 if test -n "$STRIP" ; then
2037 striplib="$STRIP -x" 2029 striplib="$STRIP -x"
2030 old_striplib="$STRIP -S"
2038 AC_MSG_RESULT([yes]) 2031 AC_MSG_RESULT([yes])
2039 else 2032 else
2033 AC_MSG_RESULT([no])
2034 fi
2035 ;;
2036 *)
2040 AC_MSG_RESULT([no]) 2037 AC_MSG_RESULT([no])
2041fi
2042 ;;
2043 *)
2044 AC_MSG_RESULT([no])
2045 ;; 2038 ;;
2046 esac 2039 esac
2047fi 2040fi
2048])# AC_LIBTOOL_SYS_LIB_STRIP 2041_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2042_LT_DECL([], [striplib], [1])
2043])# _LT_CMD_STRIPLIB
2049 2044
2050 2045
2051# AC_LIBTOOL_SYS_DYNAMIC_LINKER 2046# _LT_SYS_DYNAMIC_LINKER([TAG])
2052# ----------------------------- 2047# -----------------------------
2053# PORTME Fill in your ld.so characteristics 2048# PORTME Fill in your ld.so characteristics
2054AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 2049m4_defun([_LT_SYS_DYNAMIC_LINKER],
2050[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2051m4_require([_LT_DECL_EGREP])dnl
2052m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2053m4_require([_LT_DECL_OBJDUMP])dnl
2054m4_require([_LT_DECL_SED])dnl
2055[AC_MSG_CHECKING([dynamic linker characteristics]) 2055AC_MSG_CHECKING([dynamic linker characteristics])
2056m4_if([$1],
2057 [], [
2058if test "$GCC" = yes; then
2059 case $host_os in
2060 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061 *) lt_awk_arg="/^libraries:/" ;;
2062 esac
2063 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2064 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2065 # if the path contains ";" then we assume it to be the separator
2066 # otherwise default to the standard path separator (i.e. ":") - it is
2067 # assumed that no part of a normal pathname contains ";" but that should
2068 # okay in the real world where ";" in dirpaths is itself problematic.
2069 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2070 else
2071 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2072 fi
2073 # Ok, now we have the path, separated by spaces, we can step through it
2074 # and add multilib dir if necessary.
2075 lt_tmp_lt_search_path_spec=
2076 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2077 for lt_sys_path in $lt_search_path_spec; do
2078 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2079 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2080 else
2081 test -d "$lt_sys_path" && \
2082 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083 fi
2084 done
2085 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2086BEGIN {RS=" "; FS="/|\n";} {
2087 lt_foo="";
2088 lt_count=0;
2089 for (lt_i = NF; lt_i > 0; lt_i--) {
2090 if ($lt_i != "" && $lt_i != ".") {
2091 if ($lt_i == "..") {
2092 lt_count++;
2093 } else {
2094 if (lt_count == 0) {
2095 lt_foo="/" $lt_i lt_foo;
2096 } else {
2097 lt_count--;
2098 }
2099 }
2100 }
2101 }
2102 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104}'`
2105 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2106else
2107 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108fi])
2056library_names_spec= 2109library_names_spec=
2057libname_spec='lib$name' 2110libname_spec='lib$name'
2058soname_spec= 2111soname_spec=
2059shrext_cmds=".so" 2112shrext_cmds=".so"
2060postinstall_cmds= 2113postinstall_cmds=
2064shlibpath_var= 2117shlibpath_var=
2065shlibpath_overrides_runpath=unknown 2118shlibpath_overrides_runpath=unknown
2066version_type=none 2119version_type=none
2067dynamic_linker="$host_os ld.so" 2120dynamic_linker="$host_os ld.so"
2068sys_lib_dlsearch_path_spec="/lib /usr/lib" 2121sys_lib_dlsearch_path_spec="/lib /usr/lib"
2069if test "$GCC" = yes; then
2070 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2071 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2072 # if the path contains ";" then we assume it to be the separator
2073 # otherwise default to the standard path separator (i.e. ":") - it is
2074 # assumed that no part of a normal pathname contains ";" but that should
2075 # okay in the real world where ";" in dirpaths is itself problematic.
2076 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2077 else
2078 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2079 fi
2080else
2081 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2082fi
2083need_lib_prefix=unknown 2122need_lib_prefix=unknown
2084hardcode_into_libs=no 2123hardcode_into_libs=no
2085 2124
2086# when you set need_version to no, make sure it does not cause -set_version 2125# when you set need_version to no, make sure it does not cause -set_version
2087# flags to be left without arguments 2126# flags to be left without arguments
2095 2134
2096 # AIX 3 has no versioning support, so we append a major version to the name. 2135 # AIX 3 has no versioning support, so we append a major version to the name.
2097 soname_spec='${libname}${release}${shared_ext}$major' 2136 soname_spec='${libname}${release}${shared_ext}$major'
2098 ;; 2137 ;;
2099 2138
2100aix4* | aix5*) 2139aix[[4-9]]*)
2101 version_type=linux 2140 version_type=linux
2102 need_lib_prefix=no 2141 need_lib_prefix=no
2103 need_version=no 2142 need_version=no
2104 hardcode_into_libs=yes 2143 hardcode_into_libs=yes
2105 if test "$host_cpu" = ia64; then 2144 if test "$host_cpu" = ia64; then
2114 # development snapshots of GCC prior to 3.0. 2153 # development snapshots of GCC prior to 3.0.
2115 case $host_os in 2154 case $host_os in
2116 aix4 | aix4.[[01]] | aix4.[[01]].*) 2155 aix4 | aix4.[[01]] | aix4.[[01]].*)
2117 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2156 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2118 echo ' yes ' 2157 echo ' yes '
2119 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 2158 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2120 : 2159 :
2121 else 2160 else
2122 can_build_shared=no 2161 can_build_shared=no
2123 fi 2162 fi
2124 ;; 2163 ;;
2140 shlibpath_var=LIBPATH 2179 shlibpath_var=LIBPATH
2141 fi 2180 fi
2142 ;; 2181 ;;
2143 2182
2144amigaos*) 2183amigaos*)
2184 case $host_cpu in
2185 powerpc)
2186 # Since July 2007 AmigaOS4 officially supports .so libraries.
2187 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2188 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2189 ;;
2190 m68k)
2145 library_names_spec='$libname.ixlibrary $libname.a' 2191 library_names_spec='$libname.ixlibrary $libname.a'
2146 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2192 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2147 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2193 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2194 ;;
2195 esac
2148 ;; 2196 ;;
2149 2197
2150beos*) 2198beos*)
2151 library_names_spec='${libname}${shared_ext}' 2199 library_names_spec='${libname}${shared_ext}'
2152 dynamic_linker="$host_os ld.so" 2200 dynamic_linker="$host_os ld.so"
2165 # the default ld.so.conf also contains /usr/contrib/lib and 2213 # the default ld.so.conf also contains /usr/contrib/lib and
2166 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2214 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2167 # libtool to hard-code these into programs 2215 # libtool to hard-code these into programs
2168 ;; 2216 ;;
2169 2217
2170cygwin* | mingw* | pw32*) 2218cygwin* | mingw* | pw32* | cegcc*)
2171 version_type=windows 2219 version_type=windows
2172 shrext_cmds=".dll" 2220 shrext_cmds=".dll"
2173 need_version=no 2221 need_version=no
2174 need_lib_prefix=no 2222 need_lib_prefix=no
2175 2223
2176 case $GCC,$host_os in 2224 case $GCC,$host_os in
2177 yes,cygwin* | yes,mingw* | yes,pw32*) 2225 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2178 library_names_spec='$libname.dll.a' 2226 library_names_spec='$libname.dll.a'
2179 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2227 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2180 postinstall_cmds='base_file=`basename \${file}`~ 2228 postinstall_cmds='base_file=`basename \${file}`~
2181 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 2229 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2182 dldir=$destdir/`dirname \$dlpath`~ 2230 dldir=$destdir/`dirname \$dlpath`~
2183 test -d \$dldir || mkdir -p \$dldir~ 2231 test -d \$dldir || mkdir -p \$dldir~
2184 $install_prog $dir/$dlname \$dldir/$dlname~ 2232 $install_prog $dir/$dlname \$dldir/$dlname~
2185 chmod a+x \$dldir/$dlname' 2233 chmod a+x \$dldir/$dlname~
2234 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2235 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2236 fi'
2186 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2237 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2187 dlpath=$dir/\$dldll~ 2238 dlpath=$dir/\$dldll~
2188 $rm \$dlpath' 2239 $RM \$dlpath'
2189 shlibpath_overrides_runpath=yes 2240 shlibpath_overrides_runpath=yes
2190 2241
2191 case $host_os in 2242 case $host_os in
2192 cygwin*) 2243 cygwin*)
2193 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2244 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2194 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2245 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2195 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2246 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2196 ;; 2247 ;;
2197 mingw*) 2248 mingw* | cegcc*)
2198 # MinGW DLLs use traditional 'lib' prefix 2249 # MinGW DLLs use traditional 'lib' prefix
2199 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2250 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2200 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2251 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2201 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 2252 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2202 # It is most probably a Windows format PATH printed by 2253 # It is most probably a Windows format PATH printed by
2203 # mingw gcc, but we are running on Cygwin. Gcc prints its search 2254 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2204 # path with ; separators, and with drive letters. We can handle the 2255 # path with ; separators, and with drive letters. We can handle the
2205 # drive letters (cygwin fileutils understands them), so leave them, 2256 # drive letters (cygwin fileutils understands them), so leave them,
2206 # especially as we might pass files found there to a mingw objdump, 2257 # especially as we might pass files found there to a mingw objdump,
2207 # which wouldn't understand a cygwinified path. Ahh. 2258 # which wouldn't understand a cygwinified path. Ahh.
2208 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2259 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2209 else 2260 else
2210 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2261 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2211 fi 2262 fi
2212 ;; 2263 ;;
2213 pw32*) 2264 pw32*)
2214 # pw32 DLLs use 'pw' prefix rather than 'lib' 2265 # pw32 DLLs use 'pw' prefix rather than 'lib'
2215 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2266 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2229darwin* | rhapsody*) 2280darwin* | rhapsody*)
2230 dynamic_linker="$host_os dyld" 2281 dynamic_linker="$host_os dyld"
2231 version_type=darwin 2282 version_type=darwin
2232 need_lib_prefix=no 2283 need_lib_prefix=no
2233 need_version=no 2284 need_version=no
2234 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2285 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2235 soname_spec='${libname}${release}${major}$shared_ext' 2286 soname_spec='${libname}${release}${major}$shared_ext'
2236 shlibpath_overrides_runpath=yes 2287 shlibpath_overrides_runpath=yes
2237 shlibpath_var=DYLD_LIBRARY_PATH 2288 shlibpath_var=DYLD_LIBRARY_PATH
2238 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2289 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2239 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 2290m4_if([$1], [],[
2240 if test "$GCC" = yes; then 2291 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2241 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2242 else
2243 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2244 fi
2245 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2292 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2246 ;; 2293 ;;
2247 2294
2248dgux*) 2295dgux*)
2249 version_type=linux 2296 version_type=linux
2293 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2340 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2294 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2341 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2295 shlibpath_overrides_runpath=no 2342 shlibpath_overrides_runpath=no
2296 hardcode_into_libs=yes 2343 hardcode_into_libs=yes
2297 ;; 2344 ;;
2298 freebsd*) # from 4.6 on 2345 *) # from 4.6 on, and DragonFly
2299 shlibpath_overrides_runpath=yes 2346 shlibpath_overrides_runpath=yes
2300 hardcode_into_libs=yes 2347 hardcode_into_libs=yes
2301 ;; 2348 ;;
2302 esac 2349 esac
2303 ;; 2350 ;;
2332 else 2379 else
2333 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2380 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2334 fi 2381 fi
2335 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2382 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2336 ;; 2383 ;;
2337 hppa*64*) 2384 hppa*64*)
2338 shrext_cmds='.sl' 2385 shrext_cmds='.sl'
2339 hardcode_into_libs=yes 2386 hardcode_into_libs=yes
2340 dynamic_linker="$host_os dld.sl" 2387 dynamic_linker="$host_os dld.sl"
2341 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2388 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2342 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2389 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2343 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2390 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2344 soname_spec='${libname}${release}${shared_ext}$major' 2391 soname_spec='${libname}${release}${shared_ext}$major'
2345 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2392 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2346 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2393 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2347 ;; 2394 ;;
2348 *) 2395 *)
2349 shrext_cmds='.sl' 2396 shrext_cmds='.sl'
2350 dynamic_linker="$host_os dld.sl" 2397 dynamic_linker="$host_os dld.sl"
2351 shlibpath_var=SHLIB_PATH 2398 shlibpath_var=SHLIB_PATH
2352 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2399 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2353 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2400 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2356 esac 2403 esac
2357 # HP-UX runs *really* slowly unless shared libraries are mode 555. 2404 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2358 postinstall_cmds='chmod 555 $lib' 2405 postinstall_cmds='chmod 555 $lib'
2359 ;; 2406 ;;
2360 2407
2361interix3*) 2408interix[[3-9]]*)
2362 version_type=linux 2409 version_type=linux
2363 need_lib_prefix=no 2410 need_lib_prefix=no
2364 need_version=no 2411 need_version=no
2365 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2412 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2366 soname_spec='${libname}${release}${shared_ext}$major' 2413 soname_spec='${libname}${release}${shared_ext}$major'
2411linux*oldld* | linux*aout* | linux*coff*) 2458linux*oldld* | linux*aout* | linux*coff*)
2412 dynamic_linker=no 2459 dynamic_linker=no
2413 ;; 2460 ;;
2414 2461
2415# This must be Linux ELF. 2462# This must be Linux ELF.
2416linux* | k*bsd*-gnu) 2463linux* | k*bsd*-gnu | kopensolaris*-gnu)
2417 version_type=linux 2464 version_type=linux
2418 need_lib_prefix=no 2465 need_lib_prefix=no
2419 need_version=no 2466 need_version=no
2420 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2467 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2421 soname_spec='${libname}${release}${shared_ext}$major' 2468 soname_spec='${libname}${release}${shared_ext}$major'
2422 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2469 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2423 shlibpath_var=LD_LIBRARY_PATH 2470 shlibpath_var=LD_LIBRARY_PATH
2424 shlibpath_overrides_runpath=no 2471 shlibpath_overrides_runpath=no
2472 # Some binutils ld are patched to set DT_RUNPATH
2473 save_LDFLAGS=$LDFLAGS
2474 save_libdir=$libdir
2475 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2476 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2477 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2478 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2479 [shlibpath_overrides_runpath=yes])])
2480 LDFLAGS=$save_LDFLAGS
2481 libdir=$save_libdir
2482
2425 # This implies no fast_install, which is unacceptable. 2483 # This implies no fast_install, which is unacceptable.
2426 # Some rework will be needed to allow for fast_install 2484 # Some rework will be needed to allow for fast_install
2427 # before this can be enabled. 2485 # before this can be enabled.
2428 hardcode_into_libs=yes 2486 hardcode_into_libs=yes
2429 2487
2430 # Append ld.so.conf contents to the search path 2488 # Append ld.so.conf contents to the search path
2431 if test -f /etc/ld.so.conf; then 2489 if test -f /etc/ld.so.conf; then
2432 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 2490 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2433 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2491 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2434 fi 2492 fi
2435 2493
2436 # We used to test for /lib/ld.so.1 and disable shared libraries on 2494 # We used to test for /lib/ld.so.1 and disable shared libraries on
2437 # powerpc, because MkLinux only supported shared libraries with the 2495 # powerpc, because MkLinux only supported shared libraries with the
2456 2514
2457netbsd*) 2515netbsd*)
2458 version_type=sunos 2516 version_type=sunos
2459 need_lib_prefix=no 2517 need_lib_prefix=no
2460 need_version=no 2518 need_version=no
2461 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 2519 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2462 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2520 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2463 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2521 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2464 dynamic_linker='NetBSD (a.out) ld.so' 2522 dynamic_linker='NetBSD (a.out) ld.so'
2465 else 2523 else
2466 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2524 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2477 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2535 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2478 shlibpath_var=LD_LIBRARY_PATH 2536 shlibpath_var=LD_LIBRARY_PATH
2479 shlibpath_overrides_runpath=yes 2537 shlibpath_overrides_runpath=yes
2480 ;; 2538 ;;
2481 2539
2482nto-qnx*) 2540*nto* | *qnx*)
2483 version_type=linux 2541 version_type=qnx
2484 need_lib_prefix=no 2542 need_lib_prefix=no
2485 need_version=no 2543 need_version=no
2486 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2544 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2487 soname_spec='${libname}${release}${shared_ext}$major' 2545 soname_spec='${libname}${release}${shared_ext}$major'
2488 shlibpath_var=LD_LIBRARY_PATH 2546 shlibpath_var=LD_LIBRARY_PATH
2489 shlibpath_overrides_runpath=yes 2547 shlibpath_overrides_runpath=no
2548 hardcode_into_libs=yes
2549 dynamic_linker='ldqnx.so'
2490 ;; 2550 ;;
2491 2551
2492openbsd*) 2552openbsd*)
2493 version_type=sunos 2553 version_type=sunos
2494 sys_lib_dlsearch_path_spec="/usr/lib" 2554 sys_lib_dlsearch_path_spec="/usr/lib"
2495 need_lib_prefix=no 2555 need_lib_prefix=no
2496 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2556 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2497 case $host_os in 2557 case $host_os in
2498 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2558 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2499 *) need_version=no ;; 2559 *) need_version=no ;;
2500 esac 2560 esac
2501 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2561 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2502 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2562 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2503 shlibpath_var=LD_LIBRARY_PATH 2563 shlibpath_var=LD_LIBRARY_PATH
2504 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2564 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2505 case $host_os in 2565 case $host_os in
2506 openbsd2.[[89]] | openbsd2.[[89]].*) 2566 openbsd2.[[89]] | openbsd2.[[89]].*)
2507 shlibpath_overrides_runpath=no 2567 shlibpath_overrides_runpath=no
2508 ;; 2568 ;;
2509 *) 2569 *)
2533 shlibpath_var=LD_LIBRARY_PATH 2593 shlibpath_var=LD_LIBRARY_PATH
2534 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2594 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2535 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2595 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2536 ;; 2596 ;;
2537 2597
2598rdos*)
2599 dynamic_linker=no
2600 ;;
2601
2538solaris*) 2602solaris*)
2539 version_type=linux 2603 version_type=linux
2540 need_lib_prefix=no 2604 need_lib_prefix=no
2541 need_version=no 2605 need_version=no
2542 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2606 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2567 shlibpath_var=LD_LIBRARY_PATH 2631 shlibpath_var=LD_LIBRARY_PATH
2568 case $host_vendor in 2632 case $host_vendor in
2569 sni) 2633 sni)
2570 shlibpath_overrides_runpath=no 2634 shlibpath_overrides_runpath=no
2571 need_lib_prefix=no 2635 need_lib_prefix=no
2572 export_dynamic_flag_spec='${wl}-Blargedynsym'
2573 runpath_var=LD_RUN_PATH 2636 runpath_var=LD_RUN_PATH
2574 ;; 2637 ;;
2575 siemens) 2638 siemens)
2576 need_lib_prefix=no 2639 need_lib_prefix=no
2577 ;; 2640 ;;
2598 need_lib_prefix=no 2661 need_lib_prefix=no
2599 need_version=no 2662 need_version=no
2600 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2663 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2601 soname_spec='${libname}${release}${shared_ext}$major' 2664 soname_spec='${libname}${release}${shared_ext}$major'
2602 shlibpath_var=LD_LIBRARY_PATH 2665 shlibpath_var=LD_LIBRARY_PATH
2666 shlibpath_overrides_runpath=yes
2603 hardcode_into_libs=yes 2667 hardcode_into_libs=yes
2604 if test "$with_gnu_ld" = yes; then 2668 if test "$with_gnu_ld" = yes; then
2605 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2669 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2606 shlibpath_overrides_runpath=no
2607 else 2670 else
2608 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2671 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2609 shlibpath_overrides_runpath=yes
2610 case $host_os in 2672 case $host_os in
2611 sco3.2v5*) 2673 sco3.2v5*)
2612 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2674 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2613 ;; 2675 ;;
2614 esac 2676 esac
2615 fi 2677 fi
2616 sys_lib_dlsearch_path_spec='/usr/lib' 2678 sys_lib_dlsearch_path_spec='/usr/lib'
2617 ;; 2679 ;;
2618 2680
2681tpf*)
2682 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2683 version_type=linux
2684 need_lib_prefix=no
2685 need_version=no
2686 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2687 shlibpath_var=LD_LIBRARY_PATH
2688 shlibpath_overrides_runpath=no
2689 hardcode_into_libs=yes
2690 ;;
2691
2619uts4*) 2692uts4*)
2620 version_type=linux 2693 version_type=linux
2621 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2694 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2622 soname_spec='${libname}${release}${shared_ext}$major' 2695 soname_spec='${libname}${release}${shared_ext}$major'
2623 shlibpath_var=LD_LIBRARY_PATH 2696 shlibpath_var=LD_LIBRARY_PATH
2632 2705
2633variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2706variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2634if test "$GCC" = yes; then 2707if test "$GCC" = yes; then
2635 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2708 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2636fi 2709fi
2637])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2638 2710
2639 2711if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2640# _LT_AC_TAGCONFIG 2712 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2641# ----------------
2642AC_DEFUN([_LT_AC_TAGCONFIG],
2643[AC_ARG_WITH([tags],
2644 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2645 [include additional configurations @<:@automatic@:>@])],
2646 [tagnames="$withval"])
2647
2648if test -f "$ltmain" && test -n "$tagnames"; then
2649 if test ! -f "${ofile}"; then
2650 AC_MSG_WARN([output file `$ofile' does not exist])
2651 fi
2652
2653 if test -z "$LTCC"; then
2654 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2655 if test -z "$LTCC"; then
2656 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2657 else
2658 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2659 fi
2660 fi
2661 if test -z "$LTCFLAGS"; then
2662 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2663 fi
2664
2665 # Extract list of available tagged configurations in $ofile.
2666 # Note that this assumes the entire list is on one line.
2667 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2668
2669 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2670 for tagname in $tagnames; do
2671 IFS="$lt_save_ifs"
2672 # Check whether tagname contains only valid characters
2673 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2674 "") ;;
2675 *) AC_MSG_ERROR([invalid tag name: $tagname])
2676 ;;
2677 esac
2678
2679 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2680 then
2681 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2682 fi
2683
2684 # Update the list of available tags.
2685 if test -n "$tagname"; then
2686 echo appending configuration tag \"$tagname\" to $ofile
2687
2688 case $tagname in
2689 CXX)
2690 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2691 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2692 (test "X$CXX" != "Xg++"))) ; then
2693 AC_LIBTOOL_LANG_CXX_CONFIG
2694 else
2695 tagname=""
2696 fi
2697 ;;
2698
2699 F77)
2700 if test -n "$F77" && test "X$F77" != "Xno"; then
2701 AC_LIBTOOL_LANG_F77_CONFIG
2702 else
2703 tagname=""
2704 fi
2705 ;;
2706
2707 GCJ)
2708 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2709 AC_LIBTOOL_LANG_GCJ_CONFIG
2710 else
2711 tagname=""
2712 fi
2713 ;;
2714
2715 RC)
2716 AC_LIBTOOL_LANG_RC_CONFIG
2717 ;;
2718
2719 *)
2720 AC_MSG_ERROR([Unsupported tag name: $tagname])
2721 ;;
2722 esac
2723
2724 # Append the new tag name to the list of available tags.
2725 if test -n "$tagname" ; then
2726 available_tags="$available_tags $tagname"
2727 fi
2728 fi
2729 done
2730 IFS="$lt_save_ifs"
2731
2732 # Now substitute the updated list of available tags.
2733 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2734 mv "${ofile}T" "$ofile"
2735 chmod +x "$ofile"
2736 else
2737 rm -f "${ofile}T"
2738 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2739 fi
2740fi 2713fi
2741])# _LT_AC_TAGCONFIG 2714if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2742 2715 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2743
2744# AC_LIBTOOL_DLOPEN
2745# -----------------
2746# enable checks for dlopen support
2747AC_DEFUN([AC_LIBTOOL_DLOPEN],
2748 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2749])# AC_LIBTOOL_DLOPEN
2750
2751
2752# AC_LIBTOOL_WIN32_DLL
2753# --------------------
2754# declare package support for building win32 DLLs
2755AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2756[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2757])# AC_LIBTOOL_WIN32_DLL
2758
2759
2760# AC_ENABLE_SHARED([DEFAULT])
2761# ---------------------------
2762# implement the --enable-shared flag
2763# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2764AC_DEFUN([AC_ENABLE_SHARED],
2765[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2766AC_ARG_ENABLE([shared],
2767 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2768 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2769 [p=${PACKAGE-default}
2770 case $enableval in
2771 yes) enable_shared=yes ;;
2772 no) enable_shared=no ;;
2773 *)
2774 enable_shared=no
2775 # Look at the argument we got. We use all the common list separators.
2776 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2777 for pkg in $enableval; do
2778 IFS="$lt_save_ifs"
2779 if test "X$pkg" = "X$p"; then
2780 enable_shared=yes
2781 fi 2716fi
2782 done
2783 IFS="$lt_save_ifs"
2784 ;;
2785 esac],
2786 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2787])# AC_ENABLE_SHARED
2788 2717
2718_LT_DECL([], [variables_saved_for_relink], [1],
2719 [Variables whose values should be saved in libtool wrapper scripts and
2720 restored at link time])
2721_LT_DECL([], [need_lib_prefix], [0],
2722 [Do we need the "lib" prefix for modules?])
2723_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2724_LT_DECL([], [version_type], [0], [Library versioning type])
2725_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2726_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2727_LT_DECL([], [shlibpath_overrides_runpath], [0],
2728 [Is shlibpath searched before the hard-coded library search path?])
2729_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2730_LT_DECL([], [library_names_spec], [1],
2731 [[List of archive names. First name is the real one, the rest are links.
2732 The last name is the one that the linker finds with -lNAME]])
2733_LT_DECL([], [soname_spec], [1],
2734 [[The coded name of the library, if different from the real name]])
2735_LT_DECL([], [postinstall_cmds], [2],
2736 [Command to use after installation of a shared archive])
2737_LT_DECL([], [postuninstall_cmds], [2],
2738 [Command to use after uninstallation of a shared archive])
2739_LT_DECL([], [finish_cmds], [2],
2740 [Commands used to finish a libtool library installation in a directory])
2741_LT_DECL([], [finish_eval], [1],
2742 [[As "finish_cmds", except a single script fragment to be evaled but
2743 not shown]])
2744_LT_DECL([], [hardcode_into_libs], [0],
2745 [Whether we should hardcode library paths into libraries])
2746_LT_DECL([], [sys_lib_search_path_spec], [2],
2747 [Compile-time system search path for libraries])
2748_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2749 [Run-time system search path for libraries])
2750])# _LT_SYS_DYNAMIC_LINKER
2789 2751
2790# AC_DISABLE_SHARED
2791# -----------------
2792# set the default shared flag to --disable-shared
2793AC_DEFUN([AC_DISABLE_SHARED],
2794[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2795AC_ENABLE_SHARED(no)
2796])# AC_DISABLE_SHARED
2797 2752
2798 2753# _LT_PATH_TOOL_PREFIX(TOOL)
2799# AC_ENABLE_STATIC([DEFAULT])
2800# ---------------------------
2801# implement the --enable-static flag
2802# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2803AC_DEFUN([AC_ENABLE_STATIC],
2804[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2805AC_ARG_ENABLE([static],
2806 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2807 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2808 [p=${PACKAGE-default}
2809 case $enableval in
2810 yes) enable_static=yes ;;
2811 no) enable_static=no ;;
2812 *)
2813 enable_static=no
2814 # Look at the argument we got. We use all the common list separators.
2815 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2816 for pkg in $enableval; do
2817 IFS="$lt_save_ifs"
2818 if test "X$pkg" = "X$p"; then
2819 enable_static=yes
2820 fi
2821 done
2822 IFS="$lt_save_ifs"
2823 ;;
2824 esac],
2825 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2826])# AC_ENABLE_STATIC
2827
2828
2829# AC_DISABLE_STATIC
2830# -----------------
2831# set the default static flag to --disable-static
2832AC_DEFUN([AC_DISABLE_STATIC],
2833[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2834AC_ENABLE_STATIC(no)
2835])# AC_DISABLE_STATIC
2836
2837
2838# AC_ENABLE_FAST_INSTALL([DEFAULT])
2839# ---------------------------------
2840# implement the --enable-fast-install flag
2841# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2842AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2843[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2844AC_ARG_ENABLE([fast-install],
2845 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2846 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2847 [p=${PACKAGE-default}
2848 case $enableval in
2849 yes) enable_fast_install=yes ;;
2850 no) enable_fast_install=no ;;
2851 *)
2852 enable_fast_install=no
2853 # Look at the argument we got. We use all the common list separators.
2854 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2855 for pkg in $enableval; do
2856 IFS="$lt_save_ifs"
2857 if test "X$pkg" = "X$p"; then
2858 enable_fast_install=yes
2859 fi
2860 done
2861 IFS="$lt_save_ifs"
2862 ;;
2863 esac],
2864 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2865])# AC_ENABLE_FAST_INSTALL
2866
2867
2868# AC_DISABLE_FAST_INSTALL
2869# -----------------------
2870# set the default to --disable-fast-install
2871AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2872[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2873AC_ENABLE_FAST_INSTALL(no)
2874])# AC_DISABLE_FAST_INSTALL
2875
2876
2877# AC_LIBTOOL_PICMODE([MODE])
2878# -------------------------- 2754# --------------------------
2879# implement the --with-pic flag
2880# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2881AC_DEFUN([AC_LIBTOOL_PICMODE],
2882[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2883pic_mode=ifelse($#,1,$1,default)
2884])# AC_LIBTOOL_PICMODE
2885
2886
2887# AC_PROG_EGREP
2888# -------------
2889# This is predefined starting with Autoconf 2.54, so this conditional
2890# definition can be removed once we require Autoconf 2.54 or later.
2891m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2892[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2893 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2894 then ac_cv_prog_egrep='grep -E'
2895 else ac_cv_prog_egrep='egrep'
2896 fi])
2897 EGREP=$ac_cv_prog_egrep
2898 AC_SUBST([EGREP])
2899])])
2900
2901
2902# AC_PATH_TOOL_PREFIX
2903# -------------------
2904# find a file program which can recognise shared library 2755# find a file program which can recognize shared library
2905AC_DEFUN([AC_PATH_TOOL_PREFIX], 2756AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2906[AC_REQUIRE([AC_PROG_EGREP])dnl 2757[m4_require([_LT_DECL_EGREP])dnl
2907AC_MSG_CHECKING([for $1]) 2758AC_MSG_CHECKING([for $1])
2908AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2759AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2909[case $MAGIC_CMD in 2760[case $MAGIC_CMD in
2910[[\\/*] | ?:[\\/]*]) 2761[[\\/*] | ?:[\\/]*])
2911 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2762 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2914 lt_save_MAGIC_CMD="$MAGIC_CMD" 2765 lt_save_MAGIC_CMD="$MAGIC_CMD"
2915 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2766 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2916dnl $ac_dummy forces splitting on constant user-supplied paths. 2767dnl $ac_dummy forces splitting on constant user-supplied paths.
2917dnl POSIX.2 word splitting is done only on the output of word expansions, 2768dnl POSIX.2 word splitting is done only on the output of word expansions,
2918dnl not every word. This closes a longstanding sh security hole. 2769dnl not every word. This closes a longstanding sh security hole.
2919 ac_dummy="ifelse([$2], , $PATH, [$2])" 2770 ac_dummy="m4_if([$2], , $PATH, [$2])"
2920 for ac_dir in $ac_dummy; do 2771 for ac_dir in $ac_dummy; do
2921 IFS="$lt_save_ifs" 2772 IFS="$lt_save_ifs"
2922 test -z "$ac_dir" && ac_dir=. 2773 test -z "$ac_dir" && ac_dir=.
2923 if test -f $ac_dir/$1; then 2774 if test -f $ac_dir/$1; then
2924 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2775 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2929 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2780 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2930 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2781 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2931 $EGREP "$file_magic_regex" > /dev/null; then 2782 $EGREP "$file_magic_regex" > /dev/null; then
2932 : 2783 :
2933 else 2784 else
2934 cat <<EOF 1>&2 2785 cat <<_LT_EOF 1>&2
2935 2786
2936*** Warning: the command libtool uses to detect shared libraries, 2787*** Warning: the command libtool uses to detect shared libraries,
2937*** $file_magic_cmd, produces output that libtool cannot recognize. 2788*** $file_magic_cmd, produces output that libtool cannot recognize.
2938*** The result is that libtool may fail to recognize shared libraries 2789*** The result is that libtool may fail to recognize shared libraries
2939*** as such. This will affect the creation of libtool libraries that 2790*** as such. This will affect the creation of libtool libraries that
2940*** depend on shared libraries, but programs linked with such libtool 2791*** depend on shared libraries, but programs linked with such libtool
2941*** libraries will work regardless of this problem. Nevertheless, you 2792*** libraries will work regardless of this problem. Nevertheless, you
2942*** may want to report the problem to your system manager and/or to 2793*** may want to report the problem to your system manager and/or to
2943*** bug-libtool@gnu.org 2794*** bug-libtool@gnu.org
2944 2795
2945EOF 2796_LT_EOF
2946 fi ;; 2797 fi ;;
2947 esac 2798 esac
2948 fi 2799 fi
2949 break 2800 break
2950 fi 2801 fi
2957if test -n "$MAGIC_CMD"; then 2808if test -n "$MAGIC_CMD"; then
2958 AC_MSG_RESULT($MAGIC_CMD) 2809 AC_MSG_RESULT($MAGIC_CMD)
2959else 2810else
2960 AC_MSG_RESULT(no) 2811 AC_MSG_RESULT(no)
2961fi 2812fi
2813_LT_DECL([], [MAGIC_CMD], [0],
2814 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2962])# AC_PATH_TOOL_PREFIX 2815])# _LT_PATH_TOOL_PREFIX
2963 2816
2817# Old name:
2818AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2819dnl aclocal-1.4 backwards compatibility:
2820dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2964 2821
2822
2965# AC_PATH_MAGIC 2823# _LT_PATH_MAGIC
2966# ------------- 2824# --------------
2967# find a file program which can recognise a shared library 2825# find a file program which can recognize a shared library
2968AC_DEFUN([AC_PATH_MAGIC], 2826m4_defun([_LT_PATH_MAGIC],
2969[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2827[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2970if test -z "$lt_cv_path_MAGIC_CMD"; then 2828if test -z "$lt_cv_path_MAGIC_CMD"; then
2971 if test -n "$ac_tool_prefix"; then 2829 if test -n "$ac_tool_prefix"; then
2972 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2830 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2973 else 2831 else
2974 MAGIC_CMD=: 2832 MAGIC_CMD=:
2975 fi 2833 fi
2976fi 2834fi
2977])# AC_PATH_MAGIC 2835])# _LT_PATH_MAGIC
2978 2836
2979 2837
2980# AC_PROG_LD 2838# LT_PATH_LD
2981# ---------- 2839# ----------
2982# find the pathname to the GNU or non-GNU linker 2840# find the pathname to the GNU or non-GNU linker
2983AC_DEFUN([AC_PROG_LD], 2841AC_DEFUN([LT_PATH_LD],
2842[AC_REQUIRE([AC_PROG_CC])dnl
2843AC_REQUIRE([AC_CANONICAL_HOST])dnl
2844AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2845m4_require([_LT_DECL_SED])dnl
2846m4_require([_LT_DECL_EGREP])dnl
2847
2984[AC_ARG_WITH([gnu-ld], 2848AC_ARG_WITH([gnu-ld],
2985 [AC_HELP_STRING([--with-gnu-ld], 2849 [AS_HELP_STRING([--with-gnu-ld],
2986 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2850 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2987 [test "$withval" = no || with_gnu_ld=yes], 2851 [test "$withval" = no || with_gnu_ld=yes],
2988 [with_gnu_ld=no]) 2852 [with_gnu_ld=no])dnl
2989AC_REQUIRE([LT_AC_PROG_SED])dnl 2853
2990AC_REQUIRE([AC_PROG_CC])dnl
2991AC_REQUIRE([AC_CANONICAL_HOST])dnl
2992AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2993ac_prog=ld 2854ac_prog=ld
2994if test "$GCC" = yes; then 2855if test "$GCC" = yes; then
2995 # Check if gcc -print-prog-name=ld gives a path. 2856 # Check if gcc -print-prog-name=ld gives a path.
2996 AC_MSG_CHECKING([for ld used by $CC]) 2857 AC_MSG_CHECKING([for ld used by $CC])
2997 case $host in 2858 case $host in
3004 case $ac_prog in 2865 case $ac_prog in
3005 # Accept absolute paths. 2866 # Accept absolute paths.
3006 [[\\/]]* | ?:[[\\/]]*) 2867 [[\\/]]* | ?:[[\\/]]*)
3007 re_direlt='/[[^/]][[^/]]*/\.\./' 2868 re_direlt='/[[^/]][[^/]]*/\.\./'
3008 # Canonicalize the pathname of ld 2869 # Canonicalize the pathname of ld
3009 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2870 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3010 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2871 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3011 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2872 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3012 done 2873 done
3013 test -z "$LD" && LD="$ac_prog" 2874 test -z "$LD" && LD="$ac_prog"
3014 ;; 2875 ;;
3015 "") 2876 "")
3016 # If it fails, then pretend we aren't using GCC. 2877 # If it fails, then pretend we aren't using GCC.
3056 AC_MSG_RESULT($LD) 2917 AC_MSG_RESULT($LD)
3057else 2918else
3058 AC_MSG_RESULT(no) 2919 AC_MSG_RESULT(no)
3059fi 2920fi
3060test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2921test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3061AC_PROG_LD_GNU 2922_LT_PATH_LD_GNU
3062])# AC_PROG_LD 2923AC_SUBST([LD])
3063 2924
2925_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2926])# LT_PATH_LD
3064 2927
3065# AC_PROG_LD_GNU 2928# Old names:
2929AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2930AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2931dnl aclocal-1.4 backwards compatibility:
2932dnl AC_DEFUN([AM_PROG_LD], [])
2933dnl AC_DEFUN([AC_PROG_LD], [])
2934
2935
2936# _LT_PATH_LD_GNU
3066# -------------- 2937#- --------------
3067AC_DEFUN([AC_PROG_LD_GNU], 2938m4_defun([_LT_PATH_LD_GNU],
3068[AC_REQUIRE([AC_PROG_EGREP])dnl
3069AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2939[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3070[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2940[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3071case `$LD -v 2>&1 </dev/null` in 2941case `$LD -v 2>&1 </dev/null` in
3072*GNU* | *'with BFD'*) 2942*GNU* | *'with BFD'*)
3073 lt_cv_prog_gnu_ld=yes 2943 lt_cv_prog_gnu_ld=yes
3074 ;; 2944 ;;
3075*) 2945*)
3076 lt_cv_prog_gnu_ld=no 2946 lt_cv_prog_gnu_ld=no
3077 ;; 2947 ;;
3078esac]) 2948esac])
3079with_gnu_ld=$lt_cv_prog_gnu_ld 2949with_gnu_ld=$lt_cv_prog_gnu_ld
3080])# AC_PROG_LD_GNU 2950])# _LT_PATH_LD_GNU
3081 2951
3082 2952
3083# AC_PROG_LD_RELOAD_FLAG 2953# _LT_CMD_RELOAD
3084# ---------------------- 2954# --------------
3085# find reload flag for linker 2955# find reload flag for linker
3086# -- PORTME Some linkers may need a different reload flag. 2956# -- PORTME Some linkers may need a different reload flag.
3087AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2957m4_defun([_LT_CMD_RELOAD],
3088[AC_CACHE_CHECK([for $LD option to reload object files], 2958[AC_CACHE_CHECK([for $LD option to reload object files],
3089 lt_cv_ld_reload_flag, 2959 lt_cv_ld_reload_flag,
3090 [lt_cv_ld_reload_flag='-r']) 2960 [lt_cv_ld_reload_flag='-r'])
3091reload_flag=$lt_cv_ld_reload_flag 2961reload_flag=$lt_cv_ld_reload_flag
3092case $reload_flag in 2962case $reload_flag in
3101 else 2971 else
3102 reload_cmds='$LD$reload_flag -o $output$reload_objs' 2972 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3103 fi 2973 fi
3104 ;; 2974 ;;
3105esac 2975esac
3106])# AC_PROG_LD_RELOAD_FLAG 2976_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2977_LT_DECL([], [reload_cmds], [2])dnl
2978])# _LT_CMD_RELOAD
3107 2979
3108 2980
3109# AC_DEPLIBS_CHECK_METHOD 2981# _LT_CHECK_MAGIC_METHOD
3110# ----------------------- 2982# ----------------------
3111# how to check for library dependencies 2983# how to check for library dependencies
3112# -- PORTME fill in with the dynamic library characteristics 2984# -- PORTME fill in with the dynamic library characteristics
3113AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2985m4_defun([_LT_CHECK_MAGIC_METHOD],
2986[m4_require([_LT_DECL_EGREP])
2987m4_require([_LT_DECL_OBJDUMP])
3114[AC_CACHE_CHECK([how to recognise dependent libraries], 2988AC_CACHE_CHECK([how to recognize dependent libraries],
3115lt_cv_deplibs_check_method, 2989lt_cv_deplibs_check_method,
3116[lt_cv_file_magic_cmd='$MAGIC_CMD' 2990[lt_cv_file_magic_cmd='$MAGIC_CMD'
3117lt_cv_file_magic_test_file= 2991lt_cv_file_magic_test_file=
3118lt_cv_deplibs_check_method='unknown' 2992lt_cv_deplibs_check_method='unknown'
3119# Need to set the preceding variable on all platforms that support 2993# Need to set the preceding variable on all platforms that support
3126# which responds to the $file_magic_cmd with a given extended regex. 3000# which responds to the $file_magic_cmd with a given extended regex.
3127# If you have `file' or equivalent on your system and you're not sure 3001# If you have `file' or equivalent on your system and you're not sure
3128# whether `pass_all' will *always* work, you probably want this one. 3002# whether `pass_all' will *always* work, you probably want this one.
3129 3003
3130case $host_os in 3004case $host_os in
3131aix4* | aix5*) 3005aix[[4-9]]*)
3132 lt_cv_deplibs_check_method=pass_all 3006 lt_cv_deplibs_check_method=pass_all
3133 ;; 3007 ;;
3134 3008
3135beos*) 3009beos*)
3136 lt_cv_deplibs_check_method=pass_all 3010 lt_cv_deplibs_check_method=pass_all
3148 lt_cv_file_magic_cmd='func_win32_libid' 3022 lt_cv_file_magic_cmd='func_win32_libid'
3149 ;; 3023 ;;
3150 3024
3151mingw* | pw32*) 3025mingw* | pw32*)
3152 # Base MSYS/MinGW do not provide the 'file' command needed by 3026 # Base MSYS/MinGW do not provide the 'file' command needed by
3153 # func_win32_libid shell function, so use a weaker test based on 'objdump'. 3027 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3028 # unless we find 'file', for example because we are cross-compiling.
3029 if ( file / ) >/dev/null 2>&1; then
3030 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3031 lt_cv_file_magic_cmd='func_win32_libid'
3032 else
3154 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3033 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3034 lt_cv_file_magic_cmd='$OBJDUMP -f'
3035 fi
3036 ;;
3037
3038cegcc)
3039 # use the weaker test based on 'objdump'. See mingw*.
3040 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3155 lt_cv_file_magic_cmd='$OBJDUMP -f' 3041 lt_cv_file_magic_cmd='$OBJDUMP -f'
3156 ;; 3042 ;;
3157 3043
3158darwin* | rhapsody*) 3044darwin* | rhapsody*)
3159 lt_cv_deplibs_check_method=pass_all 3045 lt_cv_deplibs_check_method=pass_all
3160 ;; 3046 ;;
3161 3047
3162freebsd* | dragonfly*) 3048freebsd* | dragonfly*)
3163 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3049 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3164 case $host_cpu in 3050 case $host_cpu in
3165 i*86 ) 3051 i*86 )
3166 # Not sure whether the presence of OpenBSD here was a mistake. 3052 # Not sure whether the presence of OpenBSD here was a mistake.
3167 # Let's accept both of them until this is cleared up. 3053 # Let's accept both of them until this is cleared up.
3168 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3054 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3195 lt_cv_file_magic_test_file=/usr/lib/libc.sl 3081 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3196 ;; 3082 ;;
3197 esac 3083 esac
3198 ;; 3084 ;;
3199 3085
3200interix3*) 3086interix[[3-9]]*)
3201 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3087 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3202 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3088 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3203 ;; 3089 ;;
3204 3090
3205irix5* | irix6* | nonstopux*) 3091irix5* | irix6* | nonstopux*)
3211 esac 3097 esac
3212 lt_cv_deplibs_check_method=pass_all 3098 lt_cv_deplibs_check_method=pass_all
3213 ;; 3099 ;;
3214 3100
3215# This must be Linux ELF. 3101# This must be Linux ELF.
3216linux* | k*bsd*-gnu) 3102linux* | k*bsd*-gnu | kopensolaris*-gnu)
3217 lt_cv_deplibs_check_method=pass_all 3103 lt_cv_deplibs_check_method=pass_all
3218 ;; 3104 ;;
3219 3105
3220netbsd* | netbsdelf*-gnu) 3106netbsd* | netbsdelf*-gnu)
3221 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3107 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3222 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3108 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3223 else 3109 else
3224 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3110 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3225 fi 3111 fi
3226 ;; 3112 ;;
3229 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3115 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3230 lt_cv_file_magic_cmd=/usr/bin/file 3116 lt_cv_file_magic_cmd=/usr/bin/file
3231 lt_cv_file_magic_test_file=/usr/lib/libnls.so 3117 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3232 ;; 3118 ;;
3233 3119
3234nto-qnx*) 3120*nto* | *qnx*)
3235 lt_cv_deplibs_check_method=unknown 3121 lt_cv_deplibs_check_method=pass_all
3236 ;; 3122 ;;
3237 3123
3238openbsd*) 3124openbsd*)
3239 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3125 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3240 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3126 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3241 else 3127 else
3242 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3128 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3243 fi 3129 fi
3244 ;; 3130 ;;
3245 3131
3246osf3* | osf4* | osf5*) 3132osf3* | osf4* | osf5*)
3247 lt_cv_deplibs_check_method=pass_all 3133 lt_cv_deplibs_check_method=pass_all
3248 ;; 3134 ;;
3249 3135
3136rdos*)
3137 lt_cv_deplibs_check_method=pass_all
3138 ;;
3139
3250solaris*) 3140solaris*)
3141 lt_cv_deplibs_check_method=pass_all
3142 ;;
3143
3144sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3251 lt_cv_deplibs_check_method=pass_all 3145 lt_cv_deplibs_check_method=pass_all
3252 ;; 3146 ;;
3253 3147
3254sysv4 | sysv4.3*) 3148sysv4 | sysv4.3*)
3255 case $host_vendor in 3149 case $host_vendor in
3276 lt_cv_deplibs_check_method=pass_all 3170 lt_cv_deplibs_check_method=pass_all
3277 ;; 3171 ;;
3278 esac 3172 esac
3279 ;; 3173 ;;
3280 3174
3281sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3175tpf*)
3282 lt_cv_deplibs_check_method=pass_all 3176 lt_cv_deplibs_check_method=pass_all
3283 ;; 3177 ;;
3284esac 3178esac
3285]) 3179])
3286file_magic_cmd=$lt_cv_file_magic_cmd 3180file_magic_cmd=$lt_cv_file_magic_cmd
3287deplibs_check_method=$lt_cv_deplibs_check_method 3181deplibs_check_method=$lt_cv_deplibs_check_method
3288test -z "$deplibs_check_method" && deplibs_check_method=unknown 3182test -z "$deplibs_check_method" && deplibs_check_method=unknown
3289])# AC_DEPLIBS_CHECK_METHOD
3290 3183
3184_LT_DECL([], [deplibs_check_method], [1],
3185 [Method to check whether dependent libraries are shared objects])
3186_LT_DECL([], [file_magic_cmd], [1],
3187 [Command to use when deplibs_check_method == "file_magic"])
3188])# _LT_CHECK_MAGIC_METHOD
3291 3189
3292# AC_PROG_NM 3190
3191# LT_PATH_NM
3293# ---------- 3192# ----------
3294# find the pathname to a BSD-compatible name lister 3193# find the pathname to a BSD- or MS-compatible name lister
3295AC_DEFUN([AC_PROG_NM], 3194AC_DEFUN([LT_PATH_NM],
3195[AC_REQUIRE([AC_PROG_CC])dnl
3296[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 3196AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3297[if test -n "$NM"; then 3197[if test -n "$NM"; then
3298 # Let the user override the test. 3198 # Let the user override the test.
3299 lt_cv_path_NM="$NM" 3199 lt_cv_path_NM="$NM"
3300else 3200else
3301 lt_nm_to_check="${ac_tool_prefix}nm" 3201 lt_nm_to_check="${ac_tool_prefix}nm"
3302 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3202 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3303 lt_nm_to_check="$lt_nm_to_check nm" 3203 lt_nm_to_check="$lt_nm_to_check nm"
3304 fi 3204 fi
3305 for lt_tmp_nm in $lt_nm_to_check; do 3205 for lt_tmp_nm in $lt_nm_to_check; do
3306 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3206 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3307 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3207 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3333 esac 3233 esac
3334 fi 3234 fi
3335 done 3235 done
3336 IFS="$lt_save_ifs" 3236 IFS="$lt_save_ifs"
3337 done 3237 done
3338 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 3238 : ${lt_cv_path_NM=no}
3339fi]) 3239fi])
3240if test "$lt_cv_path_NM" != "no"; then
3340NM="$lt_cv_path_NM" 3241 NM="$lt_cv_path_NM"
3341])# AC_PROG_NM 3242else
3243 # Didn't find any BSD compatible name lister, look for dumpbin.
3244 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3245 AC_SUBST([DUMPBIN])
3246 if test "$DUMPBIN" != ":"; then
3247 NM="$DUMPBIN"
3248 fi
3249fi
3250test -z "$NM" && NM=nm
3251AC_SUBST([NM])
3252_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3342 3253
3254AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3255 [lt_cv_nm_interface="BSD nm"
3256 echo "int some_variable = 0;" > conftest.$ac_ext
3257 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3258 (eval "$ac_compile" 2>conftest.err)
3259 cat conftest.err >&AS_MESSAGE_LOG_FD
3260 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3261 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3262 cat conftest.err >&AS_MESSAGE_LOG_FD
3263 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3264 cat conftest.out >&AS_MESSAGE_LOG_FD
3265 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3266 lt_cv_nm_interface="MS dumpbin"
3267 fi
3268 rm -f conftest*])
3269])# LT_PATH_NM
3343 3270
3344# AC_CHECK_LIBM 3271# Old names:
3272AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3273AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3274dnl aclocal-1.4 backwards compatibility:
3275dnl AC_DEFUN([AM_PROG_NM], [])
3276dnl AC_DEFUN([AC_PROG_NM], [])
3277
3278
3279# LT_LIB_M
3345# ------------- 3280# --------
3346# check for math library 3281# check for math library
3347AC_DEFUN([AC_CHECK_LIBM], 3282AC_DEFUN([LT_LIB_M],
3348[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3283[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3349LIBM= 3284LIBM=
3350case $host in 3285case $host in
3351*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3286*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3352 # These system don't have libm, or don't need it 3287 # These system don't have libm, or don't need it
3357 ;; 3292 ;;
3358*) 3293*)
3359 AC_CHECK_LIB(m, cos, LIBM="-lm") 3294 AC_CHECK_LIB(m, cos, LIBM="-lm")
3360 ;; 3295 ;;
3361esac 3296esac
3362])# AC_CHECK_LIBM 3297AC_SUBST([LIBM])
3298])# LT_LIB_M
3363 3299
3300# Old name:
3301AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3302dnl aclocal-1.4 backwards compatibility:
3303dnl AC_DEFUN([AC_CHECK_LIBM], [])
3364 3304
3365# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3366# -----------------------------------
3367# sets LIBLTDL to the link flags for the libltdl convenience library and
3368# LTDLINCL to the include flags for the libltdl header and adds
3369# --enable-ltdl-convenience to the configure arguments. Note that
3370# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3371# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3372# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3373# (note the single quotes!). If your package is not flat and you're not
3374# using automake, define top_builddir and top_srcdir appropriately in
3375# the Makefiles.
3376AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3377[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3378 case $enable_ltdl_convenience in
3379 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3380 "") enable_ltdl_convenience=yes
3381 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3382 esac
3383 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3384 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3385 # For backwards non-gettext consistent compatibility...
3386 INCLTDL="$LTDLINCL"
3387])# AC_LIBLTDL_CONVENIENCE
3388 3305
3389 3306# _LT_COMPILER_NO_RTTI([TAGNAME])
3390# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3391# -----------------------------------
3392# sets LIBLTDL to the link flags for the libltdl installable library and
3393# LTDLINCL to the include flags for the libltdl header and adds
3394# --enable-ltdl-install to the configure arguments. Note that
3395# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3396# and an installed libltdl is not found, it is assumed to be `libltdl'.
3397# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3398# '${top_srcdir}/' (note the single quotes!). If your package is not
3399# flat and you're not using automake, define top_builddir and top_srcdir
3400# appropriately in the Makefiles.
3401# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3402AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3403[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3404 AC_CHECK_LIB(ltdl, lt_dlinit,
3405 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3406 [if test x"$enable_ltdl_install" = xno; then
3407 AC_MSG_WARN([libltdl not installed, but installation disabled])
3408 else
3409 enable_ltdl_install=yes
3410 fi
3411 ])
3412 if test x"$enable_ltdl_install" = x"yes"; then
3413 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3414 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3415 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3416 else
3417 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3418 LIBLTDL="-lltdl"
3419 LTDLINCL=
3420 fi
3421 # For backwards non-gettext consistent compatibility...
3422 INCLTDL="$LTDLINCL"
3423])# AC_LIBLTDL_INSTALLABLE
3424
3425
3426# AC_LIBTOOL_CXX
3427# --------------
3428# enable support for C++ libraries
3429AC_DEFUN([AC_LIBTOOL_CXX],
3430[AC_REQUIRE([_LT_AC_LANG_CXX])
3431])# AC_LIBTOOL_CXX
3432
3433
3434# _LT_AC_LANG_CXX
3435# ---------------
3436AC_DEFUN([_LT_AC_LANG_CXX],
3437[AC_REQUIRE([AC_PROG_CXX])
3438AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3439_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3440])# _LT_AC_LANG_CXX
3441
3442# _LT_AC_PROG_CXXCPP
3443# ------------------
3444AC_DEFUN([_LT_AC_PROG_CXXCPP],
3445[
3446AC_REQUIRE([AC_PROG_CXX])
3447if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3448 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3449 (test "X$CXX" != "Xg++"))) ; then
3450 AC_PROG_CXXCPP
3451fi
3452])# _LT_AC_PROG_CXXCPP
3453
3454# AC_LIBTOOL_F77
3455# --------------
3456# enable support for Fortran 77 libraries
3457AC_DEFUN([AC_LIBTOOL_F77],
3458[AC_REQUIRE([_LT_AC_LANG_F77])
3459])# AC_LIBTOOL_F77
3460
3461
3462# _LT_AC_LANG_F77
3463# ---------------
3464AC_DEFUN([_LT_AC_LANG_F77],
3465[AC_REQUIRE([AC_PROG_F77])
3466_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3467])# _LT_AC_LANG_F77
3468
3469
3470# AC_LIBTOOL_GCJ
3471# --------------
3472# enable support for GCJ libraries
3473AC_DEFUN([AC_LIBTOOL_GCJ],
3474[AC_REQUIRE([_LT_AC_LANG_GCJ])
3475])# AC_LIBTOOL_GCJ
3476
3477
3478# _LT_AC_LANG_GCJ
3479# ---------------
3480AC_DEFUN([_LT_AC_LANG_GCJ],
3481[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3482 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3483 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3484 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3485 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3486 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3487_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3488])# _LT_AC_LANG_GCJ
3489
3490
3491# AC_LIBTOOL_RC
3492# -------------
3493# enable support for Windows resource files
3494AC_DEFUN([AC_LIBTOOL_RC],
3495[AC_REQUIRE([LT_AC_PROG_RC])
3496_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3497])# AC_LIBTOOL_RC
3498
3499
3500# AC_LIBTOOL_LANG_C_CONFIG
3501# ------------------------
3502# Ensure that the configuration vars for the C compiler are
3503# suitably defined. Those variables are subsequently used by
3504# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3505AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3506AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3507[lt_save_CC="$CC"
3508AC_LANG_PUSH(C)
3509
3510# Source file extension for C test sources.
3511ac_ext=c
3512
3513# Object file extension for compiled C test sources.
3514objext=o
3515_LT_AC_TAGVAR(objext, $1)=$objext
3516
3517# Code to be used in simple compile tests
3518lt_simple_compile_test_code="int some_variable = 0;\n"
3519
3520# Code to be used in simple link tests
3521lt_simple_link_test_code='int main(){return(0);}\n'
3522
3523_LT_AC_SYS_COMPILER
3524
3525# save warnings/boilerplate of simple test code
3526_LT_COMPILER_BOILERPLATE
3527_LT_LINKER_BOILERPLATE
3528
3529AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3530AC_LIBTOOL_PROG_COMPILER_PIC($1)
3531AC_LIBTOOL_PROG_CC_C_O($1)
3532AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3533AC_LIBTOOL_PROG_LD_SHLIBS($1)
3534AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3535AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3536AC_LIBTOOL_SYS_LIB_STRIP
3537AC_LIBTOOL_DLOPEN_SELF
3538
3539# Report which library types will actually be built
3540AC_MSG_CHECKING([if libtool supports shared libraries])
3541AC_MSG_RESULT([$can_build_shared])
3542
3543AC_MSG_CHECKING([whether to build shared libraries])
3544test "$can_build_shared" = "no" && enable_shared=no
3545
3546# On AIX, shared libraries and static libraries use the same namespace, and
3547# are all built from PIC.
3548case $host_os in
3549aix3*)
3550 test "$enable_shared" = yes && enable_static=no
3551 if test -n "$RANLIB"; then
3552 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3553 postinstall_cmds='$RANLIB $lib'
3554 fi
3555 ;;
3556
3557aix4* | aix5*)
3558 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3559 test "$enable_shared" = yes && enable_static=no
3560 fi
3561 ;;
3562esac
3563AC_MSG_RESULT([$enable_shared])
3564
3565AC_MSG_CHECKING([whether to build static libraries])
3566# Make sure either enable_shared or enable_static is yes.
3567test "$enable_shared" = yes || enable_static=yes
3568AC_MSG_RESULT([$enable_static])
3569
3570AC_LIBTOOL_CONFIG($1)
3571
3572AC_LANG_POP
3573CC="$lt_save_CC"
3574])# AC_LIBTOOL_LANG_C_CONFIG
3575
3576
3577# AC_LIBTOOL_LANG_CXX_CONFIG
3578# --------------------------
3579# Ensure that the configuration vars for the C compiler are
3580# suitably defined. Those variables are subsequently used by
3581# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3582AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3583AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3584[AC_LANG_PUSH(C++)
3585AC_REQUIRE([AC_PROG_CXX])
3586AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3587
3588_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3589_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3590_LT_AC_TAGVAR(always_export_symbols, $1)=no
3591_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3592_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3593_LT_AC_TAGVAR(hardcode_direct, $1)=no
3594_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3595_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3596_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3597_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3598_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3599_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3600_LT_AC_TAGVAR(module_cmds, $1)=
3601_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3602_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3603_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3604_LT_AC_TAGVAR(no_undefined_flag, $1)=
3605_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3606_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3607
3608# Dependencies to place before and after the object being linked:
3609_LT_AC_TAGVAR(predep_objects, $1)=
3610_LT_AC_TAGVAR(postdep_objects, $1)=
3611_LT_AC_TAGVAR(predeps, $1)=
3612_LT_AC_TAGVAR(postdeps, $1)=
3613_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3614
3615# Source file extension for C++ test sources.
3616ac_ext=cpp
3617
3618# Object file extension for compiled C++ test sources.
3619objext=o
3620_LT_AC_TAGVAR(objext, $1)=$objext
3621
3622# Code to be used in simple compile tests
3623lt_simple_compile_test_code="int some_variable = 0;\n"
3624
3625# Code to be used in simple link tests
3626lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
3627
3628# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3629_LT_AC_SYS_COMPILER
3630
3631# save warnings/boilerplate of simple test code
3632_LT_COMPILER_BOILERPLATE
3633_LT_LINKER_BOILERPLATE
3634
3635# Allow CC to be a program name with arguments.
3636lt_save_CC=$CC
3637lt_save_LD=$LD
3638lt_save_GCC=$GCC
3639GCC=$GXX
3640lt_save_with_gnu_ld=$with_gnu_ld
3641lt_save_path_LD=$lt_cv_path_LD
3642if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3643 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3644else
3645 $as_unset lt_cv_prog_gnu_ld
3646fi
3647if test -n "${lt_cv_path_LDCXX+set}"; then
3648 lt_cv_path_LD=$lt_cv_path_LDCXX
3649else
3650 $as_unset lt_cv_path_LD
3651fi
3652test -z "${LDCXX+set}" || LD=$LDCXX
3653CC=${CXX-"c++"}
3654compiler=$CC
3655_LT_AC_TAGVAR(compiler, $1)=$CC
3656_LT_CC_BASENAME([$compiler])
3657
3658# We don't want -fno-exception wen compiling C++ code, so set the
3659# no_builtin_flag separately
3660if test "$GXX" = yes; then
3661 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3662else
3663 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3664fi
3665
3666if test "$GXX" = yes; then
3667 # Set up default GNU C++ configuration
3668
3669 AC_PROG_LD
3670
3671 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3672 # archiving commands below assume that GNU ld is being used.
3673 if test "$with_gnu_ld" = yes; then
3674 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3675 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3676
3677 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3678 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3679
3680 # If archive_cmds runs LD, not CC, wlarc should be empty
3681 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3682 # investigate it a little bit more. (MM)
3683 wlarc='${wl}'
3684
3685 # ancient GNU ld didn't support --whole-archive et. al.
3686 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3687 grep 'no-whole-archive' > /dev/null; then
3688 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3689 else
3690 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3691 fi
3692 else
3693 with_gnu_ld=no
3694 wlarc=
3695
3696 # A generic and very simple default shared library creation
3697 # command for GNU C++ for the case where it uses the native
3698 # linker, instead of GNU ld. If possible, this setting should
3699 # overridden to take advantage of the native linker features on
3700 # the platform it is being used on.
3701 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3702 fi
3703
3704 # Commands to make compiler produce verbose output that lists
3705 # what "hidden" libraries, object files and flags are used when
3706 # linking a shared library.
3707 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3708
3709else
3710 GXX=no
3711 with_gnu_ld=no
3712 wlarc=
3713fi
3714
3715# PORTME: fill in a description of your system's C++ link characteristics
3716AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3717_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3718case $host_os in
3719 aix3*)
3720 # FIXME: insert proper C++ library support
3721 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3722 ;;
3723 aix4* | aix5*)
3724 if test "$host_cpu" = ia64; then
3725 # On IA64, the linker does run time linking by default, so we don't
3726 # have to do anything special.
3727 aix_use_runtimelinking=no
3728 exp_sym_flag='-Bexport'
3729 no_entry_flag=""
3730 else
3731 aix_use_runtimelinking=no
3732
3733 # Test if we are trying to use run time linking or normal
3734 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3735 # need to do runtime linking.
3736 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3737 for ld_flag in $LDFLAGS; do
3738 case $ld_flag in
3739 *-brtl*)
3740 aix_use_runtimelinking=yes
3741 break
3742 ;;
3743 esac
3744 done
3745 ;;
3746 esac
3747
3748 exp_sym_flag='-bexport'
3749 no_entry_flag='-bnoentry'
3750 fi
3751
3752 # When large executables or shared objects are built, AIX ld can
3753 # have problems creating the table of contents. If linking a library
3754 # or program results in "error TOC overflow" add -mminimal-toc to
3755 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3756 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3757
3758 _LT_AC_TAGVAR(archive_cmds, $1)=''
3759 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3760 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3761 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3762
3763 if test "$GXX" = yes; then
3764 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3765 # We only want to do this on AIX 4.2 and lower, the check
3766 # below for broken collect2 doesn't work under 4.3+
3767 collect2name=`${CC} -print-prog-name=collect2`
3768 if test -f "$collect2name" && \
3769 strings "$collect2name" | grep resolve_lib_name >/dev/null
3770 then
3771 # We have reworked collect2
3772 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3773 else
3774 # We have old collect2
3775 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3776 # It fails to find uninstalled libraries when the uninstalled
3777 # path is not listed in the libpath. Setting hardcode_minus_L
3778 # to unsupported forces relinking
3779 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3780 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3781 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3782 fi
3783 ;;
3784 esac
3785 shared_flag='-shared'
3786 if test "$aix_use_runtimelinking" = yes; then
3787 shared_flag="$shared_flag "'${wl}-G'
3788 fi
3789 else
3790 # not using gcc
3791 if test "$host_cpu" = ia64; then
3792 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3793 # chokes on -Wl,-G. The following line is correct:
3794 shared_flag='-G'
3795 else
3796 if test "$aix_use_runtimelinking" = yes; then
3797 shared_flag='${wl}-G'
3798 else
3799 shared_flag='${wl}-bM:SRE'
3800 fi
3801 fi
3802 fi
3803
3804 # It seems that -bexpall does not export symbols beginning with
3805 # underscore (_), so it is better to generate a list of symbols to export.
3806 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3807 if test "$aix_use_runtimelinking" = yes; then
3808 # Warning - without using the other runtime loading flags (-brtl),
3809 # -berok will link without error, but may produce a broken library.
3810 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3811 # Determine the default libpath from the value encoded in an empty executable.
3812 _LT_AC_SYS_LIBPATH_AIX
3813 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3814
3815 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3816 else
3817 if test "$host_cpu" = ia64; then
3818 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3819 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3820 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3821 else
3822 # Determine the default libpath from the value encoded in an empty executable.
3823 _LT_AC_SYS_LIBPATH_AIX
3824 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3825 # Warning - without using the other run time loading flags,
3826 # -berok will link without error, but may produce a broken library.
3827 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3828 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3829 # Exported symbols can be pulled into shared objects from archives
3830 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3831 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3832 # This is similar to how AIX traditionally builds its shared libraries.
3833 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3834 fi
3835 fi
3836 ;;
3837
3838 beos*)
3839 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3840 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3841 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3842 # support --undefined. This deserves some investigation. FIXME
3843 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3844 else
3845 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3846 fi
3847 ;;
3848
3849 chorus*)
3850 case $cc_basename in
3851 *)
3852 # FIXME: insert proper C++ library support
3853 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3854 ;;
3855 esac
3856 ;;
3857
3858 cygwin* | mingw* | pw32*)
3859 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3860 # as there is no search path for DLLs.
3861 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3862 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3863 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3864 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3865
3866 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3867 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3868 # If the export-symbols file already is a .def file (1st line
3869 # is EXPORTS), use it as is; otherwise, prepend...
3870 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3871 cp $export_symbols $output_objdir/$soname.def;
3872 else
3873 echo EXPORTS > $output_objdir/$soname.def;
3874 cat $export_symbols >> $output_objdir/$soname.def;
3875 fi~
3876 $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'
3877 else
3878 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3879 fi
3880 ;;
3881 darwin* | rhapsody*)
3882 case $host_os in
3883 rhapsody* | darwin1.[[012]])
3884 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3885 ;;
3886 *) # Darwin 1.3 on
3887 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3888 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3889 else
3890 case ${MACOSX_DEPLOYMENT_TARGET} in
3891 10.[[012]])
3892 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3893 ;;
3894 10.*)
3895 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3896 ;;
3897 esac
3898 fi
3899 ;;
3900 esac
3901 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3902 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3903 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3904 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3905 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3906 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3907
3908 if test "$GXX" = yes ; then
3909 lt_int_apple_cc_single_mod=no
3910 output_verbose_link_cmd='echo'
3911 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3912 lt_int_apple_cc_single_mod=yes
3913 fi
3914 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3915 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3916 else
3917 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3918 fi
3919 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3920 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3921 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3922 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3923 else
3924 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3925 fi
3926 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3927 else
3928 case $cc_basename in
3929 xlc*)
3930 output_verbose_link_cmd='echo'
3931 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3932 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3933 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3934 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3935 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3936 ;;
3937 *)
3938 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3939 ;;
3940 esac
3941 fi
3942 ;;
3943
3944 dgux*)
3945 case $cc_basename in
3946 ec++*)
3947 # FIXME: insert proper C++ library support
3948 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3949 ;;
3950 ghcx*)
3951 # Green Hills C++ Compiler
3952 # FIXME: insert proper C++ library support
3953 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3954 ;;
3955 *)
3956 # FIXME: insert proper C++ library support
3957 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3958 ;;
3959 esac
3960 ;;
3961 freebsd[[12]]*)
3962 # C++ shared libraries reported to be fairly broken before switch to ELF
3963 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3964 ;;
3965 freebsd-elf*)
3966 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3967 ;;
3968 freebsd* | dragonfly*)
3969 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3970 # conventions
3971 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3972 ;;
3973 gnu*)
3974 ;;
3975 hpux9*)
3976 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3977 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3978 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3979 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3980 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3981 # but as the default
3982 # location of the library.
3983
3984 case $cc_basename in
3985 CC*)
3986 # FIXME: insert proper C++ library support
3987 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3988 ;;
3989 aCC*)
3990 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3991 # Commands to make compiler produce verbose output that lists
3992 # what "hidden" libraries, object files and flags are used when
3993 # linking a shared library.
3994 #
3995 # There doesn't appear to be a way to prevent this compiler from
3996 # explicitly linking system object files so we need to strip them
3997 # from the output so that they don't get included in the library
3998 # dependencies.
3999 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4000 ;;
4001 *)
4002 if test "$GXX" = yes; then
4003 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4004 else
4005 # FIXME: insert proper C++ library support
4006 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4007 fi
4008 ;;
4009 esac
4010 ;;
4011 hpux10*|hpux11*)
4012 if test $with_gnu_ld = no; then
4013 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4014 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4015
4016 case $host_cpu in
4017 hppa*64*|ia64*)
4018 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4019 ;;
4020 *)
4021 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4022 ;;
4023 esac
4024 fi
4025 case $host_cpu in
4026 hppa*64*|ia64*)
4027 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4028 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4029 ;;
4030 *)
4031 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4032 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4033 # but as the default
4034 # location of the library.
4035 ;;
4036 esac
4037
4038 case $cc_basename in
4039 CC*)
4040 # FIXME: insert proper C++ library support
4041 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4042 ;;
4043 aCC*)
4044 case $host_cpu in
4045 hppa*64*)
4046 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4047 ;;
4048 ia64*)
4049 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4050 ;;
4051 *)
4052 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4053 ;;
4054 esac
4055 # Commands to make compiler produce verbose output that lists
4056 # what "hidden" libraries, object files and flags are used when
4057 # linking a shared library.
4058 #
4059 # There doesn't appear to be a way to prevent this compiler from
4060 # explicitly linking system object files so we need to strip them
4061 # from the output so that they don't get included in the library
4062 # dependencies.
4063 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4064 ;;
4065 *)
4066 if test "$GXX" = yes; then
4067 if test $with_gnu_ld = no; then
4068 case $host_cpu in
4069 hppa*64*)
4070 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4071 ;;
4072 ia64*)
4073 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4074 ;;
4075 *)
4076 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4077 ;;
4078 esac
4079 fi
4080 else
4081 # FIXME: insert proper C++ library support
4082 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4083 fi
4084 ;;
4085 esac
4086 ;;
4087 interix3*)
4088 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4089 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4090 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4091 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4092 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4093 # Instead, shared libraries are loaded at an image base (0x10000000 by
4094 # default) and relocated if they conflict, which is a slow very memory
4095 # consuming and fragmenting process. To avoid this, we pick a random,
4096 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4097 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4098 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4099 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4100 ;;
4101 irix5* | irix6*)
4102 case $cc_basename in
4103 CC*)
4104 # SGI C++
4105 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4106
4107 # Archives containing C++ object files must be created using
4108 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4109 # necessary to make sure instantiated templates are included
4110 # in the archive.
4111 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4112 ;;
4113 *)
4114 if test "$GXX" = yes; then
4115 if test "$with_gnu_ld" = no; then
4116 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4117 else
4118 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4119 fi
4120 fi
4121 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4122 ;;
4123 esac
4124 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4125 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4126 ;;
4127 linux* | k*bsd*-gnu)
4128 case $cc_basename in
4129 KCC*)
4130 # Kuck and Associates, Inc. (KAI) C++ Compiler
4131
4132 # KCC will only create a shared library if the output file
4133 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4134 # to its proper name (with version) after linking.
4135 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4136 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4137 # Commands to make compiler produce verbose output that lists
4138 # what "hidden" libraries, object files and flags are used when
4139 # linking a shared library.
4140 #
4141 # There doesn't appear to be a way to prevent this compiler from
4142 # explicitly linking system object files so we need to strip them
4143 # from the output so that they don't get included in the library
4144 # dependencies.
4145 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4146
4147 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4148 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4149
4150 # Archives containing C++ object files must be created using
4151 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4152 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4153 ;;
4154 icpc*)
4155 # Intel C++
4156 with_gnu_ld=yes
4157 # version 8.0 and above of icpc choke on multiply defined symbols
4158 # if we add $predep_objects and $postdep_objects, however 7.1 and
4159 # earlier do not add the objects themselves.
4160 case `$CC -V 2>&1` in
4161 *"Version 7."*)
4162 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4163 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4164 ;;
4165 *) # Version 8.0 or newer
4166 tmp_idyn=
4167 case $host_cpu in
4168 ia64*) tmp_idyn=' -i_dynamic';;
4169 esac
4170 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4171 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4172 ;;
4173 esac
4174 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4175 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4176 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4177 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4178 ;;
4179 pgCC*)
4180 # Portland Group C++ compiler
4181 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4182 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4183
4184 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4185 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4186 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4187 ;;
4188 cxx*)
4189 # Compaq C++
4190 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4191 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4192
4193 runpath_var=LD_RUN_PATH
4194 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4195 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4196
4197 # Commands to make compiler produce verbose output that lists
4198 # what "hidden" libraries, object files and flags are used when
4199 # linking a shared library.
4200 #
4201 # There doesn't appear to be a way to prevent this compiler from
4202 # explicitly linking system object files so we need to strip them
4203 # from the output so that they don't get included in the library
4204 # dependencies.
4205 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4206 ;;
4207 esac
4208 ;;
4209 lynxos*)
4210 # FIXME: insert proper C++ library support
4211 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4212 ;;
4213 m88k*)
4214 # FIXME: insert proper C++ library support
4215 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4216 ;;
4217 mvs*)
4218 case $cc_basename in
4219 cxx*)
4220 # FIXME: insert proper C++ library support
4221 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4222 ;;
4223 *)
4224 # FIXME: insert proper C++ library support
4225 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4226 ;;
4227 esac
4228 ;;
4229 netbsd* | netbsdelf*-gnu)
4230 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4231 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4232 wlarc=
4233 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4234 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4235 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4236 fi
4237 # Workaround some broken pre-1.5 toolchains
4238 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4239 ;;
4240 openbsd2*)
4241 # C++ shared libraries are fairly broken
4242 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4243 ;;
4244 openbsd*)
4245 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4246 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4247 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4248 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4249 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4250 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4251 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4252 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4253 fi
4254 output_verbose_link_cmd='echo'
4255 ;;
4256 osf3*)
4257 case $cc_basename in
4258 KCC*)
4259 # Kuck and Associates, Inc. (KAI) C++ Compiler
4260
4261 # KCC will only create a shared library if the output file
4262 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4263 # to its proper name (with version) after linking.
4264 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4265
4266 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4267 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4268
4269 # Archives containing C++ object files must be created using
4270 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4271 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4272
4273 ;;
4274 RCC*)
4275 # Rational C++ 2.4.1
4276 # FIXME: insert proper C++ library support
4277 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4278 ;;
4279 cxx*)
4280 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4281 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4282
4283 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4284 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4285
4286 # Commands to make compiler produce verbose output that lists
4287 # what "hidden" libraries, object files and flags are used when
4288 # linking a shared library.
4289 #
4290 # There doesn't appear to be a way to prevent this compiler from
4291 # explicitly linking system object files so we need to strip them
4292 # from the output so that they don't get included in the library
4293 # dependencies.
4294 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4295 ;;
4296 *)
4297 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4298 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4299 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4300
4301 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4302 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4303
4304 # Commands to make compiler produce verbose output that lists
4305 # what "hidden" libraries, object files and flags are used when
4306 # linking a shared library.
4307 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4308
4309 else
4310 # FIXME: insert proper C++ library support
4311 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4312 fi
4313 ;;
4314 esac
4315 ;;
4316 osf4* | osf5*)
4317 case $cc_basename in
4318 KCC*)
4319 # Kuck and Associates, Inc. (KAI) C++ Compiler
4320
4321 # KCC will only create a shared library if the output file
4322 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4323 # to its proper name (with version) after linking.
4324 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4325
4326 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4327 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4328
4329 # Archives containing C++ object files must be created using
4330 # the KAI C++ compiler.
4331 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4332 ;;
4333 RCC*)
4334 # Rational C++ 2.4.1
4335 # FIXME: insert proper C++ library support
4336 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4337 ;;
4338 cxx*)
4339 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4340 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4341 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4342 echo "-hidden">> $lib.exp~
4343 $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~
4344 $rm $lib.exp'
4345
4346 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4347 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4348
4349 # Commands to make compiler produce verbose output that lists
4350 # what "hidden" libraries, object files and flags are used when
4351 # linking a shared library.
4352 #
4353 # There doesn't appear to be a way to prevent this compiler from
4354 # explicitly linking system object files so we need to strip them
4355 # from the output so that they don't get included in the library
4356 # dependencies.
4357 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4358 ;;
4359 *)
4360 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4361 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4362 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4363
4364 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4365 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4366
4367 # Commands to make compiler produce verbose output that lists
4368 # what "hidden" libraries, object files and flags are used when
4369 # linking a shared library.
4370 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4371
4372 else
4373 # FIXME: insert proper C++ library support
4374 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4375 fi
4376 ;;
4377 esac
4378 ;;
4379 psos*)
4380 # FIXME: insert proper C++ library support
4381 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4382 ;;
4383 sunos4*)
4384 case $cc_basename in
4385 CC*)
4386 # Sun C++ 4.x
4387 # FIXME: insert proper C++ library support
4388 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4389 ;;
4390 lcc*)
4391 # Lucid
4392 # FIXME: insert proper C++ library support
4393 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4394 ;;
4395 *)
4396 # FIXME: insert proper C++ library support
4397 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4398 ;;
4399 esac
4400 ;;
4401 solaris*)
4402 case $cc_basename in
4403 CC*)
4404 # Sun C++ 4.2, 5.x and Centerline C++
4405 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4406 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4407 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4408 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4409 $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'
4410
4411 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4412 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4413 case $host_os in
4414 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4415 *)
4416 # The C++ compiler is used as linker so we must use $wl
4417 # flag to pass the commands to the underlying system
4418 # linker. We must also pass each convience library through
4419 # to the system linker between allextract/defaultextract.
4420 # The C++ compiler will combine linker options so we
4421 # cannot just pass the convience library names through
4422 # without $wl.
4423 # Supported since Solaris 2.6 (maybe 2.5.1?)
4424 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4425 ;;
4426 esac
4427 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4428
4429 output_verbose_link_cmd='echo'
4430
4431 # Archives containing C++ object files must be created using
4432 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4433 # necessary to make sure instantiated templates are included
4434 # in the archive.
4435 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4436 ;;
4437 gcx*)
4438 # Green Hills C++ Compiler
4439 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4440
4441 # The C++ compiler must be used to create the archive.
4442 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4443 ;;
4444 *)
4445 # GNU C++ compiler with Solaris linker
4446 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4447 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4448 if $CC --version | grep -v '^2\.7' > /dev/null; then
4449 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4450 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4451 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4452
4453 # Commands to make compiler produce verbose output that lists
4454 # what "hidden" libraries, object files and flags are used when
4455 # linking a shared library.
4456 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4457 else
4458 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4459 # platform.
4460 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4461 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4462 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4463
4464 # Commands to make compiler produce verbose output that lists
4465 # what "hidden" libraries, object files and flags are used when
4466 # linking a shared library.
4467 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4468 fi
4469
4470 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4471 fi
4472 ;;
4473 esac
4474 ;;
4475 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4476 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4477 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4478 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4479 runpath_var='LD_RUN_PATH'
4480
4481 case $cc_basename in
4482 CC*)
4483 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4484 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4485 ;;
4486 *)
4487 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4488 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4489 ;;
4490 esac
4491 ;;
4492 sysv5* | sco3.2v5* | sco5v6*)
4493 # Note: We can NOT use -z defs as we might desire, because we do not
4494 # link with -lc, and that would cause any symbols used from libc to
4495 # always be unresolved, which means just about no library would
4496 # ever link correctly. If we're not using GNU ld we use -z text
4497 # though, which does catch some bad symbols but isn't as heavy-handed
4498 # as -z defs.
4499 # For security reasons, it is highly recommended that you always
4500 # use absolute paths for naming shared libraries, and exclude the
4501 # DT_RUNPATH tag from executables and libraries. But doing so
4502 # requires that you compile everything twice, which is a pain.
4503 # So that behaviour is only enabled if SCOABSPATH is set to a
4504 # non-empty value in the environment. Most likely only useful for
4505 # creating official distributions of packages.
4506 # This is a hack until libtool officially supports absolute path
4507 # names for shared libraries.
4508 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4509 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4510 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4511 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4512 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4513 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4514 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4515 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4516 runpath_var='LD_RUN_PATH'
4517
4518 case $cc_basename in
4519 CC*)
4520 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4521 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4522 ;;
4523 *)
4524 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4525 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4526 ;;
4527 esac
4528 ;;
4529 tandem*)
4530 case $cc_basename in
4531 NCC*)
4532 # NonStop-UX NCC 3.20
4533 # FIXME: insert proper C++ library support
4534 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4535 ;;
4536 *)
4537 # FIXME: insert proper C++ library support
4538 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4539 ;;
4540 esac
4541 ;;
4542 vxworks*)
4543 # FIXME: insert proper C++ library support
4544 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4545 ;;
4546 *)
4547 # FIXME: insert proper C++ library support
4548 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4549 ;;
4550esac
4551AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4552test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4553
4554_LT_AC_TAGVAR(GCC, $1)="$GXX"
4555_LT_AC_TAGVAR(LD, $1)="$LD"
4556
4557AC_LIBTOOL_POSTDEP_PREDEP($1)
4558AC_LIBTOOL_PROG_COMPILER_PIC($1)
4559AC_LIBTOOL_PROG_CC_C_O($1)
4560AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4561AC_LIBTOOL_PROG_LD_SHLIBS($1)
4562AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4563AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4564
4565AC_LIBTOOL_CONFIG($1)
4566
4567AC_LANG_POP
4568CC=$lt_save_CC
4569LDCXX=$LD
4570LD=$lt_save_LD
4571GCC=$lt_save_GCC
4572with_gnu_ldcxx=$with_gnu_ld
4573with_gnu_ld=$lt_save_with_gnu_ld
4574lt_cv_path_LDCXX=$lt_cv_path_LD
4575lt_cv_path_LD=$lt_save_path_LD
4576lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4577lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4578])# AC_LIBTOOL_LANG_CXX_CONFIG
4579
4580# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4581# ------------------------------------
4582# Figure out "hidden" library dependencies from verbose
4583# compiler output when linking a shared library.
4584# Parse the compiler output and extract the necessary
4585# objects, libraries and library flags.
4586AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4587dnl we can't use the lt_simple_compile_test_code here,
4588dnl because it contains code intended for an executable,
4589dnl not a library. It's possible we should let each
4590dnl tag define a new lt_????_link_test_code variable,
4591dnl but it's only used here...
4592ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4593int a;
4594void foo (void) { a = 0; }
4595EOF
4596],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4597class Foo
4598{
4599public:
4600 Foo (void) { a = 0; }
4601private:
4602 int a;
4603};
4604EOF
4605],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4606 subroutine foo
4607 implicit none
4608 integer*4 a
4609 a=0
4610 return
4611 end
4612EOF
4613],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4614public class foo {
4615 private int a;
4616 public void bar (void) {
4617 a = 0;
4618 }
4619};
4620EOF
4621])
4622dnl Parse the compiler output and extract the necessary
4623dnl objects, libraries and library flags.
4624if AC_TRY_EVAL(ac_compile); then
4625 # Parse the compiler output and extract the necessary
4626 # objects, libraries and library flags.
4627
4628 # Sentinel used to keep track of whether or not we are before
4629 # the conftest object file.
4630 pre_test_object_deps_done=no
4631
4632 # The `*' in the case matches for architectures that use `case' in
4633 # $output_verbose_cmd can trigger glob expansion during the loop
4634 # eval without this substitution.
4635 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4636
4637 for p in `eval $output_verbose_link_cmd`; do
4638 case $p in
4639
4640 -L* | -R* | -l*)
4641 # Some compilers place space between "-{L,R}" and the path.
4642 # Remove the space.
4643 if test $p = "-L" \
4644 || test $p = "-R"; then
4645 prev=$p
4646 continue
4647 else
4648 prev=
4649 fi
4650
4651 if test "$pre_test_object_deps_done" = no; then
4652 case $p in
4653 -L* | -R*)
4654 # Internal compiler library paths should come after those
4655 # provided the user. The postdeps already come after the
4656 # user supplied libs so there is no need to process them.
4657 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4658 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4659 else
4660 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4661 fi
4662 ;;
4663 # The "-l" case would never come before the object being
4664 # linked, so don't bother handling this case.
4665 esac
4666 else
4667 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4668 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4669 else
4670 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4671 fi
4672 fi
4673 ;;
4674
4675 *.$objext)
4676 # This assumes that the test object file only shows up
4677 # once in the compiler output.
4678 if test "$p" = "conftest.$objext"; then
4679 pre_test_object_deps_done=yes
4680 continue
4681 fi
4682
4683 if test "$pre_test_object_deps_done" = no; then
4684 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4685 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4686 else
4687 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4688 fi
4689 else
4690 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4691 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4692 else
4693 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4694 fi
4695 fi
4696 ;;
4697
4698 *) ;; # Ignore the rest.
4699
4700 esac
4701 done
4702
4703 # Clean up.
4704 rm -f a.out a.exe
4705else
4706 echo "libtool.m4: error: problem compiling $1 test program"
4707fi
4708
4709$rm -f confest.$objext
4710
4711# PORTME: override above test on systems where it is broken
4712ifelse([$1],[CXX],
4713[case $host_os in
4714interix3*)
4715 # Interix 3.5 installs completely hosed .la files for C++, so rather than
4716 # hack all around it, let's just trust "g++" to DTRT.
4717 _LT_AC_TAGVAR(predep_objects,$1)=
4718 _LT_AC_TAGVAR(postdep_objects,$1)=
4719 _LT_AC_TAGVAR(postdeps,$1)=
4720 ;;
4721
4722solaris*)
4723 case $cc_basename in
4724 CC*)
4725 # Adding this requires a known-good setup of shared libraries for
4726 # Sun compiler versions before 5.6, else PIC objects from an old
4727 # archive will be linked into the output, leading to subtle bugs.
4728 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4729 ;;
4730 esac
4731 ;;
4732esac
4733])
4734
4735case " $_LT_AC_TAGVAR(postdeps, $1) " in
4736*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4737esac
4738])# AC_LIBTOOL_POSTDEP_PREDEP
4739
4740# AC_LIBTOOL_LANG_F77_CONFIG
4741# --------------------------
4742# Ensure that the configuration vars for the C compiler are
4743# suitably defined. Those variables are subsequently used by
4744# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4745AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4746AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4747[AC_REQUIRE([AC_PROG_F77])
4748AC_LANG_PUSH(Fortran 77)
4749
4750_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4751_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4752_LT_AC_TAGVAR(always_export_symbols, $1)=no
4753_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4754_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4755_LT_AC_TAGVAR(hardcode_direct, $1)=no
4756_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4757_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4758_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4759_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4760_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4761_LT_AC_TAGVAR(module_cmds, $1)=
4762_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4763_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4764_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4765_LT_AC_TAGVAR(no_undefined_flag, $1)=
4766_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4767_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4768
4769# Source file extension for f77 test sources.
4770ac_ext=f
4771
4772# Object file extension for compiled f77 test sources.
4773objext=o
4774_LT_AC_TAGVAR(objext, $1)=$objext
4775
4776# Code to be used in simple compile tests
4777lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4778
4779# Code to be used in simple link tests
4780lt_simple_link_test_code=" program t\n end\n"
4781
4782# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4783_LT_AC_SYS_COMPILER
4784
4785# save warnings/boilerplate of simple test code
4786_LT_COMPILER_BOILERPLATE
4787_LT_LINKER_BOILERPLATE
4788
4789# Allow CC to be a program name with arguments.
4790lt_save_CC="$CC"
4791CC=${F77-"f77"}
4792compiler=$CC
4793_LT_AC_TAGVAR(compiler, $1)=$CC
4794_LT_CC_BASENAME([$compiler])
4795
4796AC_MSG_CHECKING([if libtool supports shared libraries])
4797AC_MSG_RESULT([$can_build_shared])
4798
4799AC_MSG_CHECKING([whether to build shared libraries])
4800test "$can_build_shared" = "no" && enable_shared=no
4801
4802# On AIX, shared libraries and static libraries use the same namespace, and
4803# are all built from PIC.
4804case $host_os in
4805aix3*)
4806 test "$enable_shared" = yes && enable_static=no
4807 if test -n "$RANLIB"; then
4808 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4809 postinstall_cmds='$RANLIB $lib'
4810 fi
4811 ;;
4812aix4* | aix5*)
4813 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4814 test "$enable_shared" = yes && enable_static=no
4815 fi
4816 ;;
4817esac
4818AC_MSG_RESULT([$enable_shared])
4819
4820AC_MSG_CHECKING([whether to build static libraries])
4821# Make sure either enable_shared or enable_static is yes.
4822test "$enable_shared" = yes || enable_static=yes
4823AC_MSG_RESULT([$enable_static])
4824
4825_LT_AC_TAGVAR(GCC, $1)="$G77"
4826_LT_AC_TAGVAR(LD, $1)="$LD"
4827
4828AC_LIBTOOL_PROG_COMPILER_PIC($1)
4829AC_LIBTOOL_PROG_CC_C_O($1)
4830AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4831AC_LIBTOOL_PROG_LD_SHLIBS($1)
4832AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4833AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4834
4835AC_LIBTOOL_CONFIG($1)
4836
4837AC_LANG_POP
4838CC="$lt_save_CC"
4839])# AC_LIBTOOL_LANG_F77_CONFIG
4840
4841
4842# AC_LIBTOOL_LANG_GCJ_CONFIG
4843# --------------------------
4844# Ensure that the configuration vars for the C compiler are
4845# suitably defined. Those variables are subsequently used by
4846# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4847AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4848AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4849[AC_LANG_SAVE
4850
4851# Source file extension for Java test sources.
4852ac_ext=java
4853
4854# Object file extension for compiled Java test sources.
4855objext=o
4856_LT_AC_TAGVAR(objext, $1)=$objext
4857
4858# Code to be used in simple compile tests
4859lt_simple_compile_test_code="class foo {}\n"
4860
4861# Code to be used in simple link tests
4862lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4863
4864# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4865_LT_AC_SYS_COMPILER
4866
4867# save warnings/boilerplate of simple test code
4868_LT_COMPILER_BOILERPLATE
4869_LT_LINKER_BOILERPLATE
4870
4871# Allow CC to be a program name with arguments.
4872lt_save_CC="$CC"
4873CC=${GCJ-"gcj"}
4874compiler=$CC
4875_LT_AC_TAGVAR(compiler, $1)=$CC
4876_LT_CC_BASENAME([$compiler])
4877
4878# GCJ did not exist at the time GCC didn't implicitly link libc in.
4879_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4880
4881_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4882
4883AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4884AC_LIBTOOL_PROG_COMPILER_PIC($1)
4885AC_LIBTOOL_PROG_CC_C_O($1)
4886AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4887AC_LIBTOOL_PROG_LD_SHLIBS($1)
4888AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4889AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4890
4891AC_LIBTOOL_CONFIG($1)
4892
4893AC_LANG_RESTORE
4894CC="$lt_save_CC"
4895])# AC_LIBTOOL_LANG_GCJ_CONFIG
4896
4897
4898# AC_LIBTOOL_LANG_RC_CONFIG
4899# -------------------------
4900# Ensure that the configuration vars for the Windows resource compiler are
4901# suitably defined. Those variables are subsequently used by
4902# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4903AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4904AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4905[AC_LANG_SAVE
4906
4907# Source file extension for RC test sources.
4908ac_ext=rc
4909
4910# Object file extension for compiled RC test sources.
4911objext=o
4912_LT_AC_TAGVAR(objext, $1)=$objext
4913
4914# Code to be used in simple compile tests
4915lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4916
4917# Code to be used in simple link tests
4918lt_simple_link_test_code="$lt_simple_compile_test_code"
4919
4920# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4921_LT_AC_SYS_COMPILER
4922
4923# save warnings/boilerplate of simple test code
4924_LT_COMPILER_BOILERPLATE
4925_LT_LINKER_BOILERPLATE
4926
4927# Allow CC to be a program name with arguments.
4928lt_save_CC="$CC"
4929CC=${RC-"windres"}
4930compiler=$CC
4931_LT_AC_TAGVAR(compiler, $1)=$CC
4932_LT_CC_BASENAME([$compiler])
4933_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4934
4935AC_LIBTOOL_CONFIG($1)
4936
4937AC_LANG_RESTORE
4938CC="$lt_save_CC"
4939])# AC_LIBTOOL_LANG_RC_CONFIG
4940
4941
4942# AC_LIBTOOL_CONFIG([TAGNAME])
4943# ---------------------------- 3307# -------------------------------
4944# If TAGNAME is not passed, then create an initial libtool script 3308m4_defun([_LT_COMPILER_NO_RTTI],
4945# with a default configuration from the untagged config vars. Otherwise 3309[m4_require([_LT_TAG_COMPILER])dnl
4946# add code to config.status for appending the configuration named by
4947# TAGNAME from the matching tagged config vars.
4948AC_DEFUN([AC_LIBTOOL_CONFIG],
4949[# The else clause should only fire when bootstrapping the
4950# libtool distribution, otherwise you forgot to ship ltmain.sh
4951# with your package, and you will get complaints that there are
4952# no rules to generate ltmain.sh.
4953if test -f "$ltmain"; then
4954 # See if we are running on zsh, and set the options which allow our commands through
4955 # without removal of \ escapes.
4956 if test -n "${ZSH_VERSION+set}" ; then
4957 setopt NO_GLOB_SUBST
4958 fi
4959 # Now quote all the things that may contain metacharacters while being
4960 # careful not to overquote the AC_SUBSTed values. We take copies of the
4961 # variables and quote the copies for generation of the libtool script.
4962 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4963 SED SHELL STRIP \
4964 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4965 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4966 deplibs_check_method reload_flag reload_cmds need_locks \
4967 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4968 lt_cv_sys_global_symbol_to_c_name_address \
4969 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4970 old_postinstall_cmds old_postuninstall_cmds \
4971 _LT_AC_TAGVAR(compiler, $1) \
4972 _LT_AC_TAGVAR(CC, $1) \
4973 _LT_AC_TAGVAR(LD, $1) \
4974 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4975 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4976 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4977 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4978 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4979 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4980 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4981 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4982 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4983 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4984 _LT_AC_TAGVAR(predep_objects, $1) \
4985 _LT_AC_TAGVAR(postdep_objects, $1) \
4986 _LT_AC_TAGVAR(predeps, $1) \
4987 _LT_AC_TAGVAR(postdeps, $1) \
4988 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4989 _LT_AC_TAGVAR(archive_cmds, $1) \
4990 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4991 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4992 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4993 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4994 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4995 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4996 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4997 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4998 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4999 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5000 _LT_AC_TAGVAR(hardcode_automatic, $1) \
5001 _LT_AC_TAGVAR(module_cmds, $1) \
5002 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5003 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5004 _LT_AC_TAGVAR(exclude_expsyms, $1) \
5005 _LT_AC_TAGVAR(include_expsyms, $1); do
5006 3310
5007 case $var in
5008 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5009 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5010 _LT_AC_TAGVAR(archive_cmds, $1) | \
5011 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5012 _LT_AC_TAGVAR(module_cmds, $1) | \
5013 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5014 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5015 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5016 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5017 postinstall_cmds | postuninstall_cmds | \
5018 old_postinstall_cmds | old_postuninstall_cmds | \
5019 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5020 # Double-quote double-evaled strings.
5021 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5022 ;;
5023 *)
5024 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5025 ;;
5026 esac
5027 done
5028
5029 case $lt_echo in
5030 *'\[$]0 --fallback-echo"')
5031 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5032 ;;
5033 esac
5034
5035ifelse([$1], [],
5036 [cfgfile="${ofile}T"
5037 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5038 $rm -f "$cfgfile"
5039 AC_MSG_NOTICE([creating $ofile])],
5040 [cfgfile="$ofile"])
5041
5042 cat <<__EOF__ >> "$cfgfile"
5043ifelse([$1], [],
5044[#! $SHELL
5045
5046# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5047# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5048# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5049#
5050# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5051# Free Software Foundation, Inc.
5052#
5053# This file is part of GNU Libtool:
5054# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5055#
5056# This program is free software; you can redistribute it and/or modify
5057# it under the terms of the GNU General Public License as published by
5058# the Free Software Foundation; either version 2 of the License, or
5059# (at your option) any later version.
5060#
5061# This program is distributed in the hope that it will be useful, but
5062# WITHOUT ANY WARRANTY; without even the implied warranty of
5063# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5064# General Public License for more details.
5065#
5066# You should have received a copy of the GNU General Public License
5067# along with this program; if not, write to the Free Software
5068# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5069#
5070# As a special exception to the GNU General Public License, if you
5071# distribute this file as part of a program that contains a
5072# configuration script generated by Autoconf, you may include it under
5073# the same distribution terms that you use for the rest of that program.
5074
5075# A sed program that does not truncate output.
5076SED=$lt_SED
5077
5078# Sed that helps us avoid accidentally triggering echo(1) options like -n.
5079Xsed="$SED -e 1s/^X//"
5080
5081# The HP-UX ksh and POSIX shell print the target directory to stdout
5082# if CDPATH is set.
5083(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5084
5085# The names of the tagged configurations supported by this script.
5086available_tags=
5087
5088# ### BEGIN LIBTOOL CONFIG],
5089[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5090
5091# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5092
5093# Shell to use when invoking shell scripts.
5094SHELL=$lt_SHELL
5095
5096# Whether or not to build shared libraries.
5097build_libtool_libs=$enable_shared
5098
5099# Whether or not to build static libraries.
5100build_old_libs=$enable_static
5101
5102# Whether or not to add -lc for building shared libraries.
5103build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5104
5105# Whether or not to disallow shared libs when runtime libs are static
5106allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5107
5108# Whether or not to optimize for fast installation.
5109fast_install=$enable_fast_install
5110
5111# The host system.
5112host_alias=$host_alias
5113host=$host
5114host_os=$host_os
5115
5116# The build system.
5117build_alias=$build_alias
5118build=$build
5119build_os=$build_os
5120
5121# An echo program that does not interpret backslashes.
5122echo=$lt_echo
5123
5124# The archiver.
5125AR=$lt_AR
5126AR_FLAGS=$lt_AR_FLAGS
5127
5128# A C compiler.
5129LTCC=$lt_LTCC
5130
5131# LTCC compiler flags.
5132LTCFLAGS=$lt_LTCFLAGS
5133
5134# A language-specific compiler.
5135CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5136
5137# Is the compiler the GNU C compiler?
5138with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5139
5140# An ERE matcher.
5141EGREP=$lt_EGREP
5142
5143# The linker used to build libraries.
5144LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5145
5146# Whether we need hard or soft links.
5147LN_S=$lt_LN_S
5148
5149# A BSD-compatible nm program.
5150NM=$lt_NM
5151
5152# A symbol stripping program
5153STRIP=$lt_STRIP
5154
5155# Used to examine libraries when file_magic_cmd begins "file"
5156MAGIC_CMD=$MAGIC_CMD
5157
5158# Used on cygwin: DLL creation program.
5159DLLTOOL="$DLLTOOL"
5160
5161# Used on cygwin: object dumper.
5162OBJDUMP="$OBJDUMP"
5163
5164# Used on cygwin: assembler.
5165AS="$AS"
5166
5167# The name of the directory that contains temporary libtool files.
5168objdir=$objdir
5169
5170# How to create reloadable object files.
5171reload_flag=$lt_reload_flag
5172reload_cmds=$lt_reload_cmds
5173
5174# How to pass a linker flag through the compiler.
5175wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5176
5177# Object file suffix (normally "o").
5178objext="$ac_objext"
5179
5180# Old archive suffix (normally "a").
5181libext="$libext"
5182
5183# Shared library suffix (normally ".so").
5184shrext_cmds='$shrext_cmds'
5185
5186# Executable file suffix (normally "").
5187exeext="$exeext"
5188
5189# Additional compiler flags for building library objects.
5190pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5191pic_mode=$pic_mode
5192
5193# What is the maximum length of a command?
5194max_cmd_len=$lt_cv_sys_max_cmd_len
5195
5196# Does compiler simultaneously support -c and -o options?
5197compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5198
5199# Must we lock files when doing compilation?
5200need_locks=$lt_need_locks
5201
5202# Do we need the lib prefix for modules?
5203need_lib_prefix=$need_lib_prefix
5204
5205# Do we need a version for libraries?
5206need_version=$need_version
5207
5208# Whether dlopen is supported.
5209dlopen_support=$enable_dlopen
5210
5211# Whether dlopen of programs is supported.
5212dlopen_self=$enable_dlopen_self
5213
5214# Whether dlopen of statically linked programs is supported.
5215dlopen_self_static=$enable_dlopen_self_static
5216
5217# Compiler flag to prevent dynamic linking.
5218link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5219
5220# Compiler flag to turn off builtin functions.
5221no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5222
5223# Compiler flag to allow reflexive dlopens.
5224export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5225
5226# Compiler flag to generate shared objects directly from archives.
5227whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5228
5229# Compiler flag to generate thread-safe objects.
5230thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5231
5232# Library versioning type.
5233version_type=$version_type
5234
5235# Format of library name prefix.
5236libname_spec=$lt_libname_spec
5237
5238# List of archive names. First name is the real one, the rest are links.
5239# The last name is the one that the linker finds with -lNAME.
5240library_names_spec=$lt_library_names_spec
5241
5242# The coded name of the library, if different from the real name.
5243soname_spec=$lt_soname_spec
5244
5245# Commands used to build and install an old-style archive.
5246RANLIB=$lt_RANLIB
5247old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5248old_postinstall_cmds=$lt_old_postinstall_cmds
5249old_postuninstall_cmds=$lt_old_postuninstall_cmds
5250
5251# Create an old-style archive from a shared archive.
5252old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5253
5254# Create a temporary old-style archive to link instead of a shared archive.
5255old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5256
5257# Commands used to build and install a shared archive.
5258archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5259archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5260postinstall_cmds=$lt_postinstall_cmds
5261postuninstall_cmds=$lt_postuninstall_cmds
5262
5263# Commands used to build a loadable module (assumed same as above if empty)
5264module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5265module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5266
5267# Commands to strip libraries.
5268old_striplib=$lt_old_striplib
5269striplib=$lt_striplib
5270
5271# Dependencies to place before the objects being linked to create a
5272# shared library.
5273predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5274
5275# Dependencies to place after the objects being linked to create a
5276# shared library.
5277postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5278
5279# Dependencies to place before the objects being linked to create a
5280# shared library.
5281predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5282
5283# Dependencies to place after the objects being linked to create a
5284# shared library.
5285postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5286
5287# The library search path used internally by the compiler when linking
5288# a shared library.
5289compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5290
5291# Method to check whether dependent libraries are shared objects.
5292deplibs_check_method=$lt_deplibs_check_method
5293
5294# Command to use when deplibs_check_method == file_magic.
5295file_magic_cmd=$lt_file_magic_cmd
5296
5297# Flag that allows shared libraries with undefined symbols to be built.
5298allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5299
5300# Flag that forces no undefined symbols.
5301no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5302
5303# Commands used to finish a libtool library installation in a directory.
5304finish_cmds=$lt_finish_cmds
5305
5306# Same as above, but a single script fragment to be evaled but not shown.
5307finish_eval=$lt_finish_eval
5308
5309# Take the output of nm and produce a listing of raw symbols and C names.
5310global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5311
5312# Transform the output of nm in a proper C declaration
5313global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5314
5315# Transform the output of nm in a C name address pair
5316global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5317
5318# This is the shared library runtime path variable.
5319runpath_var=$runpath_var
5320
5321# This is the shared library path variable.
5322shlibpath_var=$shlibpath_var
5323
5324# Is shlibpath searched before the hard-coded library search path?
5325shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5326
5327# How to hardcode a shared library path into an executable.
5328hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5329
5330# Whether we should hardcode library paths into libraries.
5331hardcode_into_libs=$hardcode_into_libs
5332
5333# Flag to hardcode \$libdir into a binary during linking.
5334# This must work even if \$libdir does not exist.
5335hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5336
5337# If ld is used when linking, flag to hardcode \$libdir into
5338# a binary during linking. This must work even if \$libdir does
5339# not exist.
5340hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5341
5342# Whether we need a single -rpath flag with a separated argument.
5343hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5344
5345# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5346# resulting binary.
5347hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5348
5349# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5350# resulting binary.
5351hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5352
5353# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5354# the resulting binary.
5355hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5356
5357# Set to yes if building a shared library automatically hardcodes DIR into the library
5358# and all subsequent libraries and executables linked against it.
5359hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5360
5361# Variables whose values should be saved in libtool wrapper scripts and
5362# restored at relink time.
5363variables_saved_for_relink="$variables_saved_for_relink"
5364
5365# Whether libtool must link a program against all its dependency libraries.
5366link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5367
5368# Compile-time system search path for libraries
5369sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5370
5371# Run-time system search path for libraries
5372sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5373
5374# Fix the shell variable \$srcfile for the compiler.
5375fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5376
5377# Set to yes if exported symbols are required.
5378always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5379
5380# The commands to list exported symbols.
5381export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5382
5383# The commands to extract the exported symbol list from a shared archive.
5384extract_expsyms_cmds=$lt_extract_expsyms_cmds
5385
5386# Symbols that should not be listed in the preloaded symbols.
5387exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5388
5389# Symbols that must always be exported.
5390include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5391
5392ifelse([$1],[],
5393[# ### END LIBTOOL CONFIG],
5394[# ### END LIBTOOL TAG CONFIG: $tagname])
5395
5396__EOF__
5397
5398ifelse([$1],[], [
5399 case $host_os in
5400 aix3*)
5401 cat <<\EOF >> "$cfgfile"
5402
5403# AIX sometimes has problems with the GCC collect2 program. For some
5404# reason, if we set the COLLECT_NAMES environment variable, the problems
5405# vanish in a puff of smoke.
5406if test "X${COLLECT_NAMES+set}" != Xset; then
5407 COLLECT_NAMES=
5408 export COLLECT_NAMES
5409fi
5410EOF
5411 ;;
5412 esac
5413
5414 # We use sed instead of cat because bash on DJGPP gets confused if
5415 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5416 # text mode, it properly converts lines to CR/LF. This bash problem
5417 # is reportedly fixed, but why not run on old versions too?
5418 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5419
5420 mv -f "$cfgfile" "$ofile" || \
5421 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5422 chmod +x "$ofile"
5423])
5424else
5425 # If there is no Makefile yet, we rely on a make rule to execute
5426 # `config.status --recheck' to rerun these tests and create the
5427 # libtool script then.
5428 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5429 if test -f "$ltmain_in"; then
5430 test -f Makefile && make "$ltmain"
5431 fi
5432fi
5433])# AC_LIBTOOL_CONFIG
5434
5435
5436# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5437# -------------------------------------------
5438AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5439[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5440
5441_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3311_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5442 3312
5443if test "$GCC" = yes; then 3313if test "$GCC" = yes; then
5444 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3314 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5445 3315
5446 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3316 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5447 lt_cv_prog_compiler_rtti_exceptions, 3317 lt_cv_prog_compiler_rtti_exceptions,
5448 [-fno-rtti -fno-exceptions], [], 3318 [-fno-rtti -fno-exceptions], [],
5449 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3319 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5450fi 3320fi
3321_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3322 [Compiler flag to turn off builtin functions])
5451])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 3323])# _LT_COMPILER_NO_RTTI
5452 3324
5453 3325
5454# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 3326# _LT_CMD_GLOBAL_SYMBOLS
5455# --------------------------------- 3327# ----------------------
5456AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 3328m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5457[AC_REQUIRE([AC_CANONICAL_HOST]) 3329[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5458AC_REQUIRE([AC_PROG_NM]) 3330AC_REQUIRE([AC_PROG_CC])dnl
5459AC_REQUIRE([AC_OBJEXT]) 3331AC_REQUIRE([LT_PATH_NM])dnl
3332AC_REQUIRE([LT_PATH_LD])dnl
3333m4_require([_LT_DECL_SED])dnl
3334m4_require([_LT_DECL_EGREP])dnl
3335m4_require([_LT_TAG_COMPILER])dnl
3336
5460# Check for command to grab the raw symbol name followed by C symbol from nm. 3337# Check for command to grab the raw symbol name followed by C symbol from nm.
5461AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3338AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5462AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3339AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5463[ 3340[
5464# These are sane defaults that work on at least a few old systems. 3341# These are sane defaults that work on at least a few old systems.
5468symcode='[[BCDEGRST]]' 3345symcode='[[BCDEGRST]]'
5469 3346
5470# Regexp to match symbols that can be accessed directly from C. 3347# Regexp to match symbols that can be accessed directly from C.
5471sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3348sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5472 3349
5473# Transform an extracted symbol line into a proper C declaration
5474lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5475
5476# Transform an extracted symbol line into symbol name and symbol address
5477lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5478
5479# Define system-specific variables. 3350# Define system-specific variables.
5480case $host_os in 3351case $host_os in
5481aix*) 3352aix*)
5482 symcode='[[BCDT]]' 3353 symcode='[[BCDT]]'
5483 ;; 3354 ;;
5484cygwin* | mingw* | pw32*) 3355cygwin* | mingw* | pw32* | cegcc*)
5485 symcode='[[ABCDGISTW]]' 3356 symcode='[[ABCDGISTW]]'
5486 ;; 3357 ;;
5487hpux*) # Its linker distinguishes data from code symbols 3358hpux*)
5488 if test "$host_cpu" = ia64; then 3359 if test "$host_cpu" = ia64; then
5489 symcode='[[ABCDEGRST]]' 3360 symcode='[[ABCDEGRST]]'
5490 fi 3361 fi
5491 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5492 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5493 ;;
5494linux* | k*bsd*-gnu)
5495 if test "$host_cpu" = ia64; then
5496 symcode='[[ABCDGIRSTW]]'
5497 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5498 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5499 fi
5500 ;; 3362 ;;
5501irix* | nonstopux*) 3363irix* | nonstopux*)
5502 symcode='[[BCDEGRST]]' 3364 symcode='[[BCDEGRST]]'
5503 ;; 3365 ;;
5504osf*) 3366osf*)
5516sysv5* | sco5v6* | unixware* | OpenUNIX*) 3378sysv5* | sco5v6* | unixware* | OpenUNIX*)
5517 symcode='[[ABDT]]' 3379 symcode='[[ABDT]]'
5518 ;; 3380 ;;
5519sysv4) 3381sysv4)
5520 symcode='[[DFNSTU]]' 3382 symcode='[[DFNSTU]]'
5521 ;;
5522esac
5523
5524# Handle CRLF in mingw tool chain
5525opt_cr=
5526case $build_os in
5527mingw*)
5528 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5529 ;; 3383 ;;
5530esac 3384esac
5531 3385
5532# If we're using GNU nm, then use its standard symbol codes. 3386# If we're using GNU nm, then use its standard symbol codes.
5533case `$NM -V 2>&1` in 3387case `$NM -V 2>&1` in
5534*GNU* | *'with BFD'*) 3388*GNU* | *'with BFD'*)
5535 symcode='[[ABCDGIRSTW]]' ;; 3389 symcode='[[ABCDGIRSTW]]' ;;
5536esac 3390esac
5537 3391
3392# Transform an extracted symbol line into a proper C declaration.
3393# Some systems (esp. on ia64) link data and code symbols differently,
3394# so use this general approach.
3395lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3396
3397# Transform an extracted symbol line into symbol name and symbol address
3398lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3399lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3400
3401# Handle CRLF in mingw tool chain
3402opt_cr=
3403case $build_os in
3404mingw*)
3405 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3406 ;;
3407esac
3408
5538# Try without a prefix undercore, then with it. 3409# Try without a prefix underscore, then with it.
5539for ac_symprfx in "" "_"; do 3410for ac_symprfx in "" "_"; do
5540 3411
5541 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3412 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5542 symxfrm="\\1 $ac_symprfx\\2 \\2" 3413 symxfrm="\\1 $ac_symprfx\\2 \\2"
5543 3414
5544 # Write the raw and C identifiers. 3415 # Write the raw and C identifiers.
3416 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3417 # Fake it for dumpbin and say T for any non-static function
3418 # and D for any global variable.
3419 # Also find C++ and __fastcall symbols from MSVC++,
3420 # which start with @ or ?.
3421 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3422" {last_section=section; section=\$ 3};"\
3423" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3424" \$ 0!~/External *\|/{next};"\
3425" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3426" {if(hide[section]) next};"\
3427" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3428" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3429" s[1]~/^[@?]/{print s[1], s[1]; next};"\
3430" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3431" ' prfx=^$ac_symprfx]"
3432 else
5545 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3433 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3434 fi
5546 3435
5547 # Check to see that the pipe works correctly. 3436 # Check to see that the pipe works correctly.
5548 pipe_works=no 3437 pipe_works=no
5549 3438
5550 rm -f conftest* 3439 rm -f conftest*
5551 cat > conftest.$ac_ext <<EOF 3440 cat > conftest.$ac_ext <<_LT_EOF
5552#ifdef __cplusplus 3441#ifdef __cplusplus
5553extern "C" { 3442extern "C" {
5554#endif 3443#endif
5555char nm_test_var; 3444char nm_test_var;
3445void nm_test_func(void);
5556void nm_test_func(){} 3446void nm_test_func(void){}
5557#ifdef __cplusplus 3447#ifdef __cplusplus
5558} 3448}
5559#endif 3449#endif
5560int main(){nm_test_var='a';nm_test_func();return(0);} 3450int main(){nm_test_var='a';nm_test_func();return(0);}
5561EOF 3451_LT_EOF
5562 3452
5563 if AC_TRY_EVAL(ac_compile); then 3453 if AC_TRY_EVAL(ac_compile); then
5564 # Now try to grab the symbols. 3454 # Now try to grab the symbols.
5565 nlist=conftest.nm 3455 nlist=conftest.nm
5566 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 3456 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5570 else 3460 else
5571 rm -f "$nlist"T 3461 rm -f "$nlist"T
5572 fi 3462 fi
5573 3463
5574 # Make sure that we snagged all the symbols we need. 3464 # Make sure that we snagged all the symbols we need.
5575 if grep ' nm_test_var$' "$nlist" >/dev/null; then 3465 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5576 if grep ' nm_test_func$' "$nlist" >/dev/null; then 3466 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5577 cat <<EOF > conftest.$ac_ext 3467 cat <<_LT_EOF > conftest.$ac_ext
5578#ifdef __cplusplus 3468#ifdef __cplusplus
5579extern "C" { 3469extern "C" {
5580#endif 3470#endif
5581 3471
5582EOF 3472_LT_EOF
5583 # Now generate the symbol file. 3473 # Now generate the symbol file.
5584 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 3474 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5585 3475
5586 cat <<EOF >> conftest.$ac_ext 3476 cat <<_LT_EOF >> conftest.$ac_ext
5587#if defined (__STDC__) && __STDC__
5588# define lt_ptr_t void *
5589#else
5590# define lt_ptr_t char *
5591# define const
5592#endif
5593 3477
5594/* The mapping between symbol names and symbols. */ 3478/* The mapping between symbol names and symbols. */
5595const struct { 3479const struct {
5596 const char *name; 3480 const char *name;
5597 lt_ptr_t address; 3481 void *address;
5598} 3482}
5599lt_preloaded_symbols[[]] = 3483lt__PROGRAM__LTX_preloaded_symbols[[]] =
5600{ 3484{
5601EOF 3485 { "@PROGRAM@", (void *) 0 },
3486_LT_EOF
5602 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 3487 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5603 cat <<\EOF >> conftest.$ac_ext 3488 cat <<\_LT_EOF >> conftest.$ac_ext
5604 {0, (lt_ptr_t) 0} 3489 {0, (void *) 0}
5605}; 3490};
3491
3492/* This works around a problem in FreeBSD linker */
3493#ifdef FREEBSD_WORKAROUND
3494static const void *lt_preloaded_setup() {
3495 return lt__PROGRAM__LTX_preloaded_symbols;
3496}
3497#endif
5606 3498
5607#ifdef __cplusplus 3499#ifdef __cplusplus
5608} 3500}
5609#endif 3501#endif
5610EOF 3502_LT_EOF
5611 # Now try linking the two files. 3503 # Now try linking the two files.
5612 mv conftest.$ac_objext conftstm.$ac_objext 3504 mv conftest.$ac_objext conftstm.$ac_objext
5613 lt_save_LIBS="$LIBS" 3505 lt_save_LIBS="$LIBS"
5614 lt_save_CFLAGS="$CFLAGS" 3506 lt_save_CFLAGS="$CFLAGS"
5615 LIBS="conftstm.$ac_objext" 3507 LIBS="conftstm.$ac_objext"
5616 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3508 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5617 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3509 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5618 pipe_works=yes 3510 pipe_works=yes
5619 fi 3511 fi
5620 LIBS="$lt_save_LIBS" 3512 LIBS="$lt_save_LIBS"
5621 CFLAGS="$lt_save_CFLAGS" 3513 CFLAGS="$lt_save_CFLAGS"
5630 fi 3522 fi
5631 else 3523 else
5632 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3524 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5633 cat conftest.$ac_ext >&5 3525 cat conftest.$ac_ext >&5
5634 fi 3526 fi
5635 rm -f conftest* conftst* 3527 rm -rf conftest* conftst*
5636 3528
5637 # Do not use the global_symbol_pipe unless it works. 3529 # Do not use the global_symbol_pipe unless it works.
5638 if test "$pipe_works" = yes; then 3530 if test "$pipe_works" = yes; then
5639 break 3531 break
5640 else 3532 else
5648if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3540if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5649 AC_MSG_RESULT(failed) 3541 AC_MSG_RESULT(failed)
5650else 3542else
5651 AC_MSG_RESULT(ok) 3543 AC_MSG_RESULT(ok)
5652fi 3544fi
5653]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5654 3545
3546_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3547 [Take the output of nm and produce a listing of raw symbols and C names])
3548_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3549 [Transform the output of nm in a proper C declaration])
3550_LT_DECL([global_symbol_to_c_name_address],
3551 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3552 [Transform the output of nm in a C name address pair])
3553_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3554 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3555 [Transform the output of nm in a C name address pair when lib prefix is needed])
3556]) # _LT_CMD_GLOBAL_SYMBOLS
5655 3557
3558
5656# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 3559# _LT_COMPILER_PIC([TAGNAME])
5657# --------------------------------------- 3560# ---------------------------
5658AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 3561m4_defun([_LT_COMPILER_PIC],
3562[m4_require([_LT_TAG_COMPILER])dnl
5659[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 3563_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5660_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 3564_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5661_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 3565_LT_TAGVAR(lt_prog_compiler_static, $1)=
5662 3566
5663AC_MSG_CHECKING([for $compiler option to produce PIC]) 3567AC_MSG_CHECKING([for $compiler option to produce PIC])
5664 ifelse([$1],[CXX],[ 3568m4_if([$1], [CXX], [
5665 # C++ specific cases for pic, static, wl, etc. 3569<