blob: 9079a0ef26612be7f01e201b9e5835919c98fd92 [file] [log] [blame]
mostang.com!davidm46149fd2003-03-31 18:16:54 +00001# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
mostang.com!davidm85bd7b82002-02-28 16:24:48 +00002
mostang.com!davidm0440c532003-01-17 18:12:55 +00003# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
mostang.com!davidm85bd7b82002-02-28 16:24:48 +00004# Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
mostang.com!davidm0440c532003-01-17 18:12:55 +000014AC_DEFUN([LIBUNWIND___THREAD],
15[dnl Check whether the compiler supports the __thread keyword.
16if test "x$use__thread" != xno; then
17 AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread,
18 [cat > conftest.c <<\EOF
19 __thread int a = 42;
20EOF
21 if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
22 libc_cv_gcc___thread=yes
mostang.com!davidm85bd7b82002-02-28 16:24:48 +000023 else
mostang.com!davidm0440c532003-01-17 18:12:55 +000024 libc_cv_gcc___thread=no
mostang.com!davidm85bd7b82002-02-28 16:24:48 +000025 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +000026 rm -f conftest*])
27 if test "$libc_cv_gcc___thread" = yes; then
28 AC_DEFINE(HAVE___THREAD, 1,
29 [Define to 1 if __thread keyword is supported by the C compiler.])
30 fi
31else
32 libc_cv_gcc___thread=no
33fi])
mostang.com!davidm85bd7b82002-02-28 16:24:48 +000034
mostang.com!davidm0440c532003-01-17 18:12:55 +000035# Do all the work for Automake. -*- Autoconf -*-
mostang.com!davidm85bd7b82002-02-28 16:24:48 +000036
mostang.com!davidm0440c532003-01-17 18:12:55 +000037# This macro actually does too much some checks are only needed if
38# your package does certain things. But this isn't really a big deal.
mostang.com!davidm85bd7b82002-02-28 16:24:48 +000039
mostang.com!davidm0440c532003-01-17 18:12:55 +000040# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
41# Free Software Foundation, Inc.
mostang.com!davidm85bd7b82002-02-28 16:24:48 +000042
mostang.com!davidm0440c532003-01-17 18:12:55 +000043# This program is free software; you can redistribute it and/or modify
44# it under the terms of the GNU General Public License as published by
45# the Free Software Foundation; either version 2, or (at your option)
46# any later version.
47
48# This program is distributed in the hope that it will be useful,
49# but WITHOUT ANY WARRANTY; without even the implied warranty of
50# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51# GNU General Public License for more details.
52
53# You should have received a copy of the GNU General Public License
54# along with this program; if not, write to the Free Software
55# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
56# 02111-1307, USA.
57
58# serial 8
mostang.com!davidm85bd7b82002-02-28 16:24:48 +000059
60# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
61# written in clear, in which case automake, when reading aclocal.m4,
62# will think it sees a *use*, and therefore will trigger all it's
63# C support machinery. Also note that it means that autoscan, seeing
64# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
65
66
mostang.com!davidm0440c532003-01-17 18:12:55 +000067AC_PREREQ([2.52])
mostang.com!davidm85bd7b82002-02-28 16:24:48 +000068
69# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
70# the ones we care about.
mostang.com!davidm0440c532003-01-17 18:12:55 +000071m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
mostang.com!davidm85bd7b82002-02-28 16:24:48 +000072
mostang.com!davidm0440c532003-01-17 18:12:55 +000073# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
74# AM_INIT_AUTOMAKE([OPTIONS])
75# -----------------------------------------------
76# The call with PACKAGE and VERSION arguments is the old style
77# call (pre autoconf-2.50), which is being phased out. PACKAGE
78# and VERSION should now be passed to AC_INIT and removed from
79# the call to AM_INIT_AUTOMAKE.
80# We support both call styles for the transition. After
81# the next Automake release, Autoconf can make the AC_INIT
82# arguments mandatory, and then we can depend on a new Autoconf
83# release and drop the old call support.
84AC_DEFUN([AM_INIT_AUTOMAKE],
85[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
86 AC_REQUIRE([AC_PROG_INSTALL])dnl
87# test to see if srcdir already configured
88if test "`cd $srcdir && pwd`" != "`pwd`" &&
89 test -f $srcdir/config.status; then
90 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
91fi
92
93# Define the identity of the package.
94dnl Distinguish between old-style and new-style calls.
95m4_ifval([$2],
96[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
97 AC_SUBST([PACKAGE], [$1])dnl
98 AC_SUBST([VERSION], [$2])],
99[_AM_SET_OPTIONS([$1])dnl
100 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
101 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
102
103_AM_IF_OPTION([no-define],,
104[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
105 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000106
107# Some tools Automake needs.
108AC_REQUIRE([AM_SANITY_CHECK])dnl
109AC_REQUIRE([AC_ARG_PROGRAM])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000110AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000111AM_MISSING_PROG(AUTOCONF, autoconf)
mostang.com!davidm0440c532003-01-17 18:12:55 +0000112AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000113AM_MISSING_PROG(AUTOHEADER, autoheader)
114AM_MISSING_PROG(MAKEINFO, makeinfo)
115AM_MISSING_PROG(AMTAR, tar)
116AM_PROG_INSTALL_SH
117AM_PROG_INSTALL_STRIP
118# We need awk for the "check" target. The system "awk" is bad on
119# some platforms.
120AC_REQUIRE([AC_PROG_AWK])dnl
121AC_REQUIRE([AC_PROG_MAKE_SET])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000122
123_AM_IF_OPTION([no-dependencies],,
124[AC_PROVIDE_IFELSE([AC_PROG_][CC],
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000125 [_AM_DEPENDENCIES(CC)],
126 [define([AC_PROG_][CC],
127 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
128AC_PROVIDE_IFELSE([AC_PROG_][CXX],
129 [_AM_DEPENDENCIES(CXX)],
130 [define([AC_PROG_][CXX],
131 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
132])
mostang.com!davidm0440c532003-01-17 18:12:55 +0000133])
134
135# Copyright 2002 Free Software Foundation, Inc.
136
137# This program is free software; you can redistribute it and/or modify
138# it under the terms of the GNU General Public License as published by
139# the Free Software Foundation; either version 2, or (at your option)
140# any later version.
141
142# This program is distributed in the hope that it will be useful,
143# but WITHOUT ANY WARRANTY; without even the implied warranty of
144# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
145# GNU General Public License for more details.
146
147# You should have received a copy of the GNU General Public License
148# along with this program; if not, write to the Free Software
149# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
150
151# AM_AUTOMAKE_VERSION(VERSION)
152# ----------------------------
153# Automake X.Y traces this macro to ensure aclocal.m4 has been
154# generated from the m4 files accompanying Automake X.Y.
155AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
156
157# AM_SET_CURRENT_AUTOMAKE_VERSION
158# -------------------------------
159# Call AM_AUTOMAKE_VERSION so it can be traced.
160# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
161AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
162 [AM_AUTOMAKE_VERSION([1.6.3])])
163
164# Helper functions for option handling. -*- Autoconf -*-
165
166# Copyright 2001, 2002 Free Software Foundation, Inc.
167
168# This program is free software; you can redistribute it and/or modify
169# it under the terms of the GNU General Public License as published by
170# the Free Software Foundation; either version 2, or (at your option)
171# any later version.
172
173# This program is distributed in the hope that it will be useful,
174# but WITHOUT ANY WARRANTY; without even the implied warranty of
175# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
176# GNU General Public License for more details.
177
178# You should have received a copy of the GNU General Public License
179# along with this program; if not, write to the Free Software
180# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
181# 02111-1307, USA.
182
183# serial 2
184
185# _AM_MANGLE_OPTION(NAME)
186# -----------------------
187AC_DEFUN([_AM_MANGLE_OPTION],
188[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
189
190# _AM_SET_OPTION(NAME)
191# ------------------------------
192# Set option NAME. Presently that only means defining a flag for this option.
193AC_DEFUN([_AM_SET_OPTION],
194[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
195
196# _AM_SET_OPTIONS(OPTIONS)
197# ----------------------------------
198# OPTIONS is a space-separated list of Automake options.
199AC_DEFUN([_AM_SET_OPTIONS],
200[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
201
202# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
203# -------------------------------------------
204# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
205AC_DEFUN([_AM_IF_OPTION],
206[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000207
208#
209# Check to make sure that the build environment is sane.
210#
211
mostang.com!davidm0440c532003-01-17 18:12:55 +0000212# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
213
214# This program is free software; you can redistribute it and/or modify
215# it under the terms of the GNU General Public License as published by
216# the Free Software Foundation; either version 2, or (at your option)
217# any later version.
218
219# This program is distributed in the hope that it will be useful,
220# but WITHOUT ANY WARRANTY; without even the implied warranty of
221# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
222# GNU General Public License for more details.
223
224# You should have received a copy of the GNU General Public License
225# along with this program; if not, write to the Free Software
226# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
227# 02111-1307, USA.
228
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000229# serial 3
230
231# AM_SANITY_CHECK
232# ---------------
233AC_DEFUN([AM_SANITY_CHECK],
234[AC_MSG_CHECKING([whether build environment is sane])
235# Just in case
236sleep 1
237echo timestamp > conftest.file
238# Do `set' in a subshell so we don't clobber the current shell's
239# arguments. Must try -L first in case configure is actually a
240# symlink; some systems play weird games with the mod time of symlinks
241# (eg FreeBSD returns the mod time of the symlink's containing
242# directory).
243if (
244 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
245 if test "$[*]" = "X"; then
246 # -L didn't work.
247 set X `ls -t $srcdir/configure conftest.file`
248 fi
249 rm -f conftest.file
250 if test "$[*]" != "X $srcdir/configure conftest.file" \
251 && test "$[*]" != "X conftest.file $srcdir/configure"; then
252
253 # If neither matched, then we have a broken ls. This can happen
254 # if, for instance, CONFIG_SHELL is bash and it inherits a
255 # broken ls alias from the environment. This has actually
256 # happened. Such a system could not be considered "sane".
257 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
258alias in your environment])
259 fi
260
261 test "$[2]" = conftest.file
262 )
263then
264 # Ok.
265 :
266else
267 AC_MSG_ERROR([newly created file is older than distributed files!
268Check your system clock])
269fi
270AC_MSG_RESULT(yes)])
271
mostang.com!davidm0440c532003-01-17 18:12:55 +0000272# -*- Autoconf -*-
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000273
mostang.com!davidm0440c532003-01-17 18:12:55 +0000274
275# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
276
277# This program is free software; you can redistribute it and/or modify
278# it under the terms of the GNU General Public License as published by
279# the Free Software Foundation; either version 2, or (at your option)
280# any later version.
281
282# This program is distributed in the hope that it will be useful,
283# but WITHOUT ANY WARRANTY; without even the implied warranty of
284# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
285# GNU General Public License for more details.
286
287# You should have received a copy of the GNU General Public License
288# along with this program; if not, write to the Free Software
289# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
290# 02111-1307, USA.
291
292# serial 3
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000293
294# AM_MISSING_PROG(NAME, PROGRAM)
295# ------------------------------
296AC_DEFUN([AM_MISSING_PROG],
297[AC_REQUIRE([AM_MISSING_HAS_RUN])
298$1=${$1-"${am_missing_run}$2"}
299AC_SUBST($1)])
300
301
302# AM_MISSING_HAS_RUN
303# ------------------
304# Define MISSING if not defined so far and test if it supports --run.
305# If it does, set am_missing_run to use it, otherwise, to nothing.
306AC_DEFUN([AM_MISSING_HAS_RUN],
307[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
308test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
309# Use eval to expand $SHELL
310if eval "$MISSING --run true"; then
311 am_missing_run="$MISSING --run "
312else
313 am_missing_run=
mostang.com!davidm0440c532003-01-17 18:12:55 +0000314 AC_MSG_WARN([`missing' script is too old or missing])
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000315fi
316])
317
318# AM_AUX_DIR_EXPAND
319
mostang.com!davidm0440c532003-01-17 18:12:55 +0000320# Copyright 2001 Free Software Foundation, Inc.
321
322# This program is free software; you can redistribute it and/or modify
323# it under the terms of the GNU General Public License as published by
324# the Free Software Foundation; either version 2, or (at your option)
325# any later version.
326
327# This program is distributed in the hope that it will be useful,
328# but WITHOUT ANY WARRANTY; without even the implied warranty of
329# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
330# GNU General Public License for more details.
331
332# You should have received a copy of the GNU General Public License
333# along with this program; if not, write to the Free Software
334# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
335# 02111-1307, USA.
336
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000337# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
338# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
339# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
340#
341# Of course, Automake must honor this variable whenever it calls a
342# tool from the auxiliary directory. The problem is that $srcdir (and
343# therefore $ac_aux_dir as well) can be either absolute or relative,
344# depending on how configure is run. This is pretty annoying, since
345# it makes $ac_aux_dir quite unusable in subdirectories: in the top
346# source directory, any form will work fine, but in subdirectories a
347# relative path needs to be adjusted first.
348#
349# $ac_aux_dir/missing
350# fails when called from a subdirectory if $ac_aux_dir is relative
351# $top_srcdir/$ac_aux_dir/missing
352# fails if $ac_aux_dir is absolute,
353# fails when called from a subdirectory in a VPATH build with
354# a relative $ac_aux_dir
355#
356# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
357# are both prefixed by $srcdir. In an in-source build this is usually
358# harmless because $srcdir is `.', but things will broke when you
359# start a VPATH build or use an absolute $srcdir.
360#
361# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
362# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
363# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
364# and then we would define $MISSING as
365# MISSING="\${SHELL} $am_aux_dir/missing"
366# This will work as long as MISSING is not called from configure, because
367# unfortunately $(top_srcdir) has no meaning in configure.
368# However there are other variables, like CC, which are often used in
369# configure, and could therefore not use this "fixed" $ac_aux_dir.
370#
371# Another solution, used here, is to always expand $ac_aux_dir to an
372# absolute PATH. The drawback is that using absolute paths prevent a
373# configured tree to be moved without reconfiguration.
374
mostang.com!davidm0440c532003-01-17 18:12:55 +0000375# Rely on autoconf to set up CDPATH properly.
376AC_PREREQ([2.50])
377
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000378AC_DEFUN([AM_AUX_DIR_EXPAND], [
379# expand $ac_aux_dir to an absolute path
mostang.com!davidm0440c532003-01-17 18:12:55 +0000380am_aux_dir=`cd $ac_aux_dir && pwd`
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000381])
382
383# AM_PROG_INSTALL_SH
384# ------------------
385# Define $install_sh.
mostang.com!davidm0440c532003-01-17 18:12:55 +0000386
387# Copyright 2001 Free Software Foundation, Inc.
388
389# This program is free software; you can redistribute it and/or modify
390# it under the terms of the GNU General Public License as published by
391# the Free Software Foundation; either version 2, or (at your option)
392# any later version.
393
394# This program is distributed in the hope that it will be useful,
395# but WITHOUT ANY WARRANTY; without even the implied warranty of
396# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
397# GNU General Public License for more details.
398
399# You should have received a copy of the GNU General Public License
400# along with this program; if not, write to the Free Software
401# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
402# 02111-1307, USA.
403
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000404AC_DEFUN([AM_PROG_INSTALL_SH],
405[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
406install_sh=${install_sh-"$am_aux_dir/install-sh"}
407AC_SUBST(install_sh)])
408
mostang.com!davidm0440c532003-01-17 18:12:55 +0000409# AM_PROG_INSTALL_STRIP
410
411# Copyright 2001 Free Software Foundation, Inc.
412
413# This program is free software; you can redistribute it and/or modify
414# it under the terms of the GNU General Public License as published by
415# the Free Software Foundation; either version 2, or (at your option)
416# any later version.
417
418# This program is distributed in the hope that it will be useful,
419# but WITHOUT ANY WARRANTY; without even the implied warranty of
420# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
421# GNU General Public License for more details.
422
423# You should have received a copy of the GNU General Public License
424# along with this program; if not, write to the Free Software
425# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
426# 02111-1307, USA.
427
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000428# One issue with vendor `install' (even GNU) is that you can't
429# specify the program used to strip binaries. This is especially
430# annoying in cross-compiling environments, where the build's strip
431# is unlikely to handle the host's binaries.
432# Fortunately install-sh will honor a STRIPPROG variable, so we
433# always use install-sh in `make install-strip', and initialize
434# STRIPPROG with the value of the STRIP variable (set by the user).
435AC_DEFUN([AM_PROG_INSTALL_STRIP],
436[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000437# Installed binaries are usually stripped using `strip' when the user
438# run `make install-strip'. However `strip' might not be the right
439# tool to use in cross-compilation environments, therefore Automake
440# will honor the `STRIP' environment variable to overrule this program.
441dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
442if test "$cross_compiling" != no; then
443 AC_CHECK_TOOL([STRIP], [strip], :)
444fi
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000445INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
446AC_SUBST([INSTALL_STRIP_PROGRAM])])
447
448# serial 4 -*- Autoconf -*-
449
mostang.com!davidm0440c532003-01-17 18:12:55 +0000450# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
451
452# This program is free software; you can redistribute it and/or modify
453# it under the terms of the GNU General Public License as published by
454# the Free Software Foundation; either version 2, or (at your option)
455# any later version.
456
457# This program is distributed in the hope that it will be useful,
458# but WITHOUT ANY WARRANTY; without even the implied warranty of
459# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
460# GNU General Public License for more details.
461
462# You should have received a copy of the GNU General Public License
463# along with this program; if not, write to the Free Software
464# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
465# 02111-1307, USA.
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000466
467
468# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
469# written in clear, in which case automake, when reading aclocal.m4,
470# will think it sees a *use*, and therefore will trigger all it's
471# C support machinery. Also note that it means that autoscan, seeing
472# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
473
474
475
476# _AM_DEPENDENCIES(NAME)
mostang.com!davidm0440c532003-01-17 18:12:55 +0000477# ----------------------
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000478# See how the compiler implements dependency checking.
mostang.com!davidm0440c532003-01-17 18:12:55 +0000479# NAME is "CC", "CXX", "GCJ", or "OBJC".
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000480# We try a few techniques and use that to set a single cache variable.
481#
482# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
483# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
484# dependency, and given that the user is not expected to run this macro,
485# just rely on AC_PROG_CC.
486AC_DEFUN([_AM_DEPENDENCIES],
487[AC_REQUIRE([AM_SET_DEPDIR])dnl
488AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
489AC_REQUIRE([AM_MAKE_INCLUDE])dnl
490AC_REQUIRE([AM_DEP_TRACK])dnl
491
492ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
493 [$1], CXX, [depcc="$CXX" am_compiler_list=],
mostang.com!davidm0440c532003-01-17 18:12:55 +0000494 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000495 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
496 [depcc="$$1" am_compiler_list=])
497
498AC_CACHE_CHECK([dependency style of $depcc],
499 [am_cv_$1_dependencies_compiler_type],
500[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
501 # We make a subdir and do the tests there. Otherwise we can end up
502 # making bogus files that we don't know about and never remove. For
503 # instance it was reported that on HP-UX the gcc test will end up
504 # making a dummy file named `D' -- because `-MD' means `put the output
505 # in D'.
506 mkdir conftest.dir
507 # Copy depcomp to subdir because otherwise we won't find it if we're
508 # using a relative directory.
509 cp "$am_depcomp" conftest.dir
510 cd conftest.dir
511
512 am_cv_$1_dependencies_compiler_type=none
513 if test "$am_compiler_list" = ""; then
514 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
515 fi
516 for depmode in $am_compiler_list; do
517 # We need to recreate these files for each test, as the compiler may
518 # overwrite some of them when testing with obscure command lines.
519 # This happens at least with the AIX C compiler.
520 echo '#include "conftest.h"' > conftest.c
521 echo 'int i;' > conftest.h
522 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
523
524 case $depmode in
525 nosideeffect)
526 # after this tag, mechanisms are not by side-effect, so they'll
527 # only be used when explicitly requested
528 if test "x$enable_dependency_tracking" = xyes; then
529 continue
530 else
531 break
532 fi
533 ;;
534 none) break ;;
535 esac
536 # We check with `-c' and `-o' for the sake of the "dashmstdout"
537 # mode. It turns out that the SunPro C++ compiler does not properly
538 # handle `-M -o', and we need to detect this.
539 if depmode=$depmode \
540 source=conftest.c object=conftest.o \
541 depfile=conftest.Po tmpdepfile=conftest.TPo \
542 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
543 grep conftest.h conftest.Po > /dev/null 2>&1 &&
544 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
545 am_cv_$1_dependencies_compiler_type=$depmode
546 break
547 fi
548 done
549
550 cd ..
551 rm -rf conftest.dir
552else
553 am_cv_$1_dependencies_compiler_type=none
554fi
555])
mostang.com!davidm0440c532003-01-17 18:12:55 +0000556AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000557])
558
559
560# AM_SET_DEPDIR
561# -------------
562# Choose a directory name for dependency files.
563# This macro is AC_REQUIREd in _AM_DEPENDENCIES
564AC_DEFUN([AM_SET_DEPDIR],
565[rm -f .deps 2>/dev/null
566mkdir .deps 2>/dev/null
567if test -d .deps; then
568 DEPDIR=.deps
569else
570 # MS-DOS does not allow filenames that begin with a dot.
571 DEPDIR=_deps
572fi
573rmdir .deps 2>/dev/null
mostang.com!davidm0440c532003-01-17 18:12:55 +0000574AC_SUBST([DEPDIR])
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000575])
576
577
578# AM_DEP_TRACK
579# ------------
580AC_DEFUN([AM_DEP_TRACK],
581[AC_ARG_ENABLE(dependency-tracking,
582[ --disable-dependency-tracking Speeds up one-time builds
583 --enable-dependency-tracking Do not reject slow dependency extractors])
584if test "x$enable_dependency_tracking" != xno; then
585 am_depcomp="$ac_aux_dir/depcomp"
586 AMDEPBACKSLASH='\'
587fi
588AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
mostang.com!davidm0440c532003-01-17 18:12:55 +0000589AC_SUBST([AMDEPBACKSLASH])
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000590])
591
mostang.com!davidm0440c532003-01-17 18:12:55 +0000592# Generate code to set up dependency tracking. -*- Autoconf -*-
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000593
mostang.com!davidm0440c532003-01-17 18:12:55 +0000594# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
595
596# This program is free software; you can redistribute it and/or modify
597# it under the terms of the GNU General Public License as published by
598# the Free Software Foundation; either version 2, or (at your option)
599# any later version.
600
601# This program is distributed in the hope that it will be useful,
602# but WITHOUT ANY WARRANTY; without even the implied warranty of
603# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
604# GNU General Public License for more details.
605
606# You should have received a copy of the GNU General Public License
607# along with this program; if not, write to the Free Software
608# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
609# 02111-1307, USA.
610
611#serial 2
612
613# _AM_OUTPUT_DEPENDENCY_COMMANDS
614# ------------------------------
615AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
616[for mf in $CONFIG_FILES; do
617 # Strip MF so we end up with the name of the file.
618 mf=`echo "$mf" | sed -e 's/:.*$//'`
619 # Check whether this is an Automake generated Makefile or not.
620 # We used to match only the files named `Makefile.in', but
621 # some people rename them; so instead we look at the file content.
622 # Grep'ing the first line is not enough: some people post-process
623 # each Makefile.in and add a new line on top of each file to say so.
624 # So let's grep whole file.
625 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
626 dirpart=`AS_DIRNAME("$mf")`
627 else
628 continue
629 fi
630 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000631 # Extract the definition of DEP_FILES from the Makefile without
632 # running `make'.
633 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
634 test -z "$DEPDIR" && continue
635 # When using ansi2knr, U may be empty or an underscore; expand it
636 U=`sed -n -e '/^U = / s///p' < "$mf"`
637 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
638 # We invoke sed twice because it is the simplest approach to
639 # changing $(DEPDIR) to its actual value in the expansion.
640 for file in `sed -n -e '
641 /^DEP_FILES = .*\\\\$/ {
642 s/^DEP_FILES = //
643 :loop
644 s/\\\\$//
645 p
646 n
647 /\\\\$/ b loop
648 p
649 }
650 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
651 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
652 # Make sure the directory exists.
653 test -f "$dirpart/$file" && continue
mostang.com!davidm0440c532003-01-17 18:12:55 +0000654 fdir=`AS_DIRNAME(["$file"])`
655 AS_MKDIR_P([$dirpart/$fdir])
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000656 # echo "creating $dirpart/$file"
657 echo '# dummy' > "$dirpart/$file"
658 done
659done
mostang.com!davidm0440c532003-01-17 18:12:55 +0000660])# _AM_OUTPUT_DEPENDENCY_COMMANDS
661
662
663# AM_OUTPUT_DEPENDENCY_COMMANDS
664# -----------------------------
665# This macro should only be invoked once -- use via AC_REQUIRE.
666#
667# This code is only required when automatic dependency tracking
668# is enabled. FIXME. This creates each `.P' file that we will
669# need in order to bootstrap the dependency handling code.
670AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
671[AC_CONFIG_COMMANDS([depfiles],
672 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
673 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
674])
675
676# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
677
678# This program is free software; you can redistribute it and/or modify
679# it under the terms of the GNU General Public License as published by
680# the Free Software Foundation; either version 2, or (at your option)
681# any later version.
682
683# This program is distributed in the hope that it will be useful,
684# but WITHOUT ANY WARRANTY; without even the implied warranty of
685# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
686# GNU General Public License for more details.
687
688# You should have received a copy of the GNU General Public License
689# along with this program; if not, write to the Free Software
690# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
691# 02111-1307, USA.
692
693# serial 2
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000694
695# AM_MAKE_INCLUDE()
696# -----------------
697# Check to see how make treats includes.
698AC_DEFUN([AM_MAKE_INCLUDE],
699[am_make=${MAKE-make}
700cat > confinc << 'END'
701doit:
702 @echo done
703END
704# If we don't find an include directive, just comment out the code.
705AC_MSG_CHECKING([for style of include used by $am_make])
mostang.com!davidm0440c532003-01-17 18:12:55 +0000706am__include="#"
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000707am__quote=
708_am_result=none
709# First try GNU make style include.
710echo "include confinc" > confmf
711# We grep out `Entering directory' and `Leaving directory'
712# messages which can occur if `w' ends up in MAKEFLAGS.
713# In particular we don't look at `^make:' because GNU make might
714# be invoked under some other name (usually "gmake"), in which
715# case it prints its new name instead of `make'.
716if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
717 am__include=include
718 am__quote=
719 _am_result=GNU
720fi
721# Now try BSD make style include.
722if test "$am__include" = "#"; then
723 echo '.include "confinc"' > confmf
724 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
725 am__include=.include
mostang.com!davidm0440c532003-01-17 18:12:55 +0000726 am__quote="\""
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000727 _am_result=BSD
728 fi
729fi
730AC_SUBST(am__include)
731AC_SUBST(am__quote)
732AC_MSG_RESULT($_am_result)
733rm -f confinc confmf
734])
735
mostang.com!davidm0440c532003-01-17 18:12:55 +0000736# AM_CONDITIONAL -*- Autoconf -*-
737
738# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
739
740# This program is free software; you can redistribute it and/or modify
741# it under the terms of the GNU General Public License as published by
742# the Free Software Foundation; either version 2, or (at your option)
743# any later version.
744
745# This program is distributed in the hope that it will be useful,
746# but WITHOUT ANY WARRANTY; without even the implied warranty of
747# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
748# GNU General Public License for more details.
749
750# You should have received a copy of the GNU General Public License
751# along with this program; if not, write to the Free Software
752# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
753# 02111-1307, USA.
754
755# serial 5
756
757AC_PREREQ(2.52)
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000758
759# AM_CONDITIONAL(NAME, SHELL-CONDITION)
760# -------------------------------------
761# Define a conditional.
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000762AC_DEFUN([AM_CONDITIONAL],
mostang.com!davidm0440c532003-01-17 18:12:55 +0000763[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
764 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000765AC_SUBST([$1_TRUE])
766AC_SUBST([$1_FALSE])
767if $2; then
768 $1_TRUE=
769 $1_FALSE='#'
770else
771 $1_TRUE='#'
772 $1_FALSE=
mostang.com!davidm0440c532003-01-17 18:12:55 +0000773fi
774AC_CONFIG_COMMANDS_PRE(
775[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
776 AC_MSG_ERROR([conditional \"$1\" was never defined.
777Usually this means the macro was only invoked conditionally.])
778fi])])
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000779
780# Add --enable-maintainer-mode option to configure.
781# From Jim Meyering
782
mostang.com!davidm0440c532003-01-17 18:12:55 +0000783# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
784
785# This program is free software; you can redistribute it and/or modify
786# it under the terms of the GNU General Public License as published by
787# the Free Software Foundation; either version 2, or (at your option)
788# any later version.
789
790# This program is distributed in the hope that it will be useful,
791# but WITHOUT ANY WARRANTY; without even the implied warranty of
792# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
793# GNU General Public License for more details.
794
795# You should have received a copy of the GNU General Public License
796# along with this program; if not, write to the Free Software
797# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
798# 02111-1307, USA.
799
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000800# serial 1
801
802AC_DEFUN([AM_MAINTAINER_MODE],
803[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
804 dnl maintainer-mode is disabled by default
805 AC_ARG_ENABLE(maintainer-mode,
806[ --enable-maintainer-mode enable make rules and dependencies not useful
807 (and sometimes confusing) to the casual installer],
808 USE_MAINTAINER_MODE=$enableval,
809 USE_MAINTAINER_MODE=no)
810 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
811 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
812 MAINT=$MAINTAINER_MODE_TRUE
813 AC_SUBST(MAINT)dnl
814]
815)
816
mostang.com!davidm0440c532003-01-17 18:12:55 +0000817# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000818
mostang.com!davidm0440c532003-01-17 18:12:55 +0000819# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
820
821# This program is free software; you can redistribute it and/or modify
822# it under the terms of the GNU General Public License as published by
823# the Free Software Foundation; either version 2, or (at your option)
824# any later version.
825
826# This program is distributed in the hope that it will be useful,
827# but WITHOUT ANY WARRANTY; without even the implied warranty of
828# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
829# GNU General Public License for more details.
830
831# You should have received a copy of the GNU General Public License
832# along with this program; if not, write to the Free Software
833# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
834# 02111-1307, USA.
835
836AC_PREREQ([2.52])
837
838# serial 6
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000839
840# When config.status generates a header, we must update the stamp-h file.
841# This file resides in the same directory as the config header
842# that is generated. We must strip everything past the first ":",
843# and everything past the last "/".
844
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000845# _AM_DIRNAME(PATH)
846# -----------------
847# Like AS_DIRNAME, only do it during macro expansion
848AC_DEFUN([_AM_DIRNAME],
mostang.com!davidm56c93292002-11-09 07:59:02 +0000849 [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
850 m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
851 m4_if(regexp([$1], [^/.*]), -1,
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000852 [.],
mostang.com!davidm56c93292002-11-09 07:59:02 +0000853 patsubst([$1], [^\(/\).*], [\1])),
854 patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
855 patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000856])# _AM_DIRNAME
mostang.com!davidm85bd7b82002-02-28 16:24:48 +0000857
mostang.com!davidm0440c532003-01-17 18:12:55 +0000858
859# The stamp files are numbered to have different names.
860# We could number them on a directory basis, but that's additional
861# complications, let's have a unique counter.
862m4_define([_AM_STAMP_Count], [0])
863
864
865# _AM_STAMP(HEADER)
866# -----------------
867# The name of the stamp file for HEADER.
868AC_DEFUN([_AM_STAMP],
869[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
870AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
871 [:.*])))/stamp-h[]_AM_STAMP_Count])
872
873
874# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
875# ------------------------------------------------------------
876# We used to try to get a real timestamp in stamp-h. But the fear is that
877# that will cause unnecessary cvs conflicts.
878AC_DEFUN([_AM_CONFIG_HEADER],
879[# Add the stamp file to the list of files AC keeps track of,
880# along with our hook.
881AC_CONFIG_HEADERS([$1],
882 [# update the timestamp
883echo 'timestamp for $1' >"_AM_STAMP([$1])"
884$2],
885 [$3])
886])# _AM_CONFIG_HEADER
887
888
889# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
890# --------------------------------------------------------------
891AC_DEFUN([AM_CONFIG_HEADER],
892[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
893])# AM_CONFIG_HEADER
894
895# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
896
897# serial 46 AC_PROG_LIBTOOL
898
899AC_DEFUN([AC_PROG_LIBTOOL],
900[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
901
902# This can be used to rebuild libtool when needed
903LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
904
905# Always use our own libtool.
906LIBTOOL='$(SHELL) $(top_builddir)/libtool'
907AC_SUBST(LIBTOOL)dnl
908
909# Prevent multiple expansion
910define([AC_PROG_LIBTOOL], [])
911])
912
913AC_DEFUN([AC_LIBTOOL_SETUP],
914[AC_PREREQ(2.13)dnl
915AC_REQUIRE([AC_ENABLE_SHARED])dnl
916AC_REQUIRE([AC_ENABLE_STATIC])dnl
917AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
918AC_REQUIRE([AC_CANONICAL_HOST])dnl
919AC_REQUIRE([AC_CANONICAL_BUILD])dnl
920AC_REQUIRE([AC_PROG_CC])dnl
921AC_REQUIRE([AC_PROG_LD])dnl
922AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
923AC_REQUIRE([AC_PROG_NM])dnl
924AC_REQUIRE([LT_AC_PROG_SED])dnl
925
926AC_REQUIRE([AC_PROG_LN_S])dnl
927AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
928AC_REQUIRE([AC_OBJEXT])dnl
929AC_REQUIRE([AC_EXEEXT])dnl
930dnl
931
932_LT_AC_PROG_ECHO_BACKSLASH
933# Only perform the check for file, if the check method requires it
934case $deplibs_check_method in
935file_magic*)
936 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
937 AC_PATH_MAGIC
mostang.com!davidm56c93292002-11-09 07:59:02 +0000938 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +0000939 ;;
940esac
941
942AC_CHECK_TOOL(RANLIB, ranlib, :)
943AC_CHECK_TOOL(STRIP, strip, :)
944
945ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
946ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
947enable_win32_dll=yes, enable_win32_dll=no)
948
949AC_ARG_ENABLE(libtool-lock,
950 [ --disable-libtool-lock avoid locking (might break parallel builds)])
951test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
952
953# Some flags need to be propagated to the compiler or linker for good
954# libtool support.
955case $host in
956*-*-irix6*)
957 # Find out which ABI we are using.
958 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
959 if AC_TRY_EVAL(ac_compile); then
960 case `/usr/bin/file conftest.$ac_objext` in
961 *32-bit*)
962 LD="${LD-ld} -32"
963 ;;
964 *N32*)
965 LD="${LD-ld} -n32"
966 ;;
967 *64-bit*)
968 LD="${LD-ld} -64"
969 ;;
970 esac
971 fi
972 rm -rf conftest*
973 ;;
974
975*-*-sco3.2v5*)
976 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
977 SAVE_CFLAGS="$CFLAGS"
978 CFLAGS="$CFLAGS -belf"
979 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
980 [AC_LANG_SAVE
981 AC_LANG_C
982 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
983 AC_LANG_RESTORE])
984 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
985 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
986 CFLAGS="$SAVE_CFLAGS"
987 fi
988 ;;
989
990ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
991[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
992 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
993 AC_CHECK_TOOL(AS, as, false)
994 AC_CHECK_TOOL(OBJDUMP, objdump, false)
995
996 # recent cygwin and mingw systems supply a stub DllMain which the user
997 # can override, but on older systems we have to supply one
998 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
999 [AC_TRY_LINK([],
1000 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1001 DllMain (0, 0, 0);],
1002 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1003
1004 case $host/$CC in
1005 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1006 # old mingw systems require "-dll" to link a DLL, while more recent ones
1007 # require "-mdll"
1008 SAVE_CFLAGS="$CFLAGS"
1009 CFLAGS="$CFLAGS -mdll"
1010 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1011 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1012 CFLAGS="$SAVE_CFLAGS" ;;
1013 *-*-cygwin* | *-*-pw32*)
1014 # cygwin systems need to pass --dll to the linker, and not link
1015 # crt.o which will require a WinMain@16 definition.
1016 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1017 esac
1018 ;;
1019 ])
1020esac
1021
1022_LT_AC_LTCONFIG_HACK
1023
1024])
1025
1026# AC_LIBTOOL_HEADER_ASSERT
1027# ------------------------
1028AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1029[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1030 [lt_cv_func_assert_works],
1031 [case $host in
1032 *-*-solaris*)
1033 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1034 case `$CC --version 2>/dev/null` in
1035 [[12]].*) lt_cv_func_assert_works=no ;;
1036 *) lt_cv_func_assert_works=yes ;;
1037 esac
1038 fi
1039 ;;
1040 esac])
1041
1042if test "x$lt_cv_func_assert_works" = xyes; then
1043 AC_CHECK_HEADERS(assert.h)
1044fi
1045])# AC_LIBTOOL_HEADER_ASSERT
1046
1047# _LT_AC_CHECK_DLFCN
1048# --------------------
1049AC_DEFUN([_LT_AC_CHECK_DLFCN],
1050[AC_CHECK_HEADERS(dlfcn.h)
1051])# _LT_AC_CHECK_DLFCN
1052
1053# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1054# ---------------------------------
1055AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1056[AC_REQUIRE([AC_CANONICAL_HOST])
1057AC_REQUIRE([AC_PROG_NM])
1058AC_REQUIRE([AC_OBJEXT])
1059# Check for command to grab the raw symbol name followed by C symbol from nm.
1060AC_MSG_CHECKING([command to parse $NM output])
1061AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1062
1063# These are sane defaults that work on at least a few old systems.
1064# [They come from Ultrix. What could be older than Ultrix?!! ;)]
1065
1066# Character class describing NM global symbol codes.
1067symcode='[[BCDEGRST]]'
1068
1069# Regexp to match symbols that can be accessed directly from C.
1070sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1071
1072# Transform the above into a raw symbol and a C symbol.
1073symxfrm='\1 \2\3 \3'
1074
1075# Transform an extracted symbol line into a proper C declaration
1076lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1077
1078# Transform an extracted symbol line into symbol name and symbol address
1079lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1080
1081# Define system-specific variables.
1082case $host_os in
1083aix*)
1084 symcode='[[BCDT]]'
1085 ;;
1086cygwin* | mingw* | pw32*)
1087 symcode='[[ABCDGISTW]]'
1088 ;;
1089hpux*) # Its linker distinguishes data from code symbols
1090 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1091 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1092 ;;
1093irix* | nonstopux*)
1094 symcode='[[BCDEGRST]]'
1095 ;;
1096osf*)
1097 symcode='[[BCDEGQRST]]'
1098 ;;
1099solaris* | sysv5*)
1100 symcode='[[BDT]]'
1101 ;;
1102sysv4)
1103 symcode='[[DFNSTU]]'
1104 ;;
1105esac
1106
1107# Handle CRLF in mingw tool chain
1108opt_cr=
1109case $host_os in
1110mingw*)
1111 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1112 ;;
1113esac
1114
1115# If we're using GNU nm, then use its standard symbol codes.
1116if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1117 symcode='[[ABCDGISTW]]'
1118fi
1119
1120# Try without a prefix undercore, then with it.
1121for ac_symprfx in "" "_"; do
1122
1123 # Write the raw and C identifiers.
1124lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1125
1126 # Check to see that the pipe works correctly.
1127 pipe_works=no
1128 rm -f conftest*
1129 cat > conftest.$ac_ext <<EOF
1130#ifdef __cplusplus
1131extern "C" {
1132#endif
1133char nm_test_var;
1134void nm_test_func(){}
1135#ifdef __cplusplus
1136}
1137#endif
1138int main(){nm_test_var='a';nm_test_func();return(0);}
1139EOF
1140
1141 if AC_TRY_EVAL(ac_compile); then
1142 # Now try to grab the symbols.
1143 nlist=conftest.nm
1144 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1145 # Try sorting and uniquifying the output.
1146 if sort "$nlist" | uniq > "$nlist"T; then
1147 mv -f "$nlist"T "$nlist"
1148 else
1149 rm -f "$nlist"T
1150 fi
1151
1152 # Make sure that we snagged all the symbols we need.
1153 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1154 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1155 cat <<EOF > conftest.$ac_ext
1156#ifdef __cplusplus
1157extern "C" {
1158#endif
1159
1160EOF
1161 # Now generate the symbol file.
1162 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1163
1164 cat <<EOF >> conftest.$ac_ext
1165#if defined (__STDC__) && __STDC__
1166# define lt_ptr void *
1167#else
1168# define lt_ptr char *
1169# define const
1170#endif
1171
1172/* The mapping between symbol names and symbols. */
1173const struct {
1174 const char *name;
1175 lt_ptr address;
1176}
1177lt_preloaded_symbols[[]] =
1178{
1179EOF
1180 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1181 cat <<\EOF >> conftest.$ac_ext
1182 {0, (lt_ptr) 0}
1183};
1184
1185#ifdef __cplusplus
1186}
1187#endif
1188EOF
1189 # Now try linking the two files.
1190 mv conftest.$ac_objext conftstm.$ac_objext
1191 save_LIBS="$LIBS"
1192 save_CFLAGS="$CFLAGS"
1193 LIBS="conftstm.$ac_objext"
1194 CFLAGS="$CFLAGS$no_builtin_flag"
1195 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
1196 pipe_works=yes
1197 fi
1198 LIBS="$save_LIBS"
1199 CFLAGS="$save_CFLAGS"
1200 else
1201 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1202 fi
1203 else
1204 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1205 fi
1206 else
1207 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1208 fi
1209 else
1210 echo "$progname: failed program was:" >&AC_FD_CC
1211 cat conftest.$ac_ext >&5
1212 fi
1213 rm -f conftest* conftst*
1214
1215 # Do not use the global_symbol_pipe unless it works.
1216 if test "$pipe_works" = yes; then
1217 break
1218 else
1219 lt_cv_sys_global_symbol_pipe=
1220 fi
1221done
1222])
1223global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1224if test -z "$lt_cv_sys_global_symbol_pipe"; then
1225 global_symbol_to_cdecl=
1226 global_symbol_to_c_name_address=
1227else
1228 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1229 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1230fi
1231if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1232then
1233 AC_MSG_RESULT(failed)
1234else
1235 AC_MSG_RESULT(ok)
1236fi
1237]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1238
1239# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1240# ---------------------------------
1241AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1242[# Find the correct PATH separator. Usually this is `:', but
1243# DJGPP uses `;' like DOS.
1244if test "X${PATH_SEPARATOR+set}" != Xset; then
1245 UNAME=${UNAME-`uname 2>/dev/null`}
1246 case X$UNAME in
1247 *-DOS) lt_cv_sys_path_separator=';' ;;
1248 *) lt_cv_sys_path_separator=':' ;;
1249 esac
1250 PATH_SEPARATOR=$lt_cv_sys_path_separator
1251fi
1252])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1253
1254# _LT_AC_PROG_ECHO_BACKSLASH
1255# --------------------------
1256# Add some code to the start of the generated configure script which
1257# will find an echo command which doesn't interpret backslashes.
1258AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1259[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1260 [AC_DIVERT_PUSH(NOTICE)])
1261_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1262
1263# Check that we are running under the correct shell.
1264SHELL=${CONFIG_SHELL-/bin/sh}
1265
1266case X$ECHO in
1267X*--fallback-echo)
1268 # Remove one level of quotation (which was required for Make).
1269 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1270 ;;
1271esac
1272
1273echo=${ECHO-echo}
1274if test "X[$]1" = X--no-reexec; then
1275 # Discard the --no-reexec flag, and continue.
1276 shift
1277elif test "X[$]1" = X--fallback-echo; then
1278 # Avoid inline document here, it may be left over
1279 :
1280elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1281 # Yippee, $echo works!
1282 :
1283else
1284 # Restart under the correct shell.
1285 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1286fi
1287
1288if test "X[$]1" = X--fallback-echo; then
1289 # used as fallback echo
1290 shift
1291 cat <<EOF
1292$*
1293EOF
1294 exit 0
1295fi
1296
1297# The HP-UX ksh and POSIX shell print the target directory to stdout
1298# if CDPATH is set.
1299if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1300
1301if test -z "$ECHO"; then
1302if test "X${echo_test_string+set}" != Xset; then
1303# find a string as large as possible, as long as the shell can cope with it
1304 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1305 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1306 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1307 echo_test_string="`eval $cmd`" &&
1308 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1309 then
1310 break
1311 fi
1312 done
1313fi
1314
1315if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1316 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1317 test "X$echo_testing_string" = "X$echo_test_string"; then
1318 :
1319else
1320 # The Solaris, AIX, and Digital Unix default echo programs unquote
1321 # backslashes. This makes it impossible to quote backslashes using
1322 # echo "$something" | sed 's/\\/\\\\/g'
1323 #
1324 # So, first we look for a working echo in the user's PATH.
1325
1326 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1327 for dir in $PATH /usr/ucb; do
1328 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1329 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1330 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1331 test "X$echo_testing_string" = "X$echo_test_string"; then
1332 echo="$dir/echo"
1333 break
1334 fi
1335 done
1336 IFS="$save_ifs"
1337
1338 if test "X$echo" = Xecho; then
1339 # We didn't find a better echo, so look for alternatives.
1340 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1341 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1342 test "X$echo_testing_string" = "X$echo_test_string"; then
1343 # This shell has a builtin print -r that does the trick.
1344 echo='print -r'
1345 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1346 test "X$CONFIG_SHELL" != X/bin/ksh; then
1347 # If we have ksh, try running configure again with it.
1348 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1349 export ORIGINAL_CONFIG_SHELL
1350 CONFIG_SHELL=/bin/ksh
1351 export CONFIG_SHELL
1352 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1353 else
1354 # Try using printf.
1355 echo='printf %s\n'
1356 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1357 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1358 test "X$echo_testing_string" = "X$echo_test_string"; then
1359 # Cool, printf works
1360 :
1361 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1362 test "X$echo_testing_string" = 'X\t' &&
1363 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1364 test "X$echo_testing_string" = "X$echo_test_string"; then
1365 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1366 export CONFIG_SHELL
1367 SHELL="$CONFIG_SHELL"
1368 export SHELL
1369 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1370 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1371 test "X$echo_testing_string" = 'X\t' &&
1372 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1373 test "X$echo_testing_string" = "X$echo_test_string"; then
1374 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1375 else
1376 # maybe with a smaller string...
1377 prev=:
1378
1379 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1380 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1381 then
1382 break
1383 fi
1384 prev="$cmd"
1385 done
1386
1387 if test "$prev" != 'sed 50q "[$]0"'; then
1388 echo_test_string=`eval $prev`
1389 export echo_test_string
1390 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1391 else
1392 # Oops. We lost completely, so just stick with echo.
1393 echo=echo
1394 fi
1395 fi
1396 fi
1397 fi
1398fi
1399fi
1400
1401# Copy echo and quote the copy suitably for passing to libtool from
1402# the Makefile, instead of quoting the original, which is used later.
1403ECHO=$echo
1404if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1405 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1406fi
1407
1408AC_SUBST(ECHO)
1409AC_DIVERT_POP
1410])# _LT_AC_PROG_ECHO_BACKSLASH
1411
1412# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1413# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1414# ------------------------------------------------------------------
1415AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1416[if test "$cross_compiling" = yes; then :
1417 [$4]
1418else
1419 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1420 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1421 lt_status=$lt_dlunknown
1422 cat > conftest.$ac_ext <<EOF
1423[#line __oline__ "configure"
1424#include "confdefs.h"
1425
1426#if HAVE_DLFCN_H
1427#include <dlfcn.h>
1428#endif
1429
1430#include <stdio.h>
1431
1432#ifdef RTLD_GLOBAL
1433# define LT_DLGLOBAL RTLD_GLOBAL
1434#else
1435# ifdef DL_GLOBAL
1436# define LT_DLGLOBAL DL_GLOBAL
1437# else
1438# define LT_DLGLOBAL 0
1439# endif
1440#endif
1441
1442/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1443 find out it does not work in some platform. */
1444#ifndef LT_DLLAZY_OR_NOW
1445# ifdef RTLD_LAZY
1446# define LT_DLLAZY_OR_NOW RTLD_LAZY
1447# else
1448# ifdef DL_LAZY
1449# define LT_DLLAZY_OR_NOW DL_LAZY
1450# else
1451# ifdef RTLD_NOW
1452# define LT_DLLAZY_OR_NOW RTLD_NOW
1453# else
1454# ifdef DL_NOW
1455# define LT_DLLAZY_OR_NOW DL_NOW
1456# else
1457# define LT_DLLAZY_OR_NOW 0
1458# endif
1459# endif
1460# endif
1461# endif
1462#endif
1463
1464#ifdef __cplusplus
1465extern "C" void exit (int);
1466#endif
1467
1468void fnord() { int i=42;}
1469int main ()
1470{
1471 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1472 int status = $lt_dlunknown;
1473
1474 if (self)
1475 {
1476 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1477 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1478 /* dlclose (self); */
1479 }
1480
1481 exit (status);
1482}]
1483EOF
1484 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1485 (./conftest; exit; ) 2>/dev/null
1486 lt_status=$?
1487 case x$lt_status in
1488 x$lt_dlno_uscore) $1 ;;
1489 x$lt_dlneed_uscore) $2 ;;
1490 x$lt_unknown|x*) $3 ;;
1491 esac
1492 else :
1493 # compilation failed
1494 $3
1495 fi
1496fi
1497rm -fr conftest*
1498])# _LT_AC_TRY_DLOPEN_SELF
1499
1500# AC_LIBTOOL_DLOPEN_SELF
1501# -------------------
1502AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1503[if test "x$enable_dlopen" != xyes; then
1504 enable_dlopen=unknown
1505 enable_dlopen_self=unknown
1506 enable_dlopen_self_static=unknown
1507else
1508 lt_cv_dlopen=no
1509 lt_cv_dlopen_libs=
1510
1511 case $host_os in
1512 beos*)
1513 lt_cv_dlopen="load_add_on"
1514 lt_cv_dlopen_libs=
1515 lt_cv_dlopen_self=yes
1516 ;;
1517
1518 cygwin* | mingw* | pw32*)
1519 lt_cv_dlopen="LoadLibrary"
1520 lt_cv_dlopen_libs=
1521 ;;
1522
1523 *)
1524 AC_CHECK_FUNC([shl_load],
1525 [lt_cv_dlopen="shl_load"],
1526 [AC_CHECK_LIB([dld], [shl_load],
1527 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1528 [AC_CHECK_FUNC([dlopen],
1529 [lt_cv_dlopen="dlopen"],
1530 [AC_CHECK_LIB([dl], [dlopen],
1531 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1532 [AC_CHECK_LIB([svld], [dlopen],
1533 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1534 [AC_CHECK_LIB([dld], [dld_link],
1535 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1536 ])
1537 ])
1538 ])
1539 ])
1540 ])
1541 ;;
1542 esac
1543
1544 if test "x$lt_cv_dlopen" != xno; then
1545 enable_dlopen=yes
1546 else
1547 enable_dlopen=no
1548 fi
1549
1550 case $lt_cv_dlopen in
1551 dlopen)
1552 save_CPPFLAGS="$CPPFLAGS"
1553 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1554 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1555
1556 save_LDFLAGS="$LDFLAGS"
1557 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1558
1559 save_LIBS="$LIBS"
1560 LIBS="$lt_cv_dlopen_libs $LIBS"
1561
1562 AC_CACHE_CHECK([whether a program can dlopen itself],
1563 lt_cv_dlopen_self, [dnl
1564 _LT_AC_TRY_DLOPEN_SELF(
1565 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1566 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1567 ])
1568
1569 if test "x$lt_cv_dlopen_self" = xyes; then
1570 LDFLAGS="$LDFLAGS $link_static_flag"
1571 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1572 lt_cv_dlopen_self_static, [dnl
1573 _LT_AC_TRY_DLOPEN_SELF(
1574 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1575 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1576 ])
1577 fi
1578
1579 CPPFLAGS="$save_CPPFLAGS"
1580 LDFLAGS="$save_LDFLAGS"
1581 LIBS="$save_LIBS"
1582 ;;
1583 esac
1584
1585 case $lt_cv_dlopen_self in
1586 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1587 *) enable_dlopen_self=unknown ;;
1588 esac
1589
1590 case $lt_cv_dlopen_self_static in
1591 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1592 *) enable_dlopen_self_static=unknown ;;
1593 esac
1594fi
1595])# AC_LIBTOOL_DLOPEN_SELF
1596
1597AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1598[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1599# Sed substitution that helps us do robust quoting. It backslashifies
1600# metacharacters that are still active within double-quoted strings.
1601Xsed='sed -e s/^X//'
1602sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1603
1604# Same as above, but do not quote variable references.
1605double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1606
1607# Sed substitution to delay expansion of an escaped shell variable in a
1608# double_quote_subst'ed string.
1609delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1610
1611# Constants:
1612rm="rm -f"
1613
1614# Global variables:
1615default_ofile=libtool
1616can_build_shared=yes
1617
1618# All known linkers require a `.a' archive for static linking (except M$VC,
1619# which needs '.lib').
1620libext=a
1621ltmain="$ac_aux_dir/ltmain.sh"
1622ofile="$default_ofile"
1623with_gnu_ld="$lt_cv_prog_gnu_ld"
1624need_locks="$enable_libtool_lock"
1625
1626old_CC="$CC"
1627old_CFLAGS="$CFLAGS"
1628
1629# Set sane defaults for various variables
1630test -z "$AR" && AR=ar
1631test -z "$AR_FLAGS" && AR_FLAGS=cru
1632test -z "$AS" && AS=as
1633test -z "$CC" && CC=cc
1634test -z "$DLLTOOL" && DLLTOOL=dlltool
1635test -z "$LD" && LD=ld
1636test -z "$LN_S" && LN_S="ln -s"
1637test -z "$MAGIC_CMD" && MAGIC_CMD=file
1638test -z "$NM" && NM=nm
1639test -z "$OBJDUMP" && OBJDUMP=objdump
1640test -z "$RANLIB" && RANLIB=:
1641test -z "$STRIP" && STRIP=:
1642test -z "$ac_objext" && ac_objext=o
1643
1644if test x"$host" != x"$build"; then
1645 ac_tool_prefix=${host_alias}-
1646else
1647 ac_tool_prefix=
1648fi
1649
1650# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1651case $host_os in
1652linux-gnu*) ;;
1653linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1654esac
1655
1656case $host_os in
1657aix3*)
1658 # AIX sometimes has problems with the GCC collect2 program. For some
1659 # reason, if we set the COLLECT_NAMES environment variable, the problems
1660 # vanish in a puff of smoke.
1661 if test "X${COLLECT_NAMES+set}" != Xset; then
1662 COLLECT_NAMES=
1663 export COLLECT_NAMES
1664 fi
1665 ;;
1666esac
1667
1668# Determine commands to create old-style static archives.
1669old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1670old_postinstall_cmds='chmod 644 $oldlib'
1671old_postuninstall_cmds=
1672
1673if test -n "$RANLIB"; then
1674 case $host_os in
1675 openbsd*)
1676 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1677 ;;
1678 *)
1679 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1680 ;;
1681 esac
1682 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1683fi
1684
1685# Allow CC to be a program name with arguments.
1686set dummy $CC
1687compiler="[$]2"
1688
1689AC_MSG_CHECKING([for objdir])
1690rm -f .libs 2>/dev/null
1691mkdir .libs 2>/dev/null
1692if test -d .libs; then
1693 objdir=.libs
1694else
1695 # MS-DOS does not allow filenames that begin with a dot.
1696 objdir=_libs
1697fi
1698rmdir .libs 2>/dev/null
1699AC_MSG_RESULT($objdir)
1700
1701
1702AC_ARG_WITH(pic,
1703[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1704pic_mode="$withval", pic_mode=default)
1705test -z "$pic_mode" && pic_mode=default
1706
1707# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1708# in isolation, and that seeing it set (from the cache) indicates that
1709# the associated values are set (in the cache) correctly too.
1710AC_MSG_CHECKING([for $compiler option to produce PIC])
1711AC_CACHE_VAL(lt_cv_prog_cc_pic,
1712[ lt_cv_prog_cc_pic=
1713 lt_cv_prog_cc_shlib=
1714 lt_cv_prog_cc_wl=
1715 lt_cv_prog_cc_static=
1716 lt_cv_prog_cc_no_builtin=
1717 lt_cv_prog_cc_can_build_shared=$can_build_shared
1718
1719 if test "$GCC" = yes; then
1720 lt_cv_prog_cc_wl='-Wl,'
1721 lt_cv_prog_cc_static='-static'
1722
1723 case $host_os in
1724 aix*)
1725 # Below there is a dirty hack to force normal static linking with -ldl
1726 # The problem is because libdl dynamically linked with both libc and
1727 # libC (AIX C++ library), which obviously doesn't included in libraries
1728 # list by gcc. This cause undefined symbols with -static flags.
1729 # This hack allows C programs to be linked with "-static -ldl", but
1730 # not sure about C++ programs.
1731 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1732 ;;
1733 amigaos*)
1734 # FIXME: we need at least 68020 code to build shared libraries, but
1735 # adding the `-m68020' flag to GCC prevents building anything better,
1736 # like `-m68040'.
1737 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1738 ;;
1739 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1740 # PIC is the default for these OSes.
1741 ;;
1742 darwin* | rhapsody*)
1743 # PIC is the default on this platform
1744 # Common symbols not allowed in MH_DYLIB files
1745 lt_cv_prog_cc_pic='-fno-common'
1746 ;;
1747 cygwin* | mingw* | pw32* | os2*)
1748 # This hack is so that the source file can tell whether it is being
1749 # built for inclusion in a dll (and should export symbols for example).
1750 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1751 ;;
1752 sysv4*MP*)
1753 if test -d /usr/nec; then
1754 lt_cv_prog_cc_pic=-Kconform_pic
1755 fi
1756 ;;
1757 *)
1758 lt_cv_prog_cc_pic='-fPIC'
1759 ;;
1760 esac
1761 else
1762 # PORTME Check for PIC flags for the system compiler.
1763 case $host_os in
1764 aix3* | aix4* | aix5*)
1765 lt_cv_prog_cc_wl='-Wl,'
1766 # All AIX code is PIC.
1767 if test "$host_cpu" = ia64; then
1768 # AIX 5 now supports IA64 processor
1769 lt_cv_prog_cc_static='-Bstatic'
1770 else
1771 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1772 fi
1773 ;;
1774
1775 hpux9* | hpux10* | hpux11*)
1776 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1777 lt_cv_prog_cc_wl='-Wl,'
1778 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1779 lt_cv_prog_cc_pic='+Z'
1780 ;;
1781
1782 irix5* | irix6* | nonstopux*)
1783 lt_cv_prog_cc_wl='-Wl,'
1784 lt_cv_prog_cc_static='-non_shared'
1785 # PIC (with -KPIC) is the default.
1786 ;;
1787
1788 cygwin* | mingw* | pw32* | os2*)
1789 # This hack is so that the source file can tell whether it is being
1790 # built for inclusion in a dll (and should export symbols for example).
1791 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1792 ;;
1793
1794 newsos6)
1795 lt_cv_prog_cc_pic='-KPIC'
1796 lt_cv_prog_cc_static='-Bstatic'
1797 ;;
1798
1799 osf3* | osf4* | osf5*)
1800 # All OSF/1 code is PIC.
1801 lt_cv_prog_cc_wl='-Wl,'
1802 lt_cv_prog_cc_static='-non_shared'
1803 ;;
1804
1805 sco3.2v5*)
1806 lt_cv_prog_cc_pic='-Kpic'
1807 lt_cv_prog_cc_static='-dn'
1808 lt_cv_prog_cc_shlib='-belf'
1809 ;;
1810
1811 solaris*)
1812 lt_cv_prog_cc_pic='-KPIC'
1813 lt_cv_prog_cc_static='-Bstatic'
1814 lt_cv_prog_cc_wl='-Wl,'
1815 ;;
1816
1817 sunos4*)
1818 lt_cv_prog_cc_pic='-PIC'
1819 lt_cv_prog_cc_static='-Bstatic'
1820 lt_cv_prog_cc_wl='-Qoption ld '
1821 ;;
1822
1823 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1824 lt_cv_prog_cc_pic='-KPIC'
1825 lt_cv_prog_cc_static='-Bstatic'
1826 lt_cv_prog_cc_wl='-Wl,'
1827 ;;
1828
1829 uts4*)
1830 lt_cv_prog_cc_pic='-pic'
1831 lt_cv_prog_cc_static='-Bstatic'
1832 ;;
1833
1834 sysv4*MP*)
1835 if test -d /usr/nec ;then
1836 lt_cv_prog_cc_pic='-Kconform_pic'
1837 lt_cv_prog_cc_static='-Bstatic'
1838 fi
1839 ;;
1840
1841 *)
1842 lt_cv_prog_cc_can_build_shared=no
1843 ;;
1844 esac
1845 fi
1846])
1847if test -z "$lt_cv_prog_cc_pic"; then
1848 AC_MSG_RESULT([none])
1849else
1850 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1851
1852 # Check to make sure the pic_flag actually works.
1853 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1854 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1855 save_CFLAGS="$CFLAGS"
1856 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1857 AC_TRY_COMPILE([], [], [dnl
1858 case $host_os in
1859 hpux9* | hpux10* | hpux11*)
1860 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1861 # they create non-PIC objects. So, if there were any warnings, we
1862 # assume that PIC is not supported.
1863 if test -s conftest.err; then
1864 lt_cv_prog_cc_pic_works=no
1865 else
1866 lt_cv_prog_cc_pic_works=yes
1867 fi
1868 ;;
1869 *)
1870 lt_cv_prog_cc_pic_works=yes
1871 ;;
1872 esac
1873 ], [dnl
1874 lt_cv_prog_cc_pic_works=no
1875 ])
1876 CFLAGS="$save_CFLAGS"
1877 ])
1878
1879 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1880 lt_cv_prog_cc_pic=
1881 lt_cv_prog_cc_can_build_shared=no
1882 else
1883 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1884 fi
1885
1886 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1887fi
1888
1889# Check for any special shared library compilation flags.
1890if test -n "$lt_cv_prog_cc_shlib"; then
1891 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1892 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1893 else
1894 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1895 lt_cv_prog_cc_can_build_shared=no
1896 fi
1897fi
1898
1899AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1900AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1901 lt_cv_prog_cc_static_works=no
1902 save_LDFLAGS="$LDFLAGS"
1903 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1904 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1905 LDFLAGS="$save_LDFLAGS"
1906])
1907
1908# Belt *and* braces to stop my trousers falling down:
1909test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1910AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1911
1912pic_flag="$lt_cv_prog_cc_pic"
1913special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1914wl="$lt_cv_prog_cc_wl"
1915link_static_flag="$lt_cv_prog_cc_static"
1916no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1917can_build_shared="$lt_cv_prog_cc_can_build_shared"
1918
1919
1920# Check to see if options -o and -c are simultaneously supported by compiler
1921AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1922AC_CACHE_VAL([lt_cv_compiler_c_o], [
1923$rm -r conftest 2>/dev/null
1924mkdir conftest
1925cd conftest
1926echo "int some_variable = 0;" > conftest.$ac_ext
1927mkdir out
1928# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1929# that will create temporary files in the current directory regardless of
1930# the output directory. Thus, making CWD read-only will cause this test
1931# to fail, enabling locking or at least warning the user not to do parallel
1932# builds.
1933chmod -w .
1934save_CFLAGS="$CFLAGS"
1935CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1936compiler_c_o=no
1937if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1938 # The compiler can only warn and ignore the option if not recognized
1939 # So say no if there are warnings
1940 if test -s out/conftest.err; then
1941 lt_cv_compiler_c_o=no
1942 else
1943 lt_cv_compiler_c_o=yes
mostang.com!davidm56c93292002-11-09 07:59:02 +00001944 fi
1945else
mostang.com!davidm0440c532003-01-17 18:12:55 +00001946 # Append any errors to the config.log.
1947 cat out/conftest.err 1>&AC_FD_CC
1948 lt_cv_compiler_c_o=no
1949fi
1950CFLAGS="$save_CFLAGS"
1951chmod u+w .
1952$rm conftest* out/*
1953rmdir out
1954cd ..
1955rmdir conftest
1956$rm -r conftest 2>/dev/null
1957])
1958compiler_c_o=$lt_cv_compiler_c_o
1959AC_MSG_RESULT([$compiler_c_o])
1960
1961if test x"$compiler_c_o" = x"yes"; then
1962 # Check to see if we can write to a .lo
1963 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1964 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1965 lt_cv_compiler_o_lo=no
1966 save_CFLAGS="$CFLAGS"
1967 CFLAGS="$CFLAGS -c -o conftest.lo"
1968 save_objext="$ac_objext"
1969 ac_objext=lo
1970 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1971 # The compiler can only warn and ignore the option if not recognized
1972 # So say no if there are warnings
1973 if test -s conftest.err; then
1974 lt_cv_compiler_o_lo=no
1975 else
1976 lt_cv_compiler_o_lo=yes
1977 fi
1978 ])
1979 ac_objext="$save_objext"
1980 CFLAGS="$save_CFLAGS"
1981 ])
1982 compiler_o_lo=$lt_cv_compiler_o_lo
1983 AC_MSG_RESULT([$compiler_o_lo])
1984else
1985 compiler_o_lo=no
1986fi
1987
1988# Check to see if we can do hard links to lock some files if needed
1989hard_links="nottested"
1990if test "$compiler_c_o" = no && test "$need_locks" != no; then
1991 # do not overwrite the value of need_locks provided by the user
1992 AC_MSG_CHECKING([if we can lock with hard links])
1993 hard_links=yes
1994 $rm conftest*
1995 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1996 touch conftest.a
1997 ln conftest.a conftest.b 2>&5 || hard_links=no
1998 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1999 AC_MSG_RESULT([$hard_links])
2000 if test "$hard_links" = no; then
2001 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2002 need_locks=warn
2003 fi
2004else
2005 need_locks=no
2006fi
2007
2008if test "$GCC" = yes; then
2009 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2010 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2011 echo "int some_variable = 0;" > conftest.$ac_ext
2012 save_CFLAGS="$CFLAGS"
2013 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2014 compiler_rtti_exceptions=no
2015 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2016 # The compiler can only warn and ignore the option if not recognized
2017 # So say no if there are warnings
2018 if test -s conftest.err; then
2019 compiler_rtti_exceptions=no
2020 else
2021 compiler_rtti_exceptions=yes
2022 fi
2023 ])
2024 CFLAGS="$save_CFLAGS"
2025 AC_MSG_RESULT([$compiler_rtti_exceptions])
2026
2027 if test "$compiler_rtti_exceptions" = "yes"; then
2028 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2029 else
2030 no_builtin_flag=' -fno-builtin'
2031 fi
2032fi
2033
2034# See if the linker supports building shared libraries.
2035AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2036
2037allow_undefined_flag=
2038no_undefined_flag=
2039need_lib_prefix=unknown
2040need_version=unknown
2041# when you set need_version to no, make sure it does not cause -set_version
2042# flags to be left without arguments
2043archive_cmds=
2044archive_expsym_cmds=
2045old_archive_from_new_cmds=
2046old_archive_from_expsyms_cmds=
2047export_dynamic_flag_spec=
2048whole_archive_flag_spec=
2049thread_safe_flag_spec=
2050hardcode_into_libs=no
2051hardcode_libdir_flag_spec=
2052hardcode_libdir_separator=
2053hardcode_direct=no
2054hardcode_minus_L=no
2055hardcode_shlibpath_var=unsupported
2056runpath_var=
2057link_all_deplibs=unknown
2058always_export_symbols=no
2059export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2060# include_expsyms should be a list of space-separated symbols to be *always*
2061# included in the symbol list
2062include_expsyms=
2063# exclude_expsyms can be an egrep regular expression of symbols to exclude
2064# it will be wrapped by ` (' and `)$', so one must not match beginning or
2065# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2066# as well as any symbol that contains `d'.
2067exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2068# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2069# platforms (ab)use it in PIC code, but their linkers get confused if
2070# the symbol is explicitly referenced. Since portable code cannot
2071# rely on this symbol name, it's probably fine to never include it in
2072# preloaded symbol tables.
2073extract_expsyms_cmds=
2074
2075case $host_os in
2076cygwin* | mingw* | pw32*)
2077 # FIXME: the MSVC++ port hasn't been tested in a loooong time
2078 # When not using gcc, we currently assume that we are using
2079 # Microsoft Visual C++.
2080 if test "$GCC" != yes; then
2081 with_gnu_ld=no
2082 fi
2083 ;;
2084openbsd*)
2085 with_gnu_ld=no
2086 ;;
2087esac
2088
2089ld_shlibs=yes
2090if test "$with_gnu_ld" = yes; then
2091 # If archive_cmds runs LD, not CC, wlarc should be empty
2092 wlarc='${wl}'
2093
2094 # See if GNU ld supports shared libraries.
2095 case $host_os in
2096 aix3* | aix4* | aix5*)
2097 # On AIX, the GNU linker is very broken
2098 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2099 ld_shlibs=no
2100 cat <<EOF 1>&2
2101
2102*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2103*** to be unable to reliably create shared libraries on AIX.
2104*** Therefore, libtool is disabling shared libraries support. If you
2105*** really care for shared libraries, you may want to modify your PATH
2106*** so that a non-GNU linker is found, and then restart.
2107
2108EOF
2109 ;;
2110
2111 amigaos*)
2112 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
2113 hardcode_libdir_flag_spec='-L$libdir'
2114 hardcode_minus_L=yes
2115
2116 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2117 # that the semantics of dynamic libraries on AmigaOS, at least up
2118 # to version 4, is to share data among multiple programs linked
2119 # with the same dynamic library. Since this doesn't match the
2120 # behavior of shared libraries on other platforms, we can use
2121 # them.
2122 ld_shlibs=no
2123 ;;
2124
2125 beos*)
2126 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2127 allow_undefined_flag=unsupported
2128 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2129 # support --undefined. This deserves some investigation. FIXME
2130 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2131 else
2132 ld_shlibs=no
2133 fi
2134 ;;
2135
2136 cygwin* | mingw* | pw32*)
2137 # hardcode_libdir_flag_spec is actually meaningless, as there is
2138 # no search path for DLLs.
2139 hardcode_libdir_flag_spec='-L$libdir'
2140 allow_undefined_flag=unsupported
2141 always_export_symbols=yes
2142
2143 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2144 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2145 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2146 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2147 else $CC -o impgen impgen.c ; fi)~
2148 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2149
2150 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2151
2152 # cygwin and mingw dlls have different entry points and sets of symbols
2153 # to exclude.
2154 # FIXME: what about values for MSVC?
2155 dll_entry=__cygwin_dll_entry@12
2156 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2157 case $host_os in
2158 mingw*)
2159 # mingw values
2160 dll_entry=_DllMainCRTStartup@12
2161 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2162 ;;
2163 esac
2164
2165 # mingw and cygwin differ, and it's simplest to just exclude the union
2166 # of the two symbol sets.
2167 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2168
2169 # recent cygwin and mingw systems supply a stub DllMain which the user
2170 # can override, but on older systems we have to supply one (in ltdll.c)
2171 if test "x$lt_cv_need_dllmain" = "xyes"; then
2172 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2173 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
2174 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2175 else
2176 ltdll_obj=
2177 ltdll_cmds=
2178 fi
2179
2180 # Extract the symbol export list from an `--export-all' def file,
2181 # then regenerate the def file from the symbol export list, so that
2182 # the compiled dll only exports the symbol export list.
2183 # Be careful not to strip the DATA tag left be newer dlltools.
2184 export_symbols_cmds="$ltdll_cmds"'
2185 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2186 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2187
2188 # If the export-symbols file already is a .def file (1st line
2189 # is EXPORTS), use it as is.
2190 # If DATA tags from a recent dlltool are present, honour them!
2191 archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2192 cp $export_symbols $output_objdir/$soname-def;
2193 else
2194 echo EXPORTS > $output_objdir/$soname-def;
2195 _lt_hint=1;
2196 cat $export_symbols | while read symbol; do
2197 set dummy \$symbol;
2198 case \[$]# in
2199 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2200 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2201 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2202 esac;
2203 _lt_hint=`expr 1 + \$_lt_hint`;
2204 done;
2205 fi~
2206 '"$ltdll_cmds"'
2207 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2208 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2209 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2210 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2211 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2212 ;;
2213
2214 netbsd*)
2215 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2216 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2217 wlarc=
2218 else
2219 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2220 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2221 fi
2222 ;;
2223
2224 solaris* | sysv5*)
2225 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2226 ld_shlibs=no
2227 cat <<EOF 1>&2
2228
2229*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2230*** create shared libraries on Solaris systems. Therefore, libtool
2231*** is disabling shared libraries support. We urge you to upgrade GNU
2232*** binutils to release 2.9.1 or newer. Another option is to modify
2233*** your PATH or compiler configuration so that the native linker is
2234*** used, and then restart.
2235
2236EOF
2237 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2238 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2239 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2240 else
2241 ld_shlibs=no
2242 fi
2243 ;;
2244
2245 sunos4*)
2246 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2247 wlarc=
2248 hardcode_direct=yes
2249 hardcode_shlibpath_var=no
2250 ;;
2251
2252 *)
2253 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2254 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2255 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2256 else
2257 ld_shlibs=no
2258 fi
2259 ;;
2260 esac
2261
2262 if test "$ld_shlibs" = yes; then
2263 runpath_var=LD_RUN_PATH
2264 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2265 export_dynamic_flag_spec='${wl}--export-dynamic'
2266 case $host_os in
2267 cygwin* | mingw* | pw32*)
2268 # dlltool doesn't understand --whole-archive et. al.
2269 whole_archive_flag_spec=
2270 ;;
2271 *)
2272 # ancient GNU ld didn't support --whole-archive et. al.
2273 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2274 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2275 else
2276 whole_archive_flag_spec=
2277 fi
2278 ;;
2279 esac
2280 fi
2281else
2282 # PORTME fill in a description of your system's linker (not GNU ld)
2283 case $host_os in
2284 aix3*)
2285 allow_undefined_flag=unsupported
2286 always_export_symbols=yes
2287 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2288 # Note: this linker hardcodes the directories in LIBPATH if there
2289 # are no directories specified by -L.
2290 hardcode_minus_L=yes
2291 if test "$GCC" = yes && test -z "$link_static_flag"; then
2292 # Neither direct hardcoding nor static linking is supported with a
2293 # broken collect2.
2294 hardcode_direct=unsupported
2295 fi
2296 ;;
2297
2298 aix4* | aix5*)
2299 if test "$host_cpu" = ia64; then
2300 # On IA64, the linker does run time linking by default, so we don't
2301 # have to do anything special.
2302 aix_use_runtimelinking=no
2303 exp_sym_flag='-Bexport'
2304 no_entry_flag=""
2305 else
2306 aix_use_runtimelinking=no
2307
2308 # Test if we are trying to use run time linking or normal
2309 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2310 # need to do runtime linking.
2311 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2312 for ld_flag in $LDFLAGS; do
2313 case $ld_flag in
2314 *-brtl*)
2315 aix_use_runtimelinking=yes
2316 break
2317 ;;
2318 esac
2319 done
2320 esac
2321
2322 exp_sym_flag='-bexport'
2323 no_entry_flag='-bnoentry'
2324 fi
2325
2326 # When large executables or shared objects are built, AIX ld can
2327 # have problems creating the table of contents. If linking a library
2328 # or program results in "error TOC overflow" add -mminimal-toc to
2329 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2330 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2331
2332 hardcode_direct=yes
2333 archive_cmds=''
2334 hardcode_libdir_separator=':'
2335 if test "$GCC" = yes; then
2336 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2337 collect2name=`${CC} -print-prog-name=collect2`
2338 if test -f "$collect2name" && \
2339 strings "$collect2name" | grep resolve_lib_name >/dev/null
2340 then
2341 # We have reworked collect2
2342 hardcode_direct=yes
2343 else
2344 # We have old collect2
2345 hardcode_direct=unsupported
2346 # It fails to find uninstalled libraries when the uninstalled
2347 # path is not listed in the libpath. Setting hardcode_minus_L
2348 # to unsupported forces relinking
2349 hardcode_minus_L=yes
2350 hardcode_libdir_flag_spec='-L$libdir'
2351 hardcode_libdir_separator=
2352 fi
2353 esac
2354
2355 shared_flag='-shared'
2356 else
2357 # not using gcc
2358 if test "$host_cpu" = ia64; then
2359 shared_flag='${wl}-G'
2360 else
2361 if test "$aix_use_runtimelinking" = yes; then
2362 shared_flag='${wl}-G'
2363 else
2364 shared_flag='${wl}-bM:SRE'
2365 fi
2366 fi
2367 fi
2368
2369 # It seems that -bexpall can do strange things, so it is better to
2370 # generate a list of symbols to export.
2371 always_export_symbols=yes
2372 if test "$aix_use_runtimelinking" = yes; then
2373 # Warning - without using the other runtime loading flags (-brtl),
2374 # -berok will link without error, but may produce a broken library.
2375 allow_undefined_flag='-berok'
2376 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2377 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2378 else
2379 if test "$host_cpu" = ia64; then
2380 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2381 allow_undefined_flag="-z nodefs"
2382 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2383 else
2384 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2385 # Warning - without using the other run time loading flags,
2386 # -berok will link without error, but may produce a broken library.
2387 allow_undefined_flag='${wl}-berok'
2388 # This is a bit strange, but is similar to how AIX traditionally builds
2389 # it's shared libraries.
2390 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2391 fi
2392 fi
2393 ;;
2394
2395 amigaos*)
2396 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
2397 hardcode_libdir_flag_spec='-L$libdir'
2398 hardcode_minus_L=yes
2399 # see comment about different semantics on the GNU ld section
2400 ld_shlibs=no
2401 ;;
2402
2403 cygwin* | mingw* | pw32*)
2404 # When not using gcc, we currently assume that we are using
2405 # Microsoft Visual C++.
2406 # hardcode_libdir_flag_spec is actually meaningless, as there is
2407 # no search path for DLLs.
2408 hardcode_libdir_flag_spec=' '
2409 allow_undefined_flag=unsupported
2410 # Tell ltmain to make .lib files, not .a files.
2411 libext=lib
2412 # FIXME: Setting linknames here is a bad hack.
2413 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2414 # The linker will automatically build a .lib file if we build a DLL.
2415 old_archive_from_new_cmds='true'
2416 # FIXME: Should let the user specify the lib program.
2417 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2418 fix_srcfile_path='`cygpath -w "$srcfile"`'
2419 ;;
2420
2421 darwin* | rhapsody*)
2422 case "$host_os" in
2423 rhapsody* | darwin1.[[012]])
2424 allow_undefined_flag='-undefined suppress'
2425 ;;
2426 *) # Darwin 1.3 on
2427 allow_undefined_flag='-flat_namespace -undefined suppress'
2428 ;;
2429 esac
2430 # FIXME: Relying on posixy $() will cause problems for
2431 # cross-compilation, but unfortunately the echo tests do not
2432 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
2433 # `"' quotes if we put them in here... so don't!
2434 archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2435 # We need to add '_' to the symbols in $export_symbols first
2436 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2437 hardcode_direct=yes
2438 hardcode_shlibpath_var=no
2439 whole_archive_flag_spec='-all_load $convenience'
2440 ;;
2441
2442 freebsd1*)
2443 ld_shlibs=no
2444 ;;
2445
2446 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2447 # support. Future versions do this automatically, but an explicit c++rt0.o
2448 # does not break anything, and helps significantly (at the cost of a little
2449 # extra space).
2450 freebsd2.2*)
2451 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2452 hardcode_libdir_flag_spec='-R$libdir'
2453 hardcode_direct=yes
2454 hardcode_shlibpath_var=no
2455 ;;
2456
2457 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2458 freebsd2*)
2459 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2460 hardcode_direct=yes
2461 hardcode_minus_L=yes
2462 hardcode_shlibpath_var=no
2463 ;;
2464
2465 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2466 freebsd*)
2467 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2468 hardcode_libdir_flag_spec='-R$libdir'
2469 hardcode_direct=yes
2470 hardcode_shlibpath_var=no
2471 ;;
2472
2473 hpux9* | hpux10* | hpux11*)
2474 case $host_os in
2475 hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
2476 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2477 esac
2478 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2479 hardcode_libdir_separator=:
2480 hardcode_direct=yes
2481 hardcode_minus_L=yes # Not in the search PATH, but as the default
2482 # location of the library.
2483 export_dynamic_flag_spec='${wl}-E'
2484 ;;
2485
2486 irix5* | irix6* | nonstopux*)
2487 if test "$GCC" = yes; then
2488 archive_cmds='$CC -shared $libobjs $deplibs $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'
2489 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2490 else
2491 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2492 hardcode_libdir_flag_spec='-rpath $libdir'
2493 fi
2494 hardcode_libdir_separator=:
2495 link_all_deplibs=yes
2496 ;;
2497
2498 netbsd*)
2499 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2500 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2501 else
2502 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2503 fi
2504 hardcode_libdir_flag_spec='-R$libdir'
2505 hardcode_direct=yes
2506 hardcode_shlibpath_var=no
2507 ;;
2508
2509 newsos6)
2510 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2511 hardcode_direct=yes
2512 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2513 hardcode_libdir_separator=:
2514 hardcode_shlibpath_var=no
2515 ;;
2516
2517 openbsd*)
2518 hardcode_direct=yes
2519 hardcode_shlibpath_var=no
2520 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2521 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2522 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2523 export_dynamic_flag_spec='${wl}-E'
2524 else
2525 case "$host_os" in
2526 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2527 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2528 hardcode_libdir_flag_spec='-R$libdir'
2529 ;;
2530 *)
2531 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2532 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2533 ;;
2534 esac
2535 fi
2536 ;;
2537
2538 os2*)
2539 hardcode_libdir_flag_spec='-L$libdir'
2540 hardcode_minus_L=yes
2541 allow_undefined_flag=unsupported
2542 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
2543 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2544 ;;
2545
2546 osf3*)
2547 if test "$GCC" = yes; then
2548 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2549 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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'
2550 else
2551 allow_undefined_flag=' -expect_unresolved \*'
2552 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2553 fi
2554 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2555 hardcode_libdir_separator=:
2556 ;;
2557
2558 osf4* | osf5*) # as osf3* with the addition of -msym flag
2559 if test "$GCC" = yes; then
2560 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2561 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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'
2562 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2563 else
2564 allow_undefined_flag=' -expect_unresolved \*'
2565 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2566 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2567 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2568
2569 #Both c and cxx compiler support -rpath directly
2570 hardcode_libdir_flag_spec='-rpath $libdir'
2571 fi
2572 hardcode_libdir_separator=:
2573 ;;
2574
2575 sco3.2v5*)
2576 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2577 hardcode_shlibpath_var=no
2578 runpath_var=LD_RUN_PATH
2579 hardcode_runpath_var=yes
2580 export_dynamic_flag_spec='${wl}-Bexport'
2581 ;;
2582
2583 solaris*)
2584 # gcc --version < 3.0 without binutils cannot create self contained
2585 # shared libraries reliably, requiring libgcc.a to resolve some of
2586 # the object symbols generated in some cases. Libraries that use
2587 # assert need libgcc.a to resolve __eprintf, for example. Linking
2588 # a copy of libgcc.a into every shared library to guarantee resolving
2589 # such symbols causes other problems: According to Tim Van Holder
2590 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2591 # (to the application) exception stack for one thing.
2592 no_undefined_flag=' -z defs'
2593 if test "$GCC" = yes; then
2594 case `$CC --version 2>/dev/null` in
2595 [[12]].*)
2596 cat <<EOF 1>&2
2597
2598*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2599*** create self contained shared libraries on Solaris systems, without
2600*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2601*** -no-undefined support, which will at least allow you to build shared
2602*** libraries. However, you may find that when you link such libraries
2603*** into an application without using GCC, you have to manually add
2604*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2605*** upgrade to a newer version of GCC. Another option is to rebuild your
2606*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2607
2608EOF
2609 no_undefined_flag=
2610 ;;
2611 esac
2612 fi
2613 # $CC -shared without GNU ld will not create a library from C++
2614 # object files and a static libstdc++, better avoid it by now
2615 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2616 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2617 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2618 hardcode_libdir_flag_spec='-R$libdir'
2619 hardcode_shlibpath_var=no
2620 case $host_os in
2621 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2622 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2623 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2624 esac
2625 link_all_deplibs=yes
2626 ;;
2627
2628 sunos4*)
2629 if test "x$host_vendor" = xsequent; then
2630 # Use $CC to link under sequent, because it throws in some extra .o
2631 # files that make .init and .fini sections work.
2632 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2633 else
2634 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2635 fi
2636 hardcode_libdir_flag_spec='-L$libdir'
2637 hardcode_direct=yes
2638 hardcode_minus_L=yes
2639 hardcode_shlibpath_var=no
2640 ;;
2641
2642 sysv4)
2643 case $host_vendor in
2644 sni)
2645 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2646 hardcode_direct=yes # is this really true???
2647 ;;
2648 siemens)
2649 ## LD is ld it makes a PLAMLIB
2650 ## CC just makes a GrossModule.
2651 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2652 reload_cmds='$CC -r -o $output$reload_objs'
2653 hardcode_direct=no
2654 ;;
2655 motorola)
2656 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2657 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2658 ;;
2659 esac
2660 runpath_var='LD_RUN_PATH'
2661 hardcode_shlibpath_var=no
2662 ;;
2663
2664 sysv4.3*)
2665 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2666 hardcode_shlibpath_var=no
2667 export_dynamic_flag_spec='-Bexport'
2668 ;;
2669
2670 sysv5*)
2671 no_undefined_flag=' -z text'
2672 # $CC -shared without GNU ld will not create a library from C++
2673 # object files and a static libstdc++, better avoid it by now
2674 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2675 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2676 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2677 hardcode_libdir_flag_spec=
2678 hardcode_shlibpath_var=no
2679 runpath_var='LD_RUN_PATH'
2680 ;;
2681
2682 uts4*)
2683 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2684 hardcode_libdir_flag_spec='-L$libdir'
2685 hardcode_shlibpath_var=no
2686 ;;
2687
2688 dgux*)
2689 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2690 hardcode_libdir_flag_spec='-L$libdir'
2691 hardcode_shlibpath_var=no
2692 ;;
2693
2694 sysv4*MP*)
2695 if test -d /usr/nec; then
2696 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2697 hardcode_shlibpath_var=no
2698 runpath_var=LD_RUN_PATH
2699 hardcode_runpath_var=yes
2700 ld_shlibs=yes
2701 fi
2702 ;;
2703
2704 sysv4.2uw2*)
2705 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2706 hardcode_direct=yes
2707 hardcode_minus_L=no
2708 hardcode_shlibpath_var=no
2709 hardcode_runpath_var=yes
2710 runpath_var=LD_RUN_PATH
2711 ;;
2712
2713 sysv5uw7* | unixware7*)
2714 no_undefined_flag='${wl}-z ${wl}text'
2715 if test "$GCC" = yes; then
2716 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2717 else
2718 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2719 fi
2720 runpath_var='LD_RUN_PATH'
2721 hardcode_shlibpath_var=no
2722 ;;
2723
2724 *)
2725 ld_shlibs=no
2726 ;;
2727 esac
2728fi
2729AC_MSG_RESULT([$ld_shlibs])
2730test "$ld_shlibs" = no && can_build_shared=no
2731
2732# Check hardcoding attributes.
2733AC_MSG_CHECKING([how to hardcode library paths into programs])
2734hardcode_action=
2735if test -n "$hardcode_libdir_flag_spec" || \
2736 test -n "$runpath_var"; then
2737
2738 # We can hardcode non-existant directories.
2739 if test "$hardcode_direct" != no &&
2740 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2741 # have to relink, otherwise we might link with an installed library
2742 # when we should be linking with a yet-to-be-installed one
2743 ## test "$hardcode_shlibpath_var" != no &&
2744 test "$hardcode_minus_L" != no; then
2745 # Linking always hardcodes the temporary library directory.
2746 hardcode_action=relink
2747 else
2748 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2749 hardcode_action=immediate
2750 fi
2751else
2752 # We cannot hardcode anything, or else we can only hardcode existing
2753 # directories.
2754 hardcode_action=unsupported
2755fi
2756AC_MSG_RESULT([$hardcode_action])
2757
2758striplib=
2759old_striplib=
2760AC_MSG_CHECKING([whether stripping libraries is possible])
2761if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2762 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2763 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2764 AC_MSG_RESULT([yes])
2765else
2766 AC_MSG_RESULT([no])
2767fi
2768
2769reload_cmds='$LD$reload_flag -o $output$reload_objs'
2770test -z "$deplibs_check_method" && deplibs_check_method=unknown
2771
2772# PORTME Fill in your ld.so characteristics
2773AC_MSG_CHECKING([dynamic linker characteristics])
2774library_names_spec=
2775libname_spec='lib$name'
2776soname_spec=
2777postinstall_cmds=
2778postuninstall_cmds=
2779finish_cmds=
2780finish_eval=
2781shlibpath_var=
2782shlibpath_overrides_runpath=unknown
2783version_type=none
2784dynamic_linker="$host_os ld.so"
2785sys_lib_dlsearch_path_spec="/lib /usr/lib"
2786sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2787
2788case $host_os in
2789aix3*)
2790 version_type=linux
2791 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2792 shlibpath_var=LIBPATH
2793
2794 # AIX has no versioning support, so we append a major version to the name.
2795 soname_spec='${libname}${release}.so$major'
2796 ;;
2797
2798aix4* | aix5*)
2799 version_type=linux
2800 need_lib_prefix=no
2801 need_version=no
2802 hardcode_into_libs=yes
2803 if test "$host_cpu" = ia64; then
2804 # AIX 5 supports IA64
2805 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2806 shlibpath_var=LD_LIBRARY_PATH
2807 else
2808 # With GCC up to 2.95.x, collect2 would create an import file
2809 # for dependence libraries. The import file would start with
2810 # the line `#! .'. This would cause the generated library to
2811 # depend on `.', always an invalid library. This was fixed in
2812 # development snapshots of GCC prior to 3.0.
2813 case $host_os in
2814 aix4 | aix4.[[01]] | aix4.[[01]].*)
2815 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2816 echo ' yes '
2817 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2818 :
2819 else
2820 can_build_shared=no
2821 fi
2822 ;;
2823 esac
2824 # AIX (on Power*) has no versioning support, so currently we can
2825 # not hardcode correct soname into executable. Probably we can
2826 # add versioning support to collect2, so additional links can
2827 # be useful in future.
2828 if test "$aix_use_runtimelinking" = yes; then
2829 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2830 # instead of lib<name>.a to let people know that these are not
2831 # typical AIX shared libraries.
2832 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2833 else
2834 # We preserve .a as extension for shared libraries through AIX4.2
2835 # and later when we are not doing run time linking.
2836 library_names_spec='${libname}${release}.a $libname.a'
2837 soname_spec='${libname}${release}.so$major'
2838 fi
2839 shlibpath_var=LIBPATH
2840 fi
2841 hardcode_into_libs=yes
2842 ;;
2843
2844amigaos*)
2845 library_names_spec='$libname.ixlibrary $libname.a'
2846 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2847 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'
2848 ;;
2849
2850beos*)
2851 library_names_spec='${libname}.so'
2852 dynamic_linker="$host_os ld.so"
2853 shlibpath_var=LIBRARY_PATH
2854 ;;
2855
2856bsdi4*)
2857 version_type=linux
2858 need_version=no
2859 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2860 soname_spec='${libname}${release}.so$major'
2861 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2862 shlibpath_var=LD_LIBRARY_PATH
2863 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2864 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2865 export_dynamic_flag_spec=-rdynamic
2866 # the default ld.so.conf also contains /usr/contrib/lib and
2867 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2868 # libtool to hard-code these into programs
2869 ;;
2870
2871cygwin* | mingw* | pw32*)
2872 version_type=windows
2873 need_version=no
2874 need_lib_prefix=no
2875 case $GCC,$host_os in
2876 yes,cygwin*)
2877 library_names_spec='$libname.dll.a'
2878 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2879 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2880 dldir=$destdir/`dirname \$dlpath`~
2881 test -d \$dldir || mkdir -p \$dldir~
2882 $install_prog .libs/$dlname \$dldir/$dlname'
2883 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2884 dlpath=$dir/\$dldll~
2885 $rm \$dlpath'
2886 ;;
2887 yes,mingw*)
2888 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2889 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2890 ;;
2891 yes,pw32*)
2892 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2893 ;;
2894 *)
2895 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2896 ;;
2897 esac
2898 dynamic_linker='Win32 ld.exe'
2899 # FIXME: first we should search . and the directory the executable is in
2900 shlibpath_var=PATH
2901 ;;
2902
2903darwin* | rhapsody*)
2904 dynamic_linker="$host_os dyld"
2905 version_type=darwin
2906 need_lib_prefix=no
2907 need_version=no
2908 # FIXME: Relying on posixy $() will cause problems for
2909 # cross-compilation, but unfortunately the echo tests do not
2910 # yet detect zsh echo's removal of \ escapes.
2911 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2912 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2913 shlibpath_overrides_runpath=yes
2914 shlibpath_var=DYLD_LIBRARY_PATH
2915 ;;
2916
2917freebsd1*)
2918 dynamic_linker=no
2919 ;;
2920
2921freebsd*-gnu*)
2922 version_type=linux
2923 need_lib_prefix=no
2924 need_version=no
2925 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2926 soname_spec='${libname}${release}.so$major'
2927 shlibpath_var=LD_LIBRARY_PATH
2928 shlibpath_overrides_runpath=no
2929 hardcode_into_libs=yes
2930 dynamic_linker='GNU/FreeBSD ld.so'
2931 ;;
2932
2933freebsd*)
2934 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2935 version_type=freebsd-$objformat
2936 case $version_type in
2937 freebsd-elf*)
2938 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2939 need_version=no
2940 need_lib_prefix=no
2941 ;;
2942 freebsd-*)
2943 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2944 need_version=yes
2945 ;;
2946 esac
2947 shlibpath_var=LD_LIBRARY_PATH
2948 case $host_os in
2949 freebsd2*)
2950 shlibpath_overrides_runpath=yes
2951 ;;
2952 *)
2953 shlibpath_overrides_runpath=no
2954 hardcode_into_libs=yes
2955 ;;
2956 esac
2957 ;;
2958
2959gnu*)
2960 version_type=linux
2961 need_lib_prefix=no
2962 need_version=no
2963 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2964 soname_spec='${libname}${release}.so$major'
2965 shlibpath_var=LD_LIBRARY_PATH
2966 hardcode_into_libs=yes
2967 ;;
2968
2969hpux9* | hpux10* | hpux11*)
2970 # Give a soname corresponding to the major version so that dld.sl refuses to
2971 # link against other versions.
2972 dynamic_linker="$host_os dld.sl"
2973 version_type=sunos
2974 need_lib_prefix=no
2975 need_version=no
2976 shlibpath_var=SHLIB_PATH
2977 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2978 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2979 soname_spec='${libname}${release}.sl$major'
2980 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2981 postinstall_cmds='chmod 555 $lib'
2982 ;;
2983
2984irix5* | irix6* | nonstopux*)
2985 case $host_os in
2986 nonstopux*) version_type=nonstopux ;;
2987 *) version_type=irix ;;
2988 esac
2989 need_lib_prefix=no
2990 need_version=no
2991 soname_spec='${libname}${release}.so$major'
2992 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2993 case $host_os in
2994 irix5* | nonstopux*)
2995 libsuff= shlibsuff=
2996 ;;
2997 *)
2998 case $LD in # libtool.m4 will add one of these switches to LD
2999 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3000 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3001 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3002 *) libsuff= shlibsuff= libmagic=never-match;;
3003 esac
3004 ;;
3005 esac
3006 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3007 shlibpath_overrides_runpath=no
3008 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3009 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3010 ;;
3011
3012# No shared lib support for Linux oldld, aout, or coff.
3013linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3014 dynamic_linker=no
3015 ;;
3016
3017# This must be Linux ELF.
3018linux-gnu*)
3019 version_type=linux
3020 need_lib_prefix=no
3021 need_version=no
3022 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3023 soname_spec='${libname}${release}.so$major'
3024 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3025 shlibpath_var=LD_LIBRARY_PATH
3026 shlibpath_overrides_runpath=no
3027 # This implies no fast_install, which is unacceptable.
3028 # Some rework will be needed to allow for fast_install
3029 # before this can be enabled.
3030 hardcode_into_libs=yes
3031
3032 # We used to test for /lib/ld.so.1 and disable shared libraries on
3033 # powerpc, because MkLinux only supported shared libraries with the
3034 # GNU dynamic linker. Since this was broken with cross compilers,
3035 # most powerpc-linux boxes support dynamic linking these days and
3036 # people can always --disable-shared, the test was removed, and we
3037 # assume the GNU/Linux dynamic linker is in use.
3038 dynamic_linker='GNU/Linux ld.so'
3039 ;;
3040
3041netbsd*)
3042 version_type=sunos
3043 need_lib_prefix=no
3044 need_version=no
3045 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3046 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3047 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3048 dynamic_linker='NetBSD (a.out) ld.so'
3049 else
3050 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3051 soname_spec='${libname}${release}.so$major'
3052 dynamic_linker='NetBSD ld.elf_so'
3053 fi
3054 shlibpath_var=LD_LIBRARY_PATH
3055 shlibpath_overrides_runpath=yes
3056 hardcode_into_libs=yes
3057 ;;
3058
3059newsos6)
3060 version_type=linux
3061 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3062 shlibpath_var=LD_LIBRARY_PATH
3063 shlibpath_overrides_runpath=yes
3064 ;;
3065
3066openbsd*)
3067 version_type=sunos
3068 need_lib_prefix=no
3069 need_version=no
3070 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3071 case "$host_os" in
3072 openbsd2.[[89]] | openbsd2.[[89]].*)
3073 shlibpath_overrides_runpath=no
3074 ;;
3075 *)
3076 shlibpath_overrides_runpath=yes
3077 ;;
3078 esac
3079 else
3080 shlibpath_overrides_runpath=yes
3081 fi
3082 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3083 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3084 shlibpath_var=LD_LIBRARY_PATH
3085 ;;
3086
3087os2*)
3088 libname_spec='$name'
3089 need_lib_prefix=no
3090 library_names_spec='$libname.dll $libname.a'
3091 dynamic_linker='OS/2 ld.exe'
3092 shlibpath_var=LIBPATH
3093 ;;
3094
3095osf3* | osf4* | osf5*)
3096 version_type=osf
3097 need_version=no
3098 need_lib_prefix=no
3099 soname_spec='${libname}${release}.so$major'
3100 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3101 shlibpath_var=LD_LIBRARY_PATH
3102 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3103 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3104 hardcode_into_libs=yes
3105 ;;
3106
3107sco3.2v5*)
3108 version_type=osf
3109 soname_spec='${libname}${release}.so$major'
3110 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3111 shlibpath_var=LD_LIBRARY_PATH
3112 ;;
3113
3114solaris*)
3115 version_type=linux
3116 need_lib_prefix=no
3117 need_version=no
3118 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3119 soname_spec='${libname}${release}.so$major'
3120 shlibpath_var=LD_LIBRARY_PATH
3121 shlibpath_overrides_runpath=yes
3122 hardcode_into_libs=yes
3123 # ldd complains unless libraries are executable
3124 postinstall_cmds='chmod +x $lib'
3125 ;;
3126
3127sunos4*)
3128 version_type=sunos
3129 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3130 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3131 shlibpath_var=LD_LIBRARY_PATH
3132 shlibpath_overrides_runpath=yes
3133 if test "$with_gnu_ld" = yes; then
3134 need_lib_prefix=no
3135 fi
3136 need_version=yes
3137 ;;
3138
3139sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3140 version_type=linux
3141 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3142 soname_spec='${libname}${release}.so$major'
3143 shlibpath_var=LD_LIBRARY_PATH
3144 case $host_vendor in
3145 sni)
3146 shlibpath_overrides_runpath=no
3147 need_lib_prefix=no
3148 export_dynamic_flag_spec='${wl}-Blargedynsym'
3149 runpath_var=LD_RUN_PATH
3150 ;;
3151 siemens)
3152 need_lib_prefix=no
3153 ;;
3154 motorola)
3155 need_lib_prefix=no
3156 need_version=no
3157 shlibpath_overrides_runpath=no
3158 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3159 ;;
3160 esac
3161 ;;
3162
3163uts4*)
3164 version_type=linux
3165 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3166 soname_spec='${libname}${release}.so$major'
3167 shlibpath_var=LD_LIBRARY_PATH
3168 ;;
3169
3170dgux*)
3171 version_type=linux
3172 need_lib_prefix=no
3173 need_version=no
3174 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3175 soname_spec='${libname}${release}.so$major'
3176 shlibpath_var=LD_LIBRARY_PATH
3177 ;;
3178
3179sysv4*MP*)
3180 if test -d /usr/nec ;then
3181 version_type=linux
3182 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3183 soname_spec='$libname.so.$major'
3184 shlibpath_var=LD_LIBRARY_PATH
3185 fi
3186 ;;
3187
3188*)
3189 dynamic_linker=no
3190 ;;
3191esac
3192AC_MSG_RESULT([$dynamic_linker])
3193test "$dynamic_linker" = no && can_build_shared=no
3194
3195# Report the final consequences.
3196AC_MSG_CHECKING([if libtool supports shared libraries])
3197AC_MSG_RESULT([$can_build_shared])
3198
3199AC_MSG_CHECKING([whether to build shared libraries])
3200test "$can_build_shared" = "no" && enable_shared=no
3201
3202# On AIX, shared libraries and static libraries use the same namespace, and
3203# are all built from PIC.
3204case "$host_os" in
3205aix3*)
3206 test "$enable_shared" = yes && enable_static=no
3207 if test -n "$RANLIB"; then
3208 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3209 postinstall_cmds='$RANLIB $lib'
3210 fi
3211 ;;
3212
3213aix4*)
3214 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3215 test "$enable_shared" = yes && enable_static=no
3216 fi
3217 ;;
3218esac
3219AC_MSG_RESULT([$enable_shared])
3220
3221AC_MSG_CHECKING([whether to build static libraries])
3222# Make sure either enable_shared or enable_static is yes.
3223test "$enable_shared" = yes || enable_static=yes
3224AC_MSG_RESULT([$enable_static])
3225
3226if test "$hardcode_action" = relink; then
3227 # Fast installation is not supported
3228 enable_fast_install=no
3229elif test "$shlibpath_overrides_runpath" = yes ||
3230 test "$enable_shared" = no; then
3231 # Fast installation is not necessary
3232 enable_fast_install=needless
3233fi
3234
3235variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3236if test "$GCC" = yes; then
3237 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3238fi
3239
3240AC_LIBTOOL_DLOPEN_SELF
3241
3242if test "$enable_shared" = yes && test "$GCC" = yes; then
3243 case $archive_cmds in
3244 *'~'*)
3245 # FIXME: we may have to deal with multi-command sequences.
3246 ;;
3247 '$CC '*)
3248 # Test whether the compiler implicitly links with -lc since on some
3249 # systems, -lgcc has to come before -lc. If gcc already passes -lc
3250 # to ld, don't add -lc before -lgcc.
3251 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3252 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3253 [$rm conftest*
3254 echo 'static int dummy;' > conftest.$ac_ext
3255
3256 if AC_TRY_EVAL(ac_compile); then
3257 soname=conftest
3258 lib=conftest
3259 libobjs=conftest.$ac_objext
3260 deplibs=
3261 wl=$lt_cv_prog_cc_wl
3262 compiler_flags=-v
3263 linker_flags=-v
3264 verstring=
3265 output_objdir=.
3266 libname=conftest
3267 save_allow_undefined_flag=$allow_undefined_flag
3268 allow_undefined_flag=
3269 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3270 then
3271 lt_cv_archive_cmds_need_lc=no
3272 else
3273 lt_cv_archive_cmds_need_lc=yes
3274 fi
3275 allow_undefined_flag=$save_allow_undefined_flag
3276 else
3277 cat conftest.err 1>&5
3278 fi])
3279 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3280 ;;
3281 esac
3282fi
3283need_lc=${lt_cv_archive_cmds_need_lc-yes}
3284
3285# The second clause should only fire when bootstrapping the
3286# libtool distribution, otherwise you forgot to ship ltmain.sh
3287# with your package, and you will get complaints that there are
3288# no rules to generate ltmain.sh.
3289if test -f "$ltmain"; then
3290 :
3291else
3292 # If there is no Makefile yet, we rely on a make rule to execute
3293 # `config.status --recheck' to rerun these tests and create the
3294 # libtool script then.
3295 test -f Makefile && make "$ltmain"
3296fi
3297
3298if test -f "$ltmain"; then
3299 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3300 $rm -f "${ofile}T"
3301
3302 echo creating $ofile
3303
3304 # Now quote all the things that may contain metacharacters while being
3305 # careful not to overquote the AC_SUBSTed values. We take copies of the
3306 # variables and quote the copies for generation of the libtool script.
3307 for var in echo old_CC old_CFLAGS SED \
3308 AR AR_FLAGS CC LD LN_S NM SHELL \
3309 reload_flag reload_cmds wl \
3310 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3311 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3312 library_names_spec soname_spec \
3313 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3314 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3315 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3316 old_striplib striplib file_magic_cmd export_symbols_cmds \
3317 deplibs_check_method allow_undefined_flag no_undefined_flag \
3318 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3319 global_symbol_to_c_name_address \
3320 hardcode_libdir_flag_spec hardcode_libdir_separator \
3321 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3322 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3323
3324 case $var in
3325 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3326 old_postinstall_cmds | old_postuninstall_cmds | \
3327 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3328 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3329 postinstall_cmds | postuninstall_cmds | \
3330 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3331 # Double-quote double-evaled strings.
3332 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3333 ;;
3334 *)
3335 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3336 ;;
3337 esac
3338 done
3339
3340 cat <<__EOF__ > "${ofile}T"
3341#! $SHELL
3342
3343# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3344# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3345# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3346#
3347# Copyright (C) 1996-2000 Free Software Foundation, Inc.
3348# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3349#
3350# This program is free software; you can redistribute it and/or modify
3351# it under the terms of the GNU General Public License as published by
3352# the Free Software Foundation; either version 2 of the License, or
3353# (at your option) any later version.
3354#
3355# This program is distributed in the hope that it will be useful, but
3356# WITHOUT ANY WARRANTY; without even the implied warranty of
3357# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3358# General Public License for more details.
3359#
3360# You should have received a copy of the GNU General Public License
3361# along with this program; if not, write to the Free Software
3362# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3363#
3364# As a special exception to the GNU General Public License, if you
3365# distribute this file as part of a program that contains a
3366# configuration script generated by Autoconf, you may include it under
3367# the same distribution terms that you use for the rest of that program.
3368
3369# A sed that does not truncate output.
3370SED=$lt_SED
3371
3372# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3373Xsed="${SED} -e s/^X//"
3374
3375# The HP-UX ksh and POSIX shell print the target directory to stdout
3376# if CDPATH is set.
3377if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3378
3379# ### BEGIN LIBTOOL CONFIG
3380
3381# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3382
3383# Shell to use when invoking shell scripts.
3384SHELL=$lt_SHELL
3385
3386# Whether or not to build shared libraries.
3387build_libtool_libs=$enable_shared
3388
3389# Whether or not to build static libraries.
3390build_old_libs=$enable_static
3391
3392# Whether or not to add -lc for building shared libraries.
3393build_libtool_need_lc=$need_lc
3394
3395# Whether or not to optimize for fast installation.
3396fast_install=$enable_fast_install
3397
3398# The host system.
3399host_alias=$host_alias
3400host=$host
3401
3402# An echo program that does not interpret backslashes.
3403echo=$lt_echo
3404
3405# The archiver.
3406AR=$lt_AR
3407AR_FLAGS=$lt_AR_FLAGS
3408
3409# The default C compiler.
3410CC=$lt_CC
3411
3412# Is the compiler the GNU C compiler?
3413with_gcc=$GCC
3414
3415# The linker used to build libraries.
3416LD=$lt_LD
3417
3418# Whether we need hard or soft links.
3419LN_S=$lt_LN_S
3420
3421# A BSD-compatible nm program.
3422NM=$lt_NM
3423
3424# A symbol stripping program
3425STRIP=$STRIP
3426
3427# Used to examine libraries when file_magic_cmd begins "file"
3428MAGIC_CMD=$MAGIC_CMD
3429
3430# Used on cygwin: DLL creation program.
3431DLLTOOL="$DLLTOOL"
3432
3433# Used on cygwin: object dumper.
3434OBJDUMP="$OBJDUMP"
3435
3436# Used on cygwin: assembler.
3437AS="$AS"
3438
3439# The name of the directory that contains temporary libtool files.
3440objdir=$objdir
3441
3442# How to create reloadable object files.
3443reload_flag=$lt_reload_flag
3444reload_cmds=$lt_reload_cmds
3445
3446# How to pass a linker flag through the compiler.
3447wl=$lt_wl
3448
3449# Object file suffix (normally "o").
3450objext="$ac_objext"
3451
3452# Old archive suffix (normally "a").
3453libext="$libext"
3454
3455# Executable file suffix (normally "").
3456exeext="$exeext"
3457
3458# Additional compiler flags for building library objects.
3459pic_flag=$lt_pic_flag
3460pic_mode=$pic_mode
3461
3462# Does compiler simultaneously support -c and -o options?
3463compiler_c_o=$lt_compiler_c_o
3464
3465# Can we write directly to a .lo ?
3466compiler_o_lo=$lt_compiler_o_lo
3467
3468# Must we lock files when doing compilation ?
3469need_locks=$lt_need_locks
3470
3471# Do we need the lib prefix for modules?
3472need_lib_prefix=$need_lib_prefix
3473
3474# Do we need a version for libraries?
3475need_version=$need_version
3476
3477# Whether dlopen is supported.
3478dlopen_support=$enable_dlopen
3479
3480# Whether dlopen of programs is supported.
3481dlopen_self=$enable_dlopen_self
3482
3483# Whether dlopen of statically linked programs is supported.
3484dlopen_self_static=$enable_dlopen_self_static
3485
3486# Compiler flag to prevent dynamic linking.
3487link_static_flag=$lt_link_static_flag
3488
3489# Compiler flag to turn off builtin functions.
3490no_builtin_flag=$lt_no_builtin_flag
3491
3492# Compiler flag to allow reflexive dlopens.
3493export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3494
3495# Compiler flag to generate shared objects directly from archives.
3496whole_archive_flag_spec=$lt_whole_archive_flag_spec
3497
3498# Compiler flag to generate thread-safe objects.
3499thread_safe_flag_spec=$lt_thread_safe_flag_spec
3500
3501# Library versioning type.
3502version_type=$version_type
3503
3504# Format of library name prefix.
3505libname_spec=$lt_libname_spec
3506
3507# List of archive names. First name is the real one, the rest are links.
3508# The last name is the one that the linker finds with -lNAME.
3509library_names_spec=$lt_library_names_spec
3510
3511# The coded name of the library, if different from the real name.
3512soname_spec=$lt_soname_spec
3513
3514# Commands used to build and install an old-style archive.
3515RANLIB=$lt_RANLIB
3516old_archive_cmds=$lt_old_archive_cmds
3517old_postinstall_cmds=$lt_old_postinstall_cmds
3518old_postuninstall_cmds=$lt_old_postuninstall_cmds
3519
3520# Create an old-style archive from a shared archive.
3521old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3522
3523# Create a temporary old-style archive to link instead of a shared archive.
3524old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3525
3526# Commands used to build and install a shared archive.
3527archive_cmds=$lt_archive_cmds
3528archive_expsym_cmds=$lt_archive_expsym_cmds
3529postinstall_cmds=$lt_postinstall_cmds
3530postuninstall_cmds=$lt_postuninstall_cmds
3531
3532# Commands to strip libraries.
3533old_striplib=$lt_old_striplib
3534striplib=$lt_striplib
3535
3536# Method to check whether dependent libraries are shared objects.
3537deplibs_check_method=$lt_deplibs_check_method
3538
3539# Command to use when deplibs_check_method == file_magic.
3540file_magic_cmd=$lt_file_magic_cmd
3541
3542# Flag that allows shared libraries with undefined symbols to be built.
3543allow_undefined_flag=$lt_allow_undefined_flag
3544
3545# Flag that forces no undefined symbols.
3546no_undefined_flag=$lt_no_undefined_flag
3547
3548# Commands used to finish a libtool library installation in a directory.
3549finish_cmds=$lt_finish_cmds
3550
3551# Same as above, but a single script fragment to be evaled but not shown.
3552finish_eval=$lt_finish_eval
3553
3554# Take the output of nm and produce a listing of raw symbols and C names.
3555global_symbol_pipe=$lt_global_symbol_pipe
3556
3557# Transform the output of nm in a proper C declaration
3558global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3559
3560# Transform the output of nm in a C name address pair
3561global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3562
3563# This is the shared library runtime path variable.
3564runpath_var=$runpath_var
3565
3566# This is the shared library path variable.
3567shlibpath_var=$shlibpath_var
3568
3569# Is shlibpath searched before the hard-coded library search path?
3570shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3571
3572# How to hardcode a shared library path into an executable.
3573hardcode_action=$hardcode_action
3574
3575# Whether we should hardcode library paths into libraries.
3576hardcode_into_libs=$hardcode_into_libs
3577
3578# Flag to hardcode \$libdir into a binary during linking.
3579# This must work even if \$libdir does not exist.
3580hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3581
3582# Whether we need a single -rpath flag with a separated argument.
3583hardcode_libdir_separator=$lt_hardcode_libdir_separator
3584
3585# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3586# resulting binary.
3587hardcode_direct=$hardcode_direct
3588
3589# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3590# resulting binary.
3591hardcode_minus_L=$hardcode_minus_L
3592
3593# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3594# the resulting binary.
3595hardcode_shlibpath_var=$hardcode_shlibpath_var
3596
3597# Variables whose values should be saved in libtool wrapper scripts and
3598# restored at relink time.
3599variables_saved_for_relink="$variables_saved_for_relink"
3600
3601# Whether libtool must link a program against all its dependency libraries.
3602link_all_deplibs=$link_all_deplibs
3603
3604# Compile-time system search path for libraries
3605sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3606
3607# Run-time system search path for libraries
3608sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3609
3610# Fix the shell variable \$srcfile for the compiler.
3611fix_srcfile_path="$fix_srcfile_path"
3612
3613# Set to yes if exported symbols are required.
3614always_export_symbols=$always_export_symbols
3615
3616# The commands to list exported symbols.
3617export_symbols_cmds=$lt_export_symbols_cmds
3618
3619# The commands to extract the exported symbol list from a shared archive.
3620extract_expsyms_cmds=$lt_extract_expsyms_cmds
3621
3622# Symbols that should not be listed in the preloaded symbols.
3623exclude_expsyms=$lt_exclude_expsyms
3624
3625# Symbols that must always be exported.
3626include_expsyms=$lt_include_expsyms
3627
3628# ### END LIBTOOL CONFIG
3629
3630__EOF__
3631
3632 case $host_os in
3633 aix3*)
3634 cat <<\EOF >> "${ofile}T"
3635
3636# AIX sometimes has problems with the GCC collect2 program. For some
3637# reason, if we set the COLLECT_NAMES environment variable, the problems
3638# vanish in a puff of smoke.
3639if test "X${COLLECT_NAMES+set}" != Xset; then
3640 COLLECT_NAMES=
3641 export COLLECT_NAMES
3642fi
3643EOF
3644 ;;
3645 esac
3646
3647 case $host_os in
3648 cygwin* | mingw* | pw32* | os2*)
3649 cat <<'EOF' >> "${ofile}T"
3650 # This is a source program that is used to create dlls on Windows
3651 # Don't remove nor modify the starting and closing comments
3652# /* ltdll.c starts here */
3653# #define WIN32_LEAN_AND_MEAN
3654# #include <windows.h>
3655# #undef WIN32_LEAN_AND_MEAN
3656# #include <stdio.h>
3657#
3658# #ifndef __CYGWIN__
3659# # ifdef __CYGWIN32__
3660# # define __CYGWIN__ __CYGWIN32__
3661# # endif
3662# #endif
3663#
3664# #ifdef __cplusplus
3665# extern "C" {
3666# #endif
3667# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3668# #ifdef __cplusplus
3669# }
3670# #endif
3671#
3672# #ifdef __CYGWIN__
3673# #include <cygwin/cygwin_dll.h>
3674# DECLARE_CYGWIN_DLL( DllMain );
3675# #endif
3676# HINSTANCE __hDllInstance_base;
3677#
3678# BOOL APIENTRY
3679# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3680# {
3681# __hDllInstance_base = hInst;
3682# return TRUE;
3683# }
3684# /* ltdll.c ends here */
3685 # This is a source program that is used to create import libraries
3686 # on Windows for dlls which lack them. Don't remove nor modify the
3687 # starting and closing comments
3688# /* impgen.c starts here */
3689# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3690#
3691# This file is part of GNU libtool.
3692#
3693# This program is free software; you can redistribute it and/or modify
3694# it under the terms of the GNU General Public License as published by
3695# the Free Software Foundation; either version 2 of the License, or
3696# (at your option) any later version.
3697#
3698# This program is distributed in the hope that it will be useful,
3699# but WITHOUT ANY WARRANTY; without even the implied warranty of
3700# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3701# GNU General Public License for more details.
3702#
3703# You should have received a copy of the GNU General Public License
3704# along with this program; if not, write to the Free Software
3705# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3706# */
3707#
3708# #include <stdio.h> /* for printf() */
3709# #include <unistd.h> /* for open(), lseek(), read() */
3710# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3711# #include <string.h> /* for strdup() */
3712#
3713# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3714# #ifndef O_BINARY
3715# #define O_BINARY 0
3716# #endif
3717#
3718# static unsigned int
3719# pe_get16 (fd, offset)
3720# int fd;
3721# int offset;
3722# {
3723# unsigned char b[2];
3724# lseek (fd, offset, SEEK_SET);
3725# read (fd, b, 2);
3726# return b[0] + (b[1]<<8);
3727# }
3728#
3729# static unsigned int
3730# pe_get32 (fd, offset)
3731# int fd;
3732# int offset;
3733# {
3734# unsigned char b[4];
3735# lseek (fd, offset, SEEK_SET);
3736# read (fd, b, 4);
3737# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3738# }
3739#
3740# static unsigned int
3741# pe_as32 (ptr)
3742# void *ptr;
3743# {
3744# unsigned char *b = ptr;
3745# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3746# }
3747#
3748# int
3749# main (argc, argv)
3750# int argc;
3751# char *argv[];
3752# {
3753# int dll;
3754# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3755# unsigned long export_rva, export_size, nsections, secptr, expptr;
3756# unsigned long name_rvas, nexp;
3757# unsigned char *expdata, *erva;
3758# char *filename, *dll_name;
3759#
3760# filename = argv[1];
3761#
3762# dll = open(filename, O_RDONLY|O_BINARY);
3763# if (dll < 1)
3764# return 1;
3765#
3766# dll_name = filename;
3767#
3768# for (i=0; filename[i]; i++)
3769# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3770# dll_name = filename + i +1;
3771#
3772# pe_header_offset = pe_get32 (dll, 0x3c);
3773# opthdr_ofs = pe_header_offset + 4 + 20;
3774# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3775#
3776# if (num_entries < 1) /* no exports */
3777# return 1;
3778#
3779# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3780# export_size = pe_get32 (dll, opthdr_ofs + 100);
3781# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3782# secptr = (pe_header_offset + 4 + 20 +
3783# pe_get16 (dll, pe_header_offset + 4 + 16));
3784#
3785# expptr = 0;
3786# for (i = 0; i < nsections; i++)
3787# {
3788# char sname[8];
3789# unsigned long secptr1 = secptr + 40 * i;
3790# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3791# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3792# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3793# lseek(dll, secptr1, SEEK_SET);
3794# read(dll, sname, 8);
3795# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3796# {
3797# expptr = fptr + (export_rva - vaddr);
3798# if (export_rva + export_size > vaddr + vsize)
3799# export_size = vsize - (export_rva - vaddr);
3800# break;
3801# }
3802# }
3803#
3804# expdata = (unsigned char*)malloc(export_size);
3805# lseek (dll, expptr, SEEK_SET);
3806# read (dll, expdata, export_size);
3807# erva = expdata - export_rva;
3808#
3809# nexp = pe_as32 (expdata+24);
3810# name_rvas = pe_as32 (expdata+32);
3811#
3812# printf ("EXPORTS\n");
3813# for (i = 0; i<nexp; i++)
3814# {
3815# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3816# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3817# }
3818#
3819# return 0;
3820# }
3821# /* impgen.c ends here */
3822
3823EOF
3824 ;;
3825 esac
3826
3827 # We use sed instead of cat because bash on DJGPP gets confused if
3828 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3829 # text mode, it properly converts lines to CR/LF. This bash problem
3830 # is reportedly fixed, but why not run on old versions too?
3831 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3832
3833 mv -f "${ofile}T" "$ofile" || \
3834 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3835 chmod +x "$ofile"
3836fi
3837
3838])# _LT_AC_LTCONFIG_HACK
3839
3840# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3841AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3842
3843# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3844AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3845
3846# AC_ENABLE_SHARED - implement the --enable-shared flag
3847# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3848# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3849# `yes'.
3850AC_DEFUN([AC_ENABLE_SHARED],
3851[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3852AC_ARG_ENABLE(shared,
3853changequote(<<, >>)dnl
3854<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3855changequote([, ])dnl
3856[p=${PACKAGE-default}
3857case $enableval in
3858yes) enable_shared=yes ;;
3859no) enable_shared=no ;;
3860*)
3861 enable_shared=no
3862 # Look at the argument we got. We use all the common list separators.
3863 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3864 for pkg in $enableval; do
3865 if test "X$pkg" = "X$p"; then
3866 enable_shared=yes
3867 fi
3868 done
3869 IFS="$ac_save_ifs"
3870 ;;
3871esac],
3872enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3873])
3874
3875# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3876AC_DEFUN([AC_DISABLE_SHARED],
3877[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3878AC_ENABLE_SHARED(no)])
3879
3880# AC_ENABLE_STATIC - implement the --enable-static flag
3881# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3882# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3883# `yes'.
3884AC_DEFUN([AC_ENABLE_STATIC],
3885[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3886AC_ARG_ENABLE(static,
3887changequote(<<, >>)dnl
3888<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3889changequote([, ])dnl
3890[p=${PACKAGE-default}
3891case $enableval in
3892yes) enable_static=yes ;;
3893no) enable_static=no ;;
3894*)
3895 enable_static=no
3896 # Look at the argument we got. We use all the common list separators.
3897 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3898 for pkg in $enableval; do
3899 if test "X$pkg" = "X$p"; then
3900 enable_static=yes
3901 fi
3902 done
3903 IFS="$ac_save_ifs"
3904 ;;
3905esac],
3906enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3907])
3908
3909# AC_DISABLE_STATIC - set the default static flag to --disable-static
3910AC_DEFUN([AC_DISABLE_STATIC],
3911[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3912AC_ENABLE_STATIC(no)])
3913
3914
3915# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3916# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3917# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3918# `yes'.
3919AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3920[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3921AC_ARG_ENABLE(fast-install,
3922changequote(<<, >>)dnl
3923<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3924changequote([, ])dnl
3925[p=${PACKAGE-default}
3926case $enableval in
3927yes) enable_fast_install=yes ;;
3928no) enable_fast_install=no ;;
3929*)
3930 enable_fast_install=no
3931 # Look at the argument we got. We use all the common list separators.
3932 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3933 for pkg in $enableval; do
3934 if test "X$pkg" = "X$p"; then
3935 enable_fast_install=yes
3936 fi
3937 done
3938 IFS="$ac_save_ifs"
3939 ;;
3940esac],
3941enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3942])
3943
3944# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3945AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3946[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3947AC_ENABLE_FAST_INSTALL(no)])
3948
3949# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3950# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3951# Where MODE is either `yes' or `no'. If omitted, it defaults to
3952# `both'.
3953AC_DEFUN([AC_LIBTOOL_PICMODE],
3954[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3955pic_mode=ifelse($#,1,$1,default)])
3956
3957
3958# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3959AC_DEFUN([AC_PATH_TOOL_PREFIX],
3960[AC_MSG_CHECKING([for $1])
3961AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3962[case $MAGIC_CMD in
3963 /*)
3964 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3965 ;;
3966 ?:/*)
3967 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3968 ;;
3969 *)
3970 ac_save_MAGIC_CMD="$MAGIC_CMD"
3971 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3972dnl $ac_dummy forces splitting on constant user-supplied paths.
3973dnl POSIX.2 word splitting is done only on the output of word expansions,
3974dnl not every word. This closes a longstanding sh security hole.
3975 ac_dummy="ifelse([$2], , $PATH, [$2])"
3976 for ac_dir in $ac_dummy; do
3977 test -z "$ac_dir" && ac_dir=.
3978 if test -f $ac_dir/$1; then
3979 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3980 if test -n "$file_magic_test_file"; then
3981 case $deplibs_check_method in
3982 "file_magic "*)
3983 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3984 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3985 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3986 egrep "$file_magic_regex" > /dev/null; then
3987 :
3988 else
3989 cat <<EOF 1>&2
3990
3991*** Warning: the command libtool uses to detect shared libraries,
3992*** $file_magic_cmd, produces output that libtool cannot recognize.
3993*** The result is that libtool may fail to recognize shared libraries
3994*** as such. This will affect the creation of libtool libraries that
3995*** depend on shared libraries, but programs linked with such libtool
3996*** libraries will work regardless of this problem. Nevertheless, you
3997*** may want to report the problem to your system manager and/or to
3998*** bug-libtool@gnu.org
3999
4000EOF
4001 fi ;;
4002 esac
4003 fi
4004 break
4005 fi
4006 done
4007 IFS="$ac_save_ifs"
4008 MAGIC_CMD="$ac_save_MAGIC_CMD"
4009 ;;
4010esac])
4011MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4012if test -n "$MAGIC_CMD"; then
4013 AC_MSG_RESULT($MAGIC_CMD)
4014else
4015 AC_MSG_RESULT(no)
4016fi
4017])
4018
4019
4020# AC_PATH_MAGIC - find a file program which can recognise a shared library
4021AC_DEFUN([AC_PATH_MAGIC],
4022[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4023AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4024if test -z "$lt_cv_path_MAGIC_CMD"; then
4025 if test -n "$ac_tool_prefix"; then
4026 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4027 else
4028 MAGIC_CMD=:
4029 fi
4030fi
4031])
4032
4033
4034# AC_PROG_LD - find the path to the GNU or non-GNU linker
4035AC_DEFUN([AC_PROG_LD],
4036[AC_ARG_WITH(gnu-ld,
4037[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4038test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4039AC_REQUIRE([AC_PROG_CC])dnl
4040AC_REQUIRE([AC_CANONICAL_HOST])dnl
4041AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4042AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4043ac_prog=ld
4044if test "$GCC" = yes; then
4045 # Check if gcc -print-prog-name=ld gives a path.
4046 AC_MSG_CHECKING([for ld used by GCC])
4047 case $host in
4048 *-*-mingw*)
4049 # gcc leaves a trailing carriage return which upsets mingw
4050 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4051 *)
4052 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4053 esac
4054 case $ac_prog in
4055 # Accept absolute paths.
4056 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4057 re_direlt='/[[^/]][[^/]]*/\.\./'
4058 # Canonicalize the path of ld
4059 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4060 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4061 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4062 done
4063 test -z "$LD" && LD="$ac_prog"
4064 ;;
4065 "")
4066 # If it fails, then pretend we aren't using GCC.
4067 ac_prog=ld
4068 ;;
4069 *)
4070 # If it is relative, then search for the first ld in PATH.
4071 with_gnu_ld=unknown
4072 ;;
4073 esac
4074elif test "$with_gnu_ld" = yes; then
4075 AC_MSG_CHECKING([for GNU ld])
4076else
4077 AC_MSG_CHECKING([for non-GNU ld])
4078fi
4079AC_CACHE_VAL(lt_cv_path_LD,
4080[if test -z "$LD"; then
4081 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4082 for ac_dir in $PATH; do
4083 test -z "$ac_dir" && ac_dir=.
4084 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4085 lt_cv_path_LD="$ac_dir/$ac_prog"
4086 # Check to see if the program is GNU ld. I'd rather use --version,
4087 # but apparently some GNU ld's only accept -v.
4088 # Break only if it was the GNU/non-GNU ld that we prefer.
4089 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4090 test "$with_gnu_ld" != no && break
4091 else
4092 test "$with_gnu_ld" != yes && break
4093 fi
4094 fi
4095 done
4096 IFS="$ac_save_ifs"
4097else
4098 lt_cv_path_LD="$LD" # Let the user override the test with a path.
mostang.com!davidm56c93292002-11-09 07:59:02 +00004099fi])
mostang.com!davidm0440c532003-01-17 18:12:55 +00004100LD="$lt_cv_path_LD"
4101if test -n "$LD"; then
4102 AC_MSG_RESULT($LD)
4103else
4104 AC_MSG_RESULT(no)
4105fi
4106test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4107AC_PROG_LD_GNU
4108])
4109
4110# AC_PROG_LD_GNU -
4111AC_DEFUN([AC_PROG_LD_GNU],
4112[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4113[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4114if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4115 lt_cv_prog_gnu_ld=yes
4116else
4117 lt_cv_prog_gnu_ld=no
4118fi])
4119with_gnu_ld=$lt_cv_prog_gnu_ld
4120])
4121
4122# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4123# -- PORTME Some linkers may need a different reload flag.
4124AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4125[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4126[lt_cv_ld_reload_flag='-r'])
4127reload_flag=$lt_cv_ld_reload_flag
4128test -n "$reload_flag" && reload_flag=" $reload_flag"
4129])
4130
4131# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4132# -- PORTME fill in with the dynamic library characteristics
4133AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4134[AC_CACHE_CHECK([how to recognise dependent libraries],
4135lt_cv_deplibs_check_method,
4136[lt_cv_file_magic_cmd='$MAGIC_CMD'
4137lt_cv_file_magic_test_file=
4138lt_cv_deplibs_check_method='unknown'
4139# Need to set the preceding variable on all platforms that support
4140# interlibrary dependencies.
4141# 'none' -- dependencies not supported.
4142# `unknown' -- same as none, but documents that we really don't know.
4143# 'pass_all' -- all dependencies passed with no checks.
4144# 'test_compile' -- check by making test program.
4145# 'file_magic [[regex]]' -- check by looking for files in library path
4146# which responds to the $file_magic_cmd with a given egrep regex.
4147# If you have `file' or equivalent on your system and you're not sure
4148# whether `pass_all' will *always* work, you probably want this one.
4149
4150case $host_os in
4151aix4* | aix5*)
4152 lt_cv_deplibs_check_method=pass_all
4153 ;;
4154
4155beos*)
4156 lt_cv_deplibs_check_method=pass_all
4157 ;;
4158
4159bsdi4*)
4160 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4161 lt_cv_file_magic_cmd='/usr/bin/file -L'
4162 lt_cv_file_magic_test_file=/shlib/libc.so
4163 ;;
4164
4165cygwin* | mingw* | pw32*)
4166 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4167 lt_cv_file_magic_cmd='$OBJDUMP -f'
4168 ;;
4169
4170darwin* | rhapsody*)
4171 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4172 lt_cv_file_magic_cmd='/usr/bin/file -L'
4173 case "$host_os" in
4174 rhapsody* | darwin1.[[012]])
4175 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4176 ;;
4177 *) # Darwin 1.3 on
4178 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4179 ;;
4180 esac
4181 ;;
4182
4183freebsd*)
4184 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4185 case $host_cpu in
4186 i*86 )
4187 # Not sure whether the presence of OpenBSD here was a mistake.
4188 # Let's accept both of them until this is cleared up.
4189 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4190 lt_cv_file_magic_cmd=/usr/bin/file
4191 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4192 ;;
4193 esac
4194 else
4195 lt_cv_deplibs_check_method=pass_all
4196 fi
4197 ;;
4198
4199gnu*)
4200 lt_cv_deplibs_check_method=pass_all
4201 ;;
4202
4203hpux10.20*|hpux11*)
4204 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4205 lt_cv_file_magic_cmd=/usr/bin/file
4206 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4207 ;;
4208
4209irix5* | irix6* | nonstopux*)
4210 case $host_os in
4211 irix5* | nonstopux*)
4212 # this will be overridden with pass_all, but let us keep it just in case
4213 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4214 ;;
4215 *)
4216 case $LD in
4217 *-32|*"-32 ") libmagic=32-bit;;
4218 *-n32|*"-n32 ") libmagic=N32;;
4219 *-64|*"-64 ") libmagic=64-bit;;
4220 *) libmagic=never-match;;
4221 esac
4222 # this will be overridden with pass_all, but let us keep it just in case
4223 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4224 ;;
4225 esac
4226 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4227 lt_cv_deplibs_check_method=pass_all
4228 ;;
4229
4230# This must be Linux ELF.
4231linux-gnu*)
4232 case $host_cpu in
4233 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4234 lt_cv_deplibs_check_method=pass_all ;;
4235 *)
4236 # glibc up to 2.1.1 does not perform some relocations on ARM
4237 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4238 esac
4239 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4240 ;;
4241
4242netbsd*)
4243 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4244 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4245 else
4246 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4247 fi
4248 ;;
4249
4250newos6*)
4251 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4252 lt_cv_file_magic_cmd=/usr/bin/file
4253 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4254 ;;
4255
4256openbsd*)
4257 lt_cv_file_magic_cmd=/usr/bin/file
4258 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4259 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4260 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4261 else
4262 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4263 fi
4264 ;;
4265
4266osf3* | osf4* | osf5*)
4267 # this will be overridden with pass_all, but let us keep it just in case
4268 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4269 lt_cv_file_magic_test_file=/shlib/libc.so
4270 lt_cv_deplibs_check_method=pass_all
4271 ;;
4272
4273sco3.2v5*)
4274 lt_cv_deplibs_check_method=pass_all
4275 ;;
4276
4277solaris*)
4278 lt_cv_deplibs_check_method=pass_all
4279 lt_cv_file_magic_test_file=/lib/libc.so
4280 ;;
4281
4282sysv5uw[[78]]* | sysv4*uw2*)
4283 lt_cv_deplibs_check_method=pass_all
4284 ;;
4285
4286sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4287 case $host_vendor in
4288 motorola)
4289 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
4290 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4291 ;;
4292 ncr)
4293 lt_cv_deplibs_check_method=pass_all
4294 ;;
4295 sequent)
4296 lt_cv_file_magic_cmd='/bin/file'
4297 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4298 ;;
4299 sni)
4300 lt_cv_file_magic_cmd='/bin/file'
4301 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4302 lt_cv_file_magic_test_file=/lib/libc.so
4303 ;;
4304 siemens)
4305 lt_cv_deplibs_check_method=pass_all
4306 ;;
4307 esac
4308 ;;
4309esac
4310])
4311file_magic_cmd=$lt_cv_file_magic_cmd
4312deplibs_check_method=$lt_cv_deplibs_check_method
4313])
4314
4315
4316# AC_PROG_NM - find the path to a BSD-compatible name lister
4317AC_DEFUN([AC_PROG_NM],
4318[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4319AC_MSG_CHECKING([for BSD-compatible nm])
4320AC_CACHE_VAL(lt_cv_path_NM,
4321[if test -n "$NM"; then
4322 # Let the user override the test.
4323 lt_cv_path_NM="$NM"
4324else
4325 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4326 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4327 test -z "$ac_dir" && ac_dir=.
4328 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4329 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4330 # Check to see if the nm accepts a BSD-compat flag.
4331 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4332 # nm: unknown option "B" ignored
4333 # Tru64's nm complains that /dev/null is an invalid object file
4334 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4335 lt_cv_path_NM="$tmp_nm -B"
4336 break
4337 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4338 lt_cv_path_NM="$tmp_nm -p"
4339 break
4340 else
4341 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4342 continue # so that we can try to find one that supports BSD flags
4343 fi
4344 fi
4345 done
4346 IFS="$ac_save_ifs"
4347 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4348fi])
4349NM="$lt_cv_path_NM"
4350AC_MSG_RESULT([$NM])
4351])
4352
4353# AC_CHECK_LIBM - check for math library
4354AC_DEFUN([AC_CHECK_LIBM],
4355[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4356LIBM=
4357case $host in
4358*-*-beos* | *-*-cygwin* | *-*-pw32*)
4359 # These system don't have libm
4360 ;;
4361*-ncr-sysv4.3*)
4362 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4363 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4364 ;;
4365*)
4366 AC_CHECK_LIB(m, main, LIBM="-lm")
4367 ;;
4368esac
4369])
4370
4371# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4372# the libltdl convenience library and LTDLINCL to the include flags for
4373# the libltdl header and adds --enable-ltdl-convenience to the
4374# configure arguments. Note that LIBLTDL and LTDLINCL are not
4375# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4376# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4377# with '${top_builddir}/' and LTDLINCL will be prefixed with
4378# '${top_srcdir}/' (note the single quotes!). If your package is not
4379# flat and you're not using automake, define top_builddir and
4380# top_srcdir appropriately in the Makefiles.
4381AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4382[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4383 case $enable_ltdl_convenience in
4384 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4385 "") enable_ltdl_convenience=yes
4386 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4387 esac
4388 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4389 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4390 # For backwards non-gettext consistent compatibility...
4391 INCLTDL="$LTDLINCL"
4392])
4393
4394# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4395# the libltdl installable library and LTDLINCL to the include flags for
4396# the libltdl header and adds --enable-ltdl-install to the configure
4397# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4398# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4399# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4400# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4401# with '${top_srcdir}/' (note the single quotes!). If your package is
4402# not flat and you're not using automake, define top_builddir and
4403# top_srcdir appropriately in the Makefiles.
4404# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4405AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4406[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4407 AC_CHECK_LIB(ltdl, main,
4408 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4409 [if test x"$enable_ltdl_install" = xno; then
4410 AC_MSG_WARN([libltdl not installed, but installation disabled])
4411 else
4412 enable_ltdl_install=yes
4413 fi
4414 ])
4415 if test x"$enable_ltdl_install" = x"yes"; then
4416 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4417 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4418 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4419 else
4420 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4421 LIBLTDL="-lltdl"
4422 LTDLINCL=
4423 fi
4424 # For backwards non-gettext consistent compatibility...
4425 INCLTDL="$LTDLINCL"
4426])
4427
4428# old names
4429AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4430AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4431AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4432AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4433AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4434AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4435AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4436
4437# This is just to silence aclocal about the macro not being used
4438ifelse([AC_DISABLE_FAST_INSTALL])
4439
4440# NOTE: This macro has been submitted for inclusion into #
4441# GNU Autoconf as AC_PROG_SED. When it is available in #
4442# a released version of Autoconf we should remove this #
4443# macro and use it instead. #
4444# LT_AC_PROG_SED
4445# --------------
4446# Check for a fully-functional sed program, that truncates
4447# as few characters as possible. Prefer GNU sed if found.
4448AC_DEFUN([LT_AC_PROG_SED],
4449[AC_MSG_CHECKING([for a sed that does not truncate output])
4450AC_CACHE_VAL(lt_cv_path_SED,
4451[# Loop through the user's path and test for sed and gsed.
4452# Then use that list of sed's as ones to test for truncation.
4453as_executable_p="test -f"
4454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455for as_dir in $PATH
4456do
4457 IFS=$as_save_IFS
4458 test -z "$as_dir" && as_dir=.
4459 for ac_prog in sed gsed; do
4460 for ac_exec_ext in '' $ac_executable_extensions; do
4461 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4462 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4463 fi
4464 done
4465 done
4466done
4467
4468 # Create a temporary directory, and hook for its removal unless debugging.
4469$debug ||
4470{
4471 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4472 trap '{ (exit 1); exit 1; }' 1 2 13 15
4473}
4474
4475# Create a (secure) tmp directory for tmp files.
4476: ${TMPDIR=/tmp}
4477{
4478 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4479 test -n "$tmp" && test -d "$tmp"
4480} ||
4481{
4482 tmp=$TMPDIR/sed$$-$RANDOM
4483 (umask 077 && mkdir $tmp)
4484} ||
4485{
4486 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4487 { (exit 1); exit 1; }
4488}
4489 _max=0
4490 _count=0
4491 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4492 # along with /bin/sed that truncates output.
4493 for _sed in $_sed_list /usr/xpg4/bin/sed; do
4494 test ! -f ${_sed} && break
4495 cat /dev/null > "$tmp/sed.in"
4496 _count=0
4497 echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4498 # Check for GNU sed and select it if it is found.
4499 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4500 lt_cv_path_SED=${_sed}
4501 break
4502 fi
4503 while true; do
4504 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4505 mv "$tmp/sed.tmp" "$tmp/sed.in"
4506 cp "$tmp/sed.in" "$tmp/sed.nl"
4507 echo >>"$tmp/sed.nl"
4508 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4509 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4510 # 40000 chars as input seems more than enough
4511 test $_count -gt 10 && break
4512 _count=`expr $_count + 1`
4513 if test $_count -gt $_max; then
4514 _max=$_count
4515 lt_cv_path_SED=$_sed
4516 fi
4517 done
4518 done
4519 rm -rf "$tmp"
4520])
4521if test "X$SED" != "X"; then
4522 lt_cv_path_SED=$SED
4523else
4524 SED=$lt_cv_path_SED
4525fi
4526AC_MSG_RESULT([$SED])
4527])
4528
4529# Figure out how to run the assembler. -*- Autoconf -*-
4530
4531# serial 2
4532
4533# Copyright 2001 Free Software Foundation, Inc.
4534
4535# This program is free software; you can redistribute it and/or modify
4536# it under the terms of the GNU General Public License as published by
4537# the Free Software Foundation; either version 2, or (at your option)
4538# any later version.
4539
4540# This program is distributed in the hope that it will be useful,
4541# but WITHOUT ANY WARRANTY; without even the implied warranty of
4542# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4543# GNU General Public License for more details.
4544
4545# You should have received a copy of the GNU General Public License
4546# along with this program; if not, write to the Free Software
4547# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4548# 02111-1307, USA.
4549
4550# AM_PROG_AS
4551# ----------
4552AC_DEFUN([AM_PROG_AS],
4553[# By default we simply use the C compiler to build assembly code.
4554AC_REQUIRE([AC_PROG_CC])
4555: ${CCAS='$(CC)'}
4556# Set ASFLAGS if not already set.
4557: ${CCASFLAGS='$(CFLAGS)'}
4558AC_SUBST(CCAS)
4559AC_SUBST(CCASFLAGS)])
4560