blob: 816d6d3d7f727314c91481688f7d24f06abbd694 [file] [log] [blame]
hp.com!davidm2c9be972003-11-22 06:08:20 +00001# aclocal.m4t 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.
hp.com!davidm01b02dd2003-09-24 21:51:53 +000016if test "x$enable___thread" != xno; then
mostang.com!davidm0440c532003-01-17 18:12:55 +000017 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
hp.com!davidm2c9be972003-11-22 06:08:20 +0000895# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
mostang.com!davidm0440c532003-01-17 18:12:55 +0000896
hp.com!davidm2c9be972003-11-22 06:08:20 +0000897# serial 47 AC_PROG_LIBTOOL
898# Debian $Rev: 100 $
mostang.com!davidm0440c532003-01-17 18:12:55 +0000899
hp.com!davidm2c9be972003-11-22 06:08:20 +0000900
901# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
902# -----------------------------------------------------------
903# If this macro is not defined by Autoconf, define it here.
904m4_ifdef([AC_PROVIDE_IFELSE],
905 [],
906 [m4_define([AC_PROVIDE_IFELSE],
907 [m4_ifdef([AC_PROVIDE_$1],
908 [$2], [$3])])])
909
910
911# AC_PROG_LIBTOOL
912# ---------------
mostang.com!davidm0440c532003-01-17 18:12:55 +0000913AC_DEFUN([AC_PROG_LIBTOOL],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000914[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
915dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
916dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
917 AC_PROVIDE_IFELSE([AC_PROG_CXX],
918 [AC_LIBTOOL_CXX],
919 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
920 ])])
921dnl And a similar setup for Fortran 77 support
922 AC_PROVIDE_IFELSE([AC_PROG_F77],
923 [AC_LIBTOOL_F77],
924 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
925])])
926
927dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
928dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
929dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
930 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
931 [AC_LIBTOOL_GCJ],
932 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
933 [AC_LIBTOOL_GCJ],
934 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
935 [AC_LIBTOOL_GCJ],
936 [ifdef([AC_PROG_GCJ],
937 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
938 ifdef([A][M_PROG_GCJ],
939 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
940 ifdef([LT_AC_PROG_GCJ],
941 [define([LT_AC_PROG_GCJ],
942 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
943])])# AC_PROG_LIBTOOL
944
945
946# _AC_PROG_LIBTOOL
947# ----------------
948AC_DEFUN([_AC_PROG_LIBTOOL],
mostang.com!davidm0440c532003-01-17 18:12:55 +0000949[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
hp.com!davidm2c9be972003-11-22 06:08:20 +0000950AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
951AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
952AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000953
954# This can be used to rebuild libtool when needed
955LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
956
957# Always use our own libtool.
958LIBTOOL='$(SHELL) $(top_builddir)/libtool'
959AC_SUBST(LIBTOOL)dnl
960
961# Prevent multiple expansion
962define([AC_PROG_LIBTOOL], [])
hp.com!davidm2c9be972003-11-22 06:08:20 +0000963])# _AC_PROG_LIBTOOL
mostang.com!davidm0440c532003-01-17 18:12:55 +0000964
hp.com!davidm2c9be972003-11-22 06:08:20 +0000965
966# AC_LIBTOOL_SETUP
967# ----------------
mostang.com!davidm0440c532003-01-17 18:12:55 +0000968AC_DEFUN([AC_LIBTOOL_SETUP],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000969[AC_PREREQ(2.50)dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000970AC_REQUIRE([AC_ENABLE_SHARED])dnl
971AC_REQUIRE([AC_ENABLE_STATIC])dnl
972AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
973AC_REQUIRE([AC_CANONICAL_HOST])dnl
974AC_REQUIRE([AC_CANONICAL_BUILD])dnl
975AC_REQUIRE([AC_PROG_CC])dnl
976AC_REQUIRE([AC_PROG_LD])dnl
977AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
978AC_REQUIRE([AC_PROG_NM])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000979
980AC_REQUIRE([AC_PROG_LN_S])dnl
981AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
hp.com!davidm2c9be972003-11-22 06:08:20 +0000982# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
mostang.com!davidm0440c532003-01-17 18:12:55 +0000983AC_REQUIRE([AC_OBJEXT])dnl
984AC_REQUIRE([AC_EXEEXT])dnl
985dnl
986
hp.com!davidm2c9be972003-11-22 06:08:20 +0000987AC_LIBTOOL_SYS_MAX_CMD_LEN
988AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
989AC_LIBTOOL_OBJDIR
990
991AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000992_LT_AC_PROG_ECHO_BACKSLASH
hp.com!davidm2c9be972003-11-22 06:08:20 +0000993
994case $host_os in
995aix3*)
996 # AIX sometimes has problems with the GCC collect2 program. For some
997 # reason, if we set the COLLECT_NAMES environment variable, the problems
998 # vanish in a puff of smoke.
999 if test "X${COLLECT_NAMES+set}" != Xset; then
1000 COLLECT_NAMES=
1001 export COLLECT_NAMES
1002 fi
1003 ;;
1004esac
1005
1006# Sed substitution that helps us do robust quoting. It backslashifies
1007# metacharacters that are still active within double-quoted strings.
1008Xsed='sed -e s/^X//'
1009[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1010
1011# Same as above, but do not quote variable references.
1012[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1013
1014# Sed substitution to delay expansion of an escaped shell variable in a
1015# double_quote_subst'ed string.
1016delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1017
1018# Sed substitution to avoid accidental globbing in evaled expressions
1019no_glob_subst='s/\*/\\\*/g'
1020
1021# Constants:
1022rm="rm -f"
1023
1024# Global variables:
1025default_ofile=libtool
1026can_build_shared=yes
1027
1028# All known linkers require a `.a' archive for static linking (except M$VC,
1029# which needs '.lib').
1030libext=a
1031ltmain="$ac_aux_dir/ltmain.sh"
1032ofile="$default_ofile"
1033with_gnu_ld="$lt_cv_prog_gnu_ld"
1034
1035AC_CHECK_TOOL(AR, ar, false)
1036AC_CHECK_TOOL(RANLIB, ranlib, :)
1037AC_CHECK_TOOL(STRIP, strip, :)
1038
1039old_CC="$CC"
1040old_CFLAGS="$CFLAGS"
1041
1042# Set sane defaults for various variables
1043test -z "$AR" && AR=ar
1044test -z "$AR_FLAGS" && AR_FLAGS=cru
1045test -z "$AS" && AS=as
1046test -z "$CC" && CC=cc
1047test -z "$LTCC" && LTCC=$CC
1048test -z "$DLLTOOL" && DLLTOOL=dlltool
1049test -z "$LD" && LD=ld
1050test -z "$LN_S" && LN_S="ln -s"
1051test -z "$MAGIC_CMD" && MAGIC_CMD=file
1052test -z "$NM" && NM=nm
1053test -z "$SED" && SED=sed
1054test -z "$OBJDUMP" && OBJDUMP=objdump
1055test -z "$RANLIB" && RANLIB=:
1056test -z "$STRIP" && STRIP=:
1057test -z "$ac_objext" && ac_objext=o
1058
1059# Determine commands to create old-style static archives.
1060old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1061old_postinstall_cmds='chmod 644 $oldlib'
1062old_postuninstall_cmds=
1063
1064if test -n "$RANLIB"; then
1065 case $host_os in
1066 openbsd*)
1067 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1068 ;;
1069 *)
1070 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1071 ;;
1072 esac
1073 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1074fi
1075
mostang.com!davidm0440c532003-01-17 18:12:55 +00001076# Only perform the check for file, if the check method requires it
1077case $deplibs_check_method in
1078file_magic*)
1079 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1080 AC_PATH_MAGIC
mostang.com!davidm56c93292002-11-09 07:59:02 +00001081 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00001082 ;;
1083esac
1084
hp.com!davidm2c9be972003-11-22 06:08:20 +00001085AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1086AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
mostang.com!davidm0440c532003-01-17 18:12:55 +00001087enable_win32_dll=yes, enable_win32_dll=no)
1088
hp.com!davidm2c9be972003-11-22 06:08:20 +00001089AC_ARG_ENABLE([libtool-lock],
1090 [AC_HELP_STRING([--disable-libtool-lock],
1091 [avoid locking (might break parallel builds)])])
mostang.com!davidm0440c532003-01-17 18:12:55 +00001092test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1093
hp.com!davidm2c9be972003-11-22 06:08:20 +00001094AC_ARG_WITH([pic],
1095 [AC_HELP_STRING([--with-pic],
1096 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1097 [pic_mode="$withval"],
1098 [pic_mode=default])
1099test -z "$pic_mode" && pic_mode=default
mostang.com!davidm0440c532003-01-17 18:12:55 +00001100
hp.com!davidm2c9be972003-11-22 06:08:20 +00001101# Use C for the default configuration in the libtool script
1102tagname=
1103AC_LIBTOOL_LANG_C_CONFIG
1104_LT_AC_TAGCONFIG
1105])# AC_LIBTOOL_SETUP
mostang.com!davidm0440c532003-01-17 18:12:55 +00001106
mostang.com!davidm0440c532003-01-17 18:12:55 +00001107
hp.com!davidm2c9be972003-11-22 06:08:20 +00001108# _LT_AC_SYS_COMPILER
1109# -------------------
1110AC_DEFUN([_LT_AC_SYS_COMPILER],
1111[AC_REQUIRE([AC_PROG_CC])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +00001112
hp.com!davidm2c9be972003-11-22 06:08:20 +00001113# If no C compiler was specified, use CC.
1114LTCC=${LTCC-"$CC"}
mostang.com!davidm0440c532003-01-17 18:12:55 +00001115
hp.com!davidm2c9be972003-11-22 06:08:20 +00001116# Allow CC to be a program name with arguments.
1117compiler=$CC
1118])# _LT_AC_SYS_COMPILER
mostang.com!davidm0440c532003-01-17 18:12:55 +00001119
mostang.com!davidm0440c532003-01-17 18:12:55 +00001120
hp.com!davidm2c9be972003-11-22 06:08:20 +00001121# _LT_AC_SYS_LIBPATH_AIX
1122# ----------------------
1123# Links a minimal program and checks the executable
1124# for the system default hardcoded library path. In most cases,
1125# this is /usr/lib:/lib, but when the MPI compilers are used
1126# the location of the communication and MPI libs are included too.
1127# If we don't find anything, use the default library path according
1128# to the aix ld manual.
1129AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1130[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1131aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1132}'`
1133# Check for a 64-bit object if we didn't find anything.
1134if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1135}'`; fi],[])
1136if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1137])# _LT_AC_SYS_LIBPATH_AIX
mostang.com!davidm0440c532003-01-17 18:12:55 +00001138
mostang.com!davidm0440c532003-01-17 18:12:55 +00001139
hp.com!davidm2c9be972003-11-22 06:08:20 +00001140# _LT_AC_SHELL_INIT(ARG)
1141# ----------------------
1142AC_DEFUN([_LT_AC_SHELL_INIT],
1143[ifdef([AC_DIVERSION_NOTICE],
1144 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1145 [AC_DIVERT_PUSH(NOTICE)])
1146$1
1147AC_DIVERT_POP
1148])# _LT_AC_SHELL_INIT
mostang.com!davidm0440c532003-01-17 18:12:55 +00001149
mostang.com!davidm0440c532003-01-17 18:12:55 +00001150
1151# _LT_AC_PROG_ECHO_BACKSLASH
1152# --------------------------
1153# Add some code to the start of the generated configure script which
1154# will find an echo command which doesn't interpret backslashes.
1155AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
hp.com!davidm2c9be972003-11-22 06:08:20 +00001156[_LT_AC_SHELL_INIT([
mostang.com!davidm0440c532003-01-17 18:12:55 +00001157# Check that we are running under the correct shell.
1158SHELL=${CONFIG_SHELL-/bin/sh}
1159
1160case X$ECHO in
1161X*--fallback-echo)
1162 # Remove one level of quotation (which was required for Make).
1163 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1164 ;;
1165esac
1166
1167echo=${ECHO-echo}
1168if test "X[$]1" = X--no-reexec; then
1169 # Discard the --no-reexec flag, and continue.
1170 shift
1171elif test "X[$]1" = X--fallback-echo; then
1172 # Avoid inline document here, it may be left over
1173 :
hp.com!davidm2c9be972003-11-22 06:08:20 +00001174elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
mostang.com!davidm0440c532003-01-17 18:12:55 +00001175 # Yippee, $echo works!
1176 :
1177else
1178 # Restart under the correct shell.
1179 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1180fi
1181
1182if test "X[$]1" = X--fallback-echo; then
1183 # used as fallback echo
1184 shift
1185 cat <<EOF
hp.com!davidm2c9be972003-11-22 06:08:20 +00001186[$]*
mostang.com!davidm0440c532003-01-17 18:12:55 +00001187EOF
1188 exit 0
1189fi
1190
1191# The HP-UX ksh and POSIX shell print the target directory to stdout
1192# if CDPATH is set.
1193if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1194
1195if test -z "$ECHO"; then
1196if test "X${echo_test_string+set}" != Xset; then
1197# find a string as large as possible, as long as the shell can cope with it
1198 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1199 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1200 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1201 echo_test_string="`eval $cmd`" &&
1202 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1203 then
1204 break
1205 fi
1206 done
1207fi
1208
1209if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1210 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1211 test "X$echo_testing_string" = "X$echo_test_string"; then
1212 :
1213else
1214 # The Solaris, AIX, and Digital Unix default echo programs unquote
1215 # backslashes. This makes it impossible to quote backslashes using
1216 # echo "$something" | sed 's/\\/\\\\/g'
1217 #
1218 # So, first we look for a working echo in the user's PATH.
1219
hp.com!davidm2c9be972003-11-22 06:08:20 +00001220 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
mostang.com!davidm0440c532003-01-17 18:12:55 +00001221 for dir in $PATH /usr/ucb; do
hp.com!davidm2c9be972003-11-22 06:08:20 +00001222 IFS="$lt_save_ifs"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001223 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1224 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1225 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1226 test "X$echo_testing_string" = "X$echo_test_string"; then
1227 echo="$dir/echo"
1228 break
1229 fi
1230 done
hp.com!davidm2c9be972003-11-22 06:08:20 +00001231 IFS="$lt_save_ifs"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001232
1233 if test "X$echo" = Xecho; then
1234 # We didn't find a better echo, so look for alternatives.
1235 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1236 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1237 test "X$echo_testing_string" = "X$echo_test_string"; then
1238 # This shell has a builtin print -r that does the trick.
1239 echo='print -r'
1240 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1241 test "X$CONFIG_SHELL" != X/bin/ksh; then
1242 # If we have ksh, try running configure again with it.
1243 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1244 export ORIGINAL_CONFIG_SHELL
1245 CONFIG_SHELL=/bin/ksh
1246 export CONFIG_SHELL
1247 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1248 else
1249 # Try using printf.
1250 echo='printf %s\n'
1251 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1252 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1253 test "X$echo_testing_string" = "X$echo_test_string"; then
1254 # Cool, printf works
1255 :
1256 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1257 test "X$echo_testing_string" = 'X\t' &&
1258 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1259 test "X$echo_testing_string" = "X$echo_test_string"; then
1260 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1261 export CONFIG_SHELL
1262 SHELL="$CONFIG_SHELL"
1263 export SHELL
1264 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1265 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1266 test "X$echo_testing_string" = 'X\t' &&
1267 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1268 test "X$echo_testing_string" = "X$echo_test_string"; then
1269 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1270 else
1271 # maybe with a smaller string...
1272 prev=:
1273
1274 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1275 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1276 then
1277 break
1278 fi
1279 prev="$cmd"
1280 done
1281
1282 if test "$prev" != 'sed 50q "[$]0"'; then
1283 echo_test_string=`eval $prev`
1284 export echo_test_string
1285 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1286 else
1287 # Oops. We lost completely, so just stick with echo.
1288 echo=echo
1289 fi
1290 fi
1291 fi
1292 fi
1293fi
1294fi
1295
1296# Copy echo and quote the copy suitably for passing to libtool from
1297# the Makefile, instead of quoting the original, which is used later.
1298ECHO=$echo
1299if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1300 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1301fi
1302
1303AC_SUBST(ECHO)
hp.com!davidm2c9be972003-11-22 06:08:20 +00001304])])# _LT_AC_PROG_ECHO_BACKSLASH
1305
1306
1307# _LT_AC_LOCK
1308# -----------
1309AC_DEFUN([_LT_AC_LOCK],
1310[AC_ARG_ENABLE([libtool-lock],
1311 [AC_HELP_STRING([--disable-libtool-lock],
1312 [avoid locking (might break parallel builds)])])
1313test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1314
1315# Some flags need to be propagated to the compiler or linker for good
1316# libtool support.
1317case $host in
1318ia64-*-hpux*)
1319 # Find out which ABI we are using.
1320 echo 'int i;' > conftest.$ac_ext
1321 if AC_TRY_EVAL(ac_compile); then
1322 case `/usr/bin/file conftest.$ac_objext` in
1323 *ELF-32*)
1324 HPUX_IA64_MODE="32"
1325 ;;
1326 *ELF-64*)
1327 HPUX_IA64_MODE="64"
1328 ;;
1329 esac
1330 fi
1331 rm -rf conftest*
1332 ;;
1333*-*-irix6*)
1334 # Find out which ABI we are using.
1335 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1336 if AC_TRY_EVAL(ac_compile); then
1337 if test "$lt_cv_prog_gnu_ld" = yes; then
1338 case `/usr/bin/file conftest.$ac_objext` in
1339 *32-bit*)
1340 LD="${LD-ld} -melf32bsmip"
1341 ;;
1342 *N32*)
1343 LD="${LD-ld} -melf32bmipn32"
1344 ;;
1345 *64-bit*)
1346 LD="${LD-ld} -melf64bmip"
1347 ;;
1348 esac
1349 else
1350 case `/usr/bin/file conftest.$ac_objext` in
1351 *32-bit*)
1352 LD="${LD-ld} -32"
1353 ;;
1354 *N32*)
1355 LD="${LD-ld} -n32"
1356 ;;
1357 *64-bit*)
1358 LD="${LD-ld} -64"
1359 ;;
1360 esac
1361 fi
1362 fi
1363 rm -rf conftest*
1364 ;;
1365
1366x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1367 # Find out which ABI we are using.
1368 echo 'int i;' > conftest.$ac_ext
1369 if AC_TRY_EVAL(ac_compile); then
1370 case "`/usr/bin/file conftest.o`" in
1371 *32-bit*)
1372 case $host in
1373 x86_64-*linux*)
1374 LD="${LD-ld} -m elf_i386"
1375 ;;
1376 ppc64-*linux*|powerpc64-*linux*)
1377 LD="${LD-ld} -m elf32ppclinux"
1378 ;;
1379 s390x-*linux*)
1380 LD="${LD-ld} -m elf_s390"
1381 ;;
1382 sparc64-*linux*)
1383 LD="${LD-ld} -m elf32_sparc"
1384 ;;
1385 esac
1386 ;;
1387 *64-bit*)
1388 case $host in
1389 x86_64-*linux*)
1390 LD="${LD-ld} -m elf_x86_64"
1391 ;;
1392 ppc*-*linux*|powerpc*-*linux*)
1393 LD="${LD-ld} -m elf64ppc"
1394 ;;
1395 s390*-*linux*)
1396 LD="${LD-ld} -m elf64_s390"
1397 ;;
1398 sparc*-*linux*)
1399 LD="${LD-ld} -m elf64_sparc"
1400 ;;
1401 esac
1402 ;;
1403 esac
1404 fi
1405 rm -rf conftest*
1406 ;;
1407
1408*-*-sco3.2v5*)
1409 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1410 SAVE_CFLAGS="$CFLAGS"
1411 CFLAGS="$CFLAGS -belf"
1412 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1413 [AC_LANG_PUSH(C)
1414 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1415 AC_LANG_POP])
1416 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1417 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1418 CFLAGS="$SAVE_CFLAGS"
1419 fi
1420 ;;
1421AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1422[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1423 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1424 AC_CHECK_TOOL(AS, as, false)
1425 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1426 ;;
1427 ])
1428esac
1429
1430need_locks="$enable_libtool_lock"
1431
1432])# _LT_AC_LOCK
1433
1434
1435# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1436# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1437# ----------------------------------------------------------------
1438# Check whether the given compiler option works
1439AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1440[AC_REQUIRE([LT_AC_PROG_SED])
1441AC_CACHE_CHECK([$1], [$2],
1442 [$2=no
1443 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1444 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1445 lt_compiler_flag="$3"
1446 # Insert the option either (1) after the last *FLAGS variable, or
1447 # (2) before a word containing "conftest.", or (3) at the end.
1448 # Note that $ac_compile itself does not contain backslashes and begins
1449 # with a dollar sign (not a hyphen), so the echo should work correctly.
1450 # The option is referenced via a variable to avoid confusing sed.
1451 lt_compile=`echo "$ac_compile" | $SED \
1452 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1453 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1454 -e 's:$: $lt_compiler_flag:'`
1455 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1456 (eval "$lt_compile" 2>conftest.err)
1457 ac_status=$?
1458 cat conftest.err >&AS_MESSAGE_LOG_FD
1459 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1460 if (exit $ac_status) && test -s "$ac_outfile"; then
1461 # The compiler can only warn and ignore the option if not recognized
1462 # So say no if there are warnings
1463 if test ! -s conftest.err; then
1464 $2=yes
1465 fi
1466 fi
1467 $rm conftest*
1468])
1469
1470if test x"[$]$2" = xyes; then
1471 ifelse([$5], , :, [$5])
1472else
1473 ifelse([$6], , :, [$6])
1474fi
1475])# AC_LIBTOOL_COMPILER_OPTION
1476
1477
1478# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1479# [ACTION-SUCCESS], [ACTION-FAILURE])
1480# ------------------------------------------------------------
1481# Check whether the given compiler option works
1482AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1483[AC_CACHE_CHECK([$1], [$2],
1484 [$2=no
1485 save_LDFLAGS="$LDFLAGS"
1486 LDFLAGS="$LDFLAGS $3"
1487 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1488 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1489 # The compiler can only warn and ignore the option if not recognized
1490 # So say no if there are warnings
1491 if test -s conftest.err; then
1492 # Append any errors to the config.log.
1493 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1494 else
1495 $2=yes
1496 fi
1497 fi
1498 $rm conftest*
1499 LDFLAGS="$save_LDFLAGS"
1500])
1501
1502if test x"[$]$2" = xyes; then
1503 ifelse([$4], , :, [$4])
1504else
1505 ifelse([$5], , :, [$5])
1506fi
1507])# AC_LIBTOOL_LINKER_OPTION
1508
1509
1510# AC_LIBTOOL_SYS_MAX_CMD_LEN
1511# --------------------------
1512AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1513[# find the maximum length of command line arguments
1514AC_MSG_CHECKING([the maximum length of command line arguments])
1515AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1516 i=0
1517 testring="ABCD"
1518
1519 case $build_os in
1520 msdosdjgpp*)
1521 # On DJGPP, this test can blow up pretty badly due to problems in libc
1522 # (any single argument exceeding 2000 bytes causes a buffer overrun
1523 # during glob expansion). Even if it were fixed, the result of this
1524 # check would be larger than it should be.
1525 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1526 ;;
1527
1528 gnu*)
1529 # Under GNU Hurd, this test is not required because there is
1530 # no limit to the length of command line arguments.
1531 # Libtool will interpret -1 as no limit whatsoever
1532 lt_cv_sys_max_cmd_len=-1;
1533 ;;
1534
1535 cygwin* | mingw*)
1536 # On Win9x/ME, this test blows up -- it succeeds, but takes
1537 # about 5 minutes as the teststring grows exponentially.
1538 # Worse, since 9x/ME are not pre-emptively multitasking,
1539 # you end up with a "frozen" computer, even though with patience
1540 # the test eventually succeeds (with a max line length of 256k).
1541 # Instead, let's just punt: use the minimum linelength reported by
1542 # all of the supported platforms: 8192 (on NT/2K/XP).
1543 lt_cv_sys_max_cmd_len=8192;
1544 ;;
1545
1546 amigaos*)
1547 # On AmigaOS with pdksh, this test takes hours, literally.
1548 # So we just punt and use a minimum line length of 8192.
1549 lt_cv_sys_max_cmd_len=8192;
1550 ;;
1551
1552 *)
1553 # If test is not a shell built-in, we'll probably end up computing a
1554 # maximum length that is only half of the actual maximum length, but
1555 # we can't tell.
1556 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1557 = "XX$testring") >/dev/null 2>&1 &&
1558 new_result=`expr "X$testring" : ".*" 2>&1` &&
1559 lt_cv_sys_max_cmd_len=$new_result &&
1560 test $i != 17 # 1/2 MB should be enough
1561 do
1562 i=`expr $i + 1`
1563 testring=$testring$testring
1564 done
1565 testring=
1566 # Add a significant safety factor because C++ compilers can tack on massive
1567 # amounts of additional arguments before passing them to the linker.
1568 # It appears as though 1/2 is a usable value.
1569 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1570 ;;
1571 esac
1572])
1573if test -n $lt_cv_sys_max_cmd_len ; then
1574 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1575else
1576 AC_MSG_RESULT(none)
1577fi
1578])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1579
1580
1581# _LT_AC_CHECK_DLFCN
1582# --------------------
1583AC_DEFUN([_LT_AC_CHECK_DLFCN],
1584[AC_CHECK_HEADERS(dlfcn.h)dnl
1585])# _LT_AC_CHECK_DLFCN
1586
mostang.com!davidm0440c532003-01-17 18:12:55 +00001587
1588# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1589# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1590# ------------------------------------------------------------------
1591AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
hp.com!davidm2c9be972003-11-22 06:08:20 +00001592[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1593if test "$cross_compiling" = yes; then :
mostang.com!davidm0440c532003-01-17 18:12:55 +00001594 [$4]
1595else
mostang.com!davidm0440c532003-01-17 18:12:55 +00001596 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1597 lt_status=$lt_dlunknown
1598 cat > conftest.$ac_ext <<EOF
1599[#line __oline__ "configure"
1600#include "confdefs.h"
1601
1602#if HAVE_DLFCN_H
1603#include <dlfcn.h>
1604#endif
1605
1606#include <stdio.h>
1607
1608#ifdef RTLD_GLOBAL
1609# define LT_DLGLOBAL RTLD_GLOBAL
1610#else
1611# ifdef DL_GLOBAL
1612# define LT_DLGLOBAL DL_GLOBAL
1613# else
1614# define LT_DLGLOBAL 0
1615# endif
1616#endif
1617
1618/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1619 find out it does not work in some platform. */
1620#ifndef LT_DLLAZY_OR_NOW
1621# ifdef RTLD_LAZY
1622# define LT_DLLAZY_OR_NOW RTLD_LAZY
1623# else
1624# ifdef DL_LAZY
1625# define LT_DLLAZY_OR_NOW DL_LAZY
1626# else
1627# ifdef RTLD_NOW
1628# define LT_DLLAZY_OR_NOW RTLD_NOW
1629# else
1630# ifdef DL_NOW
1631# define LT_DLLAZY_OR_NOW DL_NOW
1632# else
1633# define LT_DLLAZY_OR_NOW 0
1634# endif
1635# endif
1636# endif
1637# endif
1638#endif
1639
1640#ifdef __cplusplus
1641extern "C" void exit (int);
1642#endif
1643
1644void fnord() { int i=42;}
1645int main ()
1646{
1647 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1648 int status = $lt_dlunknown;
1649
1650 if (self)
1651 {
1652 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1653 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1654 /* dlclose (self); */
1655 }
1656
1657 exit (status);
1658}]
1659EOF
1660 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1661 (./conftest; exit; ) 2>/dev/null
1662 lt_status=$?
1663 case x$lt_status in
1664 x$lt_dlno_uscore) $1 ;;
1665 x$lt_dlneed_uscore) $2 ;;
1666 x$lt_unknown|x*) $3 ;;
1667 esac
1668 else :
1669 # compilation failed
1670 $3
1671 fi
1672fi
1673rm -fr conftest*
1674])# _LT_AC_TRY_DLOPEN_SELF
1675
hp.com!davidm2c9be972003-11-22 06:08:20 +00001676
mostang.com!davidm0440c532003-01-17 18:12:55 +00001677# AC_LIBTOOL_DLOPEN_SELF
1678# -------------------
1679AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
hp.com!davidm2c9be972003-11-22 06:08:20 +00001680[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1681if test "x$enable_dlopen" != xyes; then
mostang.com!davidm0440c532003-01-17 18:12:55 +00001682 enable_dlopen=unknown
1683 enable_dlopen_self=unknown
1684 enable_dlopen_self_static=unknown
1685else
1686 lt_cv_dlopen=no
1687 lt_cv_dlopen_libs=
1688
1689 case $host_os in
1690 beos*)
1691 lt_cv_dlopen="load_add_on"
1692 lt_cv_dlopen_libs=
1693 lt_cv_dlopen_self=yes
1694 ;;
1695
hp.com!davidm2c9be972003-11-22 06:08:20 +00001696 mingw* | pw32*)
mostang.com!davidm0440c532003-01-17 18:12:55 +00001697 lt_cv_dlopen="LoadLibrary"
1698 lt_cv_dlopen_libs=
1699 ;;
1700
hp.com!davidm2c9be972003-11-22 06:08:20 +00001701 cygwin*)
1702 lt_cv_dlopen="dlopen"
1703 lt_cv_dlopen_libs=
1704 ;;
1705
1706 darwin*)
1707 # if libdl is installed we need to link against it
1708 AC_CHECK_LIB([dl], [dlopen],
1709 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1710 lt_cv_dlopen="dyld"
1711 lt_cv_dlopen_libs=
1712 lt_cv_dlopen_self=yes
1713 ])
1714 ;;
1715
mostang.com!davidm0440c532003-01-17 18:12:55 +00001716 *)
1717 AC_CHECK_FUNC([shl_load],
hp.com!davidm2c9be972003-11-22 06:08:20 +00001718 [lt_cv_dlopen="shl_load"],
mostang.com!davidm0440c532003-01-17 18:12:55 +00001719 [AC_CHECK_LIB([dld], [shl_load],
hp.com!davidm2c9be972003-11-22 06:08:20 +00001720 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
mostang.com!davidm0440c532003-01-17 18:12:55 +00001721 [AC_CHECK_FUNC([dlopen],
1722 [lt_cv_dlopen="dlopen"],
1723 [AC_CHECK_LIB([dl], [dlopen],
hp.com!davidm2c9be972003-11-22 06:08:20 +00001724 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
mostang.com!davidm0440c532003-01-17 18:12:55 +00001725 [AC_CHECK_LIB([svld], [dlopen],
hp.com!davidm2c9be972003-11-22 06:08:20 +00001726 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
mostang.com!davidm0440c532003-01-17 18:12:55 +00001727 [AC_CHECK_LIB([dld], [dld_link],
hp.com!davidm2c9be972003-11-22 06:08:20 +00001728 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
mostang.com!davidm0440c532003-01-17 18:12:55 +00001729 ])
1730 ])
1731 ])
1732 ])
1733 ])
1734 ;;
1735 esac
1736
1737 if test "x$lt_cv_dlopen" != xno; then
1738 enable_dlopen=yes
1739 else
1740 enable_dlopen=no
1741 fi
1742
1743 case $lt_cv_dlopen in
1744 dlopen)
1745 save_CPPFLAGS="$CPPFLAGS"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001746 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1747
1748 save_LDFLAGS="$LDFLAGS"
1749 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1750
1751 save_LIBS="$LIBS"
1752 LIBS="$lt_cv_dlopen_libs $LIBS"
1753
1754 AC_CACHE_CHECK([whether a program can dlopen itself],
1755 lt_cv_dlopen_self, [dnl
1756 _LT_AC_TRY_DLOPEN_SELF(
1757 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1758 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1759 ])
1760
1761 if test "x$lt_cv_dlopen_self" = xyes; then
1762 LDFLAGS="$LDFLAGS $link_static_flag"
1763 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1764 lt_cv_dlopen_self_static, [dnl
1765 _LT_AC_TRY_DLOPEN_SELF(
1766 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1767 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1768 ])
1769 fi
1770
1771 CPPFLAGS="$save_CPPFLAGS"
1772 LDFLAGS="$save_LDFLAGS"
1773 LIBS="$save_LIBS"
1774 ;;
1775 esac
1776
1777 case $lt_cv_dlopen_self in
1778 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1779 *) enable_dlopen_self=unknown ;;
1780 esac
1781
1782 case $lt_cv_dlopen_self_static in
1783 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1784 *) enable_dlopen_self_static=unknown ;;
1785 esac
1786fi
1787])# AC_LIBTOOL_DLOPEN_SELF
1788
mostang.com!davidm0440c532003-01-17 18:12:55 +00001789
hp.com!davidm2c9be972003-11-22 06:08:20 +00001790# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1791# ---------------------------------
1792# Check to see if options -c and -o are simultaneously supported by compiler
1793AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1794[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1795AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1796 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1797 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1798 $rm -r conftest 2>/dev/null
1799 mkdir conftest
1800 cd conftest
1801 mkdir out
1802 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
mostang.com!davidm0440c532003-01-17 18:12:55 +00001803
hp.com!davidm2c9be972003-11-22 06:08:20 +00001804 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1805 # that will create temporary files in the current directory regardless of
1806 # the output directory. Thus, making CWD read-only will cause this test
1807 # to fail, enabling locking or at least warning the user not to do parallel
1808 # builds.
1809 chmod -w .
mostang.com!davidm0440c532003-01-17 18:12:55 +00001810
hp.com!davidm2c9be972003-11-22 06:08:20 +00001811 lt_compiler_flag="-o out/conftest2.$ac_objext"
1812 # Insert the option either (1) after the last *FLAGS variable, or
1813 # (2) before a word containing "conftest.", or (3) at the end.
1814 # Note that $ac_compile itself does not contain backslashes and begins
1815 # with a dollar sign (not a hyphen), so the echo should work correctly.
1816 lt_compile=`echo "$ac_compile" | $SED \
1817 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1818 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1819 -e 's:$: $lt_compiler_flag:'`
1820 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1821 (eval "$lt_compile" 2>out/conftest.err)
1822 ac_status=$?
1823 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1824 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1825 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1826 then
1827 # The compiler can only warn and ignore the option if not recognized
1828 # So say no if there are warnings
1829 if test ! -s out/conftest.err; then
1830 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1831 fi
1832 fi
1833 chmod u+w .
1834 $rm conftest*
1835 # SGI C++ compiler will create directory out/ii_files/ for
1836 # template instantiation
1837 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1838 $rm out/* && rmdir out
1839 cd ..
1840 rmdir conftest
1841 $rm conftest*
mostang.com!davidm0440c532003-01-17 18:12:55 +00001842])
hp.com!davidm2c9be972003-11-22 06:08:20 +00001843])# AC_LIBTOOL_PROG_CC_C_O
mostang.com!davidm0440c532003-01-17 18:12:55 +00001844
1845
hp.com!davidm2c9be972003-11-22 06:08:20 +00001846# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1847# -----------------------------------------
mostang.com!davidm0440c532003-01-17 18:12:55 +00001848# Check to see if we can do hard links to lock some files if needed
hp.com!davidm2c9be972003-11-22 06:08:20 +00001849AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1850[AC_REQUIRE([_LT_AC_LOCK])dnl
1851
mostang.com!davidm0440c532003-01-17 18:12:55 +00001852hard_links="nottested"
hp.com!davidm2c9be972003-11-22 06:08:20 +00001853if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
mostang.com!davidm0440c532003-01-17 18:12:55 +00001854 # do not overwrite the value of need_locks provided by the user
1855 AC_MSG_CHECKING([if we can lock with hard links])
1856 hard_links=yes
1857 $rm conftest*
1858 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1859 touch conftest.a
1860 ln conftest.a conftest.b 2>&5 || hard_links=no
1861 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1862 AC_MSG_RESULT([$hard_links])
1863 if test "$hard_links" = no; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00001864 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
mostang.com!davidm0440c532003-01-17 18:12:55 +00001865 need_locks=warn
1866 fi
1867else
1868 need_locks=no
1869fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001870])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
mostang.com!davidm0440c532003-01-17 18:12:55 +00001871
mostang.com!davidm0440c532003-01-17 18:12:55 +00001872
hp.com!davidm2c9be972003-11-22 06:08:20 +00001873# AC_LIBTOOL_OBJDIR
1874# -----------------
1875AC_DEFUN([AC_LIBTOOL_OBJDIR],
1876[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1877[rm -f .libs 2>/dev/null
1878mkdir .libs 2>/dev/null
1879if test -d .libs; then
1880 lt_cv_objdir=.libs
mostang.com!davidm0440c532003-01-17 18:12:55 +00001881else
hp.com!davidm2c9be972003-11-22 06:08:20 +00001882 # MS-DOS does not allow filenames that begin with a dot.
1883 lt_cv_objdir=_libs
mostang.com!davidm0440c532003-01-17 18:12:55 +00001884fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001885rmdir .libs 2>/dev/null])
1886objdir=$lt_cv_objdir
1887])# AC_LIBTOOL_OBJDIR
mostang.com!davidm0440c532003-01-17 18:12:55 +00001888
hp.com!davidm2c9be972003-11-22 06:08:20 +00001889
1890# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1891# ----------------------------------------------
mostang.com!davidm0440c532003-01-17 18:12:55 +00001892# Check hardcoding attributes.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001893AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1894[AC_MSG_CHECKING([how to hardcode library paths into programs])
1895_LT_AC_TAGVAR(hardcode_action, $1)=
1896if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1897 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1898 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
mostang.com!davidm0440c532003-01-17 18:12:55 +00001899
1900 # We can hardcode non-existant directories.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001901 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
mostang.com!davidm0440c532003-01-17 18:12:55 +00001902 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1903 # have to relink, otherwise we might link with an installed library
1904 # when we should be linking with a yet-to-be-installed one
hp.com!davidm2c9be972003-11-22 06:08:20 +00001905 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1906 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
mostang.com!davidm0440c532003-01-17 18:12:55 +00001907 # Linking always hardcodes the temporary library directory.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001908 _LT_AC_TAGVAR(hardcode_action, $1)=relink
mostang.com!davidm0440c532003-01-17 18:12:55 +00001909 else
1910 # We can link without hardcoding, and we can hardcode nonexisting dirs.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001911 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
mostang.com!davidm0440c532003-01-17 18:12:55 +00001912 fi
1913else
1914 # We cannot hardcode anything, or else we can only hardcode existing
1915 # directories.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001916 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
mostang.com!davidm0440c532003-01-17 18:12:55 +00001917fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001918AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
mostang.com!davidm0440c532003-01-17 18:12:55 +00001919
hp.com!davidm2c9be972003-11-22 06:08:20 +00001920if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1921 # Fast installation is not supported
1922 enable_fast_install=no
1923elif test "$shlibpath_overrides_runpath" = yes ||
1924 test "$enable_shared" = no; then
1925 # Fast installation is not necessary
1926 enable_fast_install=needless
1927fi
1928])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1929
1930
1931# AC_LIBTOOL_SYS_LIB_STRIP
1932# ------------------------
1933AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1934[striplib=
mostang.com!davidm0440c532003-01-17 18:12:55 +00001935old_striplib=
1936AC_MSG_CHECKING([whether stripping libraries is possible])
1937if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1938 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1939 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1940 AC_MSG_RESULT([yes])
1941else
hp.com!davidm2c9be972003-11-22 06:08:20 +00001942# FIXME - insert some real tests, host_os isn't really good enough
1943 case $host_os in
1944 darwin*)
1945 if test -n "$STRIP" ; then
1946 striplib="$STRIP -x"
1947 AC_MSG_RESULT([yes])
1948 else
mostang.com!davidm0440c532003-01-17 18:12:55 +00001949 AC_MSG_RESULT([no])
1950fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001951 ;;
1952 *)
1953 AC_MSG_RESULT([no])
1954 ;;
1955 esac
1956fi
1957])# AC_LIBTOOL_SYS_LIB_STRIP
mostang.com!davidm0440c532003-01-17 18:12:55 +00001958
mostang.com!davidm0440c532003-01-17 18:12:55 +00001959
hp.com!davidm2c9be972003-11-22 06:08:20 +00001960# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1961# -----------------------------
mostang.com!davidm0440c532003-01-17 18:12:55 +00001962# PORTME Fill in your ld.so characteristics
hp.com!davidm2c9be972003-11-22 06:08:20 +00001963AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1964[AC_MSG_CHECKING([dynamic linker characteristics])
mostang.com!davidm0440c532003-01-17 18:12:55 +00001965library_names_spec=
1966libname_spec='lib$name'
1967soname_spec=
hp.com!davidm2c9be972003-11-22 06:08:20 +00001968shrext=".so"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001969postinstall_cmds=
1970postuninstall_cmds=
1971finish_cmds=
1972finish_eval=
1973shlibpath_var=
1974shlibpath_overrides_runpath=unknown
1975version_type=none
1976dynamic_linker="$host_os ld.so"
1977sys_lib_dlsearch_path_spec="/lib /usr/lib"
hp.com!davidm2c9be972003-11-22 06:08:20 +00001978if test "$GCC" = yes; then
1979 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1980 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1981 # if the path contains ";" then we assume it to be the separator
1982 # otherwise default to the standard path separator (i.e. ":") - it is
1983 # assumed that no part of a normal pathname contains ";" but that should
1984 # okay in the real world where ";" in dirpaths is itself problematic.
1985 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1986 else
1987 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1988 fi
1989else
1990 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1991fi
1992need_lib_prefix=unknown
1993hardcode_into_libs=no
1994
1995# when you set need_version to no, make sure it does not cause -set_version
1996# flags to be left without arguments
1997need_version=unknown
mostang.com!davidm0440c532003-01-17 18:12:55 +00001998
1999case $host_os in
2000aix3*)
2001 version_type=linux
hp.com!davidm2c9be972003-11-22 06:08:20 +00002002 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002003 shlibpath_var=LIBPATH
2004
hp.com!davidm2c9be972003-11-22 06:08:20 +00002005 # AIX 3 has no versioning support, so we append a major version to the name.
2006 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002007 ;;
2008
2009aix4* | aix5*)
2010 version_type=linux
2011 need_lib_prefix=no
2012 need_version=no
2013 hardcode_into_libs=yes
2014 if test "$host_cpu" = ia64; then
2015 # AIX 5 supports IA64
hp.com!davidm2c9be972003-11-22 06:08:20 +00002016 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002017 shlibpath_var=LD_LIBRARY_PATH
2018 else
2019 # With GCC up to 2.95.x, collect2 would create an import file
2020 # for dependence libraries. The import file would start with
2021 # the line `#! .'. This would cause the generated library to
2022 # depend on `.', always an invalid library. This was fixed in
2023 # development snapshots of GCC prior to 3.0.
2024 case $host_os in
2025 aix4 | aix4.[[01]] | aix4.[[01]].*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002026 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2027 echo ' yes '
2028 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2029 :
2030 else
2031 can_build_shared=no
2032 fi
2033 ;;
mostang.com!davidm0440c532003-01-17 18:12:55 +00002034 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00002035 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2036 # soname into executable. Probably we can add versioning support to
2037 # collect2, so additional links can be useful in future.
mostang.com!davidm0440c532003-01-17 18:12:55 +00002038 if test "$aix_use_runtimelinking" = yes; then
2039 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2040 # instead of lib<name>.a to let people know that these are not
2041 # typical AIX shared libraries.
hp.com!davidm2c9be972003-11-22 06:08:20 +00002042 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002043 else
2044 # We preserve .a as extension for shared libraries through AIX4.2
2045 # and later when we are not doing run time linking.
2046 library_names_spec='${libname}${release}.a $libname.a'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002047 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002048 fi
2049 shlibpath_var=LIBPATH
2050 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00002051 ;;
2052
2053amigaos*)
2054 library_names_spec='$libname.ixlibrary $libname.a'
2055 # Create ${libname}_ixlibrary.a entries in /sys/libs.
hp.com!davidm2c9be972003-11-22 06:08:20 +00002056 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'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002057 ;;
2058
2059beos*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002060 library_names_spec='${libname}${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002061 dynamic_linker="$host_os ld.so"
2062 shlibpath_var=LIBRARY_PATH
2063 ;;
2064
2065bsdi4*)
2066 version_type=linux
2067 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002068 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2069 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002070 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2071 shlibpath_var=LD_LIBRARY_PATH
2072 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2073 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
mostang.com!davidm0440c532003-01-17 18:12:55 +00002074 # the default ld.so.conf also contains /usr/contrib/lib and
2075 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2076 # libtool to hard-code these into programs
2077 ;;
2078
2079cygwin* | mingw* | pw32*)
2080 version_type=windows
hp.com!davidm2c9be972003-11-22 06:08:20 +00002081 shrext=".dll"
mostang.com!davidm0440c532003-01-17 18:12:55 +00002082 need_version=no
2083 need_lib_prefix=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002084
mostang.com!davidm0440c532003-01-17 18:12:55 +00002085 case $GCC,$host_os in
hp.com!davidm2c9be972003-11-22 06:08:20 +00002086 yes,cygwin* | yes,mingw* | yes,pw32*)
mostang.com!davidm0440c532003-01-17 18:12:55 +00002087 library_names_spec='$libname.dll.a'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002088 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2089 postinstall_cmds='base_file=`basename \${file}`~
2090 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
mostang.com!davidm0440c532003-01-17 18:12:55 +00002091 dldir=$destdir/`dirname \$dlpath`~
2092 test -d \$dldir || mkdir -p \$dldir~
hp.com!davidm2c9be972003-11-22 06:08:20 +00002093 $install_prog $dir/$dlname \$dldir/$dlname'
2094 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
mostang.com!davidm0440c532003-01-17 18:12:55 +00002095 dlpath=$dir/\$dldll~
2096 $rm \$dlpath'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002097 shlibpath_overrides_runpath=yes
2098
2099 case $host_os in
2100 cygwin*)
2101 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2102 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2103 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2104 ;;
2105 mingw*)
2106 # MinGW DLLs use traditional 'lib' prefix
2107 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2108 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2109 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2110 # It is most probably a Windows format PATH printed by
2111 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2112 # path with ; separators, and with drive letters. We can handle the
2113 # drive letters (cygwin fileutils understands them), so leave them,
2114 # especially as we might pass files found there to a mingw objdump,
2115 # which wouldn't understand a cygwinified path. Ahh.
2116 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2117 else
2118 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2119 fi
2120 ;;
2121 pw32*)
2122 # pw32 DLLs use 'pw' prefix rather than 'lib'
2123 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2124 ;;
2125 esac
mostang.com!davidm0440c532003-01-17 18:12:55 +00002126 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00002127
mostang.com!davidm0440c532003-01-17 18:12:55 +00002128 *)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002129 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002130 ;;
2131 esac
2132 dynamic_linker='Win32 ld.exe'
2133 # FIXME: first we should search . and the directory the executable is in
2134 shlibpath_var=PATH
2135 ;;
2136
2137darwin* | rhapsody*)
2138 dynamic_linker="$host_os dyld"
2139 version_type=darwin
2140 need_lib_prefix=no
2141 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002142 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2143 soname_spec='${libname}${release}${major}$shared_ext'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002144 shlibpath_overrides_runpath=yes
2145 shlibpath_var=DYLD_LIBRARY_PATH
hp.com!davidm2c9be972003-11-22 06:08:20 +00002146 shrext='$(test .$module = .yes && echo .so || echo .dylib)'
2147 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2148 if test "$GCC" = yes; then
2149 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2150 else
2151 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2152 fi
2153 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2154 ;;
2155
2156dgux*)
2157 version_type=linux
2158 need_lib_prefix=no
2159 need_version=no
2160 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2161 soname_spec='${libname}${release}${shared_ext}$major'
2162 shlibpath_var=LD_LIBRARY_PATH
mostang.com!davidm0440c532003-01-17 18:12:55 +00002163 ;;
2164
2165freebsd1*)
2166 dynamic_linker=no
2167 ;;
2168
hp.com!davidm2c9be972003-11-22 06:08:20 +00002169kfreebsd*-gnu)
mostang.com!davidm0440c532003-01-17 18:12:55 +00002170 version_type=linux
2171 need_lib_prefix=no
2172 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002173 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2174 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002175 shlibpath_var=LD_LIBRARY_PATH
2176 shlibpath_overrides_runpath=no
2177 hardcode_into_libs=yes
hp.com!davidm2c9be972003-11-22 06:08:20 +00002178 dynamic_linker='GNU ld.so'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002179 ;;
2180
2181freebsd*)
2182 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2183 version_type=freebsd-$objformat
2184 case $version_type in
2185 freebsd-elf*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002186 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002187 need_version=no
2188 need_lib_prefix=no
2189 ;;
2190 freebsd-*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002191 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002192 need_version=yes
2193 ;;
2194 esac
2195 shlibpath_var=LD_LIBRARY_PATH
2196 case $host_os in
2197 freebsd2*)
2198 shlibpath_overrides_runpath=yes
2199 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00002200 freebsd3.[01]* | freebsdelf3.[01]*)
2201 shlibpath_overrides_runpath=yes
2202 hardcode_into_libs=yes
2203 ;;
2204 *) # from 3.2 on
mostang.com!davidm0440c532003-01-17 18:12:55 +00002205 shlibpath_overrides_runpath=no
2206 hardcode_into_libs=yes
2207 ;;
2208 esac
2209 ;;
2210
2211gnu*)
2212 version_type=linux
2213 need_lib_prefix=no
2214 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002215 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2216 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002217 shlibpath_var=LD_LIBRARY_PATH
2218 hardcode_into_libs=yes
2219 ;;
2220
2221hpux9* | hpux10* | hpux11*)
2222 # Give a soname corresponding to the major version so that dld.sl refuses to
2223 # link against other versions.
mostang.com!davidm0440c532003-01-17 18:12:55 +00002224 version_type=sunos
2225 need_lib_prefix=no
2226 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002227 case "$host_cpu" in
2228 ia64*)
2229 shrext='.so'
2230 hardcode_into_libs=yes
2231 dynamic_linker="$host_os dld.so"
2232 shlibpath_var=LD_LIBRARY_PATH
2233 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2234 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2235 soname_spec='${libname}${release}${shared_ext}$major'
2236 if test "X$HPUX_IA64_MODE" = X32; then
2237 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2238 else
2239 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2240 fi
2241 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2242 ;;
2243 hppa*64*)
2244 shrext='.sl'
2245 hardcode_into_libs=yes
2246 dynamic_linker="$host_os dld.sl"
2247 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2248 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2249 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2250 soname_spec='${libname}${release}${shared_ext}$major'
2251 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2252 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2253 ;;
2254 *)
2255 shrext='.sl'
2256 dynamic_linker="$host_os dld.sl"
2257 shlibpath_var=SHLIB_PATH
2258 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2259 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2260 soname_spec='${libname}${release}${shared_ext}$major'
2261 ;;
2262 esac
mostang.com!davidm0440c532003-01-17 18:12:55 +00002263 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2264 postinstall_cmds='chmod 555 $lib'
2265 ;;
2266
2267irix5* | irix6* | nonstopux*)
2268 case $host_os in
2269 nonstopux*) version_type=nonstopux ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00002270 *)
2271 if test "$lt_cv_prog_gnu_ld" = yes; then
2272 version_type=linux
2273 else
2274 version_type=irix
2275 fi ;;
mostang.com!davidm0440c532003-01-17 18:12:55 +00002276 esac
2277 need_lib_prefix=no
2278 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002279 soname_spec='${libname}${release}${shared_ext}$major'
2280 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002281 case $host_os in
2282 irix5* | nonstopux*)
2283 libsuff= shlibsuff=
2284 ;;
2285 *)
2286 case $LD in # libtool.m4 will add one of these switches to LD
hp.com!davidm2c9be972003-11-22 06:08:20 +00002287 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2288 libsuff= shlibsuff= libmagic=32-bit;;
2289 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2290 libsuff=32 shlibsuff=N32 libmagic=N32;;
2291 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2292 libsuff=64 shlibsuff=64 libmagic=64-bit;;
mostang.com!davidm0440c532003-01-17 18:12:55 +00002293 *) libsuff= shlibsuff= libmagic=never-match;;
2294 esac
2295 ;;
2296 esac
2297 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2298 shlibpath_overrides_runpath=no
2299 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2300 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
hp.com!davidm2c9be972003-11-22 06:08:20 +00002301 hardcode_into_libs=yes
mostang.com!davidm0440c532003-01-17 18:12:55 +00002302 ;;
2303
2304# No shared lib support for Linux oldld, aout, or coff.
hp.com!davidm2c9be972003-11-22 06:08:20 +00002305linux*oldld* | linux*aout* | linux*coff*)
mostang.com!davidm0440c532003-01-17 18:12:55 +00002306 dynamic_linker=no
2307 ;;
2308
2309# This must be Linux ELF.
hp.com!davidm2c9be972003-11-22 06:08:20 +00002310linux*)
mostang.com!davidm0440c532003-01-17 18:12:55 +00002311 version_type=linux
2312 need_lib_prefix=no
2313 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002314 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2315 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002316 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2317 shlibpath_var=LD_LIBRARY_PATH
2318 shlibpath_overrides_runpath=no
2319 # This implies no fast_install, which is unacceptable.
2320 # Some rework will be needed to allow for fast_install
2321 # before this can be enabled.
2322 hardcode_into_libs=yes
2323
hp.com!davidm2c9be972003-11-22 06:08:20 +00002324 # /usr/X11R6/lib and /usr/local/lib are common enough...
2325 sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib /usr/local/lib"
2326
mostang.com!davidm0440c532003-01-17 18:12:55 +00002327 # We used to test for /lib/ld.so.1 and disable shared libraries on
2328 # powerpc, because MkLinux only supported shared libraries with the
2329 # GNU dynamic linker. Since this was broken with cross compilers,
2330 # most powerpc-linux boxes support dynamic linking these days and
2331 # people can always --disable-shared, the test was removed, and we
2332 # assume the GNU/Linux dynamic linker is in use.
2333 dynamic_linker='GNU/Linux ld.so'
2334 ;;
2335
hp.com!davidm2c9be972003-11-22 06:08:20 +00002336knetbsd*-gnu)
2337 version_type=linux
2338 need_lib_prefix=no
2339 need_version=no
2340 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2341 soname_spec='${libname}${release}${shared_ext}$major'
2342 shlibpath_var=LD_LIBRARY_PATH
2343 shlibpath_overrides_runpath=no
2344 hardcode_into_libs=yes
2345 dynamic_linker='GNU ld.so'
2346 ;;
2347
mostang.com!davidm0440c532003-01-17 18:12:55 +00002348netbsd*)
2349 version_type=sunos
2350 need_lib_prefix=no
2351 need_version=no
2352 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00002353 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002354 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2355 dynamic_linker='NetBSD (a.out) ld.so'
2356 else
hp.com!davidm2c9be972003-11-22 06:08:20 +00002357 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
2358 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002359 dynamic_linker='NetBSD ld.elf_so'
2360 fi
2361 shlibpath_var=LD_LIBRARY_PATH
2362 shlibpath_overrides_runpath=yes
2363 hardcode_into_libs=yes
2364 ;;
2365
2366newsos6)
2367 version_type=linux
hp.com!davidm2c9be972003-11-22 06:08:20 +00002368 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2369 shlibpath_var=LD_LIBRARY_PATH
2370 shlibpath_overrides_runpath=yes
2371 ;;
2372
2373nto-qnx*)
2374 version_type=linux
2375 need_lib_prefix=no
2376 need_version=no
2377 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2378 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002379 shlibpath_var=LD_LIBRARY_PATH
2380 shlibpath_overrides_runpath=yes
2381 ;;
2382
2383openbsd*)
2384 version_type=sunos
2385 need_lib_prefix=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002386 need_version=yes
2387 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2388 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2389 shlibpath_var=LD_LIBRARY_PATH
mostang.com!davidm0440c532003-01-17 18:12:55 +00002390 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00002391 case $host_os in
2392 openbsd2.[[89]] | openbsd2.[[89]].*)
2393 shlibpath_overrides_runpath=no
2394 ;;
2395 *)
2396 shlibpath_overrides_runpath=yes
2397 ;;
2398 esac
mostang.com!davidm0440c532003-01-17 18:12:55 +00002399 else
2400 shlibpath_overrides_runpath=yes
2401 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00002402 ;;
2403
2404os2*)
2405 libname_spec='$name'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002406 shrext=".dll"
mostang.com!davidm0440c532003-01-17 18:12:55 +00002407 need_lib_prefix=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002408 library_names_spec='$libname${shared_ext} $libname.a'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002409 dynamic_linker='OS/2 ld.exe'
2410 shlibpath_var=LIBPATH
2411 ;;
2412
2413osf3* | osf4* | osf5*)
2414 version_type=osf
mostang.com!davidm0440c532003-01-17 18:12:55 +00002415 need_lib_prefix=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002416 need_version=no
2417 soname_spec='${libname}${release}${shared_ext}$major'
2418 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002419 shlibpath_var=LD_LIBRARY_PATH
2420 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2421 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
mostang.com!davidm0440c532003-01-17 18:12:55 +00002422 ;;
2423
2424sco3.2v5*)
2425 version_type=osf
hp.com!davidm2c9be972003-11-22 06:08:20 +00002426 soname_spec='${libname}${release}${shared_ext}$major'
2427 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002428 shlibpath_var=LD_LIBRARY_PATH
2429 ;;
2430
2431solaris*)
2432 version_type=linux
2433 need_lib_prefix=no
2434 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002435 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2436 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002437 shlibpath_var=LD_LIBRARY_PATH
2438 shlibpath_overrides_runpath=yes
2439 hardcode_into_libs=yes
2440 # ldd complains unless libraries are executable
2441 postinstall_cmds='chmod +x $lib'
2442 ;;
2443
2444sunos4*)
2445 version_type=sunos
hp.com!davidm2c9be972003-11-22 06:08:20 +00002446 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002447 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2448 shlibpath_var=LD_LIBRARY_PATH
2449 shlibpath_overrides_runpath=yes
2450 if test "$with_gnu_ld" = yes; then
2451 need_lib_prefix=no
2452 fi
2453 need_version=yes
2454 ;;
2455
2456sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2457 version_type=linux
hp.com!davidm2c9be972003-11-22 06:08:20 +00002458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2459 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002460 shlibpath_var=LD_LIBRARY_PATH
2461 case $host_vendor in
2462 sni)
2463 shlibpath_overrides_runpath=no
2464 need_lib_prefix=no
2465 export_dynamic_flag_spec='${wl}-Blargedynsym'
2466 runpath_var=LD_RUN_PATH
2467 ;;
2468 siemens)
2469 need_lib_prefix=no
2470 ;;
2471 motorola)
2472 need_lib_prefix=no
2473 need_version=no
2474 shlibpath_overrides_runpath=no
2475 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2476 ;;
2477 esac
2478 ;;
2479
mostang.com!davidm0440c532003-01-17 18:12:55 +00002480sysv4*MP*)
2481 if test -d /usr/nec ;then
2482 version_type=linux
hp.com!davidm2c9be972003-11-22 06:08:20 +00002483 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2484 soname_spec='$libname${shared_ext}.$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002485 shlibpath_var=LD_LIBRARY_PATH
2486 fi
2487 ;;
2488
hp.com!davidm2c9be972003-11-22 06:08:20 +00002489uts4*)
2490 version_type=linux
2491 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2492 soname_spec='${libname}${release}${shared_ext}$major'
2493 shlibpath_var=LD_LIBRARY_PATH
2494 ;;
2495
mostang.com!davidm0440c532003-01-17 18:12:55 +00002496*)
2497 dynamic_linker=no
2498 ;;
2499esac
2500AC_MSG_RESULT([$dynamic_linker])
2501test "$dynamic_linker" = no && can_build_shared=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00002502])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
mostang.com!davidm0440c532003-01-17 18:12:55 +00002503
hp.com!davidm2c9be972003-11-22 06:08:20 +00002504
2505# _LT_AC_TAGCONFIG
2506# ----------------
2507AC_DEFUN([_LT_AC_TAGCONFIG],
2508[AC_ARG_WITH([tags],
2509 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2510 [include additional configurations @<:@automatic@:>@])],
2511 [tagnames="$withval"])
2512
2513if test -f "$ltmain" && test -n "$tagnames"; then
2514 if test ! -f "${ofile}"; then
2515 AC_MSG_WARN([output file `$ofile' does not exist])
2516 fi
2517
2518 if test -z "$LTCC"; then
2519 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2520 if test -z "$LTCC"; then
2521 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2522 else
2523 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2524 fi
2525 fi
2526
2527 # Extract list of available tagged configurations in $ofile.
2528 # Note that this assumes the entire list is on one line.
2529 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2530
2531 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2532 for tagname in $tagnames; do
2533 IFS="$lt_save_ifs"
2534 # Check whether tagname contains only valid characters
2535 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2536 "") ;;
2537 *) AC_MSG_ERROR([invalid tag name: $tagname])
2538 ;;
2539 esac
2540
2541 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2542 then
2543 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2544 fi
2545
2546 # Update the list of available tags.
2547 if test -n "$tagname"; then
2548 echo appending configuration tag \"$tagname\" to $ofile
2549
2550 case $tagname in
2551 CXX)
2552 if test -n "$CXX" && test "X$CXX" != "Xno"; then
2553 AC_LIBTOOL_LANG_CXX_CONFIG
2554 else
2555 tagname=""
2556 fi
2557 ;;
2558
2559 F77)
2560 if test -n "$F77" && test "X$F77" != "Xno"; then
2561 AC_LIBTOOL_LANG_F77_CONFIG
2562 else
2563 tagname=""
2564 fi
2565 ;;
2566
2567 GCJ)
2568 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2569 AC_LIBTOOL_LANG_GCJ_CONFIG
2570 else
2571 tagname=""
2572 fi
2573 ;;
2574
2575 RC)
2576 AC_LIBTOOL_LANG_RC_CONFIG
2577 ;;
2578
2579 *)
2580 AC_MSG_ERROR([Unsupported tag name: $tagname])
2581 ;;
2582 esac
2583
2584 # Append the new tag name to the list of available tags.
2585 if test -n "$tagname" ; then
2586 available_tags="$available_tags $tagname"
2587 fi
2588 fi
2589 done
2590 IFS="$lt_save_ifs"
2591
2592 # Now substitute the updated list of available tags.
2593 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2594 mv "${ofile}T" "$ofile"
2595 chmod +x "$ofile"
2596 else
2597 rm -f "${ofile}T"
2598 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2599 fi
2600fi
2601])# _LT_AC_TAGCONFIG
2602
2603
2604# AC_LIBTOOL_DLOPEN
2605# -----------------
2606# enable checks for dlopen support
2607AC_DEFUN([AC_LIBTOOL_DLOPEN],
2608 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2609])# AC_LIBTOOL_DLOPEN
2610
2611
2612# AC_LIBTOOL_WIN32_DLL
2613# --------------------
2614# declare package support for building win32 dll's
2615AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2616[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2617])# AC_LIBTOOL_WIN32_DLL
2618
2619
2620# AC_ENABLE_SHARED([DEFAULT])
2621# ---------------------------
2622# implement the --enable-shared flag
2623# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2624AC_DEFUN([AC_ENABLE_SHARED],
2625[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2626AC_ARG_ENABLE([shared],
2627 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2628 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2629 [p=${PACKAGE-default}
2630 case $enableval in
2631 yes) enable_shared=yes ;;
2632 no) enable_shared=no ;;
2633 *)
2634 enable_shared=no
2635 # Look at the argument we got. We use all the common list separators.
2636 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2637 for pkg in $enableval; do
2638 IFS="$lt_save_ifs"
2639 if test "X$pkg" = "X$p"; then
2640 enable_shared=yes
2641 fi
2642 done
2643 IFS="$lt_save_ifs"
2644 ;;
2645 esac],
2646 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2647])# AC_ENABLE_SHARED
2648
2649
2650# AC_DISABLE_SHARED
2651# -----------------
2652#- set the default shared flag to --disable-shared
2653AC_DEFUN([AC_DISABLE_SHARED],
2654[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2655AC_ENABLE_SHARED(no)
2656])# AC_DISABLE_SHARED
2657
2658
2659# AC_ENABLE_STATIC([DEFAULT])
2660# ---------------------------
2661# implement the --enable-static flag
2662# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2663AC_DEFUN([AC_ENABLE_STATIC],
2664[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2665AC_ARG_ENABLE([static],
2666 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2667 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2668 [p=${PACKAGE-default}
2669 case $enableval in
2670 yes) enable_static=yes ;;
2671 no) enable_static=no ;;
2672 *)
2673 enable_static=no
2674 # Look at the argument we got. We use all the common list separators.
2675 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2676 for pkg in $enableval; do
2677 IFS="$lt_save_ifs"
2678 if test "X$pkg" = "X$p"; then
2679 enable_static=yes
2680 fi
2681 done
2682 IFS="$lt_save_ifs"
2683 ;;
2684 esac],
2685 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2686])# AC_ENABLE_STATIC
2687
2688
2689# AC_DISABLE_STATIC
2690# -----------------
2691# set the default static flag to --disable-static
2692AC_DEFUN([AC_DISABLE_STATIC],
2693[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2694AC_ENABLE_STATIC(no)
2695])# AC_DISABLE_STATIC
2696
2697
2698# AC_ENABLE_FAST_INSTALL([DEFAULT])
2699# ---------------------------------
2700# implement the --enable-fast-install flag
2701# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2702AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2703[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2704AC_ARG_ENABLE([fast-install],
2705 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2706 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2707 [p=${PACKAGE-default}
2708 case $enableval in
2709 yes) enable_fast_install=yes ;;
2710 no) enable_fast_install=no ;;
2711 *)
2712 enable_fast_install=no
2713 # Look at the argument we got. We use all the common list separators.
2714 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2715 for pkg in $enableval; do
2716 IFS="$lt_save_ifs"
2717 if test "X$pkg" = "X$p"; then
2718 enable_fast_install=yes
2719 fi
2720 done
2721 IFS="$lt_save_ifs"
2722 ;;
2723 esac],
2724 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2725])# AC_ENABLE_FAST_INSTALL
2726
2727
2728# AC_DISABLE_FAST_INSTALL
2729# -----------------------
2730# set the default to --disable-fast-install
2731AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2732[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2733AC_ENABLE_FAST_INSTALL(no)
2734])# AC_DISABLE_FAST_INSTALL
2735
2736
2737# AC_LIBTOOL_PICMODE([MODE])
2738# --------------------------
2739# implement the --with-pic flag
2740# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2741AC_DEFUN([AC_LIBTOOL_PICMODE],
2742[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2743pic_mode=ifelse($#,1,$1,default)
2744])# AC_LIBTOOL_PICMODE
2745
2746
2747# AC_PROG_EGREP
2748# -------------
2749# This is predefined starting with Autoconf 2.54, so this conditional
2750# definition can be removed once we require Autoconf 2.54 or later.
2751m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2752[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2753 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2754 then ac_cv_prog_egrep='grep -E'
2755 else ac_cv_prog_egrep='egrep'
2756 fi])
2757 EGREP=$ac_cv_prog_egrep
2758 AC_SUBST([EGREP])
2759])])
2760
2761
2762# AC_PATH_TOOL_PREFIX
2763# -------------------
2764# find a file program which can recognise shared library
2765AC_DEFUN([AC_PATH_TOOL_PREFIX],
2766[AC_REQUIRE([AC_PROG_EGREP])dnl
2767AC_MSG_CHECKING([for $1])
2768AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2769[case $MAGIC_CMD in
2770[[\\/*] | ?:[\\/]*])
2771 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2772 ;;
2773*)
2774 lt_save_MAGIC_CMD="$MAGIC_CMD"
2775 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2776dnl $ac_dummy forces splitting on constant user-supplied paths.
2777dnl POSIX.2 word splitting is done only on the output of word expansions,
2778dnl not every word. This closes a longstanding sh security hole.
2779 ac_dummy="ifelse([$2], , $PATH, [$2])"
2780 for ac_dir in $ac_dummy; do
2781 IFS="$lt_save_ifs"
2782 test -z "$ac_dir" && ac_dir=.
2783 if test -f $ac_dir/$1; then
2784 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2785 if test -n "$file_magic_test_file"; then
2786 case $deplibs_check_method in
2787 "file_magic "*)
2788 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2789 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2790 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2791 $EGREP "$file_magic_regex" > /dev/null; then
2792 :
2793 else
2794 cat <<EOF 1>&2
2795
2796*** Warning: the command libtool uses to detect shared libraries,
2797*** $file_magic_cmd, produces output that libtool cannot recognize.
2798*** The result is that libtool may fail to recognize shared libraries
2799*** as such. This will affect the creation of libtool libraries that
2800*** depend on shared libraries, but programs linked with such libtool
2801*** libraries will work regardless of this problem. Nevertheless, you
2802*** may want to report the problem to your system manager and/or to
2803*** bug-libtool@gnu.org
2804
2805EOF
2806 fi ;;
2807 esac
2808 fi
2809 break
2810 fi
2811 done
2812 IFS="$lt_save_ifs"
2813 MAGIC_CMD="$lt_save_MAGIC_CMD"
2814 ;;
2815esac])
2816MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2817if test -n "$MAGIC_CMD"; then
2818 AC_MSG_RESULT($MAGIC_CMD)
2819else
2820 AC_MSG_RESULT(no)
2821fi
2822])# AC_PATH_TOOL_PREFIX
2823
2824
2825# AC_PATH_MAGIC
2826# -------------
2827# find a file program which can recognise a shared library
2828AC_DEFUN([AC_PATH_MAGIC],
2829[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2830if test -z "$lt_cv_path_MAGIC_CMD"; then
2831 if test -n "$ac_tool_prefix"; then
2832 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2833 else
2834 MAGIC_CMD=:
2835 fi
2836fi
2837])# AC_PATH_MAGIC
2838
2839
2840# AC_PROG_LD
2841# ----------
2842# find the pathname to the GNU or non-GNU linker
2843AC_DEFUN([AC_PROG_LD],
2844[AC_ARG_WITH([gnu-ld],
2845 [AC_HELP_STRING([--with-gnu-ld],
2846 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2847 [test "$withval" = no || with_gnu_ld=yes],
2848 [with_gnu_ld=no])
2849AC_REQUIRE([LT_AC_PROG_SED])dnl
2850AC_REQUIRE([AC_PROG_CC])dnl
2851AC_REQUIRE([AC_CANONICAL_HOST])dnl
2852AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2853ac_prog=ld
2854if test "$GCC" = yes; then
2855 # Check if gcc -print-prog-name=ld gives a path.
2856 AC_MSG_CHECKING([for ld used by $CC])
2857 case $host in
2858 *-*-mingw*)
2859 # gcc leaves a trailing carriage return which upsets mingw
2860 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2861 *)
2862 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2863 esac
2864 case $ac_prog in
2865 # Accept absolute paths.
2866 [[\\/]]* | ?:[[\\/]]*)
2867 re_direlt='/[[^/]][[^/]]*/\.\./'
2868 # Canonicalize the pathname of ld
2869 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2870 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2871 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2872 done
2873 test -z "$LD" && LD="$ac_prog"
2874 ;;
2875 "")
2876 # If it fails, then pretend we aren't using GCC.
2877 ac_prog=ld
2878 ;;
2879 *)
2880 # If it is relative, then search for the first ld in PATH.
2881 with_gnu_ld=unknown
2882 ;;
2883 esac
2884elif test "$with_gnu_ld" = yes; then
2885 AC_MSG_CHECKING([for GNU ld])
2886else
2887 AC_MSG_CHECKING([for non-GNU ld])
2888fi
2889AC_CACHE_VAL(lt_cv_path_LD,
2890[if test -z "$LD"; then
2891 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2892 for ac_dir in $PATH; do
2893 IFS="$lt_save_ifs"
2894 test -z "$ac_dir" && ac_dir=.
2895 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2896 lt_cv_path_LD="$ac_dir/$ac_prog"
2897 # Check to see if the program is GNU ld. I'd rather use --version,
2898 # but apparently some GNU ld's only accept -v.
2899 # Break only if it was the GNU/non-GNU ld that we prefer.
2900 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2901 *GNU* | *'with BFD'*)
2902 test "$with_gnu_ld" != no && break
2903 ;;
2904 *)
2905 test "$with_gnu_ld" != yes && break
2906 ;;
2907 esac
2908 fi
2909 done
2910 IFS="$lt_save_ifs"
2911else
2912 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2913fi])
2914LD="$lt_cv_path_LD"
2915if test -n "$LD"; then
2916 AC_MSG_RESULT($LD)
2917else
2918 AC_MSG_RESULT(no)
2919fi
2920test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2921AC_PROG_LD_GNU
2922])# AC_PROG_LD
2923
2924
2925# AC_PROG_LD_GNU
2926# --------------
2927AC_DEFUN([AC_PROG_LD_GNU],
2928[AC_REQUIRE([AC_PROG_EGREP])dnl
2929AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2930[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2931case `$LD -v 2>&1 </dev/null` in
2932*GNU* | *'with BFD'*)
2933 lt_cv_prog_gnu_ld=yes
2934 ;;
2935*)
2936 lt_cv_prog_gnu_ld=no
2937 ;;
2938esac])
2939with_gnu_ld=$lt_cv_prog_gnu_ld
2940])# AC_PROG_LD_GNU
2941
2942
2943# AC_PROG_LD_RELOAD_FLAG
2944# ----------------------
2945# find reload flag for linker
2946# -- PORTME Some linkers may need a different reload flag.
2947AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2948[AC_CACHE_CHECK([for $LD option to reload object files],
2949 lt_cv_ld_reload_flag,
2950 [lt_cv_ld_reload_flag='-r'])
2951reload_flag=$lt_cv_ld_reload_flag
2952case $reload_flag in
2953"" | " "*) ;;
2954*) reload_flag=" $reload_flag" ;;
2955esac
2956reload_cmds='$LD$reload_flag -o $output$reload_objs'
2957])# AC_PROG_LD_RELOAD_FLAG
2958
2959
2960# AC_DEPLIBS_CHECK_METHOD
2961# -----------------------
2962# how to check for library dependencies
2963# -- PORTME fill in with the dynamic library characteristics
2964AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2965[AC_CACHE_CHECK([how to recognise dependent libraries],
2966lt_cv_deplibs_check_method,
2967[lt_cv_file_magic_cmd='$MAGIC_CMD'
2968lt_cv_file_magic_test_file=
2969lt_cv_deplibs_check_method='unknown'
2970# Need to set the preceding variable on all platforms that support
2971# interlibrary dependencies.
2972# 'none' -- dependencies not supported.
2973# `unknown' -- same as none, but documents that we really don't know.
2974# 'pass_all' -- all dependencies passed with no checks.
2975# 'test_compile' -- check by making test program.
2976# 'file_magic [[regex]]' -- check by looking for files in library path
2977# which responds to the $file_magic_cmd with a given extended regex.
2978# If you have `file' or equivalent on your system and you're not sure
2979# whether `pass_all' will *always* work, you probably want this one.
2980
2981case $host_os in
2982aix4* | aix5*)
2983 lt_cv_deplibs_check_method=pass_all
2984 ;;
2985
2986beos*)
2987 lt_cv_deplibs_check_method=pass_all
2988 ;;
2989
2990bsdi4*)
2991 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2992 lt_cv_file_magic_cmd='/usr/bin/file -L'
2993 lt_cv_file_magic_test_file=/shlib/libc.so
2994 ;;
2995
2996cygwin* | mingw* | pw32*)
2997 # win32_libid is a shell function defined in ltmain.sh
2998 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2999 lt_cv_file_magic_cmd='win32_libid'
3000 ;;
3001
3002darwin* | rhapsody*)
3003 lt_cv_deplibs_check_method=pass_all
3004 ;;
3005
3006freebsd* | kfreebsd*-gnu)
3007 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3008 case $host_cpu in
3009 i*86 )
3010 # Not sure whether the presence of OpenBSD here was a mistake.
3011 # Let's accept both of them until this is cleared up.
3012 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3013 lt_cv_file_magic_cmd=/usr/bin/file
3014 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3015 ;;
3016 esac
3017 else
3018 lt_cv_deplibs_check_method=pass_all
3019 fi
3020 ;;
3021
3022gnu*)
3023 lt_cv_deplibs_check_method=pass_all
3024 ;;
3025
3026hpux10.20* | hpux11*)
3027 lt_cv_file_magic_cmd=/usr/bin/file
3028 case "$host_cpu" in
3029 ia64*)
3030 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3031 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3032 ;;
3033 hppa*64*)
3034 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3035 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3036 ;;
3037 *)
3038 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3039 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3040 ;;
3041 esac
3042 ;;
3043
3044irix5* | irix6* | nonstopux*)
3045 case $LD in
3046 *-32|*"-32 ") libmagic=32-bit;;
3047 *-n32|*"-n32 ") libmagic=N32;;
3048 *-64|*"-64 ") libmagic=64-bit;;
3049 *) libmagic=never-match;;
3050 esac
3051 lt_cv_deplibs_check_method=pass_all
3052 ;;
3053
3054# This must be Linux ELF.
3055linux*)
3056 lt_cv_deplibs_check_method=pass_all
3057 ;;
3058
3059netbsd*)
3060 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3061 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3062 else
3063 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3064 fi
3065 ;;
3066
3067newos6*)
3068 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3069 lt_cv_file_magic_cmd=/usr/bin/file
3070 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3071 ;;
3072
3073nto-qnx*)
3074 lt_cv_deplibs_check_method=unknown
3075 ;;
3076
3077openbsd*)
3078 lt_cv_file_magic_cmd=/usr/bin/file
3079 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3080 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3081 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3082 else
3083 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3084 fi
3085 ;;
3086
3087osf3* | osf4* | osf5*)
3088 lt_cv_deplibs_check_method=pass_all
3089 ;;
3090
3091sco3.2v5*)
3092 lt_cv_deplibs_check_method=pass_all
3093 ;;
3094
3095solaris*)
3096 lt_cv_deplibs_check_method=pass_all
3097 ;;
3098
3099sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3100 case $host_vendor in
3101 motorola)
3102 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]]'
3103 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3104 ;;
3105 ncr)
3106 lt_cv_deplibs_check_method=pass_all
3107 ;;
3108 sequent)
3109 lt_cv_file_magic_cmd='/bin/file'
3110 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3111 ;;
3112 sni)
3113 lt_cv_file_magic_cmd='/bin/file'
3114 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3115 lt_cv_file_magic_test_file=/lib/libc.so
3116 ;;
3117 siemens)
3118 lt_cv_deplibs_check_method=pass_all
3119 ;;
3120 esac
3121 ;;
3122
3123sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3124 lt_cv_deplibs_check_method=pass_all
3125 ;;
3126esac
3127])
3128file_magic_cmd=$lt_cv_file_magic_cmd
3129deplibs_check_method=$lt_cv_deplibs_check_method
3130test -z "$deplibs_check_method" && deplibs_check_method=unknown
3131])# AC_DEPLIBS_CHECK_METHOD
3132
3133
3134# AC_PROG_NM
3135# ----------
3136# find the pathname to a BSD-compatible name lister
3137AC_DEFUN([AC_PROG_NM],
3138[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3139[if test -n "$NM"; then
3140 # Let the user override the test.
3141 lt_cv_path_NM="$NM"
3142else
3143 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3144 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3145 IFS="$lt_save_ifs"
3146 test -z "$ac_dir" && ac_dir=.
3147 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3148 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3149 # Check to see if the nm accepts a BSD-compat flag.
3150 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3151 # nm: unknown option "B" ignored
3152 # Tru64's nm complains that /dev/null is an invalid object file
3153 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3154 */dev/null* | *'Invalid file or object type'*)
3155 lt_cv_path_NM="$tmp_nm -B"
3156 break
3157 ;;
3158 *)
3159 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3160 */dev/null*)
3161 lt_cv_path_NM="$tmp_nm -p"
3162 break
3163 ;;
3164 *)
3165 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3166 continue # so that we can try to find one that supports BSD flags
3167 ;;
3168 esac
3169 esac
3170 fi
3171 done
3172 IFS="$lt_save_ifs"
3173 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3174fi])
3175NM="$lt_cv_path_NM"
3176])# AC_PROG_NM
3177
3178
3179# AC_CHECK_LIBM
3180# -------------
3181# check for math library
3182AC_DEFUN([AC_CHECK_LIBM],
3183[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3184LIBM=
3185case $host in
3186*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3187 # These system don't have libm, or don't need it
3188 ;;
3189*-ncr-sysv4.3*)
3190 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3191 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3192 ;;
3193*)
3194 AC_CHECK_LIB(m, cos, LIBM="-lm")
3195 ;;
3196esac
3197])# AC_CHECK_LIBM
3198
3199
3200# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3201# -----------------------------------
3202# sets LIBLTDL to the link flags for the libltdl convenience library and
3203# LTDLINCL to the include flags for the libltdl header and adds
3204# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3205# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3206# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3207# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3208# '${top_srcdir}/' (note the single quotes!). If your package is not
3209# flat and you're not using automake, define top_builddir and
3210# top_srcdir appropriately in the Makefiles.
3211AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3212[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3213 case $enable_ltdl_convenience in
3214 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3215 "") enable_ltdl_convenience=yes
3216 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3217 esac
3218 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3219 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3220 # For backwards non-gettext consistent compatibility...
3221 INCLTDL="$LTDLINCL"
3222])# AC_LIBLTDL_CONVENIENCE
3223
3224
3225# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3226# -----------------------------------
3227# sets LIBLTDL to the link flags for the libltdl installable library and
3228# LTDLINCL to the include flags for the libltdl header and adds
3229# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3230# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3231# DIRECTORY is not provided and an installed libltdl is not found, it is
3232# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3233# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3234# quotes!). If your package is not flat and you're not using automake,
3235# define top_builddir and top_srcdir appropriately in the Makefiles.
3236# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3237AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3238[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3239 AC_CHECK_LIB(ltdl, lt_dlinit,
3240 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3241 [if test x"$enable_ltdl_install" = xno; then
3242 AC_MSG_WARN([libltdl not installed, but installation disabled])
3243 else
3244 enable_ltdl_install=yes
3245 fi
3246 ])
3247 if test x"$enable_ltdl_install" = x"yes"; then
3248 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3249 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3250 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3251 else
3252 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3253 LIBLTDL="-lltdl"
3254 LTDLINCL=
3255 fi
3256 # For backwards non-gettext consistent compatibility...
3257 INCLTDL="$LTDLINCL"
3258])# AC_LIBLTDL_INSTALLABLE
3259
3260
3261# AC_LIBTOOL_CXX
3262# --------------
3263# enable support for C++ libraries
3264AC_DEFUN([AC_LIBTOOL_CXX],
3265[AC_REQUIRE([_LT_AC_LANG_CXX])
3266])# AC_LIBTOOL_CXX
3267
3268
3269# _LT_AC_LANG_CXX
3270# ---------------
3271AC_DEFUN([_LT_AC_LANG_CXX],
3272[AC_REQUIRE([AC_PROG_CXX])
3273AC_REQUIRE([AC_PROG_CXXCPP])
3274_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3275])# _LT_AC_LANG_CXX
3276
3277
3278# AC_LIBTOOL_F77
3279# --------------
3280# enable support for Fortran 77 libraries
3281AC_DEFUN([AC_LIBTOOL_F77],
3282[AC_REQUIRE([_LT_AC_LANG_F77])
3283])# AC_LIBTOOL_F77
3284
3285
3286# _LT_AC_LANG_F77
3287# ---------------
3288AC_DEFUN([_LT_AC_LANG_F77],
3289[AC_REQUIRE([AC_PROG_F77])
3290_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3291])# _LT_AC_LANG_F77
3292
3293
3294# AC_LIBTOOL_GCJ
3295# --------------
3296# enable support for GCJ libraries
3297AC_DEFUN([AC_LIBTOOL_GCJ],
3298[AC_REQUIRE([_LT_AC_LANG_GCJ])
3299])# AC_LIBTOOL_GCJ
3300
3301
3302# _LT_AC_LANG_GCJ
3303# ---------------
3304AC_DEFUN([_LT_AC_LANG_GCJ],
3305[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3306 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3307 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3308 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3309 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3310 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3311_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3312])# _LT_AC_LANG_GCJ
3313
3314
3315# AC_LIBTOOL_RC
3316# --------------
3317# enable support for Windows resource files
3318AC_DEFUN([AC_LIBTOOL_RC],
3319[AC_REQUIRE([LT_AC_PROG_RC])
3320_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3321])# AC_LIBTOOL_RC
3322
3323
3324# AC_LIBTOOL_LANG_C_CONFIG
3325# ------------------------
3326# Ensure that the configuration vars for the C compiler are
3327# suitably defined. Those variables are subsequently used by
3328# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3329AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3330AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3331[lt_save_CC="$CC"
3332AC_LANG_PUSH(C)
3333
3334# Source file extension for C test sources.
3335ac_ext=c
3336
3337# Object file extension for compiled C test sources.
3338objext=o
3339_LT_AC_TAGVAR(objext, $1)=$objext
3340
3341# Code to be used in simple compile tests
3342lt_simple_compile_test_code="int some_variable = 0;\n"
3343
3344# Code to be used in simple link tests
3345lt_simple_link_test_code='int main(){return(0);}\n'
3346
3347_LT_AC_SYS_COMPILER
3348
3349#
3350# Check for any special shared library compilation flags.
3351#
3352_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3353if test "$GCC" = no; then
3354 case $host_os in
3355 sco3.2v5*)
3356 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3357 ;;
3358 esac
3359fi
3360if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3361 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3362 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3363 else
3364 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3365 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3366 fi
3367fi
3368
3369
3370#
3371# Check to make sure the static flag actually works.
3372#
3373AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3374 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3375 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3376 [],
3377 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3378
3379
3380AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3381AC_LIBTOOL_PROG_COMPILER_PIC($1)
3382AC_LIBTOOL_PROG_CC_C_O($1)
3383AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3384AC_LIBTOOL_PROG_LD_SHLIBS($1)
3385AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3386AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3387AC_LIBTOOL_SYS_LIB_STRIP
3388AC_LIBTOOL_DLOPEN_SELF($1)
3389
3390# Report which librarie types wil actually be built
mostang.com!davidm0440c532003-01-17 18:12:55 +00003391AC_MSG_CHECKING([if libtool supports shared libraries])
3392AC_MSG_RESULT([$can_build_shared])
3393
3394AC_MSG_CHECKING([whether to build shared libraries])
3395test "$can_build_shared" = "no" && enable_shared=no
3396
3397# On AIX, shared libraries and static libraries use the same namespace, and
3398# are all built from PIC.
3399case "$host_os" in
3400aix3*)
3401 test "$enable_shared" = yes && enable_static=no
3402 if test -n "$RANLIB"; then
3403 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3404 postinstall_cmds='$RANLIB $lib'
3405 fi
3406 ;;
3407
3408aix4*)
3409 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3410 test "$enable_shared" = yes && enable_static=no
3411 fi
3412 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003413 darwin* | rhapsody*)
3414 if test "$GCC" = yes; then
3415 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3416 case "$host_os" in
3417 rhapsody* | darwin1.[[012]])
3418 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3419 ;;
3420 *) # Darwin 1.3 on
3421 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3422 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3423 else
3424 case ${MACOSX_DEPLOYMENT_TARGET} in
3425 10.[[012]])
3426 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3427 ;;
3428 10.*)
3429 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3430 ;;
3431 esac
3432 fi
3433 ;;
3434 esac
3435 output_verbose_link_cmd='echo'
3436 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3437 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3438 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3439 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3440 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3441 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3442 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3443 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3444 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3445 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3446 else
3447 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3448 fi
3449 ;;
mostang.com!davidm0440c532003-01-17 18:12:55 +00003450esac
3451AC_MSG_RESULT([$enable_shared])
3452
3453AC_MSG_CHECKING([whether to build static libraries])
3454# Make sure either enable_shared or enable_static is yes.
3455test "$enable_shared" = yes || enable_static=yes
3456AC_MSG_RESULT([$enable_static])
3457
hp.com!davidm2c9be972003-11-22 06:08:20 +00003458AC_LIBTOOL_CONFIG($1)
3459
3460AC_LANG_POP
3461CC="$lt_save_CC"
3462])# AC_LIBTOOL_LANG_C_CONFIG
3463
3464
3465# AC_LIBTOOL_LANG_CXX_CONFIG
3466# --------------------------
3467# Ensure that the configuration vars for the C compiler are
3468# suitably defined. Those variables are subsequently used by
3469# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3470AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3471AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3472[AC_LANG_PUSH(C++)
3473AC_REQUIRE([AC_PROG_CXX])
3474AC_REQUIRE([AC_PROG_CXXCPP])
3475
3476_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3477_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3478_LT_AC_TAGVAR(always_export_symbols, $1)=no
3479_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3480_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3481_LT_AC_TAGVAR(hardcode_direct, $1)=no
3482_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3483_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3484_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3485_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3486_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3487_LT_AC_TAGVAR(module_cmds, $1)=
3488_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3489_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3490_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3491_LT_AC_TAGVAR(no_undefined_flag, $1)=
3492_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3493_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3494
3495# Dependencies to place before and after the object being linked:
3496_LT_AC_TAGVAR(predep_objects, $1)=
3497_LT_AC_TAGVAR(postdep_objects, $1)=
3498_LT_AC_TAGVAR(predeps, $1)=
3499_LT_AC_TAGVAR(postdeps, $1)=
3500_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3501
3502# Source file extension for C++ test sources.
3503ac_ext=cc
3504
3505# Object file extension for compiled C++ test sources.
3506objext=o
3507_LT_AC_TAGVAR(objext, $1)=$objext
3508
3509# Code to be used in simple compile tests
3510lt_simple_compile_test_code="int some_variable = 0;\n"
3511
3512# Code to be used in simple link tests
3513lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3514
3515# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3516_LT_AC_SYS_COMPILER
3517
3518# Allow CC to be a program name with arguments.
3519lt_save_CC=$CC
3520lt_save_LD=$LD
3521lt_save_GCC=$GCC
3522GCC=$GXX
3523lt_save_with_gnu_ld=$with_gnu_ld
3524lt_save_path_LD=$lt_cv_path_LD
3525if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3526 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3527else
3528 unset lt_cv_prog_gnu_ld
3529fi
3530if test -n "${lt_cv_path_LDCXX+set}"; then
3531 lt_cv_path_LD=$lt_cv_path_LDCXX
3532else
3533 unset lt_cv_path_LD
3534fi
3535test -z "${LDCXX+set}" || LD=$LDCXX
3536CC=${CXX-"c++"}
3537compiler=$CC
3538_LT_AC_TAGVAR(compiler, $1)=$CC
3539cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3540
3541# We don't want -fno-exception wen compiling C++ code, so set the
3542# no_builtin_flag separately
3543if test "$GXX" = yes; then
3544 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3545else
3546 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
mostang.com!davidm0440c532003-01-17 18:12:55 +00003547fi
3548
hp.com!davidm2c9be972003-11-22 06:08:20 +00003549if test "$GXX" = yes; then
3550 # Set up default GNU C++ configuration
mostang.com!davidm0440c532003-01-17 18:12:55 +00003551
hp.com!davidm2c9be972003-11-22 06:08:20 +00003552 AC_PROG_LD
mostang.com!davidm0440c532003-01-17 18:12:55 +00003553
hp.com!davidm2c9be972003-11-22 06:08:20 +00003554 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3555 # archiving commands below assume that GNU ld is being used.
3556 if test "$with_gnu_ld" = yes; then
3557 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3558 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
mostang.com!davidm0440c532003-01-17 18:12:55 +00003559
hp.com!davidm2c9be972003-11-22 06:08:20 +00003560 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3561 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3562
3563 # If archive_cmds runs LD, not CC, wlarc should be empty
3564 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3565 # investigate it a little bit more. (MM)
3566 wlarc='${wl}'
3567
3568 # ancient GNU ld didn't support --whole-archive et. al.
3569 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3570 grep 'no-whole-archive' > /dev/null; then
3571 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
mostang.com!davidm0440c532003-01-17 18:12:55 +00003572 else
hp.com!davidm2c9be972003-11-22 06:08:20 +00003573 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3574 fi
3575 else
3576 with_gnu_ld=no
3577 wlarc=
mostang.com!davidm0440c532003-01-17 18:12:55 +00003578
hp.com!davidm2c9be972003-11-22 06:08:20 +00003579 # A generic and very simple default shared library creation
3580 # command for GNU C++ for the case where it uses the native
3581 # linker, instead of GNU ld. If possible, this setting should
3582 # overridden to take advantage of the native linker features on
3583 # the platform it is being used on.
3584 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3585 fi
3586
3587 # Commands to make compiler produce verbose output that lists
3588 # what "hidden" libraries, object files and flags are used when
3589 # linking a shared library.
3590 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3591
3592else
3593 GXX=no
3594 with_gnu_ld=no
3595 wlarc=
3596fi
3597
3598# PORTME: fill in a description of your system's C++ link characteristics
3599AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3600_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3601case $host_os in
3602 aix3*)
3603 # FIXME: insert proper C++ library support
3604 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3605 ;;
3606 aix4* | aix5*)
3607 if test "$host_cpu" = ia64; then
3608 # On IA64, the linker does run time linking by default, so we don't
3609 # have to do anything special.
3610 aix_use_runtimelinking=no
3611 exp_sym_flag='-Bexport'
3612 no_entry_flag=""
3613 else
3614 aix_use_runtimelinking=no
3615
3616 # Test if we are trying to use run time linking or normal
3617 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3618 # need to do runtime linking.
3619 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3620 for ld_flag in $LDFLAGS; do
3621 case $ld_flag in
3622 *-brtl*)
3623 aix_use_runtimelinking=yes
3624 break
3625 ;;
3626 esac
3627 done
3628 esac
3629
3630 exp_sym_flag='-bexport'
3631 no_entry_flag='-bnoentry'
3632 fi
3633
3634 # When large executables or shared objects are built, AIX ld can
3635 # have problems creating the table of contents. If linking a library
3636 # or program results in "error TOC overflow" add -mminimal-toc to
3637 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3638 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3639
3640 _LT_AC_TAGVAR(archive_cmds, $1)=''
3641 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3642 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3643 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3644
3645 if test "$GXX" = yes; then
3646 case $host_os in aix4.[012]|aix4.[012].*)
3647 # We only want to do this on AIX 4.2 and lower, the check
3648 # below for broken collect2 doesn't work under 4.3+
3649 collect2name=`${CC} -print-prog-name=collect2`
3650 if test -f "$collect2name" && \
3651 strings "$collect2name" | grep resolve_lib_name >/dev/null
3652 then
3653 # We have reworked collect2
3654 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3655 else
3656 # We have old collect2
3657 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3658 # It fails to find uninstalled libraries when the uninstalled
3659 # path is not listed in the libpath. Setting hardcode_minus_L
3660 # to unsupported forces relinking
3661 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3662 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3663 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3664 fi
3665 esac
3666 shared_flag='-shared'
3667 else
3668 # not using gcc
3669 if test "$host_cpu" = ia64; then
3670 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3671 # chokes on -Wl,-G. The following line is correct:
3672 shared_flag='-G'
3673 else
3674 if test "$aix_use_runtimelinking" = yes; then
3675 shared_flag='${wl}-G'
3676 else
3677 shared_flag='${wl}-bM:SRE'
3678 fi
3679 fi
3680 fi
3681
3682 # It seems that -bexpall does not export symbols beginning with
3683 # underscore (_), so it is better to generate a list of symbols to export.
3684 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3685 if test "$aix_use_runtimelinking" = yes; then
3686 # Warning - without using the other runtime loading flags (-brtl),
3687 # -berok will link without error, but may produce a broken library.
3688 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3689 # Determine the default libpath from the value encoded in an empty executable.
3690 _LT_AC_SYS_LIBPATH_AIX
3691 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3692
3693 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
3694 else
3695 if test "$host_cpu" = ia64; then
3696 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3697 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3698 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3699 else
3700 # Determine the default libpath from the value encoded in an empty executable.
3701 _LT_AC_SYS_LIBPATH_AIX
3702 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3703 # Warning - without using the other run time loading flags,
3704 # -berok will link without error, but may produce a broken library.
3705 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3706 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3707 # -bexpall does not export symbols beginning with underscore (_)
3708 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3709 # Exported symbols can be pulled into shared objects from archives
3710 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3711 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3712 # This is similar to how AIX traditionally builds it's shared libraries.
3713 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3714 fi
3715 fi
3716 ;;
3717 chorus*)
3718 case $cc_basename in
3719 *)
3720 # FIXME: insert proper C++ library support
3721 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3722 ;;
3723 esac
3724 ;;
3725
3726 cygwin* | mingw* | pw32*)
3727 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3728 # as there is no search path for DLLs.
3729 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3730 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3731 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3732 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3733
3734 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3735 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3736 # If the export-symbols file already is a .def file (1st line
3737 # is EXPORTS), use it as is; otherwise, prepend...
3738 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3739 cp $export_symbols $output_objdir/$soname.def;
3740 else
3741 echo EXPORTS > $output_objdir/$soname.def;
3742 cat $export_symbols >> $output_objdir/$soname.def;
3743 fi~
3744 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3745 else
3746 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3747 fi
3748 ;;
3749
3750 darwin* | rhapsody*)
3751 if test "$GXX" = yes; then
3752 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3753 case "$host_os" in
3754 rhapsody* | darwin1.[[012]])
3755 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3756 ;;
3757 *) # Darwin 1.3 on
3758 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3759 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3760 else
3761 case ${MACOSX_DEPLOYMENT_TARGET} in
3762 10.[[012]])
3763 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3764 ;;
3765 10.*)
3766 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3767 ;;
3768 esac
3769 fi
3770 ;;
3771 esac
3772 lt_int_apple_cc_single_mod=no
3773 output_verbose_link_cmd='echo'
3774 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3775 lt_int_apple_cc_single_mod=yes
3776 fi
3777 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3778 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3779 else
3780 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3781 fi
3782 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3783
3784 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3785 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3786 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3787 else
3788 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3789 fi
3790 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3791 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3792 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3793 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3794 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3795 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3796 else
3797 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3798 fi
3799 ;;
3800
3801 dgux*)
3802 case $cc_basename in
3803 ec++)
3804 # FIXME: insert proper C++ library support
3805 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3806 ;;
3807 ghcx)
3808 # Green Hills C++ Compiler
3809 # FIXME: insert proper C++ library support
3810 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3811 ;;
3812 *)
3813 # FIXME: insert proper C++ library support
3814 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3815 ;;
3816 esac
3817 ;;
3818 freebsd[12]*)
3819 # C++ shared libraries reported to be fairly broken before switch to ELF
3820 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3821 ;;
3822 freebsd-elf*)
3823 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3824 ;;
3825 freebsd* | kfreebsd*-gnu)
3826 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3827 # conventions
3828 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3829 ;;
3830 gnu*)
3831 ;;
3832 hpux9*)
3833 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3834 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3835 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3836 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3837 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3838 # but as the default
3839 # location of the library.
3840
3841 case $cc_basename in
3842 CC)
3843 # FIXME: insert proper C++ library support
3844 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3845 ;;
3846 aCC)
3847 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3848 # Commands to make compiler produce verbose output that lists
3849 # what "hidden" libraries, object files and flags are used when
3850 # linking a shared library.
3851 #
3852 # There doesn't appear to be a way to prevent this compiler from
3853 # explicitly linking system object files so we need to strip them
3854 # from the output so that they don't get included in the library
3855 # dependencies.
3856 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3857 ;;
3858 *)
3859 if test "$GXX" = yes; then
3860 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3861 else
3862 # FIXME: insert proper C++ library support
3863 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3864 fi
3865 ;;
3866 esac
3867 ;;
3868 hpux10*|hpux11*)
3869 if test $with_gnu_ld = no; then
3870 case "$host_cpu" in
3871 hppa*64*)
3872 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3873 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3874 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3875 ;;
3876 ia64*)
3877 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3878 ;;
3879 *)
3880 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3881 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3882 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3883 ;;
3884 esac
3885 fi
3886 case "$host_cpu" in
3887 hppa*64*)
3888 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3889 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3890 ;;
3891 ia64*)
3892 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3893 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3894 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3895 # but as the default
3896 # location of the library.
3897 ;;
3898 *)
3899 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3900 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3901 # but as the default
3902 # location of the library.
3903 ;;
3904 esac
3905
3906 case $cc_basename in
3907 CC)
3908 # FIXME: insert proper C++ library support
3909 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3910 ;;
3911 aCC)
3912 case "$host_cpu" in
3913 hppa*64*|ia64*)
3914 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3915 ;;
3916 *)
3917 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3918 ;;
3919 esac
3920 # Commands to make compiler produce verbose output that lists
3921 # what "hidden" libraries, object files and flags are used when
3922 # linking a shared library.
3923 #
3924 # There doesn't appear to be a way to prevent this compiler from
3925 # explicitly linking system object files so we need to strip them
3926 # from the output so that they don't get included in the library
3927 # dependencies.
3928 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3929 ;;
3930 *)
3931 if test "$GXX" = yes; then
3932 if test $with_gnu_ld = no; then
3933 case "$host_cpu" in
3934 ia64*|hppa*64*)
3935 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3936 ;;
3937 *)
3938 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3939 ;;
3940 esac
3941 fi
3942 else
3943 # FIXME: insert proper C++ library support
3944 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3945 fi
3946 ;;
3947 esac
3948 ;;
3949 irix5* | irix6*)
3950 case $cc_basename in
3951 CC)
3952 # SGI C++
3953 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3954
3955 # Archives containing C++ object files must be created using
3956 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3957 # necessary to make sure instantiated templates are included
3958 # in the archive.
3959 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3960 ;;
3961 *)
3962 if test "$GXX" = yes; then
3963 if test "$with_gnu_ld" = no; then
3964 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3965 else
3966 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3967 fi
3968 fi
3969 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3970 ;;
3971 esac
3972 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3973 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3974 ;;
3975 linux*)
3976 case $cc_basename in
3977 KCC)
3978 # Kuck and Associates, Inc. (KAI) C++ Compiler
3979
3980 # KCC will only create a shared library if the output file
3981 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3982 # to its proper name (with version) after linking.
3983 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3984 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3985 # Commands to make compiler produce verbose output that lists
3986 # what "hidden" libraries, object files and flags are used when
3987 # linking a shared library.
3988 #
3989 # There doesn't appear to be a way to prevent this compiler from
3990 # explicitly linking system object files so we need to strip them
3991 # from the output so that they don't get included in the library
3992 # dependencies.
3993 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3994
3995 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3996 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3997
3998 # Archives containing C++ object files must be created using
3999 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4000 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4001 ;;
4002 icpc)
4003 # Intel C++
4004 with_gnu_ld=yes
4005 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4006 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4007 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4008 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4009 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4010 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4011 ;;
4012 cxx)
4013 # Compaq C++
4014 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4015 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4016
4017 runpath_var=LD_RUN_PATH
4018 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4019 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4020
4021 # Commands to make compiler produce verbose output that lists
4022 # what "hidden" libraries, object files and flags are used when
4023 # linking a shared library.
4024 #
4025 # There doesn't appear to be a way to prevent this compiler from
4026 # explicitly linking system object files so we need to strip them
4027 # from the output so that they don't get included in the library
4028 # dependencies.
4029 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4030 ;;
4031 esac
4032 ;;
4033 lynxos*)
4034 # FIXME: insert proper C++ library support
4035 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4036 ;;
4037 m88k*)
4038 # FIXME: insert proper C++ library support
4039 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4040 ;;
4041 mvs*)
4042 case $cc_basename in
4043 cxx)
4044 # FIXME: insert proper C++ library support
4045 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4046 ;;
4047 *)
4048 # FIXME: insert proper C++ library support
4049 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4050 ;;
4051 esac
4052 ;;
4053 netbsd*)
4054 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4055 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4056 wlarc=
4057 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4058 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4059 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4060 fi
4061 # Workaround some broken pre-1.5 toolchains
4062 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4063 ;;
4064 osf3*)
4065 case $cc_basename in
4066 KCC)
4067 # Kuck and Associates, Inc. (KAI) C++ Compiler
4068
4069 # KCC will only create a shared library if the output file
4070 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4071 # to its proper name (with version) after linking.
4072 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4073
4074 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4075 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4076
4077 # Archives containing C++ object files must be created using
4078 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4079 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4080
4081 ;;
4082 RCC)
4083 # Rational C++ 2.4.1
4084 # FIXME: insert proper C++ library support
4085 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4086 ;;
4087 cxx)
4088 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4089 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4090
4091 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4092 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4093
4094 # Commands to make compiler produce verbose output that lists
4095 # what "hidden" libraries, object files and flags are used when
4096 # linking a shared library.
4097 #
4098 # There doesn't appear to be a way to prevent this compiler from
4099 # explicitly linking system object files so we need to strip them
4100 # from the output so that they don't get included in the library
4101 # dependencies.
4102 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4103 ;;
4104 *)
4105 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4106 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4107 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4108
4109 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4110 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4111
4112 # Commands to make compiler produce verbose output that lists
4113 # what "hidden" libraries, object files and flags are used when
4114 # linking a shared library.
4115 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4116
4117 else
4118 # FIXME: insert proper C++ library support
4119 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4120 fi
4121 ;;
4122 esac
4123 ;;
4124 osf4* | osf5*)
4125 case $cc_basename in
4126 KCC)
4127 # Kuck and Associates, Inc. (KAI) C++ Compiler
4128
4129 # KCC will only create a shared library if the output file
4130 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4131 # to its proper name (with version) after linking.
4132 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4133
4134 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4135 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4136
4137 # Archives containing C++ object files must be created using
4138 # the KAI C++ compiler.
4139 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4140 ;;
4141 RCC)
4142 # Rational C++ 2.4.1
4143 # FIXME: insert proper C++ library support
4144 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4145 ;;
4146 cxx)
4147 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4148 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4149 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4150 echo "-hidden">> $lib.exp~
4151 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
4152 $rm $lib.exp'
4153
4154 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4155 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4156
4157 # Commands to make compiler produce verbose output that lists
4158 # what "hidden" libraries, object files and flags are used when
4159 # linking a shared library.
4160 #
4161 # There doesn't appear to be a way to prevent this compiler from
4162 # explicitly linking system object files so we need to strip them
4163 # from the output so that they don't get included in the library
4164 # dependencies.
4165 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4166 ;;
4167 *)
4168 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4169 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4170 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4171
4172 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4173 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4174
4175 # Commands to make compiler produce verbose output that lists
4176 # what "hidden" libraries, object files and flags are used when
4177 # linking a shared library.
4178 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4179
4180 else
4181 # FIXME: insert proper C++ library support
4182 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4183 fi
4184 ;;
4185 esac
4186 ;;
4187 psos*)
4188 # FIXME: insert proper C++ library support
4189 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4190 ;;
4191 sco*)
4192 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4193 case $cc_basename in
4194 CC)
4195 # FIXME: insert proper C++ library support
4196 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4197 ;;
4198 *)
4199 # FIXME: insert proper C++ library support
4200 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4201 ;;
4202 esac
4203 ;;
4204 sunos4*)
4205 case $cc_basename in
4206 CC)
4207 # Sun C++ 4.x
4208 # FIXME: insert proper C++ library support
4209 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4210 ;;
4211 lcc)
4212 # Lucid
4213 # FIXME: insert proper C++ library support
4214 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4215 ;;
4216 *)
4217 # FIXME: insert proper C++ library support
4218 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4219 ;;
4220 esac
4221 ;;
4222 solaris*)
4223 case $cc_basename in
4224 CC)
4225 # Sun C++ 4.2, 5.x and Centerline C++
4226 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4227 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4228 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4229 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4230
4231 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4232 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4233 case $host_os in
4234 solaris2.[0-5] | solaris2.[0-5].*) ;;
4235 *)
4236 # The C++ compiler is used as linker so we must use $wl
4237 # flag to pass the commands to the underlying system
4238 # linker.
4239 # Supported since Solaris 2.6 (maybe 2.5.1?)
4240 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4241 ;;
4242 esac
4243 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4244
4245 # Commands to make compiler produce verbose output that lists
4246 # what "hidden" libraries, object files and flags are used when
4247 # linking a shared library.
4248 #
4249 # There doesn't appear to be a way to prevent this compiler from
4250 # explicitly linking system object files so we need to strip them
4251 # from the output so that they don't get included in the library
4252 # dependencies.
4253 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4254
4255 # Archives containing C++ object files must be created using
4256 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4257 # necessary to make sure instantiated templates are included
4258 # in the archive.
4259 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4260 ;;
4261 gcx)
4262 # Green Hills C++ Compiler
4263 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4264
4265 # The C++ compiler must be used to create the archive.
4266 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4267 ;;
4268 *)
4269 # GNU C++ compiler with Solaris linker
4270 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4271 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4272 if $CC --version | grep -v '^2\.7' > /dev/null; then
4273 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4274 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4275 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4276
4277 # Commands to make compiler produce verbose output that lists
4278 # what "hidden" libraries, object files and flags are used when
4279 # linking a shared library.
4280 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4281 else
4282 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4283 # platform.
4284 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4285 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4286 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4287
4288 # Commands to make compiler produce verbose output that lists
4289 # what "hidden" libraries, object files and flags are used when
4290 # linking a shared library.
4291 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4292 fi
4293
4294 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4295 fi
4296 ;;
4297 esac
4298 ;;
4299 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4300 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4301 ;;
4302 tandem*)
4303 case $cc_basename in
4304 NCC)
4305 # NonStop-UX NCC 3.20
4306 # FIXME: insert proper C++ library support
4307 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4308 ;;
4309 *)
4310 # FIXME: insert proper C++ library support
4311 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4312 ;;
4313 esac
4314 ;;
4315 vxworks*)
4316 # FIXME: insert proper C++ library support
4317 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4318 ;;
4319 *)
4320 # FIXME: insert proper C++ library support
4321 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4322 ;;
4323esac
4324AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4325test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4326
4327_LT_AC_TAGVAR(GCC, $1)="$GXX"
4328_LT_AC_TAGVAR(LD, $1)="$LD"
4329
4330AC_LIBTOOL_POSTDEP_PREDEP($1)
4331AC_LIBTOOL_PROG_COMPILER_PIC($1)
4332AC_LIBTOOL_PROG_CC_C_O($1)
4333AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4334AC_LIBTOOL_PROG_LD_SHLIBS($1)
4335AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4336AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4337AC_LIBTOOL_SYS_LIB_STRIP
4338AC_LIBTOOL_DLOPEN_SELF($1)
4339
4340AC_LIBTOOL_CONFIG($1)
4341
4342AC_LANG_POP
4343CC=$lt_save_CC
4344LDCXX=$LD
4345LD=$lt_save_LD
4346GCC=$lt_save_GCC
4347with_gnu_ldcxx=$with_gnu_ld
4348with_gnu_ld=$lt_save_with_gnu_ld
4349lt_cv_path_LDCXX=$lt_cv_path_LD
4350lt_cv_path_LD=$lt_save_path_LD
4351lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4352lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4353])# AC_LIBTOOL_LANG_CXX_CONFIG
4354
4355# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4356# ------------------------
4357# Figure out "hidden" library dependencies from verbose
4358# compiler output when linking a shared library.
4359# Parse the compiler output and extract the necessary
4360# objects, libraries and library flags.
4361AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4362dnl we can't use the lt_simple_compile_test_code here,
4363dnl because it contains code intended for an executable,
4364dnl not a library. It's possible we should let each
4365dnl tag define a new lt_????_link_test_code variable,
4366dnl but it's only used here...
4367ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4368int a;
4369void foo (void) { a = 0; }
4370EOF
4371],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4372class Foo
4373{
4374public:
4375 Foo (void) { a = 0; }
4376private:
4377 int a;
4378};
4379EOF
4380],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4381 subroutine foo
4382 implicit none
4383 integer*4 a
4384 a=0
4385 return
4386 end
4387EOF
4388],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4389public class foo {
4390 private int a;
4391 public void bar (void) {
4392 a = 0;
4393 }
4394};
4395EOF
4396])
4397dnl Parse the compiler output and extract the necessary
4398dnl objects, libraries and library flags.
4399if AC_TRY_EVAL(ac_compile); then
4400 # Parse the compiler output and extract the necessary
4401 # objects, libraries and library flags.
4402
4403 # Sentinel used to keep track of whether or not we are before
4404 # the conftest object file.
4405 pre_test_object_deps_done=no
4406
4407 # The `*' in the case matches for architectures that use `case' in
4408 # $output_verbose_cmd can trigger glob expansion during the loop
4409 # eval without this substitution.
4410 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4411
4412 for p in `eval $output_verbose_link_cmd`; do
4413 case $p in
4414
4415 -L* | -R* | -l*)
4416 # Some compilers place space between "-{L,R}" and the path.
4417 # Remove the space.
4418 if test $p = "-L" \
4419 || test $p = "-R"; then
4420 prev=$p
4421 continue
4422 else
4423 prev=
4424 fi
4425
4426 if test "$pre_test_object_deps_done" = no; then
4427 case $p in
4428 -L* | -R*)
4429 # Internal compiler library paths should come after those
4430 # provided the user. The postdeps already come after the
4431 # user supplied libs so there is no need to process them.
4432 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4433 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4434 else
4435 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4436 fi
4437 ;;
4438 # The "-l" case would never come before the object being
4439 # linked, so don't bother handling this case.
4440 esac
4441 else
4442 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4443 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4444 else
4445 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4446 fi
4447 fi
4448 ;;
4449
4450 *.$objext)
4451 # This assumes that the test object file only shows up
4452 # once in the compiler output.
4453 if test "$p" = "conftest.$objext"; then
4454 pre_test_object_deps_done=yes
4455 continue
4456 fi
4457
4458 if test "$pre_test_object_deps_done" = no; then
4459 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4460 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4461 else
4462 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4463 fi
4464 else
4465 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4466 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4467 else
4468 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4469 fi
4470 fi
4471 ;;
4472
4473 *) ;; # Ignore the rest.
4474
4475 esac
4476 done
4477
4478 # Clean up.
4479 rm -f a.out a.exe
4480else
4481 echo "libtool.m4: error: problem compiling $1 test program"
4482fi
4483
4484$rm -f confest.$objext
4485
4486case " $_LT_AC_TAGVAR(postdeps, $1) " in
4487*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4488esac
4489])# AC_LIBTOOL_POSTDEP_PREDEP
4490
4491# AC_LIBTOOL_LANG_F77_CONFIG
4492# ------------------------
4493# Ensure that the configuration vars for the C compiler are
4494# suitably defined. Those variables are subsequently used by
4495# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4496AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4497AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4498[AC_REQUIRE([AC_PROG_F77])
4499AC_LANG_PUSH(Fortran 77)
4500
4501_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4502_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4503_LT_AC_TAGVAR(always_export_symbols, $1)=no
4504_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4505_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4506_LT_AC_TAGVAR(hardcode_direct, $1)=no
4507_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4508_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4509_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4510_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4511_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4512_LT_AC_TAGVAR(module_cmds, $1)=
4513_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4514_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4515_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4516_LT_AC_TAGVAR(no_undefined_flag, $1)=
4517_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4518_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4519
4520# Source file extension for f77 test sources.
4521ac_ext=f
4522
4523# Object file extension for compiled f77 test sources.
4524objext=o
4525_LT_AC_TAGVAR(objext, $1)=$objext
4526
4527# Code to be used in simple compile tests
4528lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4529
4530# Code to be used in simple link tests
4531lt_simple_link_test_code=" program t\n end\n"
4532
4533# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4534_LT_AC_SYS_COMPILER
4535
4536# Allow CC to be a program name with arguments.
4537lt_save_CC="$CC"
4538CC=${F77-"f77"}
4539compiler=$CC
4540_LT_AC_TAGVAR(compiler, $1)=$CC
4541cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4542
4543AC_MSG_CHECKING([if libtool supports shared libraries])
4544AC_MSG_RESULT([$can_build_shared])
4545
4546AC_MSG_CHECKING([whether to build shared libraries])
4547test "$can_build_shared" = "no" && enable_shared=no
4548
4549# On AIX, shared libraries and static libraries use the same namespace, and
4550# are all built from PIC.
4551case "$host_os" in
4552aix3*)
4553 test "$enable_shared" = yes && enable_static=no
4554 if test -n "$RANLIB"; then
4555 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4556 postinstall_cmds='$RANLIB $lib'
4557 fi
4558 ;;
4559aix4*)
4560 test "$enable_shared" = yes && enable_static=no
4561 ;;
4562esac
4563AC_MSG_RESULT([$enable_shared])
4564
4565AC_MSG_CHECKING([whether to build static libraries])
4566# Make sure either enable_shared or enable_static is yes.
4567test "$enable_shared" = yes || enable_static=yes
4568AC_MSG_RESULT([$enable_static])
4569
4570test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4571
4572_LT_AC_TAGVAR(GCC, $1)="$G77"
4573_LT_AC_TAGVAR(LD, $1)="$LD"
4574
4575AC_LIBTOOL_PROG_COMPILER_PIC($1)
4576AC_LIBTOOL_PROG_CC_C_O($1)
4577AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4578AC_LIBTOOL_PROG_LD_SHLIBS($1)
4579AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4580AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4581AC_LIBTOOL_SYS_LIB_STRIP
4582
4583
4584AC_LIBTOOL_CONFIG($1)
4585
4586AC_LANG_POP
4587CC="$lt_save_CC"
4588])# AC_LIBTOOL_LANG_F77_CONFIG
4589
4590
4591# AC_LIBTOOL_LANG_GCJ_CONFIG
4592# --------------------------
4593# Ensure that the configuration vars for the C compiler are
4594# suitably defined. Those variables are subsequently used by
4595# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4596AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4597AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4598[AC_LANG_SAVE
4599
4600# Source file extension for Java test sources.
4601ac_ext=java
4602
4603# Object file extension for compiled Java test sources.
4604objext=o
4605_LT_AC_TAGVAR(objext, $1)=$objext
4606
4607# Code to be used in simple compile tests
4608lt_simple_compile_test_code="class foo {}\n"
4609
4610# Code to be used in simple link tests
4611lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4612
4613# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4614_LT_AC_SYS_COMPILER
4615
4616# Allow CC to be a program name with arguments.
4617lt_save_CC="$CC"
4618CC=${GCJ-"gcj"}
4619compiler=$CC
4620_LT_AC_TAGVAR(compiler, $1)=$CC
4621
4622# GCJ did not exist at the time GCC didn't implicitly link libc in.
4623_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4624
4625AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4626AC_LIBTOOL_PROG_COMPILER_PIC($1)
4627AC_LIBTOOL_PROG_CC_C_O($1)
4628AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4629AC_LIBTOOL_PROG_LD_SHLIBS($1)
4630AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4631AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4632AC_LIBTOOL_SYS_LIB_STRIP
4633AC_LIBTOOL_DLOPEN_SELF($1)
4634
4635AC_LIBTOOL_CONFIG($1)
4636
4637AC_LANG_RESTORE
4638CC="$lt_save_CC"
4639])# AC_LIBTOOL_LANG_GCJ_CONFIG
4640
4641
4642# AC_LIBTOOL_LANG_RC_CONFIG
4643# --------------------------
4644# Ensure that the configuration vars for the Windows resource compiler are
4645# suitably defined. Those variables are subsequently used by
4646# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4647AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4648AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4649[AC_LANG_SAVE
4650
4651# Source file extension for RC test sources.
4652ac_ext=rc
4653
4654# Object file extension for compiled RC test sources.
4655objext=o
4656_LT_AC_TAGVAR(objext, $1)=$objext
4657
4658# Code to be used in simple compile tests
4659lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4660
4661# Code to be used in simple link tests
4662lt_simple_link_test_code="$lt_simple_compile_test_code"
4663
4664# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4665_LT_AC_SYS_COMPILER
4666
4667# Allow CC to be a program name with arguments.
4668lt_save_CC="$CC"
4669CC=${RC-"windres"}
4670compiler=$CC
4671_LT_AC_TAGVAR(compiler, $1)=$CC
4672_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4673
4674AC_LIBTOOL_CONFIG($1)
4675
4676AC_LANG_RESTORE
4677CC="$lt_save_CC"
4678])# AC_LIBTOOL_LANG_RC_CONFIG
4679
4680
4681# AC_LIBTOOL_CONFIG([TAGNAME])
4682# ----------------------------
4683# If TAGNAME is not passed, then create an initial libtool script
4684# with a default configuration from the untagged config vars. Otherwise
4685# add code to config.status for appending the configuration named by
4686# TAGNAME from the matching tagged config vars.
4687AC_DEFUN([AC_LIBTOOL_CONFIG],
4688[# The else clause should only fire when bootstrapping the
mostang.com!davidm0440c532003-01-17 18:12:55 +00004689# libtool distribution, otherwise you forgot to ship ltmain.sh
4690# with your package, and you will get complaints that there are
4691# no rules to generate ltmain.sh.
4692if test -f "$ltmain"; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00004693 # See if we are running on zsh, and set the options which allow our commands through
4694 # without removal of \ escapes.
4695 if test -n "${ZSH_VERSION+set}" ; then
4696 setopt NO_GLOB_SUBST
4697 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00004698 # Now quote all the things that may contain metacharacters while being
4699 # careful not to overquote the AC_SUBSTed values. We take copies of the
4700 # variables and quote the copies for generation of the libtool script.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004701 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4702 SED SHELL STRIP \
4703 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4704 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4705 deplibs_check_method reload_flag reload_cmds need_locks \
4706 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4707 lt_cv_sys_global_symbol_to_c_name_address \
mostang.com!davidm0440c532003-01-17 18:12:55 +00004708 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
hp.com!davidm2c9be972003-11-22 06:08:20 +00004709 old_postinstall_cmds old_postuninstall_cmds \
4710 _LT_AC_TAGVAR(compiler, $1) \
4711 _LT_AC_TAGVAR(CC, $1) \
4712 _LT_AC_TAGVAR(LD, $1) \
4713 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4714 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4715 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4716 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4717 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4718 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4719 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4720 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4721 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4722 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4723 _LT_AC_TAGVAR(predep_objects, $1) \
4724 _LT_AC_TAGVAR(postdep_objects, $1) \
4725 _LT_AC_TAGVAR(predeps, $1) \
4726 _LT_AC_TAGVAR(postdeps, $1) \
4727 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4728 _LT_AC_TAGVAR(archive_cmds, $1) \
4729 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4730 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4731 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4732 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4733 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4734 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4735 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4736 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4737 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4738 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4739 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4740 _LT_AC_TAGVAR(module_cmds, $1) \
4741 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4742 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4743 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4744 _LT_AC_TAGVAR(include_expsyms, $1); do
mostang.com!davidm0440c532003-01-17 18:12:55 +00004745
4746 case $var in
hp.com!davidm2c9be972003-11-22 06:08:20 +00004747 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4748 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4749 _LT_AC_TAGVAR(archive_cmds, $1) | \
4750 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4751 _LT_AC_TAGVAR(module_cmds, $1) | \
4752 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4753 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4754 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4755 extract_expsyms_cmds | reload_cmds | finish_cmds | \
mostang.com!davidm0440c532003-01-17 18:12:55 +00004756 postinstall_cmds | postuninstall_cmds | \
hp.com!davidm2c9be972003-11-22 06:08:20 +00004757 old_postinstall_cmds | old_postuninstall_cmds | \
4758 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004759 # Double-quote double-evaled strings.
4760 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4761 ;;
4762 *)
4763 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4764 ;;
4765 esac
4766 done
4767
hp.com!davidm2c9be972003-11-22 06:08:20 +00004768 case $lt_echo in
4769 *'\[$]0 --fallback-echo"')
4770 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4771 ;;
4772 esac
mostang.com!davidm0440c532003-01-17 18:12:55 +00004773
hp.com!davidm2c9be972003-11-22 06:08:20 +00004774ifelse([$1], [],
4775 [cfgfile="${ofile}T"
4776 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4777 $rm -f "$cfgfile"
4778 AC_MSG_NOTICE([creating $ofile])],
4779 [cfgfile="$ofile"])
4780
4781 cat <<__EOF__ >> "$cfgfile"
4782ifelse([$1], [],
4783[#! $SHELL
4784
4785# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
mostang.com!davidm0440c532003-01-17 18:12:55 +00004786# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4787# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4788#
hp.com!davidm2c9be972003-11-22 06:08:20 +00004789# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4790# Free Software Foundation, Inc.
4791#
4792# This file is part of GNU Libtool:
mostang.com!davidm0440c532003-01-17 18:12:55 +00004793# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4794#
4795# This program is free software; you can redistribute it and/or modify
4796# it under the terms of the GNU General Public License as published by
4797# the Free Software Foundation; either version 2 of the License, or
4798# (at your option) any later version.
4799#
4800# This program is distributed in the hope that it will be useful, but
4801# WITHOUT ANY WARRANTY; without even the implied warranty of
4802# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4803# General Public License for more details.
4804#
4805# You should have received a copy of the GNU General Public License
4806# along with this program; if not, write to the Free Software
4807# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4808#
4809# As a special exception to the GNU General Public License, if you
4810# distribute this file as part of a program that contains a
4811# configuration script generated by Autoconf, you may include it under
4812# the same distribution terms that you use for the rest of that program.
4813
hp.com!davidm2c9be972003-11-22 06:08:20 +00004814# A sed program that does not truncate output.
mostang.com!davidm0440c532003-01-17 18:12:55 +00004815SED=$lt_SED
4816
4817# Sed that helps us avoid accidentally triggering echo(1) options like -n.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004818Xsed="$SED -e s/^X//"
mostang.com!davidm0440c532003-01-17 18:12:55 +00004819
4820# The HP-UX ksh and POSIX shell print the target directory to stdout
4821# if CDPATH is set.
4822if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4823
hp.com!davidm2c9be972003-11-22 06:08:20 +00004824# The names of the tagged configurations supported by this script.
4825available_tags=
4826
4827# ### BEGIN LIBTOOL CONFIG],
4828[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
mostang.com!davidm0440c532003-01-17 18:12:55 +00004829
4830# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4831
4832# Shell to use when invoking shell scripts.
4833SHELL=$lt_SHELL
4834
4835# Whether or not to build shared libraries.
4836build_libtool_libs=$enable_shared
4837
4838# Whether or not to build static libraries.
4839build_old_libs=$enable_static
4840
4841# Whether or not to add -lc for building shared libraries.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004842build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4843
4844# Whether or not to disallow shared libs when runtime libs are static
4845allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004846
4847# Whether or not to optimize for fast installation.
4848fast_install=$enable_fast_install
4849
4850# The host system.
4851host_alias=$host_alias
4852host=$host
4853
4854# An echo program that does not interpret backslashes.
4855echo=$lt_echo
4856
4857# The archiver.
4858AR=$lt_AR
4859AR_FLAGS=$lt_AR_FLAGS
4860
hp.com!davidm2c9be972003-11-22 06:08:20 +00004861# A C compiler.
4862LTCC=$lt_LTCC
4863
4864# A language-specific compiler.
4865CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004866
4867# Is the compiler the GNU C compiler?
hp.com!davidm2c9be972003-11-22 06:08:20 +00004868with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4869
4870# An ERE matcher.
4871EGREP=$lt_EGREP
mostang.com!davidm0440c532003-01-17 18:12:55 +00004872
4873# The linker used to build libraries.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004874LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004875
4876# Whether we need hard or soft links.
4877LN_S=$lt_LN_S
4878
4879# A BSD-compatible nm program.
4880NM=$lt_NM
4881
4882# A symbol stripping program
hp.com!davidm2c9be972003-11-22 06:08:20 +00004883STRIP=$lt_STRIP
mostang.com!davidm0440c532003-01-17 18:12:55 +00004884
4885# Used to examine libraries when file_magic_cmd begins "file"
4886MAGIC_CMD=$MAGIC_CMD
4887
4888# Used on cygwin: DLL creation program.
4889DLLTOOL="$DLLTOOL"
4890
4891# Used on cygwin: object dumper.
4892OBJDUMP="$OBJDUMP"
4893
4894# Used on cygwin: assembler.
4895AS="$AS"
4896
4897# The name of the directory that contains temporary libtool files.
4898objdir=$objdir
4899
4900# How to create reloadable object files.
4901reload_flag=$lt_reload_flag
4902reload_cmds=$lt_reload_cmds
4903
4904# How to pass a linker flag through the compiler.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004905wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004906
4907# Object file suffix (normally "o").
4908objext="$ac_objext"
4909
4910# Old archive suffix (normally "a").
4911libext="$libext"
4912
hp.com!davidm2c9be972003-11-22 06:08:20 +00004913# Shared library suffix (normally ".so").
4914shrext='$shrext'
4915
mostang.com!davidm0440c532003-01-17 18:12:55 +00004916# Executable file suffix (normally "").
4917exeext="$exeext"
4918
4919# Additional compiler flags for building library objects.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004920pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004921pic_mode=$pic_mode
4922
hp.com!davidm2c9be972003-11-22 06:08:20 +00004923# What is the maximum length of a command?
4924max_cmd_len=$lt_cv_sys_max_cmd_len
mostang.com!davidm0440c532003-01-17 18:12:55 +00004925
hp.com!davidm2c9be972003-11-22 06:08:20 +00004926# Does compiler simultaneously support -c and -o options?
4927compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004928
4929# Must we lock files when doing compilation ?
4930need_locks=$lt_need_locks
4931
4932# Do we need the lib prefix for modules?
4933need_lib_prefix=$need_lib_prefix
4934
4935# Do we need a version for libraries?
4936need_version=$need_version
4937
4938# Whether dlopen is supported.
4939dlopen_support=$enable_dlopen
4940
4941# Whether dlopen of programs is supported.
4942dlopen_self=$enable_dlopen_self
4943
4944# Whether dlopen of statically linked programs is supported.
4945dlopen_self_static=$enable_dlopen_self_static
4946
4947# Compiler flag to prevent dynamic linking.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004948link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004949
4950# Compiler flag to turn off builtin functions.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004951no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004952
4953# Compiler flag to allow reflexive dlopens.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004954export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004955
4956# Compiler flag to generate shared objects directly from archives.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004957whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004958
4959# Compiler flag to generate thread-safe objects.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004960thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004961
4962# Library versioning type.
4963version_type=$version_type
4964
4965# Format of library name prefix.
4966libname_spec=$lt_libname_spec
4967
4968# List of archive names. First name is the real one, the rest are links.
4969# The last name is the one that the linker finds with -lNAME.
4970library_names_spec=$lt_library_names_spec
4971
4972# The coded name of the library, if different from the real name.
4973soname_spec=$lt_soname_spec
4974
4975# Commands used to build and install an old-style archive.
4976RANLIB=$lt_RANLIB
hp.com!davidm2c9be972003-11-22 06:08:20 +00004977old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004978old_postinstall_cmds=$lt_old_postinstall_cmds
4979old_postuninstall_cmds=$lt_old_postuninstall_cmds
4980
4981# Create an old-style archive from a shared archive.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004982old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004983
4984# Create a temporary old-style archive to link instead of a shared archive.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004985old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004986
4987# Commands used to build and install a shared archive.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004988archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4989archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004990postinstall_cmds=$lt_postinstall_cmds
4991postuninstall_cmds=$lt_postuninstall_cmds
4992
hp.com!davidm2c9be972003-11-22 06:08:20 +00004993# Commands used to build a loadable module (assumed same as above if empty)
4994module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4995module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4996
mostang.com!davidm0440c532003-01-17 18:12:55 +00004997# Commands to strip libraries.
4998old_striplib=$lt_old_striplib
4999striplib=$lt_striplib
5000
hp.com!davidm2c9be972003-11-22 06:08:20 +00005001# Dependencies to place before the objects being linked to create a
5002# shared library.
5003predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5004
5005# Dependencies to place after the objects being linked to create a
5006# shared library.
5007postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5008
5009# Dependencies to place before the objects being linked to create a
5010# shared library.
5011predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5012
5013# Dependencies to place after the objects being linked to create a
5014# shared library.
5015postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5016
5017# The library search path used internally by the compiler when linking
5018# a shared library.
5019compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5020
mostang.com!davidm0440c532003-01-17 18:12:55 +00005021# Method to check whether dependent libraries are shared objects.
5022deplibs_check_method=$lt_deplibs_check_method
5023
5024# Command to use when deplibs_check_method == file_magic.
5025file_magic_cmd=$lt_file_magic_cmd
5026
5027# Flag that allows shared libraries with undefined symbols to be built.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005028allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005029
5030# Flag that forces no undefined symbols.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005031no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005032
5033# Commands used to finish a libtool library installation in a directory.
5034finish_cmds=$lt_finish_cmds
5035
5036# Same as above, but a single script fragment to be evaled but not shown.
5037finish_eval=$lt_finish_eval
5038
5039# Take the output of nm and produce a listing of raw symbols and C names.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005040global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
mostang.com!davidm0440c532003-01-17 18:12:55 +00005041
5042# Transform the output of nm in a proper C declaration
hp.com!davidm2c9be972003-11-22 06:08:20 +00005043global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
mostang.com!davidm0440c532003-01-17 18:12:55 +00005044
5045# Transform the output of nm in a C name address pair
hp.com!davidm2c9be972003-11-22 06:08:20 +00005046global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
mostang.com!davidm0440c532003-01-17 18:12:55 +00005047
5048# This is the shared library runtime path variable.
5049runpath_var=$runpath_var
5050
5051# This is the shared library path variable.
5052shlibpath_var=$shlibpath_var
5053
5054# Is shlibpath searched before the hard-coded library search path?
5055shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5056
5057# How to hardcode a shared library path into an executable.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005058hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005059
5060# Whether we should hardcode library paths into libraries.
5061hardcode_into_libs=$hardcode_into_libs
5062
5063# Flag to hardcode \$libdir into a binary during linking.
5064# This must work even if \$libdir does not exist.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005065hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5066
5067# If ld is used when linking, flag to hardcode \$libdir into
5068# a binary during linking. This must work even if \$libdir does
5069# not exist.
5070hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005071
5072# Whether we need a single -rpath flag with a separated argument.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005073hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005074
hp.com!davidm2c9be972003-11-22 06:08:20 +00005075# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
mostang.com!davidm0440c532003-01-17 18:12:55 +00005076# resulting binary.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005077hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005078
5079# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5080# resulting binary.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005081hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005082
5083# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5084# the resulting binary.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005085hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5086
5087# Set to yes if building a shared library automatically hardcodes DIR into the library
5088# and all subsequent libraries and executables linked against it.
5089hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005090
5091# Variables whose values should be saved in libtool wrapper scripts and
5092# restored at relink time.
5093variables_saved_for_relink="$variables_saved_for_relink"
5094
5095# Whether libtool must link a program against all its dependency libraries.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005096link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005097
5098# Compile-time system search path for libraries
5099sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5100
5101# Run-time system search path for libraries
5102sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5103
5104# Fix the shell variable \$srcfile for the compiler.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005105fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
mostang.com!davidm0440c532003-01-17 18:12:55 +00005106
5107# Set to yes if exported symbols are required.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005108always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005109
5110# The commands to list exported symbols.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005111export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005112
5113# The commands to extract the exported symbol list from a shared archive.
5114extract_expsyms_cmds=$lt_extract_expsyms_cmds
5115
5116# Symbols that should not be listed in the preloaded symbols.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005117exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005118
5119# Symbols that must always be exported.
hp.com!davidm2c9be972003-11-22 06:08:20 +00005120include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00005121
hp.com!davidm2c9be972003-11-22 06:08:20 +00005122ifelse([$1],[],
5123[# ### END LIBTOOL CONFIG],
5124[# ### END LIBTOOL TAG CONFIG: $tagname])
mostang.com!davidm0440c532003-01-17 18:12:55 +00005125
5126__EOF__
5127
hp.com!davidm2c9be972003-11-22 06:08:20 +00005128ifelse([$1],[], [
mostang.com!davidm0440c532003-01-17 18:12:55 +00005129 case $host_os in
5130 aix3*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005131 cat <<\EOF >> "$cfgfile"
mostang.com!davidm0440c532003-01-17 18:12:55 +00005132
5133# AIX sometimes has problems with the GCC collect2 program. For some
5134# reason, if we set the COLLECT_NAMES environment variable, the problems
5135# vanish in a puff of smoke.
5136if test "X${COLLECT_NAMES+set}" != Xset; then
5137 COLLECT_NAMES=
5138 export COLLECT_NAMES
5139fi
5140EOF
5141 ;;
5142 esac
5143
hp.com!davidm2c9be972003-11-22 06:08:20 +00005144 # We use sed instead of cat because bash on DJGPP gets confused if
5145 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5146 # text mode, it properly converts lines to CR/LF. This bash problem
5147 # is reportedly fixed, but why not run on old versions too?
5148 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5149
5150 mv -f "$cfgfile" "$ofile" || \
5151 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5152 chmod +x "$ofile"
5153])
5154else
5155 # If there is no Makefile yet, we rely on a make rule to execute
5156 # `config.status --recheck' to rerun these tests and create the
5157 # libtool script then.
5158 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5159 if test -f "$ltmain_in"; then
5160 test -f Makefile && make "$ltmain"
5161 fi
5162fi
5163])# AC_LIBTOOL_CONFIG
5164
5165
5166# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5167# -------------------------------------------
5168AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5169[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5170
5171_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5172
5173if test "$GCC" = yes; then
5174 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5175
5176 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5177 lt_cv_prog_compiler_rtti_exceptions,
5178 [-fno-rtti -fno-exceptions], [],
5179 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5180fi
5181])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5182
5183
5184# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5185# ---------------------------------
5186AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5187[AC_REQUIRE([AC_CANONICAL_HOST])
5188AC_REQUIRE([AC_PROG_NM])
5189AC_REQUIRE([AC_OBJEXT])
5190# Check for command to grab the raw symbol name followed by C symbol from nm.
5191AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5192AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5193[
5194# These are sane defaults that work on at least a few old systems.
5195# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5196
5197# Character class describing NM global symbol codes.
5198symcode='[[BCDEGRST]]'
5199
5200# Regexp to match symbols that can be accessed directly from C.
5201sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5202
5203# Transform the above into a raw symbol and a C symbol.
5204symxfrm='\1 \2\3 \3'
5205
5206# Transform an extracted symbol line into a proper C declaration
5207lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5208
5209# Transform an extracted symbol line into symbol name and symbol address
5210lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5211
5212# Define system-specific variables.
5213case $host_os in
5214aix*)
5215 symcode='[[BCDT]]'
5216 ;;
5217cygwin* | mingw* | pw32*)
5218 symcode='[[ABCDGISTW]]'
5219 ;;
5220hpux*) # Its linker distinguishes data from code symbols
5221 if test "$host_cpu" = ia64; then
5222 symcode='[[ABCDEGRST]]'
5223 fi
5224 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5225 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5226 ;;
5227irix* | nonstopux*)
5228 symcode='[[BCDEGRST]]'
5229 ;;
5230osf*)
5231 symcode='[[BCDEGQRST]]'
5232 ;;
5233solaris* | sysv5*)
5234 symcode='[[BDRT]]'
5235 ;;
5236sysv4)
5237 symcode='[[DFNSTU]]'
5238 ;;
5239esac
5240
5241# Handle CRLF in mingw tool chain
5242opt_cr=
5243case $build_os in
5244mingw*)
5245 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5246 ;;
5247esac
5248
5249# If we're using GNU nm, then use its standard symbol codes.
5250case `$NM -V 2>&1` in
5251*GNU* | *'with BFD'*)
5252 symcode='[[ABCDGIRSTW]]' ;;
5253esac
5254
5255# Try without a prefix undercore, then with it.
5256for ac_symprfx in "" "_"; do
5257
5258 # Write the raw and C identifiers.
5259 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5260
5261 # Check to see that the pipe works correctly.
5262 pipe_works=no
5263
5264 rm -f conftest*
5265 cat > conftest.$ac_ext <<EOF
5266#ifdef __cplusplus
5267extern "C" {
5268#endif
5269char nm_test_var;
5270void nm_test_func(){}
5271#ifdef __cplusplus
5272}
5273#endif
5274int main(){nm_test_var='a';nm_test_func();return(0);}
5275EOF
5276
5277 if AC_TRY_EVAL(ac_compile); then
5278 # Now try to grab the symbols.
5279 nlist=conftest.nm
5280 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5281 # Try sorting and uniquifying the output.
5282 if sort "$nlist" | uniq > "$nlist"T; then
5283 mv -f "$nlist"T "$nlist"
5284 else
5285 rm -f "$nlist"T
5286 fi
5287
5288 # Make sure that we snagged all the symbols we need.
5289 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5290 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5291 cat <<EOF > conftest.$ac_ext
5292#ifdef __cplusplus
5293extern "C" {
5294#endif
5295
5296EOF
5297 # Now generate the symbol file.
5298 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5299
5300 cat <<EOF >> conftest.$ac_ext
5301#if defined (__STDC__) && __STDC__
5302# define lt_ptr_t void *
5303#else
5304# define lt_ptr_t char *
5305# define const
5306#endif
5307
5308/* The mapping between symbol names and symbols. */
5309const struct {
5310 const char *name;
5311 lt_ptr_t address;
5312}
5313lt_preloaded_symbols[[]] =
5314{
5315EOF
5316 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5317 cat <<\EOF >> conftest.$ac_ext
5318 {0, (lt_ptr_t) 0}
5319};
5320
5321#ifdef __cplusplus
5322}
5323#endif
5324EOF
5325 # Now try linking the two files.
5326 mv conftest.$ac_objext conftstm.$ac_objext
5327 lt_save_LIBS="$LIBS"
5328 lt_save_CFLAGS="$CFLAGS"
5329 LIBS="conftstm.$ac_objext"
5330 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5331 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5332 pipe_works=yes
5333 fi
5334 LIBS="$lt_save_LIBS"
5335 CFLAGS="$lt_save_CFLAGS"
5336 else
5337 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5338 fi
5339 else
5340 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5341 fi
5342 else
5343 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5344 fi
5345 else
5346 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5347 cat conftest.$ac_ext >&5
5348 fi
5349 rm -f conftest* conftst*
5350
5351 # Do not use the global_symbol_pipe unless it works.
5352 if test "$pipe_works" = yes; then
5353 break
5354 else
5355 lt_cv_sys_global_symbol_pipe=
5356 fi
5357done
5358])
5359if test -z "$lt_cv_sys_global_symbol_pipe"; then
5360 lt_cv_sys_global_symbol_to_cdecl=
5361fi
5362if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5363 AC_MSG_RESULT(failed)
5364else
5365 AC_MSG_RESULT(ok)
5366fi
5367]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5368
5369
5370# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5371# ---------------------------------------
5372AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5373[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5374_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5375_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5376
5377AC_MSG_CHECKING([for $compiler option to produce PIC])
5378 ifelse([$1],[CXX],[
5379 # C++ specific cases for pic, static, wl, etc.
5380 if test "$GXX" = yes; then
5381 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5382 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5383
5384 case $host_os in
5385 aix*)
5386 # All AIX code is PIC.
5387 if test "$host_cpu" = ia64; then
5388 # AIX 5 now supports IA64 processor
5389 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5390 fi
5391 ;;
5392 amigaos*)
5393 # FIXME: we need at least 68020 code to build shared libraries, but
5394 # adding the `-m68020' flag to GCC prevents building anything better,
5395 # like `-m68040'.
5396 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5397 ;;
5398 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5399 # PIC is the default for these OSes.
5400 ;;
5401 mingw* | os2* | pw32*)
5402 # This hack is so that the source file can tell whether it is being
5403 # built for inclusion in a dll (and should export symbols for example).
5404 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5405 ;;
5406 darwin* | rhapsody*)
5407 # PIC is the default on this platform
5408 # Common symbols not allowed in MH_DYLIB files
5409 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5410 ;;
5411 *djgpp*)
5412 # DJGPP does not support shared libraries at all
5413 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5414 ;;
5415 sysv4*MP*)
5416 if test -d /usr/nec; then
5417 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5418 fi
5419 ;;
5420 hpux*)
5421 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5422 # not for PA HP-UX.
5423 case "$host_cpu" in
5424 hppa*64*|ia64*)
5425 ;;
5426 *)
5427 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5428 ;;
5429 esac
5430 ;;
5431 *)
5432 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5433 ;;
5434 esac
5435 else
5436 case $host_os in
5437 aix4* | aix5*)
5438 # All AIX code is PIC.
5439 if test "$host_cpu" = ia64; then
5440 # AIX 5 now supports IA64 processor
5441 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5442 else
5443 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5444 fi
5445 ;;
5446 chorus*)
5447 case $cc_basename in
5448 cxch68)
5449 # Green Hills C++ Compiler
5450 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5451 ;;
5452 esac
5453 ;;
5454 dgux*)
5455 case $cc_basename in
5456 ec++)
5457 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5458 ;;
5459 ghcx)
5460 # Green Hills C++ Compiler
5461 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5462 ;;
5463 *)
5464 ;;
5465 esac
5466 ;;
5467 freebsd* | kfreebsd*-gnu)
5468 # FreeBSD uses GNU C++
5469 ;;
5470 hpux9* | hpux10* | hpux11*)
5471 case $cc_basename in
5472 CC)
5473 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5474 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5475 if test "$host_cpu" != ia64; then
5476 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5477 fi
5478 ;;
5479 aCC)
5480 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5481 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5482 case "$host_cpu" in
5483 hppa*64*|ia64*)
5484 # +Z the default
5485 ;;
5486 *)
5487 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5488 ;;
5489 esac
5490 ;;
5491 *)
5492 ;;
5493 esac
5494 ;;
5495 irix5* | irix6* | nonstopux*)
5496 case $cc_basename in
5497 CC)
5498 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5499 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5500 # CC pic flag -KPIC is the default.
5501 ;;
5502 *)
5503 ;;
5504 esac
5505 ;;
5506 linux*)
5507 case $cc_basename in
5508 KCC)
5509 # KAI C++ Compiler
5510 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5511 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5512 ;;
5513 icpc)
5514 # Intel C++
5515 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5516 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5517 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5518 ;;
5519 cxx)
5520 # Compaq C++
5521 # Make sure the PIC flag is empty. It appears that all Alpha
5522 # Linux and Compaq Tru64 Unix objects are PIC.
5523 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5524 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5525 ;;
5526 *)
5527 ;;
5528 esac
5529 ;;
5530 lynxos*)
5531 ;;
5532 m88k*)
5533 ;;
5534 mvs*)
5535 case $cc_basename in
5536 cxx)
5537 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5538 ;;
5539 *)
5540 ;;
5541 esac
5542 ;;
5543 netbsd*)
5544 ;;
5545 osf3* | osf4* | osf5*)
5546 case $cc_basename in
5547 KCC)
5548 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5549 ;;
5550 RCC)
5551 # Rational C++ 2.4.1
5552 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5553 ;;
5554 cxx)
5555 # Digital/Compaq C++
5556 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5557 # Make sure the PIC flag is empty. It appears that all Alpha
5558 # Linux and Compaq Tru64 Unix objects are PIC.
5559 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5560 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5561 ;;
5562 *)
5563 ;;
5564 esac
5565 ;;
5566 psos*)
5567 ;;
5568 sco*)
5569 case $cc_basename in
5570 CC)
5571 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5572 ;;
5573 *)
5574 ;;
5575 esac
5576 ;;
5577 solaris*)
5578 case $cc_basename in
5579 CC)
5580 # Sun C++ 4.2, 5.x and Centerline C++
5581 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5582 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5583 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5584 ;;
5585 gcx)
5586 # Green Hills C++ Compiler
5587 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5588 ;;
5589 *)
5590 ;;
5591 esac
5592 ;;
5593 sunos4*)
5594 case $cc_basename in
5595 CC)
5596 # Sun C++ 4.x
5597 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5598 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5599 ;;
5600 lcc)
5601 # Lucid
5602 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5603 ;;
5604 *)
5605 ;;
5606 esac
5607 ;;
5608 tandem*)
5609 case $cc_basename in
5610 NCC)
5611 # NonStop-UX NCC 3.20
5612 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5613 ;;
5614 *)
5615 ;;
5616 esac
5617 ;;
5618 unixware*)
5619 ;;
5620 vxworks*)
5621 ;;
5622 *)
5623 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5624 ;;
5625 esac
5626 fi
5627],
5628[
5629 if test "$GCC" = yes; then
5630 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5631 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5632
5633 case $host_os in
5634 aix*)
5635 # All AIX code is PIC.
5636 if test "$host_cpu" = ia64; then
5637 # AIX 5 now supports IA64 processor
5638 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5639 fi
5640 ;;
5641
5642 amigaos*)
5643 # FIXME: we need at least 68020 code to build shared libraries, but
5644 # adding the `-m68020' flag to GCC prevents building anything better,
5645 # like `-m68040'.
5646 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5647 ;;
5648
5649 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5650 # PIC is the default for these OSes.
5651 ;;
5652
5653 mingw* | pw32* | os2*)
5654 # This hack is so that the source file can tell whether it is being
5655 # built for inclusion in a dll (and should export symbols for example).
5656 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5657 ;;
5658
5659 darwin* | rhapsody*)
5660 # PIC is the default on this platform
5661 # Common symbols not allowed in MH_DYLIB files
5662 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5663 ;;
5664
5665 msdosdjgpp*)
5666 # Just because we use GCC doesn't mean we suddenly get shared libraries
5667 # on systems that don't support them.
5668 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5669 enable_shared=no
5670 ;;
5671
5672 sysv4*MP*)
5673 if test -d /usr/nec; then
5674 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5675 fi
5676 ;;
5677
5678 hpux*)
5679 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5680 # not for PA HP-UX.
5681 case "$host_cpu" in
5682 hppa*64*|ia64*)
5683 # +Z the default
5684 ;;
5685 *)
5686 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5687 ;;
5688 esac
5689 ;;
5690
5691 *)
5692 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5693 ;;
5694 esac
5695 else
5696 # PORTME Check for flag to pass linker flags through the system compiler.
5697 case $host_os in
5698 aix*)
5699 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5700 if test "$host_cpu" = ia64; then
5701 # AIX 5 now supports IA64 processor
5702 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5703 else
5704 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5705 fi
5706 ;;
5707
5708 mingw* | pw32* | os2*)
5709 # This hack is so that the source file can tell whether it is being
5710 # built for inclusion in a dll (and should export symbols for example).
5711 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5712 ;;
5713
5714 hpux9* | hpux10* | hpux11*)
5715 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5716 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5717 # not for PA HP-UX.
5718 case "$host_cpu" in
5719 hppa*64*|ia64*)
5720 # +Z the default
5721 ;;
5722 *)
5723 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5724 ;;
5725 esac
5726 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5727 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5728 ;;
5729
5730 irix5* | irix6* | nonstopux*)
5731 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5732 # PIC (with -KPIC) is the default.
5733 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5734 ;;
5735
5736 newsos6)
5737 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5738 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5739 ;;
5740
5741 linux*)
5742 case $CC in
5743 icc* | ecc*)
5744 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5745 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5746 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5747 ;;
5748 ccc*)
5749 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5750 # All Alpha code is PIC.
5751 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5752 ;;
5753 esac
5754 ;;
5755
5756 osf3* | osf4* | osf5*)
5757 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5758 # All OSF/1 code is PIC.
5759 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5760 ;;
5761
5762 sco3.2v5*)
5763 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5764 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5765 ;;
5766
5767 solaris*)
5768 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5769 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5770 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5771 ;;
5772
5773 sunos4*)
5774 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5775 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5776 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5777 ;;
5778
5779 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5780 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5781 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5782 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5783 ;;
5784
5785 sysv4*MP*)
5786 if test -d /usr/nec ;then
5787 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5788 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5789 fi
5790 ;;
5791
5792 uts4*)
5793 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5794 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5795 ;;
5796
5797 *)
5798 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5799 ;;
5800 esac
5801 fi
5802])
5803AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5804
5805#
5806# Check to make sure the PIC flag actually works.
5807#
5808if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5809 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5810 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5811 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5812 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5813 "" | " "*) ;;
5814 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5815 esac],
5816 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5817 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5818fi
5819case "$host_os" in
5820 # For platforms which do not support PIC, -DPIC is meaningless:
5821 *djgpp*)
5822 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5823 ;;
5824 *)
5825 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5826 ;;
5827esac
5828])
5829
5830
5831# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5832# ------------------------------------
5833# See if the linker supports building shared libraries.
5834AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5835[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5836ifelse([$1],[CXX],[
5837 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
mostang.com!davidm0440c532003-01-17 18:12:55 +00005838 case $host_os in
hp.com!davidm2c9be972003-11-22 06:08:20 +00005839 aix4* | aix5*)
5840 # If we're using GNU nm, then we don't want the "-C" option.
5841 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5842 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5843 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5844 else
5845 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5846 fi
5847 ;;
5848 pw32*)
5849 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5850 ;;
5851 cygwin* | mingw*)
5852 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5853 ;;
5854 *)
5855 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5856 ;;
5857 esac
5858],[
5859 runpath_var=
5860 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5861 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5862 _LT_AC_TAGVAR(archive_cmds, $1)=
5863 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5864 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5865 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5866 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5867 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5868 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5869 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5870 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5871 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5872 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5873 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5874 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5875 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5876 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5877 _LT_AC_TAGVAR(module_cmds, $1)=
5878 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5879 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5880 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5881 # include_expsyms should be a list of space-separated symbols to be *always*
5882 # included in the symbol list
5883 _LT_AC_TAGVAR(include_expsyms, $1)=
5884 # exclude_expsyms can be an extended regexp of symbols to exclude
5885 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5886 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5887 # as well as any symbol that contains `d'.
5888 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5889 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5890 # platforms (ab)use it in PIC code, but their linkers get confused if
5891 # the symbol is explicitly referenced. Since portable code cannot
5892 # rely on this symbol name, it's probably fine to never include it in
5893 # preloaded symbol tables.
5894 extract_expsyms_cmds=
5895
5896 case $host_os in
5897 cygwin* | mingw* | pw32*)
5898 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5899 # When not using gcc, we currently assume that we are using
5900 # Microsoft Visual C++.
5901 if test "$GCC" != yes; then
5902 with_gnu_ld=no
5903 fi
5904 ;;
5905 openbsd*)
5906 with_gnu_ld=no
5907 ;;
5908 esac
5909
5910 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5911 if test "$with_gnu_ld" = yes; then
5912 # If archive_cmds runs LD, not CC, wlarc should be empty
5913 wlarc='${wl}'
5914
5915 # See if GNU ld supports shared libraries.
5916 case $host_os in
5917 aix3* | aix4* | aix5*)
5918 # On AIX/PPC, the GNU linker is very broken
5919 if test "$host_cpu" != ia64; then
5920 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5921 cat <<EOF 1>&2
5922
5923*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5924*** to be unable to reliably create shared libraries on AIX.
5925*** Therefore, libtool is disabling shared libraries support. If you
5926*** really care for shared libraries, you may want to modify your PATH
5927*** so that a non-GNU linker is found, and then restart.
5928
5929EOF
5930 fi
5931 ;;
5932
5933 amigaos*)
5934 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5935 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5936 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5937
5938 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5939 # that the semantics of dynamic libraries on AmigaOS, at least up
5940 # to version 4, is to share data among multiple programs linked
5941 # with the same dynamic library. Since this doesn't match the
5942 # behavior of shared libraries on other platforms, we can't use
5943 # them.
5944 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5945 ;;
5946
5947 beos*)
5948 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5949 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5950 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5951 # support --undefined. This deserves some investigation. FIXME
5952 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5953 else
5954 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5955 fi
5956 ;;
5957
5958 cygwin* | mingw* | pw32*)
5959 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5960 # as there is no search path for DLLs.
5961 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5962 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5963 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5964 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5965 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5966
5967 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5968 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5969 # If the export-symbols file already is a .def file (1st line
5970 # is EXPORTS), use it as is; otherwise, prepend...
5971 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5972 cp $export_symbols $output_objdir/$soname.def;
5973 else
5974 echo EXPORTS > $output_objdir/$soname.def;
5975 cat $export_symbols >> $output_objdir/$soname.def;
5976 fi~
5977 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5978 else
5979 ld_shlibs=no
5980 fi
5981 ;;
5982
5983 netbsd*)
5984 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5985 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5986 wlarc=
5987 else
5988 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5989 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5990 fi
5991 ;;
5992
5993 solaris* | sysv5*)
5994 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5995 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5996 cat <<EOF 1>&2
5997
5998*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5999*** create shared libraries on Solaris systems. Therefore, libtool
6000*** is disabling shared libraries support. We urge you to upgrade GNU
6001*** binutils to release 2.9.1 or newer. Another option is to modify
6002*** your PATH or compiler configuration so that the native linker is
6003*** used, and then restart.
6004
6005EOF
6006 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6007 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6008 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6009 else
6010 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6011 fi
6012 ;;
6013
6014 sunos4*)
6015 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6016 wlarc=
6017 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6018 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6019 ;;
6020
6021 linux*)
6022 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6023 tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6024 _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6025 supports_anon_versioning=no
6026 case `$LD -v 2>/dev/null` in
6027 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6028 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6029 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6030 *\ 2.11.*) ;; # other 2.11 versions
6031 *) supports_anon_versioning=yes ;;
6032 esac
6033 if test $supports_anon_versioning = yes; then
6034 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6035cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6036$echo "local: *; };" >> $output_objdir/$libname.ver~
6037 $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6038 else
6039 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6040 fi
6041 else
6042 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6043 fi
6044 ;;
6045
6046 *)
6047 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6048 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6049 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6050 else
6051 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6052 fi
6053 ;;
6054 esac
6055
6056 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6057 runpath_var=LD_RUN_PATH
6058 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6059 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6060 # ancient GNU ld didn't support --whole-archive et. al.
6061 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6062 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6063 else
6064 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6065 fi
6066 fi
6067 else
6068 # PORTME fill in a description of your system's linker (not GNU ld)
6069 case $host_os in
6070 aix3*)
6071 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6072 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6073 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6074 # Note: this linker hardcodes the directories in LIBPATH if there
6075 # are no directories specified by -L.
6076 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6077 if test "$GCC" = yes && test -z "$link_static_flag"; then
6078 # Neither direct hardcoding nor static linking is supported with a
6079 # broken collect2.
6080 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6081 fi
6082 ;;
6083
6084 aix4* | aix5*)
6085 if test "$host_cpu" = ia64; then
6086 # On IA64, the linker does run time linking by default, so we don't
6087 # have to do anything special.
6088 aix_use_runtimelinking=no
6089 exp_sym_flag='-Bexport'
6090 no_entry_flag=""
6091 else
6092 # If we're using GNU nm, then we don't want the "-C" option.
6093 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6094 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6095 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6096 else
6097 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6098 fi
6099 aix_use_runtimelinking=no
6100
6101 # Test if we are trying to use run time linking or normal
6102 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6103 # need to do runtime linking.
6104 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6105 for ld_flag in $LDFLAGS; do
6106 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6107 aix_use_runtimelinking=yes
6108 break
6109 fi
6110 done
6111 esac
6112
6113 exp_sym_flag='-bexport'
6114 no_entry_flag='-bnoentry'
6115 fi
6116
6117 # When large executables or shared objects are built, AIX ld can
6118 # have problems creating the table of contents. If linking a library
6119 # or program results in "error TOC overflow" add -mminimal-toc to
6120 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6121 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6122
6123 _LT_AC_TAGVAR(archive_cmds, $1)=''
6124 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6125 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6126 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6127
6128 if test "$GCC" = yes; then
6129 case $host_os in aix4.[012]|aix4.[012].*)
6130 # We only want to do this on AIX 4.2 and lower, the check
6131 # below for broken collect2 doesn't work under 4.3+
6132 collect2name=`${CC} -print-prog-name=collect2`
6133 if test -f "$collect2name" && \
6134 strings "$collect2name" | grep resolve_lib_name >/dev/null
6135 then
6136 # We have reworked collect2
6137 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6138 else
6139 # We have old collect2
6140 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6141 # It fails to find uninstalled libraries when the uninstalled
6142 # path is not listed in the libpath. Setting hardcode_minus_L
6143 # to unsupported forces relinking
6144 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6145 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6146 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6147 fi
6148 esac
6149 shared_flag='-shared'
6150 else
6151 # not using gcc
6152 if test "$host_cpu" = ia64; then
6153 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6154 # chokes on -Wl,-G. The following line is correct:
6155 shared_flag='-G'
6156 else
6157 if test "$aix_use_runtimelinking" = yes; then
6158 shared_flag='${wl}-G'
6159 else
6160 shared_flag='${wl}-bM:SRE'
6161 fi
6162 fi
6163 fi
6164
6165 # It seems that -bexpall does not export symbols beginning with
6166 # underscore (_), so it is better to generate a list of symbols to export.
6167 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6168 if test "$aix_use_runtimelinking" = yes; then
6169 # Warning - without using the other runtime loading flags (-brtl),
6170 # -berok will link without error, but may produce a broken library.
6171 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6172 # Determine the default libpath from the value encoded in an empty executable.
6173 _LT_AC_SYS_LIBPATH_AIX
6174 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6175 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
6176 else
6177 if test "$host_cpu" = ia64; then
6178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6179 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6180 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6181 else
6182 # Determine the default libpath from the value encoded in an empty executable.
6183 _LT_AC_SYS_LIBPATH_AIX
6184 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6185 # Warning - without using the other run time loading flags,
6186 # -berok will link without error, but may produce a broken library.
6187 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6188 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6189 # -bexpall does not export symbols beginning with underscore (_)
6190 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6191 # Exported symbols can be pulled into shared objects from archives
6192 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6193 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6194 # This is similar to how AIX traditionally builds it's shared libraries.
6195 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6196 fi
6197 fi
6198 ;;
6199
6200 amigaos*)
6201 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6202 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6203 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6204 # see comment about different semantics on the GNU ld section
6205 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6206 ;;
6207
6208 bsdi4*)
6209 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6210 ;;
6211
6212 cygwin* | mingw* | pw32*)
6213 # When not using gcc, we currently assume that we are using
6214 # Microsoft Visual C++.
6215 # hardcode_libdir_flag_spec is actually meaningless, as there is
6216 # no search path for DLLs.
6217 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6218 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6219 # Tell ltmain to make .lib files, not .a files.
6220 libext=lib
6221 # Tell ltmain to make .dll files, not .so files.
6222 shrext=".dll"
6223 # FIXME: Setting linknames here is a bad hack.
6224 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6225 # The linker will automatically build a .lib file if we build a DLL.
6226 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6227 # FIXME: Should let the user specify the lib program.
6228 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6229 fix_srcfile_path='`cygpath -w "$srcfile"`'
6230 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6231 ;;
6232
6233 darwin* | rhapsody*)
6234 if test "$GXX" = yes ; then
6235 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6236 case "$host_os" in
6237 rhapsody* | darwin1.[[012]])
6238 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6239 ;;
6240 *) # Darwin 1.3 on
6241 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6242 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6243 else
6244 case ${MACOSX_DEPLOYMENT_TARGET} in
6245 10.[[012]])
6246 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6247 ;;
6248 10.*)
6249 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6250 ;;
6251 esac
6252 fi
6253 ;;
6254 esac
6255 lt_int_apple_cc_single_mod=no
6256 output_verbose_link_cmd='echo'
6257 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6258 lt_int_apple_cc_single_mod=yes
6259 fi
6260 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6261 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6262 else
6263 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6264 fi
6265 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6266 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6267 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6268 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6269 else
6270 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6271 fi
6272 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6273 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6274 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6275 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6276 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6277 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6278 else
6279 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6280 fi
6281 ;;
6282
6283 dgux*)
6284 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6285 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6286 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6287 ;;
6288
6289 freebsd1*)
6290 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6291 ;;
6292
6293 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6294 # support. Future versions do this automatically, but an explicit c++rt0.o
6295 # does not break anything, and helps significantly (at the cost of a little
6296 # extra space).
6297 freebsd2.2*)
6298 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6299 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6300 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6301 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6302 ;;
6303
6304 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6305 freebsd2*)
6306 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6307 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6308 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6309 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6310 ;;
6311
6312 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6313 freebsd* | kfreebsd*-gnu)
6314 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6315 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6316 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6317 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6318 ;;
6319
6320 hpux9*)
6321 if test "$GCC" = yes; then
6322 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6323 else
6324 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6325 fi
6326 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6327 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6328 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6329
6330 # hardcode_minus_L: Not really in the search PATH,
6331 # but as the default location of the library.
6332 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6333 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6334 ;;
6335
6336 hpux10* | hpux11*)
6337 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6338 case "$host_cpu" in
6339 hppa*64*|ia64*)
6340 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6341 ;;
6342 *)
6343 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6344 ;;
6345 esac
6346 else
6347 case "$host_cpu" in
6348 hppa*64*|ia64*)
6349 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6350 ;;
6351 *)
6352 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6353 ;;
6354 esac
6355 fi
6356 if test "$with_gnu_ld" = no; then
6357 case "$host_cpu" in
6358 hppa*64*)
6359 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6360 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6361 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6362 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6363 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6364 ;;
6365 ia64*)
6366 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6367 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6368 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6369
6370 # hardcode_minus_L: Not really in the search PATH,
6371 # but as the default location of the library.
6372 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6373 ;;
6374 *)
6375 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6376 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6377 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6378 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6379
6380 # hardcode_minus_L: Not really in the search PATH,
6381 # but as the default location of the library.
6382 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6383 ;;
6384 esac
6385 fi
6386 ;;
6387
6388 irix5* | irix6* | nonstopux*)
6389 if test "$GCC" = yes; then
6390 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
6391 else
6392 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6393 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6394 fi
6395 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6396 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6397 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6398 ;;
6399
6400 netbsd*)
6401 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6402 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6403 else
6404 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6405 fi
6406 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6407 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6408 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6409 ;;
6410
6411 newsos6)
6412 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6413 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6414 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6415 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6416 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6417 ;;
6418
6419 openbsd*)
6420 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6421 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6422 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6423 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6424 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6425 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6426 else
6427 case $host_os in
6428 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6429 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6430 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6431 ;;
6432 *)
6433 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6434 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6435 ;;
6436 esac
6437 fi
6438 ;;
6439
6440 os2*)
6441 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6442 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6443 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6444 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6445 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6446 ;;
6447
6448 osf3*)
6449 if test "$GCC" = yes; then
6450 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6451 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
6452 else
6453 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6454 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
6455 fi
6456 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6457 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6458 ;;
6459
6460 osf4* | osf5*) # as osf3* with the addition of -msym flag
6461 if test "$GCC" = yes; then
6462 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6463 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
6464 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6465 else
6466 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6467 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
6468 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6469 $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'
6470
6471 # Both c and cxx compiler support -rpath directly
6472 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6473 fi
6474 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6475 ;;
6476
6477 sco3.2v5*)
6478 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6479 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6480 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6481 runpath_var=LD_RUN_PATH
6482 hardcode_runpath_var=yes
6483 ;;
6484
6485 solaris*)
6486 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6487 if test "$GCC" = yes; then
6488 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6489 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6490 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6491 else
6492 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6493 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6494 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6495 fi
6496 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6497 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6498 case $host_os in
6499 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6500 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6501 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6502 esac
6503 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6504 ;;
6505
6506 sunos4*)
6507 if test "x$host_vendor" = xsequent; then
6508 # Use $CC to link under sequent, because it throws in some extra .o
6509 # files that make .init and .fini sections work.
6510 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6511 else
6512 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6513 fi
6514 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6515 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6516 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6517 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6518 ;;
6519
6520 sysv4)
6521 case $host_vendor in
6522 sni)
6523 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6524 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6525 ;;
6526 siemens)
6527 ## LD is ld it makes a PLAMLIB
6528 ## CC just makes a GrossModule.
6529 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6530 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6531 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6532 ;;
6533 motorola)
6534 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6535 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6536 ;;
6537 esac
6538 runpath_var='LD_RUN_PATH'
6539 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6540 ;;
6541
6542 sysv4.3*)
6543 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6544 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6545 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6546 ;;
6547
6548 sysv4*MP*)
6549 if test -d /usr/nec; then
6550 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6551 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6552 runpath_var=LD_RUN_PATH
6553 hardcode_runpath_var=yes
6554 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6555 fi
6556 ;;
6557
6558 sysv4.2uw2*)
6559 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6560 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6561 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6562 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6563 hardcode_runpath_var=yes
6564 runpath_var=LD_RUN_PATH
6565 ;;
6566
6567 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6568 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6569 if test "$GCC" = yes; then
6570 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6571 else
6572 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6573 fi
6574 runpath_var='LD_RUN_PATH'
6575 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6576 ;;
6577
6578 sysv5*)
6579 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6580 # $CC -shared without GNU ld will not create a library from C++
6581 # object files and a static libstdc++, better avoid it by now
6582 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6583 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6584 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6585 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6586 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6587 runpath_var='LD_RUN_PATH'
6588 ;;
6589
6590 uts4*)
6591 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6592 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6593 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6594 ;;
6595
6596 *)
6597 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6598 ;;
6599 esac
6600 fi
6601])
6602AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6603test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6604
6605variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6606if test "$GCC" = yes; then
6607 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6608fi
6609
6610#
6611# Do we need to explicitly link libc?
6612#
6613case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6614x|xyes)
6615 # Assume -lc should be added
6616 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6617
6618 if test "$enable_shared" = yes && test "$GCC" = yes; then
6619 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6620 *'~'*)
6621 # FIXME: we may have to deal with multi-command sequences.
6622 ;;
6623 '$CC '*)
6624 # Test whether the compiler implicitly links with -lc since on some
6625 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6626 # to ld, don't add -lc before -lgcc.
6627 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6628 $rm conftest*
6629 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6630
6631 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6632 soname=conftest
6633 lib=conftest
6634 libobjs=conftest.$ac_objext
6635 deplibs=
6636 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6637 compiler_flags=-v
6638 linker_flags=-v
6639 verstring=
6640 output_objdir=.
6641 libname=conftest
6642 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6643 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6644 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6645 then
6646 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6647 else
6648 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6649 fi
6650 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6651 else
6652 cat conftest.err 1>&5
6653 fi
6654 $rm conftest*
6655 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6656 ;;
6657 esac
6658 fi
6659 ;;
6660esac
6661])# AC_LIBTOOL_PROG_LD_SHLIBS
6662
6663
6664# _LT_AC_FILE_LTDLL_C
6665# -------------------
6666# Be careful that the start marker always follows a newline.
6667AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
mostang.com!davidm0440c532003-01-17 18:12:55 +00006668# /* ltdll.c starts here */
6669# #define WIN32_LEAN_AND_MEAN
6670# #include <windows.h>
6671# #undef WIN32_LEAN_AND_MEAN
6672# #include <stdio.h>
6673#
6674# #ifndef __CYGWIN__
6675# # ifdef __CYGWIN32__
6676# # define __CYGWIN__ __CYGWIN32__
6677# # endif
6678# #endif
6679#
6680# #ifdef __cplusplus
6681# extern "C" {
6682# #endif
6683# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6684# #ifdef __cplusplus
6685# }
6686# #endif
6687#
6688# #ifdef __CYGWIN__
6689# #include <cygwin/cygwin_dll.h>
6690# DECLARE_CYGWIN_DLL( DllMain );
6691# #endif
6692# HINSTANCE __hDllInstance_base;
6693#
6694# BOOL APIENTRY
6695# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6696# {
6697# __hDllInstance_base = hInst;
6698# return TRUE;
6699# }
6700# /* ltdll.c ends here */
hp.com!davidm2c9be972003-11-22 06:08:20 +00006701])# _LT_AC_FILE_LTDLL_C
mostang.com!davidm0440c532003-01-17 18:12:55 +00006702
6703
hp.com!davidm2c9be972003-11-22 06:08:20 +00006704# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6705# ---------------------------------
6706AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
mostang.com!davidm0440c532003-01-17 18:12:55 +00006707
mostang.com!davidm0440c532003-01-17 18:12:55 +00006708
6709# old names
6710AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6711AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6712AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6713AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6714AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6715AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6716AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6717
6718# This is just to silence aclocal about the macro not being used
6719ifelse([AC_DISABLE_FAST_INSTALL])
6720
hp.com!davidm2c9be972003-11-22 06:08:20 +00006721AC_DEFUN([LT_AC_PROG_GCJ],
6722[AC_CHECK_TOOL(GCJ, gcj, no)
6723 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6724 AC_SUBST(GCJFLAGS)
6725])
6726
6727AC_DEFUN([LT_AC_PROG_RC],
6728[AC_CHECK_TOOL(RC, windres, no)
6729])
6730
mostang.com!davidm0440c532003-01-17 18:12:55 +00006731# NOTE: This macro has been submitted for inclusion into #
6732# GNU Autoconf as AC_PROG_SED. When it is available in #
6733# a released version of Autoconf we should remove this #
6734# macro and use it instead. #
6735# LT_AC_PROG_SED
6736# --------------
6737# Check for a fully-functional sed program, that truncates
6738# as few characters as possible. Prefer GNU sed if found.
6739AC_DEFUN([LT_AC_PROG_SED],
6740[AC_MSG_CHECKING([for a sed that does not truncate output])
6741AC_CACHE_VAL(lt_cv_path_SED,
6742[# Loop through the user's path and test for sed and gsed.
6743# Then use that list of sed's as ones to test for truncation.
mostang.com!davidm0440c532003-01-17 18:12:55 +00006744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6745for as_dir in $PATH
6746do
6747 IFS=$as_save_IFS
6748 test -z "$as_dir" && as_dir=.
hp.com!davidm2c9be972003-11-22 06:08:20 +00006749 for lt_ac_prog in sed gsed; do
mostang.com!davidm0440c532003-01-17 18:12:55 +00006750 for ac_exec_ext in '' $ac_executable_extensions; do
hp.com!davidm2c9be972003-11-22 06:08:20 +00006751 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6752 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
mostang.com!davidm0440c532003-01-17 18:12:55 +00006753 fi
6754 done
6755 done
6756done
hp.com!davidm2c9be972003-11-22 06:08:20 +00006757lt_ac_max=0
6758lt_ac_count=0
6759# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6760# along with /bin/sed that truncates output.
6761for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6762 test ! -f $lt_ac_sed && break
6763 cat /dev/null > conftest.in
6764 lt_ac_count=0
6765 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6766 # Check for GNU sed and select it if it is found.
6767 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6768 lt_cv_path_SED=$lt_ac_sed
6769 break
6770 fi
6771 while true; do
6772 cat conftest.in conftest.in >conftest.tmp
6773 mv conftest.tmp conftest.in
6774 cp conftest.in conftest.nl
6775 echo >>conftest.nl
6776 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6777 cmp -s conftest.out conftest.nl || break
6778 # 10000 chars as input seems more than enough
6779 test $lt_ac_count -gt 10 && break
6780 lt_ac_count=`expr $lt_ac_count + 1`
6781 if test $lt_ac_count -gt $lt_ac_max; then
6782 lt_ac_max=$lt_ac_count
6783 lt_cv_path_SED=$lt_ac_sed
mostang.com!davidm0440c532003-01-17 18:12:55 +00006784 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00006785 done
hp.com!davidm2c9be972003-11-22 06:08:20 +00006786done
6787SED=$lt_cv_path_SED
mostang.com!davidm0440c532003-01-17 18:12:55 +00006788])
mostang.com!davidm0440c532003-01-17 18:12:55 +00006789AC_MSG_RESULT([$SED])
6790])
6791
6792# Figure out how to run the assembler. -*- Autoconf -*-
6793
6794# serial 2
6795
6796# Copyright 2001 Free Software Foundation, Inc.
6797
6798# This program is free software; you can redistribute it and/or modify
6799# it under the terms of the GNU General Public License as published by
6800# the Free Software Foundation; either version 2, or (at your option)
6801# any later version.
6802
6803# This program is distributed in the hope that it will be useful,
6804# but WITHOUT ANY WARRANTY; without even the implied warranty of
6805# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6806# GNU General Public License for more details.
6807
6808# You should have received a copy of the GNU General Public License
6809# along with this program; if not, write to the Free Software
6810# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6811# 02111-1307, USA.
6812
6813# AM_PROG_AS
6814# ----------
6815AC_DEFUN([AM_PROG_AS],
6816[# By default we simply use the C compiler to build assembly code.
6817AC_REQUIRE([AC_PROG_CC])
6818: ${CCAS='$(CC)'}
6819# Set ASFLAGS if not already set.
6820: ${CCASFLAGS='$(CFLAGS)'}
6821AC_SUBST(CCAS)
6822AC_SUBST(CCASFLAGS)])
6823