]> cygwin.com Git - cygwin-apps/setup.git/blame - aclocal.m4
2002-11-25 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / aclocal.m4
CommitLineData
f9e903a3 1# generated automatically by aclocal 1.7.1 -*- Autoconf -*-
f6100b6f 2
f9e903a3 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
f6100b6f
RC
4# 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
14# Do all the work for Automake. -*- Autoconf -*-
15
16# This macro actually does too much some checks are only needed if
17# your package does certain things. But this isn't really a big deal.
18
19# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
20# Free Software Foundation, Inc.
21
22# This program is free software; you can redistribute it and/or modify
23# it under the terms of the GNU General Public License as published by
24# the Free Software Foundation; either version 2, or (at your option)
25# any later version.
26
27# This program is distributed in the hope that it will be useful,
28# but WITHOUT ANY WARRANTY; without even the implied warranty of
29# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30# GNU General Public License for more details.
31
32# You should have received a copy of the GNU General Public License
33# along with this program; if not, write to the Free Software
34# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35# 02111-1307, USA.
36
37# serial 8
38
39# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
40# written in clear, in which case automake, when reading aclocal.m4,
41# will think it sees a *use*, and therefore will trigger all it's
42# C support machinery. Also note that it means that autoscan, seeing
43# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
44
45
f9e903a3 46AC_PREREQ([2.54])
f6100b6f
RC
47
48# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
49# the ones we care about.
50m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
51
52# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
53# AM_INIT_AUTOMAKE([OPTIONS])
54# -----------------------------------------------
55# The call with PACKAGE and VERSION arguments is the old style
56# call (pre autoconf-2.50), which is being phased out. PACKAGE
57# and VERSION should now be passed to AC_INIT and removed from
58# the call to AM_INIT_AUTOMAKE.
59# We support both call styles for the transition. After
60# the next Automake release, Autoconf can make the AC_INIT
61# arguments mandatory, and then we can depend on a new Autoconf
62# release and drop the old call support.
63AC_DEFUN([AM_INIT_AUTOMAKE],
64[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
65 AC_REQUIRE([AC_PROG_INSTALL])dnl
66# test to see if srcdir already configured
67if test "`cd $srcdir && pwd`" != "`pwd`" &&
68 test -f $srcdir/config.status; then
69 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
70fi
71
f9e903a3
RC
72# test whether we have cygpath
73if test -z "$CYGPATH_W"; then
74 if (cygpath --version) >/dev/null 2>/dev/null; then
75 CYGPATH_W='cygpath -w'
76 else
77 CYGPATH_W=echo
78 fi
79fi
80AC_SUBST([CYGPATH_W])
81
f6100b6f
RC
82# Define the identity of the package.
83dnl Distinguish between old-style and new-style calls.
84m4_ifval([$2],
85[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
86 AC_SUBST([PACKAGE], [$1])dnl
87 AC_SUBST([VERSION], [$2])],
88[_AM_SET_OPTIONS([$1])dnl
89 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
90 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
91
92_AM_IF_OPTION([no-define],,
93[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
94 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
95
96# Some tools Automake needs.
97AC_REQUIRE([AM_SANITY_CHECK])dnl
98AC_REQUIRE([AC_ARG_PROGRAM])dnl
aa1e3b4d 99AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
f6100b6f 100AM_MISSING_PROG(AUTOCONF, autoconf)
aa1e3b4d 101AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
f6100b6f
RC
102AM_MISSING_PROG(AUTOHEADER, autoheader)
103AM_MISSING_PROG(MAKEINFO, makeinfo)
104AM_MISSING_PROG(AMTAR, tar)
105AM_PROG_INSTALL_SH
106AM_PROG_INSTALL_STRIP
107# We need awk for the "check" target. The system "awk" is bad on
108# some platforms.
109AC_REQUIRE([AC_PROG_AWK])dnl
110AC_REQUIRE([AC_PROG_MAKE_SET])dnl
111
112_AM_IF_OPTION([no-dependencies],,
f9e903a3 113[AC_PROVIDE_IFELSE([AC_PROG_CC],
f6100b6f 114 [_AM_DEPENDENCIES(CC)],
f9e903a3
RC
115 [define([AC_PROG_CC],
116 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
117AC_PROVIDE_IFELSE([AC_PROG_CXX],
f6100b6f 118 [_AM_DEPENDENCIES(CXX)],
f9e903a3
RC
119 [define([AC_PROG_CXX],
120 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
f6100b6f
RC
121])
122])
123
f9e903a3
RC
124
125# When config.status generates a header, we must update the stamp-h file.
126# This file resides in the same directory as the config header
127# that is generated. The stamp files are numbered to have different names.
128
129# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
130# loop where config.status creates the headers, so we can generate
131# our stamp files there.
132AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
133[_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
134echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
135
f6100b6f
RC
136# Copyright 2002 Free Software Foundation, Inc.
137
138# This program is free software; you can redistribute it and/or modify
139# it under the terms of the GNU General Public License as published by
140# the Free Software Foundation; either version 2, or (at your option)
141# any later version.
142
143# This program is distributed in the hope that it will be useful,
144# but WITHOUT ANY WARRANTY; without even the implied warranty of
145# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
146# GNU General Public License for more details.
147
148# You should have received a copy of the GNU General Public License
149# along with this program; if not, write to the Free Software
150# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
151
152# AM_AUTOMAKE_VERSION(VERSION)
153# ----------------------------
154# Automake X.Y traces this macro to ensure aclocal.m4 has been
155# generated from the m4 files accompanying Automake X.Y.
f9e903a3 156AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
f6100b6f
RC
157
158# AM_SET_CURRENT_AUTOMAKE_VERSION
159# -------------------------------
160# Call AM_AUTOMAKE_VERSION so it can be traced.
161# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
162AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
f9e903a3 163 [AM_AUTOMAKE_VERSION([1.7.1])])
f6100b6f
RC
164
165# Helper functions for option handling. -*- Autoconf -*-
166
167# Copyright 2001, 2002 Free Software Foundation, Inc.
168
169# This program is free software; you can redistribute it and/or modify
170# it under the terms of the GNU General Public License as published by
171# the Free Software Foundation; either version 2, or (at your option)
172# any later version.
173
174# This program is distributed in the hope that it will be useful,
175# but WITHOUT ANY WARRANTY; without even the implied warranty of
176# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
177# GNU General Public License for more details.
178
179# You should have received a copy of the GNU General Public License
180# along with this program; if not, write to the Free Software
181# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
182# 02111-1307, USA.
183
184# serial 2
185
186# _AM_MANGLE_OPTION(NAME)
187# -----------------------
188AC_DEFUN([_AM_MANGLE_OPTION],
189[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
190
191# _AM_SET_OPTION(NAME)
192# ------------------------------
193# Set option NAME. Presently that only means defining a flag for this option.
194AC_DEFUN([_AM_SET_OPTION],
195[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
196
197# _AM_SET_OPTIONS(OPTIONS)
198# ----------------------------------
199# OPTIONS is a space-separated list of Automake options.
200AC_DEFUN([_AM_SET_OPTIONS],
201[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
202
203# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
204# -------------------------------------------
205# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
206AC_DEFUN([_AM_IF_OPTION],
207[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
208
209#
210# Check to make sure that the build environment is sane.
211#
212
213# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
214
215# This program is free software; you can redistribute it and/or modify
216# it under the terms of the GNU General Public License as published by
217# the Free Software Foundation; either version 2, or (at your option)
218# any later version.
219
220# This program is distributed in the hope that it will be useful,
221# but WITHOUT ANY WARRANTY; without even the implied warranty of
222# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
223# GNU General Public License for more details.
224
225# You should have received a copy of the GNU General Public License
226# along with this program; if not, write to the Free Software
227# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
228# 02111-1307, USA.
229
230# serial 3
231
232# AM_SANITY_CHECK
233# ---------------
234AC_DEFUN([AM_SANITY_CHECK],
235[AC_MSG_CHECKING([whether build environment is sane])
236# Just in case
237sleep 1
238echo timestamp > conftest.file
239# Do `set' in a subshell so we don't clobber the current shell's
240# arguments. Must try -L first in case configure is actually a
241# symlink; some systems play weird games with the mod time of symlinks
242# (eg FreeBSD returns the mod time of the symlink's containing
243# directory).
244if (
245 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
246 if test "$[*]" = "X"; then
247 # -L didn't work.
248 set X `ls -t $srcdir/configure conftest.file`
249 fi
250 rm -f conftest.file
251 if test "$[*]" != "X $srcdir/configure conftest.file" \
252 && test "$[*]" != "X conftest.file $srcdir/configure"; then
253
254 # If neither matched, then we have a broken ls. This can happen
255 # if, for instance, CONFIG_SHELL is bash and it inherits a
256 # broken ls alias from the environment. This has actually
257 # happened. Such a system could not be considered "sane".
258 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
259alias in your environment])
260 fi
261
262 test "$[2]" = conftest.file
263 )
264then
265 # Ok.
266 :
267else
268 AC_MSG_ERROR([newly created file is older than distributed files!
269Check your system clock])
270fi
271AC_MSG_RESULT(yes)])
272
273# -*- Autoconf -*-
274
275
276# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
277
278# This program is free software; you can redistribute it and/or modify
279# it under the terms of the GNU General Public License as published by
280# the Free Software Foundation; either version 2, or (at your option)
281# any later version.
282
283# This program is distributed in the hope that it will be useful,
284# but WITHOUT ANY WARRANTY; without even the implied warranty of
285# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
286# GNU General Public License for more details.
287
288# You should have received a copy of the GNU General Public License
289# along with this program; if not, write to the Free Software
290# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
291# 02111-1307, USA.
292
293# serial 3
294
295# AM_MISSING_PROG(NAME, PROGRAM)
296# ------------------------------
297AC_DEFUN([AM_MISSING_PROG],
298[AC_REQUIRE([AM_MISSING_HAS_RUN])
299$1=${$1-"${am_missing_run}$2"}
300AC_SUBST($1)])
301
302
303# AM_MISSING_HAS_RUN
304# ------------------
305# Define MISSING if not defined so far and test if it supports --run.
306# If it does, set am_missing_run to use it, otherwise, to nothing.
307AC_DEFUN([AM_MISSING_HAS_RUN],
308[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
309test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
310# Use eval to expand $SHELL
311if eval "$MISSING --run true"; then
312 am_missing_run="$MISSING --run "
313else
314 am_missing_run=
315 AC_MSG_WARN([`missing' script is too old or missing])
316fi
317])
318
319# AM_AUX_DIR_EXPAND
320
321# Copyright 2001 Free Software Foundation, Inc.
322
323# This program is free software; you can redistribute it and/or modify
324# it under the terms of the GNU General Public License as published by
325# the Free Software Foundation; either version 2, or (at your option)
326# any later version.
327
328# This program is distributed in the hope that it will be useful,
329# but WITHOUT ANY WARRANTY; without even the implied warranty of
330# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
331# GNU General Public License for more details.
332
333# You should have received a copy of the GNU General Public License
334# along with this program; if not, write to the Free Software
335# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
336# 02111-1307, USA.
337
338# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
339# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
340# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
341#
342# Of course, Automake must honor this variable whenever it calls a
343# tool from the auxiliary directory. The problem is that $srcdir (and
344# therefore $ac_aux_dir as well) can be either absolute or relative,
345# depending on how configure is run. This is pretty annoying, since
346# it makes $ac_aux_dir quite unusable in subdirectories: in the top
347# source directory, any form will work fine, but in subdirectories a
348# relative path needs to be adjusted first.
349#
350# $ac_aux_dir/missing
351# fails when called from a subdirectory if $ac_aux_dir is relative
352# $top_srcdir/$ac_aux_dir/missing
353# fails if $ac_aux_dir is absolute,
354# fails when called from a subdirectory in a VPATH build with
355# a relative $ac_aux_dir
356#
357# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
358# are both prefixed by $srcdir. In an in-source build this is usually
359# harmless because $srcdir is `.', but things will broke when you
360# start a VPATH build or use an absolute $srcdir.
361#
362# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
363# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
364# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
365# and then we would define $MISSING as
366# MISSING="\${SHELL} $am_aux_dir/missing"
367# This will work as long as MISSING is not called from configure, because
368# unfortunately $(top_srcdir) has no meaning in configure.
369# However there are other variables, like CC, which are often used in
370# configure, and could therefore not use this "fixed" $ac_aux_dir.
371#
372# Another solution, used here, is to always expand $ac_aux_dir to an
373# absolute PATH. The drawback is that using absolute paths prevent a
374# configured tree to be moved without reconfiguration.
375
376# Rely on autoconf to set up CDPATH properly.
377AC_PREREQ([2.50])
378
379AC_DEFUN([AM_AUX_DIR_EXPAND], [
380# expand $ac_aux_dir to an absolute path
381am_aux_dir=`cd $ac_aux_dir && pwd`
382])
383
384# AM_PROG_INSTALL_SH
385# ------------------
386# Define $install_sh.
387
388# Copyright 2001 Free Software Foundation, Inc.
389
390# This program is free software; you can redistribute it and/or modify
391# it under the terms of the GNU General Public License as published by
392# the Free Software Foundation; either version 2, or (at your option)
393# any later version.
394
395# This program is distributed in the hope that it will be useful,
396# but WITHOUT ANY WARRANTY; without even the implied warranty of
397# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
398# GNU General Public License for more details.
399
400# You should have received a copy of the GNU General Public License
401# along with this program; if not, write to the Free Software
402# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
403# 02111-1307, USA.
404
405AC_DEFUN([AM_PROG_INSTALL_SH],
406[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
407install_sh=${install_sh-"$am_aux_dir/install-sh"}
408AC_SUBST(install_sh)])
409
410# AM_PROG_INSTALL_STRIP
411
412# Copyright 2001 Free Software Foundation, Inc.
413
414# This program is free software; you can redistribute it and/or modify
415# it under the terms of the GNU General Public License as published by
416# the Free Software Foundation; either version 2, or (at your option)
417# any later version.
418
419# This program is distributed in the hope that it will be useful,
420# but WITHOUT ANY WARRANTY; without even the implied warranty of
421# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
422# GNU General Public License for more details.
423
424# You should have received a copy of the GNU General Public License
425# along with this program; if not, write to the Free Software
426# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
427# 02111-1307, USA.
428
429# One issue with vendor `install' (even GNU) is that you can't
430# specify the program used to strip binaries. This is especially
431# annoying in cross-compiling environments, where the build's strip
432# is unlikely to handle the host's binaries.
433# Fortunately install-sh will honor a STRIPPROG variable, so we
434# always use install-sh in `make install-strip', and initialize
435# STRIPPROG with the value of the STRIP variable (set by the user).
436AC_DEFUN([AM_PROG_INSTALL_STRIP],
437[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
438# Installed binaries are usually stripped using `strip' when the user
439# run `make install-strip'. However `strip' might not be the right
440# tool to use in cross-compilation environments, therefore Automake
441# will honor the `STRIP' environment variable to overrule this program.
442dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
443if test "$cross_compiling" != no; then
444 AC_CHECK_TOOL([STRIP], [strip], :)
445fi
446INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
447AC_SUBST([INSTALL_STRIP_PROGRAM])])
448
449# serial 4 -*- Autoconf -*-
450
451# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
452
453# This program is free software; you can redistribute it and/or modify
454# it under the terms of the GNU General Public License as published by
455# the Free Software Foundation; either version 2, or (at your option)
456# any later version.
457
458# This program is distributed in the hope that it will be useful,
459# but WITHOUT ANY WARRANTY; without even the implied warranty of
460# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
461# GNU General Public License for more details.
462
463# You should have received a copy of the GNU General Public License
464# along with this program; if not, write to the Free Software
465# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
466# 02111-1307, USA.
467
468
469# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
470# written in clear, in which case automake, when reading aclocal.m4,
471# will think it sees a *use*, and therefore will trigger all it's
472# C support machinery. Also note that it means that autoscan, seeing
473# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
474
475
476
477# _AM_DEPENDENCIES(NAME)
478# ----------------------
479# See how the compiler implements dependency checking.
480# NAME is "CC", "CXX", "GCJ", or "OBJC".
481# We try a few techniques and use that to set a single cache variable.
482#
483# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
484# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
485# dependency, and given that the user is not expected to run this macro,
486# just rely on AC_PROG_CC.
487AC_DEFUN([_AM_DEPENDENCIES],
488[AC_REQUIRE([AM_SET_DEPDIR])dnl
489AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
490AC_REQUIRE([AM_MAKE_INCLUDE])dnl
491AC_REQUIRE([AM_DEP_TRACK])dnl
492
493ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
494 [$1], CXX, [depcc="$CXX" am_compiler_list=],
12f14c3f 495 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
f6100b6f
RC
496 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
497 [depcc="$$1" am_compiler_list=])
498
499AC_CACHE_CHECK([dependency style of $depcc],
500 [am_cv_$1_dependencies_compiler_type],
501[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
502 # We make a subdir and do the tests there. Otherwise we can end up
503 # making bogus files that we don't know about and never remove. For
504 # instance it was reported that on HP-UX the gcc test will end up
505 # making a dummy file named `D' -- because `-MD' means `put the output
506 # in D'.
507 mkdir conftest.dir
508 # Copy depcomp to subdir because otherwise we won't find it if we're
509 # using a relative directory.
510 cp "$am_depcomp" conftest.dir
511 cd conftest.dir
512
513 am_cv_$1_dependencies_compiler_type=none
514 if test "$am_compiler_list" = ""; then
515 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
516 fi
517 for depmode in $am_compiler_list; do
518 # We need to recreate these files for each test, as the compiler may
519 # overwrite some of them when testing with obscure command lines.
520 # This happens at least with the AIX C compiler.
521 echo '#include "conftest.h"' > conftest.c
522 echo 'int i;' > conftest.h
523 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
524
525 case $depmode in
526 nosideeffect)
527 # after this tag, mechanisms are not by side-effect, so they'll
528 # only be used when explicitly requested
529 if test "x$enable_dependency_tracking" = xyes; then
530 continue
531 else
532 break
533 fi
534 ;;
535 none) break ;;
536 esac
537 # We check with `-c' and `-o' for the sake of the "dashmstdout"
538 # mode. It turns out that the SunPro C++ compiler does not properly
539 # handle `-M -o', and we need to detect this.
540 if depmode=$depmode \
541 source=conftest.c object=conftest.o \
542 depfile=conftest.Po tmpdepfile=conftest.TPo \
f9e903a3 543 $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
f6100b6f
RC
544 grep conftest.h conftest.Po > /dev/null 2>&1 &&
545 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
546 am_cv_$1_dependencies_compiler_type=$depmode
547 break
548 fi
549 done
550
551 cd ..
552 rm -rf conftest.dir
553else
554 am_cv_$1_dependencies_compiler_type=none
555fi
556])
557AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
f9e903a3
RC
558AM_CONDITIONAL([am__fastdep$1], [
559 test "x$enable_dependency_tracking" != xno \
560 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
f6100b6f
RC
561])
562
563
564# AM_SET_DEPDIR
565# -------------
566# Choose a directory name for dependency files.
567# This macro is AC_REQUIREd in _AM_DEPENDENCIES
568AC_DEFUN([AM_SET_DEPDIR],
569[rm -f .deps 2>/dev/null
570mkdir .deps 2>/dev/null
571if test -d .deps; then
572 DEPDIR=.deps
573else
574 # MS-DOS does not allow filenames that begin with a dot.
575 DEPDIR=_deps
576fi
577rmdir .deps 2>/dev/null
578AC_SUBST([DEPDIR])
579])
580
581
582# AM_DEP_TRACK
583# ------------
584AC_DEFUN([AM_DEP_TRACK],
585[AC_ARG_ENABLE(dependency-tracking,
586[ --disable-dependency-tracking Speeds up one-time builds
587 --enable-dependency-tracking Do not reject slow dependency extractors])
588if test "x$enable_dependency_tracking" != xno; then
589 am_depcomp="$ac_aux_dir/depcomp"
590 AMDEPBACKSLASH='\'
591fi
592AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
593AC_SUBST([AMDEPBACKSLASH])
594])
595
596# Generate code to set up dependency tracking. -*- Autoconf -*-
597
598# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
599
600# This program is free software; you can redistribute it and/or modify
601# it under the terms of the GNU General Public License as published by
602# the Free Software Foundation; either version 2, or (at your option)
603# any later version.
604
605# This program is distributed in the hope that it will be useful,
606# but WITHOUT ANY WARRANTY; without even the implied warranty of
607# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
608# GNU General Public License for more details.
609
610# You should have received a copy of the GNU General Public License
611# along with this program; if not, write to the Free Software
612# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
613# 02111-1307, USA.
614
615#serial 2
616
617# _AM_OUTPUT_DEPENDENCY_COMMANDS
618# ------------------------------
619AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
620[for mf in $CONFIG_FILES; do
621 # Strip MF so we end up with the name of the file.
622 mf=`echo "$mf" | sed -e 's/:.*$//'`
12f14c3f
RC
623 # Check whether this is an Automake generated Makefile or not.
624 # We used to match only the files named `Makefile.in', but
625 # some people rename them; so instead we look at the file content.
626 # Grep'ing the first line is not enough: some people post-process
627 # each Makefile.in and add a new line on top of each file to say so.
628 # So let's grep whole file.
629 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
f6100b6f
RC
630 dirpart=`AS_DIRNAME("$mf")`
631 else
632 continue
633 fi
634 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
635 # Extract the definition of DEP_FILES from the Makefile without
636 # running `make'.
637 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
638 test -z "$DEPDIR" && continue
639 # When using ansi2knr, U may be empty or an underscore; expand it
640 U=`sed -n -e '/^U = / s///p' < "$mf"`
641 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
642 # We invoke sed twice because it is the simplest approach to
643 # changing $(DEPDIR) to its actual value in the expansion.
644 for file in `sed -n -e '
645 /^DEP_FILES = .*\\\\$/ {
646 s/^DEP_FILES = //
647 :loop
648 s/\\\\$//
649 p
650 n
651 /\\\\$/ b loop
652 p
653 }
654 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
655 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
656 # Make sure the directory exists.
657 test -f "$dirpart/$file" && continue
658 fdir=`AS_DIRNAME(["$file"])`
659 AS_MKDIR_P([$dirpart/$fdir])
660 # echo "creating $dirpart/$file"
661 echo '# dummy' > "$dirpart/$file"
662 done
663done
664])# _AM_OUTPUT_DEPENDENCY_COMMANDS
665
666
667# AM_OUTPUT_DEPENDENCY_COMMANDS
668# -----------------------------
669# This macro should only be invoked once -- use via AC_REQUIRE.
670#
671# This code is only required when automatic dependency tracking
672# is enabled. FIXME. This creates each `.P' file that we will
673# need in order to bootstrap the dependency handling code.
674AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
675[AC_CONFIG_COMMANDS([depfiles],
676 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
677 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
678])
679
f9e903a3
RC
680# Check to see how 'make' treats includes. -*- Autoconf -*-
681
682# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
f6100b6f
RC
683
684# This program is free software; you can redistribute it and/or modify
685# it under the terms of the GNU General Public License as published by
686# the Free Software Foundation; either version 2, or (at your option)
687# any later version.
688
689# This program is distributed in the hope that it will be useful,
690# but WITHOUT ANY WARRANTY; without even the implied warranty of
691# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
692# GNU General Public License for more details.
693
694# You should have received a copy of the GNU General Public License
695# along with this program; if not, write to the Free Software
696# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
697# 02111-1307, USA.
698
699# serial 2
700
701# AM_MAKE_INCLUDE()
702# -----------------
703# Check to see how make treats includes.
704AC_DEFUN([AM_MAKE_INCLUDE],
705[am_make=${MAKE-make}
706cat > confinc << 'END'
707doit:
708 @echo done
709END
710# If we don't find an include directive, just comment out the code.
711AC_MSG_CHECKING([for style of include used by $am_make])
712am__include="#"
713am__quote=
714_am_result=none
715# First try GNU make style include.
716echo "include confinc" > confmf
717# We grep out `Entering directory' and `Leaving directory'
718# messages which can occur if `w' ends up in MAKEFLAGS.
719# In particular we don't look at `^make:' because GNU make might
720# be invoked under some other name (usually "gmake"), in which
721# case it prints its new name instead of `make'.
f9e903a3 722if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
f6100b6f
RC
723 am__include=include
724 am__quote=
725 _am_result=GNU
726fi
727# Now try BSD make style include.
728if test "$am__include" = "#"; then
729 echo '.include "confinc"' > confmf
730 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
731 am__include=.include
732 am__quote="\""
733 _am_result=BSD
734 fi
735fi
736AC_SUBST(am__include)
737AC_SUBST(am__quote)
738AC_MSG_RESULT($_am_result)
739rm -f confinc confmf
740])
741
742# AM_CONDITIONAL -*- Autoconf -*-
743
744# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
745
746# This program is free software; you can redistribute it and/or modify
747# it under the terms of the GNU General Public License as published by
748# the Free Software Foundation; either version 2, or (at your option)
749# any later version.
750
751# This program is distributed in the hope that it will be useful,
752# but WITHOUT ANY WARRANTY; without even the implied warranty of
753# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
754# GNU General Public License for more details.
755
756# You should have received a copy of the GNU General Public License
757# along with this program; if not, write to the Free Software
758# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
759# 02111-1307, USA.
760
761# serial 5
762
763AC_PREREQ(2.52)
764
765# AM_CONDITIONAL(NAME, SHELL-CONDITION)
766# -------------------------------------
767# Define a conditional.
768AC_DEFUN([AM_CONDITIONAL],
769[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
770 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
771AC_SUBST([$1_TRUE])
772AC_SUBST([$1_FALSE])
773if $2; then
774 $1_TRUE=
775 $1_FALSE='#'
776else
777 $1_TRUE='#'
778 $1_FALSE=
779fi
780AC_CONFIG_COMMANDS_PRE(
781[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
f9e903a3 782 AC_MSG_ERROR([conditional "$1" was never defined.
f6100b6f
RC
783Usually this means the macro was only invoked conditionally.])
784fi])])
785
786# Add --enable-maintainer-mode option to configure.
787# From Jim Meyering
788
f9e903a3 789# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
f6100b6f
RC
790
791# This program is free software; you can redistribute it and/or modify
792# it under the terms of the GNU General Public License as published by
793# the Free Software Foundation; either version 2, or (at your option)
794# any later version.
795
796# This program is distributed in the hope that it will be useful,
797# but WITHOUT ANY WARRANTY; without even the implied warranty of
798# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
799# GNU General Public License for more details.
800
801# You should have received a copy of the GNU General Public License
802# along with this program; if not, write to the Free Software
803# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
804# 02111-1307, USA.
805
f9e903a3 806# serial 2
f6100b6f
RC
807
808AC_DEFUN([AM_MAINTAINER_MODE],
809[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
810 dnl maintainer-mode is disabled by default
811 AC_ARG_ENABLE(maintainer-mode,
812[ --enable-maintainer-mode enable make rules and dependencies not useful
813 (and sometimes confusing) to the casual installer],
814 USE_MAINTAINER_MODE=$enableval,
815 USE_MAINTAINER_MODE=no)
816 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
817 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
818 MAINT=$MAINTAINER_MODE_TRUE
819 AC_SUBST(MAINT)dnl
820]
821)
822
f9e903a3
RC
823AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
824
f6100b6f
RC
825# serial 2
826
827# AM_PROG_CC_C_O
828# --------------
829# Like AC_PROG_CC_C_O, but changed for automake.
830
831# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
832
833# This program is free software; you can redistribute it and/or modify
834# it under the terms of the GNU General Public License as published by
835# the Free Software Foundation; either version 2, or (at your option)
836# any later version.
837
838# This program is distributed in the hope that it will be useful,
839# but WITHOUT ANY WARRANTY; without even the implied warranty of
840# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
841# GNU General Public License for more details.
842
843# You should have received a copy of the GNU General Public License
844# along with this program; if not, write to the Free Software
845# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
846# 02111-1307, USA.
847
848AC_DEFUN([AM_PROG_CC_C_O],
849[AC_REQUIRE([AC_PROG_CC_C_O])dnl
850AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
851# FIXME: we rely on the cache variable name because
852# there is no other way.
853set dummy $CC
854ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
855if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
856 # Losing compiler, so override with the script.
857 # FIXME: It is wrong to rewrite CC.
858 # But if we don't then we get into trouble of one sort or another.
859 # A longer-term fix would be to have automake use am__CC in this case,
860 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
861 CC="$am_aux_dir/compile $CC"
862fi
863])
864
865
866# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
867
868# This program is free software; you can redistribute it and/or modify
869# it under the terms of the GNU General Public License as published by
870# the Free Software Foundation; either version 2, or (at your option)
871# any later version.
872
873# This program is distributed in the hope that it will be useful,
874# but WITHOUT ANY WARRANTY; without even the implied warranty of
875# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
876# GNU General Public License for more details.
877
878# You should have received a copy of the GNU General Public License
879# along with this program; if not, write to the Free Software
880# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
881# 02111-1307, USA.
882
883# serial 3
884
885AC_PREREQ(2.50)
886
887# AM_PROG_LEX
888# -----------
889# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
890# "missing" invocation, for better error output.
891AC_DEFUN([AM_PROG_LEX],
892[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
893AC_REQUIRE([AC_PROG_LEX])dnl
894if test "$LEX" = :; then
895 LEX=${am_missing_run}flex
896fi])
897
f9e903a3
RC
898# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
899
900# serial 47 AC_PROG_LIBTOOL
6908b7d7 901
6908b7d7 902
f9e903a3
RC
903# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
904# -----------------------------------------------------------
905# If this macro is not defined by Autoconf, define it here.
906m4_ifdef([AC_PROVIDE_IFELSE],
907 [],
908 [m4_define([AC_PROVIDE_IFELSE],
909 [m4_ifdef([AC_PROVIDE_$1],
910 [$2], [$3])])])
911
912
913# AC_PROG_LIBTOOL
914# ---------------
6908b7d7 915AC_DEFUN([AC_PROG_LIBTOOL],
f9e903a3
RC
916[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
917dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
918dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
919 AC_PROVIDE_IFELSE([AC_PROG_CXX],
920 [AC_LIBTOOL_CXX],
921 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
922 ])])
923
924dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
925dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
926dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
927 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
928 [AC_LIBTOOL_GCJ],
929 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
930 [AC_LIBTOOL_GCJ],
931 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
932 [AC_LIBTOOL_GCJ],
933 [ifdef([AC_PROG_GCJ],
934 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
935 ifdef([A][M_PROG_GCJ],
936 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
937 ifdef([LT_AC_PROG_GCJ],
938 [define([LT_AC_PROG_GCJ],
939 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
940])])# AC_PROG_LIBTOOL
941
942
943# _AC_PROG_LIBTOOL
944# ----------------
945AC_DEFUN([_AC_PROG_LIBTOOL],
6908b7d7 946[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
f9e903a3
RC
947AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
948AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
6908b7d7
RC
949
950# This can be used to rebuild libtool when needed
951LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
952
953# Always use our own libtool.
954LIBTOOL='$(SHELL) $(top_builddir)/libtool'
955AC_SUBST(LIBTOOL)dnl
956
957# Prevent multiple expansion
958define([AC_PROG_LIBTOOL], [])
f9e903a3 959])# _AC_PROG_LIBTOOL
6908b7d7 960
f9e903a3
RC
961
962# AC_LIBTOOL_SETUP
963# ----------------
6908b7d7 964AC_DEFUN([AC_LIBTOOL_SETUP],
f9e903a3 965[AC_PREREQ(2.50)dnl
6908b7d7
RC
966AC_REQUIRE([AC_ENABLE_SHARED])dnl
967AC_REQUIRE([AC_ENABLE_STATIC])dnl
968AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
969AC_REQUIRE([AC_CANONICAL_HOST])dnl
970AC_REQUIRE([AC_CANONICAL_BUILD])dnl
971AC_REQUIRE([AC_PROG_CC])dnl
972AC_REQUIRE([AC_PROG_LD])dnl
973AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
974AC_REQUIRE([AC_PROG_NM])dnl
f9e903a3
RC
975AC_REQUIRE([LT_AC_PROG_SED])dnl
976
6908b7d7
RC
977AC_REQUIRE([AC_PROG_LN_S])dnl
978AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
f9e903a3 979# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6908b7d7
RC
980AC_REQUIRE([AC_OBJEXT])dnl
981AC_REQUIRE([AC_EXEEXT])dnl
982dnl
983
f9e903a3
RC
984AC_LIBTOOL_SYS_MAX_CMD_LEN
985AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
986AC_LIBTOOL_OBJDIR
987
988AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6908b7d7 989_LT_AC_PROG_ECHO_BACKSLASH
f9e903a3
RC
990
991case $host_os in
992aix3*)
993 # AIX sometimes has problems with the GCC collect2 program. For some
994 # reason, if we set the COLLECT_NAMES environment variable, the problems
995 # vanish in a puff of smoke.
996 if test "X${COLLECT_NAMES+set}" != Xset; then
997 COLLECT_NAMES=
998 export COLLECT_NAMES
6908b7d7
RC
999 fi
1000 ;;
1001esac
1002
f9e903a3
RC
1003# Sed substitution that helps us do robust quoting. It backslashifies
1004# metacharacters that are still active within double-quoted strings.
1005Xsed='sed -e s/^X//'
1006[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
6908b7d7 1007
f9e903a3
RC
1008# Same as above, but do not quote variable references.
1009[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
6908b7d7 1010
f9e903a3
RC
1011# Sed substitution to delay expansion of an escaped shell variable in a
1012# double_quote_subst'ed string.
1013delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6908b7d7 1014
f9e903a3
RC
1015# Sed substitution to avoid accidental globbing in evaled expressions
1016no_glob_subst='s/\*/\\\*/g'
6908b7d7 1017
f9e903a3
RC
1018# Constants:
1019rm="rm -f"
6908b7d7 1020
f9e903a3
RC
1021# Global variables:
1022default_ofile=libtool
1023can_build_shared=yes
6908b7d7 1024
f9e903a3
RC
1025# All known linkers require a `.a' archive for static linking (except M$VC,
1026# which needs '.lib').
1027libext=a
1028ltmain="$ac_aux_dir/ltmain.sh"
1029ofile="$default_ofile"
1030with_gnu_ld="$lt_cv_prog_gnu_ld"
6908b7d7 1031
f9e903a3
RC
1032AC_CHECK_TOOL(RANLIB, ranlib, :)
1033AC_CHECK_TOOL(STRIP, strip, :)
1034
1035old_CC="$CC"
1036old_CFLAGS="$CFLAGS"
1037
1038# Set sane defaults for various variables
1039test -z "$AR" && AR=ar
1040test -z "$AR_FLAGS" && AR_FLAGS=cru
1041test -z "$AS" && AS=as
1042test -z "$CC" && CC=cc
1043test -z "$LTCC" && LTCC=$CC
1044test -z "$DLLTOOL" && DLLTOOL=dlltool
1045test -z "$LD" && LD=ld
1046test -z "$LN_S" && LN_S="ln -s"
1047test -z "$MAGIC_CMD" && MAGIC_CMD=file
1048test -z "$NM" && NM=nm
1049test -z "$SED" && SED=sed
1050test -z "$OBJDUMP" && OBJDUMP=objdump
1051test -z "$RANLIB" && RANLIB=:
1052test -z "$STRIP" && STRIP=:
1053test -z "$ac_objext" && ac_objext=o
1054
1055# Determine commands to create old-style static archives.
1056old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1057old_postinstall_cmds='chmod 644 $oldlib'
1058old_postuninstall_cmds=
1059
1060if test -n "$RANLIB"; then
1061 case $host_os in
1062 openbsd*)
1063 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1064 ;;
1065 *)
1066 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1067 ;;
6908b7d7 1068 esac
f9e903a3
RC
1069 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1070fi
1071
1072# Only perform the check for file, if the check method requires it
1073case $deplibs_check_method in
1074file_magic*)
1075 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1076 AC_PATH_MAGIC
1077 fi
6908b7d7
RC
1078 ;;
1079esac
1080
f9e903a3
RC
1081AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1082AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1083enable_win32_dll=yes, enable_win32_dll=no)
6908b7d7 1084
f9e903a3
RC
1085AC_ARG_ENABLE([libtool-lock],
1086 [AC_HELP_STRING([--disable-libtool-lock],
1087 [avoid locking (might break parallel builds)])])
1088test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6908b7d7 1089
f9e903a3
RC
1090AC_ARG_WITH([pic],
1091 [AC_HELP_STRING([--with-pic],
1092 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1093 [pic_mode="$withval"],
1094 [pic_mode=default])
1095test -z "$pic_mode" && pic_mode=default
6908b7d7 1096
f9e903a3
RC
1097# Use C for the default configuration in the libtool script
1098tagname=
1099AC_LIBTOOL_LANG_C_CONFIG
1100_LT_AC_TAGCONFIG
1101])# AC_LIBTOOL_SETUP
6908b7d7
RC
1102
1103
f9e903a3
RC
1104# _LT_AC_SYS_COMPILER
1105# -------------------
1106AC_DEFUN([_LT_AC_SYS_COMPILER],
1107[AC_REQUIRE([AC_PROG_CC])dnl
6908b7d7 1108
f9e903a3
RC
1109# If no C compiler was specified, use CC.
1110LTCC=${LTCC-"$CC"}
6908b7d7 1111
f9e903a3
RC
1112# Allow CC to be a program name with arguments.
1113set dummy $CC
1114compiler="[$]2"
1115])# _LT_AC_SYS_COMPILER
6908b7d7
RC
1116
1117
f9e903a3
RC
1118# _LT_AC_SYS_LIBPATH_AIX
1119# ----------------------
1120# Links a minimal program and checks the executable
1121# for the system default hardcoded library path. In most cases,
1122# this is /usr/lib:/lib, but when the MPI compilers are used
1123# the location of the communication and MPI libs are included too.
1124# If we don't find anything, use the default library path according
1125# to the aix ld manual.
1126AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1127[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1128aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1129}'`
1130# Check for a 64-bit object if we didn't find anything.
1131if 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; }
1132}'`; fi],[])
1133if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1134])# _LT_AC_SYS_LIBPATH_AIX
1135
1136
1137# _LT_AC_SHELL_INIT(ARG)
1138# ----------------------
1139AC_DEFUN([_LT_AC_SHELL_INIT],
1140[ifdef([AC_DIVERSION_NOTICE],
1141 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1142 [AC_DIVERT_PUSH(NOTICE)])
1143$1
1144AC_DIVERT_POP
1145])# _LT_AC_SHELL_INIT
6908b7d7
RC
1146
1147
f9e903a3
RC
1148# _LT_AC_PROG_ECHO_BACKSLASH
1149# --------------------------
1150# Add some code to the start of the generated configure script which
1151# will find an echo command which doesn't interpret backslashes.
1152AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1153[_LT_AC_SHELL_INIT([
1154# Check that we are running under the correct shell.
1155SHELL=${CONFIG_SHELL-/bin/sh}
6908b7d7 1156
f9e903a3
RC
1157case X$ECHO in
1158X*--fallback-echo)
1159 # Remove one level of quotation (which was required for Make).
1160 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
12f14c3f
RC
1161 ;;
1162esac
6908b7d7 1163
f9e903a3
RC
1164echo=${ECHO-echo}
1165if test "X[$]1" = X--no-reexec; then
1166 # Discard the --no-reexec flag, and continue.
1167 shift
1168elif test "X[$]1" = X--fallback-echo; then
1169 # Avoid inline document here, it may be left over
1170 :
1171elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1172 # Yippee, $echo works!
1173 :
1174else
1175 # Restart under the correct shell.
1176 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1177fi
6908b7d7 1178
f9e903a3
RC
1179if test "X[$]1" = X--fallback-echo; then
1180 # used as fallback echo
1181 shift
1182 cat <<EOF
1183[$]*
1184EOF
1185 exit 0
6908b7d7
RC
1186fi
1187
f9e903a3
RC
1188# The HP-UX ksh and POSIX shell print the target directory to stdout
1189# if CDPATH is set.
1190if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
12f14c3f
RC
1191
1192if test -z "$ECHO"; then
1193if test "X${echo_test_string+set}" != Xset; then
1194# find a string as large as possible, as long as the shell can cope with it
1195 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1196 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1197 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1198 echo_test_string="`eval $cmd`" &&
1199 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1200 then
1201 break
6908b7d7
RC
1202 fi
1203 done
1204fi
1205
1206if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1207 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1208 test "X$echo_testing_string" = "X$echo_test_string"; then
1209 :
1210else
1211 # The Solaris, AIX, and Digital Unix default echo programs unquote
1212 # backslashes. This makes it impossible to quote backslashes using
1213 # echo "$something" | sed 's/\\/\\\\/g'
1214 #
1215 # So, first we look for a working echo in the user's PATH.
1216
f9e903a3 1217 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6908b7d7 1218 for dir in $PATH /usr/ucb; do
f9e903a3 1219 IFS="$lt_save_ifs"
6908b7d7
RC
1220 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1221 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1222 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1223 test "X$echo_testing_string" = "X$echo_test_string"; then
1224 echo="$dir/echo"
1225 break
1226 fi
1227 done
f9e903a3 1228 IFS="$lt_save_ifs"
6908b7d7
RC
1229
1230 if test "X$echo" = Xecho; then
1231 # We didn't find a better echo, so look for alternatives.
1232 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1233 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1234 test "X$echo_testing_string" = "X$echo_test_string"; then
1235 # This shell has a builtin print -r that does the trick.
1236 echo='print -r'
1237 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1238 test "X$CONFIG_SHELL" != X/bin/ksh; then
1239 # If we have ksh, try running configure again with it.
1240 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1241 export ORIGINAL_CONFIG_SHELL
1242 CONFIG_SHELL=/bin/ksh
1243 export CONFIG_SHELL
1244 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1245 else
1246 # Try using printf.
1247 echo='printf %s\n'
1248 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1249 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1250 test "X$echo_testing_string" = "X$echo_test_string"; then
1251 # Cool, printf works
1252 :
1253 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1254 test "X$echo_testing_string" = 'X\t' &&
1255 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1256 test "X$echo_testing_string" = "X$echo_test_string"; then
1257 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1258 export CONFIG_SHELL
1259 SHELL="$CONFIG_SHELL"
1260 export SHELL
1261 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1262 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1263 test "X$echo_testing_string" = 'X\t' &&
1264 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1265 test "X$echo_testing_string" = "X$echo_test_string"; then
1266 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1267 else
1268 # maybe with a smaller string...
1269 prev=:
1270
1271 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1272 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1273 then
1274 break
1275 fi
1276 prev="$cmd"
1277 done
1278
1279 if test "$prev" != 'sed 50q "[$]0"'; then
1280 echo_test_string=`eval $prev`
1281 export echo_test_string
1282 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1283 else
1284 # Oops. We lost completely, so just stick with echo.
1285 echo=echo
1286 fi
1287 fi
1288 fi
1289 fi
1290fi
1291fi
1292
1293# Copy echo and quote the copy suitably for passing to libtool from
1294# the Makefile, instead of quoting the original, which is used later.
1295ECHO=$echo
1296if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1297 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1298fi
1299
1300AC_SUBST(ECHO)
f9e903a3
RC
1301])])# _LT_AC_PROG_ECHO_BACKSLASH
1302
1303
1304# _LT_AC_LOCK
1305# -----------
1306AC_DEFUN([_LT_AC_LOCK],
1307[AC_ARG_ENABLE([libtool-lock],
1308 [AC_HELP_STRING([--disable-libtool-lock],
1309 [avoid locking (might break parallel builds)])])
1310test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1311
1312# Some flags need to be propagated to the compiler or linker for good
1313# libtool support.
1314case $host in
1315ia64-*-hpux*)
1316 # Find out which ABI we are using.
1317 echo 'int i;' > conftest.$ac_ext
1318 if AC_TRY_EVAL(ac_compile); then
1319 case `/usr/bin/file conftest.$ac_objext` in
1320 *ELF-32*)
1321 HPUX_IA64_MODE="32"
1322 ;;
1323 *ELF-64*)
1324 HPUX_IA64_MODE="64"
1325 ;;
1326 esac
1327 fi
1328 rm -rf conftest*
1329 ;;
1330*-*-irix6*)
1331 # Find out which ABI we are using.
1332 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1333 if AC_TRY_EVAL(ac_compile); then
1334 case `/usr/bin/file conftest.$ac_objext` in
1335 *32-bit*)
1336 LD="${LD-ld} -32"
1337 ;;
1338 *N32*)
1339 LD="${LD-ld} -n32"
1340 ;;
1341 *64-bit*)
1342 LD="${LD-ld} -64"
1343 ;;
1344 esac
1345 fi
1346 rm -rf conftest*
1347 ;;
1348
1349*-*-sco3.2v5*)
1350 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1351 SAVE_CFLAGS="$CFLAGS"
1352 CFLAGS="$CFLAGS -belf"
1353 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1354 [AC_LANG_PUSH(C)
1355 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1356 AC_LANG_POP])
1357 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1358 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1359 CFLAGS="$SAVE_CFLAGS"
1360 fi
1361 ;;
1362AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1363[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1364 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1365 AC_CHECK_TOOL(AS, as, false)
1366 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1367
1368 # recent cygwin and mingw systems supply a stub DllMain which the user
1369 # can override, but on older systems we have to supply one
1370 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1371 [AC_TRY_LINK([],
1372 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1373 DllMain (0, 0, 0);],
1374 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1375
1376 case $host/$CC in
1377 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1378 # old mingw systems require "-dll" to link a DLL, while more recent ones
1379 # require "-mdll"
1380 SAVE_CFLAGS="$CFLAGS"
1381 CFLAGS="$CFLAGS -mdll"
1382 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1383 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1384 CFLAGS="$SAVE_CFLAGS" ;;
1385 *-*-cygwin* | *-*-pw32*)
1386 # cygwin systems need to pass --dll to the linker, and not link
1387 # crt.o which will require a WinMain@16 definition.
1388 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1389 esac
1390 ;;
1391 ])
1392esac
1393
1394need_locks="$enable_libtool_lock"
1395
1396])# _LT_AC_LOCK
1397
1398
1399# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1400# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1401# ----------------------------------------------------------------
1402# Check whether the given compiler option works
1403AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1404[AC_CACHE_CHECK([$1], [$2],
1405 [$2=no
1406 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1407 save_CFLAGS="$CFLAGS"
1408 CFLAGS="$CFLAGS $3"
1409 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1410 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
1411 # The compiler can only warn and ignore the option if not recognized
1412 # So say no if there are warnings
1413 if test -s conftest.err; then
1414 # Append any errors to the config.log.
1415 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1416 else
1417 $2=yes
1418 fi
1419 fi
1420 $rm conftest*
1421 CFLAGS="$save_CFLAGS"
1422])
1423
1424if test x"[$]$2" = xyes; then
1425 ifelse([$5], , :, [$5])
1426else
1427 ifelse([$6], , :, [$6])
1428fi
1429])# AC_LIBTOOL_COMPILER_OPTION
1430
1431
1432# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1433# [ACTION-SUCCESS], [ACTION-FAILURE])
1434# ------------------------------------------------------------
1435# Check whether the given compiler option works
1436AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1437[AC_CACHE_CHECK([$1], [$2],
1438 [$2=no
1439 save_LDFLAGS="$LDFLAGS"
1440 LDFLAGS="$LDFLAGS $3"
1441 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1442 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1443 # The compiler can only warn and ignore the option if not recognized
1444 # So say no if there are warnings
1445 if test -s conftest.err; then
1446 # Append any errors to the config.log.
1447 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1448 else
1449 $2=yes
1450 fi
1451 fi
1452 $rm conftest*
1453 LDFLAGS="$save_LDFLAGS"
1454])
1455
1456if test x"[$]$2" = xyes; then
1457 ifelse([$4], , :, [$4])
1458else
1459 ifelse([$5], , :, [$5])
1460fi
1461])# AC_LIBTOOL_LINKER_OPTION
1462
1463
1464# AC_LIBTOOL_SYS_MAX_CMD_LEN
1465# --------------------------
1466AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1467[# find the maximum length of command line arguments
1468AC_MSG_CHECKING([the maximum length of command line arguments])
1469AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1470 i=0
1471 testring="ABCD"
1472
1473 case $build_os in
1474 msdosdjgpp*)
1475 # On DJGPP, this test can blow up pretty badly due to problems in libc
1476 # (any single argument exceeding 2000 bytes causes a buffer overrun
1477 # during glob expansion). Even if it were fixed, the result of this
1478 # check would be larger than it should be.
1479 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1480 ;;
1481 cygwin*)
1482 # On Win9x/ME, this test blows up -- it succeeds, but takes
1483 # about 5 minutes as the teststring grows exponentially.
1484 # Worse, since 9x/ME are not pre-emptively multitasking,
1485 # you end up with a "frozen" computer, even though with patience
1486 # the test eventually succeeds (with a max line length of 256k).
1487 # Instead, let's just punt: use the minimum linelength reported by
1488 # all of the supported platforms: 8192 (on NT/2K/XP).
1489 lt_cv_sys_max_cmd_len=8192;
1490 ;;
1491 gnu*)
1492 # Under GNU Hurd, this test is not required because there is
1493 # no limit to the length of command line arguments.
1494 # Libtool will interpret -1 as no limit whatsoever
1495 lt_cv_sys_max_cmd_len=-1;
1496 ;;
1497
1498 *)
1499 # If test is not a shell built-in, we'll probably end up computing a
1500 # maximum length that is only half of the actual maximum length, but
1501 # we can't tell.
1502 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1503 = "XX$testring") >/dev/null 2>&1 &&
1504 new_result=`expr "X$testring" : ".*" 2>&1` &&
1505 lt_cv_sys_max_cmd_len=$new_result &&
1506 test $i != 17 # 1/2 MB should be enough
1507 do
1508 i=`expr $i + 1`
1509 testring=$testring$testring
1510 done
1511 testring=
1512 # Add a significant safety factor because C++ compilers can tack on massive
1513 # amounts of additional arguments before passing them to the linker.
1514 # It appears as though 1/2 is a usable value.
1515 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1516 ;;
1517 esac
1518])
1519if test -n $lt_cv_sys_max_cmd_len ; then
1520 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1521else
1522 AC_MSG_RESULT(none)
1523fi
1524])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1525
1526
1527# _LT_AC_CHECK_DLFCN
1528# --------------------
1529AC_DEFUN([_LT_AC_CHECK_DLFCN],
1530[AC_CHECK_HEADERS(dlfcn.h)dnl
1531])# _LT_AC_CHECK_DLFCN
1532
6908b7d7 1533
12f14c3f
RC
1534# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1535# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1536# ------------------------------------------------------------------
1537AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
f9e903a3
RC
1538[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1539if test "$cross_compiling" = yes; then :
12f14c3f
RC
1540 [$4]
1541else
12f14c3f
RC
1542 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1543 lt_status=$lt_dlunknown
1544 cat > conftest.$ac_ext <<EOF
1545[#line __oline__ "configure"
1546#include "confdefs.h"
6908b7d7 1547
12f14c3f
RC
1548#if HAVE_DLFCN_H
1549#include <dlfcn.h>
1550#endif
6908b7d7 1551
12f14c3f 1552#include <stdio.h>
6908b7d7 1553
12f14c3f
RC
1554#ifdef RTLD_GLOBAL
1555# define LT_DLGLOBAL RTLD_GLOBAL
1556#else
1557# ifdef DL_GLOBAL
1558# define LT_DLGLOBAL DL_GLOBAL
1559# else
1560# define LT_DLGLOBAL 0
1561# endif
1562#endif
6908b7d7 1563
12f14c3f
RC
1564/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1565 find out it does not work in some platform. */
1566#ifndef LT_DLLAZY_OR_NOW
1567# ifdef RTLD_LAZY
1568# define LT_DLLAZY_OR_NOW RTLD_LAZY
1569# else
1570# ifdef DL_LAZY
1571# define LT_DLLAZY_OR_NOW DL_LAZY
1572# else
1573# ifdef RTLD_NOW
1574# define LT_DLLAZY_OR_NOW RTLD_NOW
1575# else
1576# ifdef DL_NOW
1577# define LT_DLLAZY_OR_NOW DL_NOW
1578# else
1579# define LT_DLLAZY_OR_NOW 0
1580# endif
1581# endif
1582# endif
1583# endif
1584#endif
6908b7d7
RC
1585
1586#ifdef __cplusplus
1587extern "C" void exit (int);
1588#endif
1589
1590void fnord() { int i=42;}
1591int main ()
1592{
1593 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1594 int status = $lt_dlunknown;
1595
1596 if (self)
1597 {
1598 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1599 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1600 /* dlclose (self); */
1601 }
1602
1603 exit (status);
1604}]
1605EOF
1606 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1607 (./conftest; exit; ) 2>/dev/null
1608 lt_status=$?
1609 case x$lt_status in
1610 x$lt_dlno_uscore) $1 ;;
1611 x$lt_dlneed_uscore) $2 ;;
1612 x$lt_unknown|x*) $3 ;;
1613 esac
1614 else :
1615 # compilation failed
1616 $3
1617 fi
1618fi
1619rm -fr conftest*
1620])# _LT_AC_TRY_DLOPEN_SELF
1621
f9e903a3 1622
6908b7d7
RC
1623# AC_LIBTOOL_DLOPEN_SELF
1624# -------------------
1625AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
f9e903a3
RC
1626[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1627if test "x$enable_dlopen" != xyes; then
6908b7d7
RC
1628 enable_dlopen=unknown
1629 enable_dlopen_self=unknown
1630 enable_dlopen_self_static=unknown
1631else
1632 lt_cv_dlopen=no
1633 lt_cv_dlopen_libs=
1634
1635 case $host_os in
1636 beos*)
1637 lt_cv_dlopen="load_add_on"
1638 lt_cv_dlopen_libs=
1639 lt_cv_dlopen_self=yes
1640 ;;
1641
1642 cygwin* | mingw* | pw32*)
1643 lt_cv_dlopen="LoadLibrary"
1644 lt_cv_dlopen_libs=
1645 ;;
1646
1647 *)
1648 AC_CHECK_FUNC([shl_load],
f9e903a3 1649 [lt_cv_dlopen="shl_load"],
6908b7d7 1650 [AC_CHECK_LIB([dld], [shl_load],
f9e903a3 1651 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6908b7d7
RC
1652 [AC_CHECK_FUNC([dlopen],
1653 [lt_cv_dlopen="dlopen"],
1654 [AC_CHECK_LIB([dl], [dlopen],
f9e903a3 1655 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6908b7d7 1656 [AC_CHECK_LIB([svld], [dlopen],
f9e903a3 1657 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6908b7d7 1658 [AC_CHECK_LIB([dld], [dld_link],
f9e903a3 1659 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6908b7d7
RC
1660 ])
1661 ])
1662 ])
1663 ])
1664 ])
1665 ;;
1666 esac
1667
1668 if test "x$lt_cv_dlopen" != xno; then
1669 enable_dlopen=yes
1670 else
1671 enable_dlopen=no
1672 fi
1673
1674 case $lt_cv_dlopen in
1675 dlopen)
1676 save_CPPFLAGS="$CPPFLAGS"
1677 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1678
1679 save_LDFLAGS="$LDFLAGS"
1680 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1681
1682 save_LIBS="$LIBS"
1683 LIBS="$lt_cv_dlopen_libs $LIBS"
1684
1685 AC_CACHE_CHECK([whether a program can dlopen itself],
1686 lt_cv_dlopen_self, [dnl
1687 _LT_AC_TRY_DLOPEN_SELF(
1688 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1689 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1690 ])
1691
1692 if test "x$lt_cv_dlopen_self" = xyes; then
1693 LDFLAGS="$LDFLAGS $link_static_flag"
1694 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1695 lt_cv_dlopen_self_static, [dnl
1696 _LT_AC_TRY_DLOPEN_SELF(
1697 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1698 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1699 ])
1700 fi
1701
1702 CPPFLAGS="$save_CPPFLAGS"
1703 LDFLAGS="$save_LDFLAGS"
1704 LIBS="$save_LIBS"
1705 ;;
1706 esac
1707
1708 case $lt_cv_dlopen_self in
1709 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1710 *) enable_dlopen_self=unknown ;;
1711 esac
1712
1713 case $lt_cv_dlopen_self_static in
1714 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1715 *) enable_dlopen_self_static=unknown ;;
1716 esac
1717fi
1718])# AC_LIBTOOL_DLOPEN_SELF
1719
6908b7d7 1720
f9e903a3
RC
1721# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1722# ---------------------------------
1723# Check to see if options -c and -o are simultaneously supported by compiler
1724AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1725[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1726AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1727 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1728 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1729 $rm -r conftest 2>/dev/null
1730 mkdir conftest
1731 cd conftest
1732 mkdir out
1733 ifelse([$1],[],[save_CFLAGS="$CFLAGS"
1734 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
1735 [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
1736 CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
1737 [$1],[GCJ],[save_GCJFLAGS="$CFLAGS"
1738 CFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
1739 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1740
1741 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1742 # that will create temporary files in the current directory regardless of
1743 # the output directory. Thus, making CWD read-only will cause this test
1744 # to fail, enabling locking or at least warning the user not to do parallel
1745 # builds.
1746 chmod -w .
1747
1748 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
1749 then
1750 # The compiler can only warn and ignore the option if not recognized
1751 # So say no if there are warnings
1752 if test -s out/conftest.err; then
1753 # Append any errors to the config.log.
1754 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
1755 else
1756 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1757 fi
1758 fi
1759 ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
1760 [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
1761 [$1],[GCJ],[CFLAGS="$save_CFLAGS"])
1762 chmod u+w .
1763 $rm conftest* out/*
1764 rmdir out
1765 cd ..
1766 rmdir conftest
1767 $rm conftest*
1768])
1769])# AC_LIBTOOL_PROG_CC_C_O
6908b7d7 1770
6908b7d7 1771
f9e903a3
RC
1772# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1773# -----------------------------------------
1774# Check to see if we can do hard links to lock some files if needed
1775AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1776[AC_REQUIRE([_LT_AC_LOCK])dnl
6908b7d7 1777
f9e903a3
RC
1778hard_links="nottested"
1779if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1780 # do not overwrite the value of need_locks provided by the user
1781 AC_MSG_CHECKING([if we can lock with hard links])
1782 hard_links=yes
1783 $rm conftest*
1784 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1785 touch conftest.a
1786 ln conftest.a conftest.b 2>&5 || hard_links=no
1787 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1788 AC_MSG_RESULT([$hard_links])
1789 if test "$hard_links" = no; then
1790 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1791 need_locks=warn
12f14c3f 1792 fi
f9e903a3
RC
1793else
1794 need_locks=no
6908b7d7 1795fi
f9e903a3 1796])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6908b7d7
RC
1797
1798
f9e903a3
RC
1799# AC_LIBTOOL_OBJDIR
1800# -----------------
1801AC_DEFUN([AC_LIBTOOL_OBJDIR],
1802[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1803[rm -f .libs 2>/dev/null
12f14c3f
RC
1804mkdir .libs 2>/dev/null
1805if test -d .libs; then
f9e903a3 1806 lt_cv_objdir=.libs
6908b7d7 1807else
12f14c3f 1808 # MS-DOS does not allow filenames that begin with a dot.
f9e903a3 1809 lt_cv_objdir=_libs
6908b7d7 1810fi
f9e903a3
RC
1811rmdir .libs 2>/dev/null])
1812objdir=$lt_cv_objdir
1813])# AC_LIBTOOL_OBJDIR
6908b7d7 1814
6908b7d7 1815
f9e903a3
RC
1816# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1817# ----------------------------------------------
1818# Check hardcoding attributes.
1819AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1820[AC_MSG_CHECKING([how to hardcode library paths into programs])
1821_LT_AC_TAGVAR(hardcode_action, $1)=
1822if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1823 test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
6908b7d7 1824
f9e903a3
RC
1825 # We can hardcode non-existant directories.
1826 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1827 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1828 # have to relink, otherwise we might link with an installed library
1829 # when we should be linking with a yet-to-be-installed one
1830 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1831 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1832 # Linking always hardcodes the temporary library directory.
1833 _LT_AC_TAGVAR(hardcode_action, $1)=relink
12f14c3f 1834 else
f9e903a3
RC
1835 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1836 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
12f14c3f 1837 fi
12f14c3f 1838else
f9e903a3
RC
1839 # We cannot hardcode anything, or else we can only hardcode existing
1840 # directories.
1841 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
12f14c3f 1842fi
f9e903a3 1843AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6908b7d7 1844
f9e903a3
RC
1845if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1846 # Fast installation is not supported
1847 enable_fast_install=no
1848elif test "$shlibpath_overrides_runpath" = yes ||
1849 test "$enable_shared" = no; then
1850 # Fast installation is not necessary
1851 enable_fast_install=needless
12f14c3f 1852fi
f9e903a3 1853])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6908b7d7 1854
6908b7d7 1855
f9e903a3
RC
1856# AC_LIBTOOL_SYS_LIB_STRIP
1857# ------------------------
1858AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1859[striplib=
1860old_striplib=
1861AC_MSG_CHECKING([whether stripping libraries is possible])
1862if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1863 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1864 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1865 AC_MSG_RESULT([yes])
12f14c3f 1866else
f9e903a3 1867 AC_MSG_RESULT([no])
12f14c3f 1868fi
f9e903a3 1869])# AC_LIBTOOL_SYS_LIB_STRIP
6908b7d7 1870
6908b7d7 1871
f9e903a3
RC
1872# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1873# -----------------------------
1874# PORTME Fill in your ld.so characteristics
1875AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1876[AC_MSG_CHECKING([dynamic linker characteristics])
1877library_names_spec=
1878libname_spec='lib$name'
1879soname_spec=
1880postinstall_cmds=
1881postuninstall_cmds=
1882finish_cmds=
1883finish_eval=
1884shlibpath_var=
1885shlibpath_overrides_runpath=unknown
1886version_type=none
1887dynamic_linker="$host_os ld.so"
1888sys_lib_dlsearch_path_spec="/lib /usr/lib"
12f14c3f 1889if test "$GCC" = yes; then
f9e903a3
RC
1890 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
1891 if echo "$sys_lib_search_path_spec" | egrep ';' >/dev/null ; then
1892 # if the path contains ";" then we assume it to be the separator
1893 # otherwise default to the standard path separator (i.e. ":") - it is
1894 # assumed that no part of a normal pathname contains ";" but that should
1895 # okay in the real world where ";" in dirpaths is itself problematic.
1896 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
6908b7d7 1897 else
f9e903a3 1898 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
6908b7d7 1899 fi
f9e903a3
RC
1900else
1901 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12f14c3f 1902fi
12f14c3f 1903need_lib_prefix=unknown
f9e903a3
RC
1904hardcode_into_libs=no
1905
12f14c3f
RC
1906# when you set need_version to no, make sure it does not cause -set_version
1907# flags to be left without arguments
f9e903a3 1908need_version=unknown
6908b7d7 1909
12f14c3f 1910case $host_os in
f9e903a3
RC
1911aix3*)
1912 version_type=linux
1913 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1914 shlibpath_var=LIBPATH
6908b7d7 1915
f9e903a3
RC
1916 # AIX 3 has no versioning support, so we append a major version to the name.
1917 soname_spec='${libname}${release}.so$major'
1918 ;;
6908b7d7 1919
f9e903a3
RC
1920aix4* | aix5*)
1921 version_type=linux
1922 if test "$host_cpu" = ia64; then
1923 # AIX 5 supports IA64
1924 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1925 shlibpath_var=LD_LIBRARY_PATH
1926 else
1927 # With GCC up to 2.95.x, collect2 would create an import file
1928 # for dependence libraries. The import file would start with
1929 # the line `#! .'. This would cause the generated library to
1930 # depend on `.', always an invalid library. This was fixed in
1931 # development snapshots of GCC prior to 3.0.
6908b7d7 1932 case $host_os in
f9e903a3
RC
1933 aix4 | aix4.[[01]] | aix4.[[01]].*)
1934 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1935 echo ' yes '
1936 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1937 :
1938 else
1939 can_build_shared=no
1940 fi
12f14c3f
RC
1941 ;;
1942 esac
f9e903a3
RC
1943 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1944 # soname into executable. Probably we can add versioning support to
1945 # collect2, so additional links can be useful in future.
1946 if test "$aix_use_runtimelinking" = yes; then
1947 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1948 # instead of lib<name>.a to let people know that these are not
1949 # typical AIX shared libraries.
1950 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6908b7d7 1951 else
f9e903a3
RC
1952 # We preserve .a as extension for shared libraries through AIX4.2
1953 # and later when we are not doing run time linking.
1954 library_names_spec='${libname}${release}.a $libname.a'
1955 soname_spec='${libname}${release}.so$major'
6908b7d7 1956 fi
f9e903a3
RC
1957 shlibpath_var=LIBPATH
1958 fi
1959 ;;
6908b7d7 1960
f9e903a3
RC
1961amigaos*)
1962 library_names_spec='$libname.ixlibrary $libname.a'
1963 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1964 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'
1965 ;;
6908b7d7 1966
f9e903a3
RC
1967beos*)
1968 library_names_spec='${libname}.so'
1969 dynamic_linker="$host_os ld.so"
1970 shlibpath_var=LIBRARY_PATH
1971 ;;
6908b7d7 1972
f9e903a3
RC
1973bsdi4*)
1974 version_type=linux
1975 need_version=no
1976 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1977 soname_spec='${libname}${release}.so$major'
1978 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1979 shlibpath_var=LD_LIBRARY_PATH
1980 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1981 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1982 # the default ld.so.conf also contains /usr/contrib/lib and
1983 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1984 # libtool to hard-code these into programs
1985 ;;
6908b7d7 1986
f9e903a3
RC
1987cygwin* | mingw* | pw32*)
1988 version_type=windows
1989 need_version=no
1990 need_lib_prefix=no
1991 case $GCC,$host_os in
1992 yes,cygwin*)
1993 library_names_spec='$libname.dll.a'
1994 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1995 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1996 postinstall_cmds='base_file=`basename \${file}`~
1997 dlpath=`bash 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1998 dldir=$destdir/`dirname \$dlpath`~
1999 test -d \$dldir || mkdir -p \$dldir~
2000 $install_prog $dir/$dlname \$dldir/$dlname'
2001 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2002 dlpath=$dir/\$dldll~
2003 $rm \$dlpath'
2004 shlibpath_overrides_runpath=yes
2005 ;;
2006 yes,mingw*)
2007 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2008 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
2009 if echo "$sys_lib_search_path_spec" | [egrep ';[c-zC-Z]:/' >/dev/null]; then
2010 # It is most probably a Windows format PATH printed by
2011 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2012 # path with ; separators, and with drive letters. We can handle the
2013 # drive letters (cygwin fileutils understands them), so leave them,
2014 # especially as we might pass files found there to a mingw objdump,
2015 # which wouldn't understand a cygwinified path. Ahh.
2016 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
12f14c3f 2017 else
f9e903a3 2018 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
12f14c3f
RC
2019 fi
2020 ;;
f9e903a3
RC
2021 yes,pw32*)
2022 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
12f14c3f 2023 ;;
12f14c3f 2024 *)
f9e903a3 2025 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
12f14c3f
RC
2026 ;;
2027 esac
f9e903a3
RC
2028 dynamic_linker='Win32 ld.exe'
2029 # FIXME: first we should search . and the directory the executable is in
2030 shlibpath_var=PATH
2031 ;;
6908b7d7 2032
f9e903a3
RC
2033darwin* | rhapsody*)
2034 dynamic_linker="$host_os dyld"
2035 version_type=darwin
2036 need_lib_prefix=no
2037 need_version=no
2038 # FIXME: Relying on posixy $() will cause problems for
2039 # cross-compilation, but unfortunately the echo tests do not
2040 # yet detect zsh echo's removal of \ escapes.
2041 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2042 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2043 shlibpath_overrides_runpath=yes
2044 shlibpath_var=DYLD_LIBRARY_PATH
2045 ;;
2046
2047dgux*)
2048 version_type=linux
2049 need_lib_prefix=no
2050 need_version=no
2051 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2052 soname_spec='${libname}${release}.so$major'
2053 shlibpath_var=LD_LIBRARY_PATH
2054 ;;
2055
2056freebsd1*)
2057 dynamic_linker=no
2058 ;;
2059
2060freebsd*)
2061 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2062 version_type=freebsd-$objformat
2063 case $version_type in
2064 freebsd-elf*)
2065 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2066 need_version=no
2067 need_lib_prefix=no
12f14c3f 2068 ;;
f9e903a3
RC
2069 freebsd-*)
2070 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2071 need_version=yes
12f14c3f 2072 ;;
f9e903a3
RC
2073 esac
2074 shlibpath_var=LD_LIBRARY_PATH
12f14c3f 2075 case $host_os in
f9e903a3
RC
2076 freebsd2*)
2077 shlibpath_overrides_runpath=yes
12f14c3f 2078 ;;
f9e903a3
RC
2079 freebsd3.[01]* | freebsdelf3.[01]*)
2080 shlibpath_overrides_runpath=yes
2081 hardcode_into_libs=yes
2082 ;;
2083 *) # from 3.2 on
2084 shlibpath_overrides_runpath=no
2085 hardcode_into_libs=yes
2086 ;;
2087 esac
2088 ;;
6908b7d7 2089
f9e903a3
RC
2090gnu*)
2091 version_type=linux
2092 need_lib_prefix=no
2093 need_version=no
2094 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2095 soname_spec='${libname}${release}.so$major'
2096 shlibpath_var=LD_LIBRARY_PATH
2097 hardcode_into_libs=yes
2098 ;;
6908b7d7 2099
f9e903a3
RC
2100hpux9* | hpux10* | hpux11*)
2101 # Give a soname corresponding to the major version so that dld.sl refuses to
2102 # link against other versions.
2103 version_type=sunos
2104 need_lib_prefix=no
2105 need_version=no
2106 if test "$host_cpu" = ia64; then
2107 hardcode_into_libs=yes
2108 dynamic_linker="$host_os dld.so"
2109 shlibpath_var=LD_LIBRARY_PATH
2110 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2111 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2112 soname_spec='${libname}${release}.so$major'
2113 if test "X$HPUX_IA64_MODE" = X32; then
2114 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2115 else
2116 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12f14c3f 2117 fi
f9e903a3
RC
2118 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2119 else
2120 dynamic_linker="$host_os dld.sl"
2121 shlibpath_var=SHLIB_PATH
2122 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2123 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2124 soname_spec='${libname}${release}.sl$major'
2125 fi
2126 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2127 postinstall_cmds='chmod 555 $lib'
2128 ;;
6908b7d7 2129
f9e903a3
RC
2130irix5* | irix6* | nonstopux*)
2131 case $host_os in
2132 nonstopux*) version_type=nonstopux ;;
2133 *) version_type=irix ;;
2134 esac
2135 need_lib_prefix=no
2136 need_version=no
2137 soname_spec='${libname}${release}.so$major'
2138 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2139 case $host_os in
2140 irix5* | nonstopux*)
2141 libsuff= shlibsuff=
12f14c3f 2142 ;;
f9e903a3
RC
2143 *)
2144 case $LD in # libtool.m4 will add one of these switches to LD
2145 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2146 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2147 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2148 *) libsuff= shlibsuff= libmagic=never-match;;
12f14c3f 2149 esac
12f14c3f 2150 ;;
f9e903a3
RC
2151 esac
2152 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2153 shlibpath_overrides_runpath=no
2154 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2155 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2156 ;;
6908b7d7 2157
f9e903a3
RC
2158# No shared lib support for Linux oldld, aout, or coff.
2159linux*oldld* | linux*aout* | linux*coff*)
2160 dynamic_linker=no
2161 ;;
6908b7d7 2162
f9e903a3
RC
2163# This must be Linux ELF.
2164linux*)
2165 version_type=linux
2166 need_lib_prefix=no
2167 need_version=no
2168 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2169 soname_spec='${libname}${release}.so$major'
2170 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2171 shlibpath_var=LD_LIBRARY_PATH
2172 shlibpath_overrides_runpath=no
2173 # This implies no fast_install, which is unacceptable.
2174 # Some rework will be needed to allow for fast_install
2175 # before this can be enabled.
2176 hardcode_into_libs=yes
6908b7d7 2177
f9e903a3
RC
2178 # We used to test for /lib/ld.so.1 and disable shared libraries on
2179 # powerpc, because MkLinux only supported shared libraries with the
2180 # GNU dynamic linker. Since this was broken with cross compilers,
2181 # most powerpc-linux boxes support dynamic linking these days and
2182 # people can always --disable-shared, the test was removed, and we
2183 # assume the GNU/Linux dynamic linker is in use.
2184 dynamic_linker='GNU/Linux ld.so'
2185 ;;
6908b7d7 2186
f9e903a3
RC
2187netbsd*)
2188 version_type=sunos
2189 need_lib_prefix=no
2190 need_version=no
2191 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2192 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2193 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2194 dynamic_linker='NetBSD (a.out) ld.so'
2195 else
2196 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2197 soname_spec='${libname}${release}.so$major'
2198 dynamic_linker='NetBSD ld.elf_so'
2199 fi
2200 shlibpath_var=LD_LIBRARY_PATH
2201 shlibpath_overrides_runpath=yes
2202 hardcode_into_libs=yes
2203 ;;
12f14c3f 2204
f9e903a3
RC
2205newsos6)
2206 version_type=linux
2207 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2208 shlibpath_var=LD_LIBRARY_PATH
2209 shlibpath_overrides_runpath=yes
2210 ;;
6908b7d7 2211
f9e903a3
RC
2212nto-qnx)
2213 version_type=linux
2214 need_lib_prefix=no
2215 need_version=no
2216 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2217 soname_spec='${libname}${release}.so$major'
2218 shlibpath_var=LD_LIBRARY_PATH
2219 shlibpath_overrides_runpath=yes
2220 ;;
6908b7d7 2221
f9e903a3
RC
2222openbsd*)
2223 version_type=sunos
2224 need_lib_prefix=no
2225 need_version=no
2226 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2227 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2228 shlibpath_var=LD_LIBRARY_PATH
2229 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2230 case $host_os in
2231 openbsd2.[[89]] | openbsd2.[[89]].*)
2232 shlibpath_overrides_runpath=no
2233 ;;
12f14c3f 2234 *)
f9e903a3
RC
2235 shlibpath_overrides_runpath=yes
2236 ;;
12f14c3f 2237 esac
f9e903a3
RC
2238 else
2239 shlibpath_overrides_runpath=yes
2240 fi
2241 ;;
6908b7d7 2242
f9e903a3
RC
2243os2*)
2244 libname_spec='$name'
2245 need_lib_prefix=no
2246 library_names_spec='$libname.dll $libname.a'
2247 dynamic_linker='OS/2 ld.exe'
2248 shlibpath_var=LIBPATH
2249 ;;
6908b7d7 2250
f9e903a3
RC
2251osf3* | osf4* | osf5*)
2252 version_type=osf
2253 need_lib_prefix=no
2254 need_version=no
2255 soname_spec='${libname}${release}.so'
2256 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2257 shlibpath_var=LD_LIBRARY_PATH
2258 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2259 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2260 ;;
6908b7d7 2261
f9e903a3
RC
2262sco3.2v5*)
2263 version_type=osf
2264 soname_spec='${libname}${release}.so$major'
2265 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2266 shlibpath_var=LD_LIBRARY_PATH
2267 ;;
6908b7d7 2268
f9e903a3
RC
2269solaris*)
2270 version_type=linux
2271 need_lib_prefix=no
2272 need_version=no
2273 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2274 soname_spec='${libname}${release}.so$major'
2275 shlibpath_var=LD_LIBRARY_PATH
2276 shlibpath_overrides_runpath=yes
2277 hardcode_into_libs=yes
2278 # ldd complains unless libraries are executable
2279 postinstall_cmds='chmod +x $lib'
2280 ;;
6908b7d7 2281
f9e903a3
RC
2282sunos4*)
2283 version_type=sunos
2284 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2285 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2286 shlibpath_var=LD_LIBRARY_PATH
2287 shlibpath_overrides_runpath=yes
2288 if test "$with_gnu_ld" = yes; then
2289 need_lib_prefix=no
2290 fi
2291 need_version=yes
2292 ;;
6908b7d7 2293
f9e903a3
RC
2294sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2295 version_type=linux
2296 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2297 soname_spec='${libname}${release}.so$major'
2298 shlibpath_var=LD_LIBRARY_PATH
2299 case $host_vendor in
2300 sni)
2301 shlibpath_overrides_runpath=no
2302 need_lib_prefix=no
2303 export_dynamic_flag_spec='${wl}-Blargedynsym'
2304 runpath_var=LD_RUN_PATH
2305 ;;
2306 siemens)
2307 need_lib_prefix=no
2308 ;;
2309 motorola)
2310 need_lib_prefix=no
2311 need_version=no
2312 shlibpath_overrides_runpath=no
2313 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2314 ;;
2315 esac
2316 ;;
6908b7d7 2317
f9e903a3
RC
2318sysv4*MP*)
2319 if test -d /usr/nec ;then
2320 version_type=linux
2321 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2322 soname_spec='$libname.so.$major'
2323 shlibpath_var=LD_LIBRARY_PATH
2324 fi
2325 ;;
6908b7d7 2326
f9e903a3
RC
2327uts4*)
2328 version_type=linux
2329 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2330 soname_spec='${libname}${release}.so$major'
2331 shlibpath_var=LD_LIBRARY_PATH
2332 ;;
12f14c3f 2333
f9e903a3
RC
2334*)
2335 dynamic_linker=no
2336 ;;
2337esac
2338AC_MSG_RESULT([$dynamic_linker])
2339test "$dynamic_linker" = no && can_build_shared=no
2340])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6908b7d7 2341
6908b7d7 2342
f9e903a3
RC
2343# _LT_AC_TAGCONFIG
2344# ----------------
2345AC_DEFUN([_LT_AC_TAGCONFIG],
2346[AC_ARG_WITH([tags],
2347 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2348 [include additional configurations @<:@automatic@:>@])],
2349 [tagnames="$withval"])
6908b7d7 2350
f9e903a3
RC
2351if test -f "$ltmain" && test -n "$tagnames"; then
2352 if test ! -f "${ofile}"; then
2353 AC_MSG_WARN([output file `$ofile' does not exist])
2354 fi
6908b7d7 2355
f9e903a3
RC
2356 if test -z "$LTCC"; then
2357 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2358 if test -z "$LTCC"; then
2359 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2360 else
2361 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2362 fi
2363 fi
6908b7d7 2364
f9e903a3
RC
2365 # Extract list of available tagged configurations in $ofile.
2366 # Note that this assumes the entire list is on one line.
2367 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2368
2369 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2370 for tagname in $tagnames; do
2371 IFS="$lt_save_ifs"
2372 # Check whether tagname contains only valid characters
2373 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2374 "") ;;
2375 *) AC_MSG_ERROR([invalid tag name: $tagname])
2376 ;;
2377 esac
6908b7d7 2378
f9e903a3
RC
2379 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2380 then
2381 AC_MSG_ERROR([tag name \"$tagname\" already exists])
12f14c3f 2382 fi
6908b7d7 2383
f9e903a3
RC
2384 # Update the list of available tags.
2385 if test -n "$tagname"; then
2386 echo appending configuration tag \"$tagname\" to $ofile
6908b7d7 2387
f9e903a3
RC
2388 case $tagname in
2389 CXX)
2390 AC_LIBTOOL_LANG_CXX_CONFIG
2391 ;;
12f14c3f 2392
f9e903a3
RC
2393 GCJ)
2394 AC_LIBTOOL_LANG_GCJ_CONFIG
2395 ;;
6908b7d7 2396
f9e903a3
RC
2397 RC)
2398 AC_LIBTOOL_LANG_RC_CONFIG
2399 ;;
6908b7d7 2400
f9e903a3
RC
2401 *)
2402 AC_MSG_ERROR([Unsupported tag name: $tagname])
2403 ;;
2404 esac
2405
2406 # Append the new tag name to the list of available tags.
2407 available_tags="$available_tags $tagname"
2408 fi
2409 done
2410 IFS="$lt_save_ifs"
2411
2412 # Now substitute the updated list of available tags.
2413 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2414 mv "${ofile}T" "$ofile"
2415 chmod +x "$ofile"
6908b7d7 2416 else
f9e903a3
RC
2417 rm -f "${ofile}T"
2418 AC_MSG_ERROR([unable to update list of available tagged configurations.])
6908b7d7 2419 fi
12f14c3f 2420fi
f9e903a3 2421])# _LT_AC_TAGCONFIG
6908b7d7 2422
6908b7d7 2423
f9e903a3
RC
2424# AC_LIBTOOL_DLOPEN
2425# -----------------
2426# enable checks for dlopen support
2427AC_DEFUN([AC_LIBTOOL_DLOPEN],
2428 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2429])# AC_LIBTOOL_DLOPEN
6908b7d7 2430
6908b7d7 2431
f9e903a3
RC
2432# AC_LIBTOOL_WIN32_DLL
2433# --------------------
2434# declare package support for building win32 dll's
2435AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2436[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2437])# AC_LIBTOOL_WIN32_DLL
6908b7d7 2438
6908b7d7 2439
f9e903a3
RC
2440# AC_ENABLE_SHARED([DEFAULT])
2441# ---------------------------
2442# implement the --enable-shared flag
2443# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2444AC_DEFUN([AC_ENABLE_SHARED],
2445[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2446AC_ARG_ENABLE([shared],
2447 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2448 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2449 [p=${PACKAGE-default}
2450 case $enableval in
2451 yes) enable_shared=yes ;;
2452 no) enable_shared=no ;;
2453 *)
2454 enable_shared=no
2455 # Look at the argument we got. We use all the common list separators.
2456 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2457 for pkg in $enableval; do
2458 IFS="$lt_save_ifs"
2459 if test "X$pkg" = "X$p"; then
2460 enable_shared=yes
12f14c3f 2461 fi
f9e903a3
RC
2462 done
2463 IFS="$lt_save_ifs"
2464 ;;
2465 esac],
2466 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2467])# AC_ENABLE_SHARED
6908b7d7 2468
6908b7d7 2469
f9e903a3
RC
2470# AC_DISABLE_SHARED
2471# -----------------
2472#- set the default shared flag to --disable-shared
2473AC_DEFUN([AC_DISABLE_SHARED],
2474[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2475AC_ENABLE_SHARED(no)
2476])# AC_DISABLE_SHARED
6908b7d7 2477
6908b7d7 2478
f9e903a3
RC
2479# AC_ENABLE_STATIC([DEFAULT])
2480# ---------------------------
2481# implement the --enable-static flag
2482# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2483AC_DEFUN([AC_ENABLE_STATIC],
2484[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2485AC_ARG_ENABLE([static],
2486 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2487 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2488 [p=${PACKAGE-default}
2489 case $enableval in
2490 yes) enable_static=yes ;;
2491 no) enable_static=no ;;
2492 *)
2493 enable_static=no
2494 # Look at the argument we got. We use all the common list separators.
2495 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2496 for pkg in $enableval; do
2497 IFS="$lt_save_ifs"
2498 if test "X$pkg" = "X$p"; then
2499 enable_static=yes
2500 fi
2501 done
2502 IFS="$lt_save_ifs"
2503 ;;
2504 esac],
2505 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2506])# AC_ENABLE_STATIC
6908b7d7 2507
6908b7d7 2508
f9e903a3
RC
2509# AC_DISABLE_STATIC
2510# -----------------
2511# set the default static flag to --disable-static
2512AC_DEFUN([AC_DISABLE_STATIC],
2513[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2514AC_ENABLE_STATIC(no)
2515])# AC_DISABLE_STATIC
6908b7d7 2516
f9e903a3
RC
2517
2518# AC_ENABLE_FAST_INSTALL([DEFAULT])
2519# ---------------------------------
2520# implement the --enable-fast-install flag
2521# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2522AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2523[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2524AC_ARG_ENABLE([fast-install],
2525 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2526 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2527 [p=${PACKAGE-default}
2528 case $enableval in
2529 yes) enable_fast_install=yes ;;
2530 no) enable_fast_install=no ;;
2531 *)
2532 enable_fast_install=no
2533 # Look at the argument we got. We use all the common list separators.
2534 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2535 for pkg in $enableval; do
2536 IFS="$lt_save_ifs"
2537 if test "X$pkg" = "X$p"; then
2538 enable_fast_install=yes
2539 fi
2540 done
2541 IFS="$lt_save_ifs"
12f14c3f 2542 ;;
f9e903a3
RC
2543 esac],
2544 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2545])# AC_ENABLE_FAST_INSTALL
6908b7d7 2546
6908b7d7 2547
f9e903a3
RC
2548# AC_DISABLE_FAST_INSTALL
2549# -----------------------
2550# set the default to --disable-fast-install
2551AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2552[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2553AC_ENABLE_FAST_INSTALL(no)
2554])# AC_DISABLE_FAST_INSTALL
2555
2556
2557# AC_LIBTOOL_PICMODE([MODE])
2558# --------------------------
2559# implement the --with-pic flag
2560# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2561AC_DEFUN([AC_LIBTOOL_PICMODE],
2562[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2563pic_mode=ifelse($#,1,$1,default)
2564])# AC_LIBTOOL_PICMODE
2565
2566
2567# AC_PATH_TOOL_PREFIX
2568# -------------------
2569# find a file program which can recognise shared library
2570AC_DEFUN([AC_PATH_TOOL_PREFIX],
2571[AC_MSG_CHECKING([for $1])
2572AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2573[case $MAGIC_CMD in
2574[[\\/*] | ?:[\\/]*])
2575 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
12f14c3f 2576 ;;
f9e903a3
RC
2577*)
2578 lt_save_MAGIC_CMD="$MAGIC_CMD"
2579 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2580dnl $ac_dummy forces splitting on constant user-supplied paths.
2581dnl POSIX.2 word splitting is done only on the output of word expansions,
2582dnl not every word. This closes a longstanding sh security hole.
2583 ac_dummy="ifelse([$2], , $PATH, [$2])"
2584 for ac_dir in $ac_dummy; do
2585 IFS="$lt_save_ifs"
2586 test -z "$ac_dir" && ac_dir=.
2587 if test -f $ac_dir/$1; then
2588 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2589 if test -n "$file_magic_test_file"; then
2590 case $deplibs_check_method in
2591 "file_magic "*)
2592 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2593 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2594 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2595 egrep "$file_magic_regex" > /dev/null; then
2596 :
2597 else
2598 cat <<EOF 1>&2
6908b7d7 2599
f9e903a3
RC
2600*** Warning: the command libtool uses to detect shared libraries,
2601*** $file_magic_cmd, produces output that libtool cannot recognize.
2602*** The result is that libtool may fail to recognize shared libraries
2603*** as such. This will affect the creation of libtool libraries that
2604*** depend on shared libraries, but programs linked with such libtool
2605*** libraries will work regardless of this problem. Nevertheless, you
2606*** may want to report the problem to your system manager and/or to
2607*** bug-libtool@gnu.org
2608
2609EOF
2610 fi ;;
2611 esac
2612 fi
2613 break
2614 fi
2615 done
2616 IFS="$lt_save_ifs"
2617 MAGIC_CMD="$lt_save_MAGIC_CMD"
2618 ;;
2619esac])
2620MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2621if test -n "$MAGIC_CMD"; then
2622 AC_MSG_RESULT($MAGIC_CMD)
2623else
2624 AC_MSG_RESULT(no)
2625fi
2626])# AC_PATH_TOOL_PREFIX
2627
2628
2629# AC_PATH_MAGIC
2630# -------------
2631# find a file program which can recognise a shared library
2632AC_DEFUN([AC_PATH_MAGIC],
2633[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2634if test -z "$lt_cv_path_MAGIC_CMD"; then
2635 if test -n "$ac_tool_prefix"; then
2636 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2637 else
2638 MAGIC_CMD=:
2639 fi
2640fi
2641])# AC_PATH_MAGIC
2642
2643
2644# AC_PROG_LD
2645# ----------
2646# find the path to the GNU or non-GNU linker
2647AC_DEFUN([AC_PROG_LD],
2648[AC_ARG_WITH([gnu-ld],
2649 [AC_HELP_STRING([--with-gnu-ld],
2650 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2651 [test "$withval" = no || with_gnu_ld=yes],
2652 [with_gnu_ld=no])
2653AC_REQUIRE([AC_PROG_CC])dnl
2654AC_REQUIRE([AC_CANONICAL_HOST])dnl
2655AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2656ac_prog=ld
2657if test "$GCC" = yes; then
2658 # Check if gcc -print-prog-name=ld gives a path.
2659 AC_MSG_CHECKING([for ld used by GCC])
2660 case $host in
2661 *-*-mingw*)
2662 # gcc leaves a trailing carriage return which upsets mingw
2663 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2664 *)
2665 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
12f14c3f 2666 esac
f9e903a3
RC
2667 case $ac_prog in
2668 # Accept absolute paths.
2669 [[\\/]]* | ?:[[\\/]]*)
2670 re_direlt='/[[^/]][[^/]]*/\.\./'
2671 # Canonicalize the path of ld
2672 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2673 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2674 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2675 done
2676 test -z "$LD" && LD="$ac_prog"
2677 ;;
2678 "")
2679 # If it fails, then pretend we aren't using GCC.
2680 ac_prog=ld
2681 ;;
2682 *)
2683 # If it is relative, then search for the first ld in PATH.
2684 with_gnu_ld=unknown
2685 ;;
2686 esac
2687elif test "$with_gnu_ld" = yes; then
2688 AC_MSG_CHECKING([for GNU ld])
2689else
2690 AC_MSG_CHECKING([for non-GNU ld])
2691fi
2692AC_CACHE_VAL(lt_cv_path_LD,
2693[if test -z "$LD"; then
2694 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2695 for ac_dir in $PATH; do
2696 IFS="$lt_save_ifs"
2697 test -z "$ac_dir" && ac_dir=.
2698 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2699 lt_cv_path_LD="$ac_dir/$ac_prog"
2700 # Check to see if the program is GNU ld. I'd rather use --version,
2701 # but apparently some GNU ld's only accept -v.
2702 # Break only if it was the GNU/non-GNU ld that we prefer.
2703 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2704 test "$with_gnu_ld" != no && break
2705 else
2706 test "$with_gnu_ld" != yes && break
2707 fi
2708 fi
2709 done
2710 IFS="$lt_save_ifs"
2711else
2712 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2713fi])
2714LD="$lt_cv_path_LD"
2715if test -n "$LD"; then
2716 AC_MSG_RESULT($LD)
2717else
2718 AC_MSG_RESULT(no)
2719fi
2720test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2721AC_PROG_LD_GNU
2722])# AC_PROG_LD
2723
2724
2725# AC_PROG_LD_GNU
2726# --------------
2727AC_DEFUN([AC_PROG_LD_GNU],
2728[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2729[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2730if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2731 lt_cv_prog_gnu_ld=yes
2732else
2733 lt_cv_prog_gnu_ld=no
2734fi])
2735with_gnu_ld=$lt_cv_prog_gnu_ld
2736])# AC_PROG_LD_GNU
2737
2738
2739# AC_PROG_LD_RELOAD_FLAG
2740# ----------------------
2741# find reload flag for linker
2742# -- PORTME Some linkers may need a different reload flag.
2743AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2744[AC_CACHE_CHECK([for $LD option to reload object files],
2745 lt_cv_ld_reload_flag,
2746 [lt_cv_ld_reload_flag='-r'])
2747reload_flag=$lt_cv_ld_reload_flag
2748case $reload_flag in
2749"" | " "*) ;;
2750*) reload_flag=" $reload_flag" ;;
2751esac
2752reload_cmds='$LD$reload_flag -o $output$reload_objs'
2753])# AC_PROG_LD_RELOAD_FLAG
2754
2755
2756# AC_DEPLIBS_CHECK_METHOD
2757# -----------------------
2758# how to check for library dependencies
2759# -- PORTME fill in with the dynamic library characteristics
2760AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2761[AC_CACHE_CHECK([how to recognise dependent libraries],
2762lt_cv_deplibs_check_method,
2763[lt_cv_file_magic_cmd='$MAGIC_CMD'
2764lt_cv_file_magic_test_file=
2765lt_cv_deplibs_check_method='unknown'
2766# Need to set the preceding variable on all platforms that support
2767# interlibrary dependencies.
2768# 'none' -- dependencies not supported.
2769# `unknown' -- same as none, but documents that we really don't know.
2770# 'pass_all' -- all dependencies passed with no checks.
2771# 'test_compile' -- check by making test program.
2772# 'file_magic [[regex]]' -- check by looking for files in library path
2773# which responds to the $file_magic_cmd with a given egrep regex.
2774# If you have `file' or equivalent on your system and you're not sure
2775# whether `pass_all' will *always* work, you probably want this one.
2776
2777case $host_os in
2778aix4* | aix5*)
2779 lt_cv_deplibs_check_method=pass_all
2780 ;;
2781
2782beos*)
2783 lt_cv_deplibs_check_method=pass_all
2784 ;;
2785
2786bsdi4*)
2787 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2788 lt_cv_file_magic_cmd='/usr/bin/file -L'
2789 lt_cv_file_magic_test_file=/shlib/libc.so
2790 ;;
2791
2792cygwin* | mingw* | pw32*)
2793 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2794 lt_cv_file_magic_cmd='$OBJDUMP -f'
2795 ;;
2796
2797darwin* | rhapsody*)
2798 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2799 lt_cv_file_magic_cmd='/usr/bin/file -L'
2800 case "$host_os" in
2801 rhapsody* | darwin1.[[012]])
2802 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2803 ;;
2804 *) # Darwin 1.3 on
2805 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2806 ;;
2807 esac
2808 ;;
2809
2810freebsd*)
2811 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2812 case $host_cpu in
2813 i*86 )
2814 # Not sure whether the presence of OpenBSD here was a mistake.
2815 # Let's accept both of them until this is cleared up.
2816 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2817 lt_cv_file_magic_cmd=/usr/bin/file
2818 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2819 ;;
2820 esac
2821 else
2822 lt_cv_deplibs_check_method=pass_all
2823 fi
2824 ;;
2825
2826gnu*)
2827 lt_cv_deplibs_check_method=pass_all
2828 ;;
2829
2830hpux10.20* | hpux11*)
2831 lt_cv_file_magic_cmd=/usr/bin/file
2832 if test "$host_cpu" = ia64; then
2833 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2834 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2835 else
2836 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2837 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2838 fi
2839 ;;
2840
2841irix5* | irix6* | nonstopux*)
12f14c3f
RC
2842 case $host_os in
2843 irix5* | nonstopux*)
f9e903a3
RC
2844 # this will be overridden with pass_all, but let us keep it just in case
2845 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2846 ;;
2847 *)
2848 case $LD in
2849 *-32|*"-32 ") libmagic=32-bit;;
2850 *-n32|*"-n32 ") libmagic=N32;;
2851 *-64|*"-64 ") libmagic=64-bit;;
2852 *) libmagic=never-match;;
2853 esac
2854 # this will be overridden with pass_all, but let us keep it just in case
2855 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
2856 ;;
2857 esac
2858 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2859 lt_cv_deplibs_check_method=pass_all
2860 ;;
2861
2862# This must be Linux ELF.
2863linux*)
2864 case $host_cpu in
2865 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
2866 lt_cv_deplibs_check_method=pass_all ;;
2867 *)
2868 # glibc up to 2.1.1 does not perform some relocations on ARM
2869 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2870 esac
2871 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2872 ;;
2873
2874netbsd*)
2875 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2876 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2877 else
2878 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2879 fi
2880 ;;
2881
2882newos6*)
2883 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2884 lt_cv_file_magic_cmd=/usr/bin/file
2885 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2886 ;;
2887
2888nto-qnx)
2889 lt_cv_deplibs_check_method=unknown
2890 ;;
2891
2892openbsd*)
2893 lt_cv_file_magic_cmd=/usr/bin/file
2894 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2895 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2896 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2897 else
2898 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2899 fi
2900 ;;
2901
2902osf3* | osf4* | osf5*)
2903 # this will be overridden with pass_all, but let us keep it just in case
2904 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2905 lt_cv_file_magic_test_file=/shlib/libc.so
2906 lt_cv_deplibs_check_method=pass_all
2907 ;;
2908
2909sco3.2v5*)
2910 lt_cv_deplibs_check_method=pass_all
2911 ;;
2912
2913solaris*)
2914 lt_cv_deplibs_check_method=pass_all
2915 lt_cv_file_magic_test_file=/lib/libc.so
2916 ;;
2917
2918sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2919 case $host_vendor in
2920 motorola)
2921 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]]'
2922 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2923 ;;
2924 ncr)
2925 lt_cv_deplibs_check_method=pass_all
2926 ;;
2927 sequent)
2928 lt_cv_file_magic_cmd='/bin/file'
2929 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2930 ;;
2931 sni)
2932 lt_cv_file_magic_cmd='/bin/file'
2933 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2934 lt_cv_file_magic_test_file=/lib/libc.so
2935 ;;
2936 siemens)
2937 lt_cv_deplibs_check_method=pass_all
2938 ;;
2939 esac
2940 ;;
2941
2942sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2943 lt_cv_deplibs_check_method=pass_all
2944 ;;
2945esac
2946])
2947file_magic_cmd=$lt_cv_file_magic_cmd
2948deplibs_check_method=$lt_cv_deplibs_check_method
2949test -z "$deplibs_check_method" && deplibs_check_method=unknown
2950])# AC_DEPLIBS_CHECK_METHOD
2951
2952
2953# AC_PROG_NM
2954# ----------
2955# find the path to a BSD-compatible name lister
2956AC_DEFUN([AC_PROG_NM],
2957[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2958[if test -n "$NM"; then
2959 # Let the user override the test.
2960 lt_cv_path_NM="$NM"
2961else
2962 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2963 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2964 IFS="$lt_save_ifs"
2965 test -z "$ac_dir" && ac_dir=.
2966 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2967 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2968 # Check to see if the nm accepts a BSD-compat flag.
2969 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2970 # nm: unknown option "B" ignored
2971 # Tru64's nm complains that /dev/null is an invalid object file
2972 if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2973 lt_cv_path_NM="$tmp_nm -B"
2974 break
2975 elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2976 lt_cv_path_NM="$tmp_nm -p"
2977 break
2978 else
2979 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2980 continue # so that we can try to find one that supports BSD flags
2981 fi
2982 fi
2983 done
2984 IFS="$lt_save_ifs"
2985 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2986fi])
2987NM="$lt_cv_path_NM"
2988])# AC_PROG_NM
2989
2990
2991# AC_CHECK_LIBM
2992# -------------
2993# check for math library
2994AC_DEFUN([AC_CHECK_LIBM],
2995[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2996LIBM=
2997case $host in
2998*-*-beos* | *-*-cygwin* | *-*-pw32*)
2999 # These system don't have libm
3000 ;;
3001*-ncr-sysv4.3*)
3002 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3003 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3004 ;;
3005*)
3006 AC_CHECK_LIB(m, main, LIBM="-lm")
3007 ;;
3008esac
3009])# AC_CHECK_LIBM
3010
3011
3012# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3013# -----------------------------------
3014# sets LIBLTDL to the link flags for the libltdl convenience library and
3015# LTDLINCL to the include flags for the libltdl header and adds
3016# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3017# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3018# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3019# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3020# '${top_srcdir}/' (note the single quotes!). If your package is not
3021# flat and you're not using automake, define top_builddir and
3022# top_srcdir appropriately in the Makefiles.
3023AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3024[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3025 case $enable_ltdl_convenience in
3026 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3027 "") enable_ltdl_convenience=yes
3028 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3029 esac
3030 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3031 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3032 # For backwards non-gettext consistent compatibility...
3033 INCLTDL="$LTDLINCL"
3034])# AC_LIBLTDL_CONVENIENCE
3035
3036
3037# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3038# -----------------------------------
3039# sets LIBLTDL to the link flags for the libltdl installable library and
3040# LTDLINCL to the include flags for the libltdl header and adds
3041# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3042# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3043# DIRECTORY is not provided and an installed libltdl is not found, it is
3044# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3045# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3046# quotes!). If your package is not flat and you're not using automake,
3047# define top_builddir and top_srcdir appropriately in the Makefiles.
3048# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3049AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3050[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3051 AC_CHECK_LIB(ltdl, main,
3052 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3053 [if test x"$enable_ltdl_install" = xno; then
3054 AC_MSG_WARN([libltdl not installed, but installation disabled])
3055 else
3056 enable_ltdl_install=yes
3057 fi
3058 ])
3059 if test x"$enable_ltdl_install" = x"yes"; then
3060 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3061 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3062 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3063 else
3064 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3065 LIBLTDL="-lltdl"
3066 LTDLINCL=
3067 fi
3068 # For backwards non-gettext consistent compatibility...
3069 INCLTDL="$LTDLINCL"
3070])# AC_LIBLTDL_INSTALLABLE
3071
3072
3073# AC_LIBTOOL_CXX
3074# --------------
3075# enable support for C++ libraries
3076AC_DEFUN([AC_LIBTOOL_CXX],
3077[AC_REQUIRE([_LT_AC_LANG_CXX])
3078])# AC_LIBTOOL_CXX
3079
3080
3081# _LT_AC_LANG_CXX
3082# ---------------
3083AC_DEFUN([_LT_AC_LANG_CXX],
3084[AC_REQUIRE([AC_PROG_CXX])
3085AC_REQUIRE([AC_PROG_CXXCPP])
3086_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
3087])# _LT_AC_LANG_CXX
3088
3089
3090# AC_LIBTOOL_GCJ
3091# --------------
3092# enable support for GCJ libraries
3093AC_DEFUN([AC_LIBTOOL_GCJ],
3094[AC_REQUIRE([_LT_AC_LANG_GCJ])
3095])# AC_LIBTOOL_GCJ
3096
3097
3098# _LT_AC_LANG_GCJ
3099# ---------------
3100AC_DEFUN([_LT_AC_LANG_GCJ],
3101[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3102 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3103 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3104 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3105 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3106 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3107_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
3108])# _LT_AC_LANG_GCJ
3109
3110
3111# AC_LIBTOOL_RC
3112# --------------
3113# enable support for Windows resource files
3114AC_DEFUN([AC_LIBTOOL_RC],
3115[AC_REQUIRE([AC_PROG_RC])
3116_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
3117])# AC_LIBTOOL_RC
3118
3119
3120# AC_LIBTOOL_LANG_C_CONFIG
3121# ------------------------
3122# Ensure that the configuration vars for the C compiler are
3123# suitably defined. Those variables are subsequently used by
3124# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3125AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3126AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3127[lt_save_CC="$CC"
3128AC_LANG_PUSH(C)
3129
3130# Source file extension for C test sources.
3131ac_ext=c
3132
3133# Object file extension for compiled C test sources.
3134objext=o
3135_LT_AC_TAGVAR(objext, $1)=$objext
3136
3137# Code to be used in simple compile tests
3138lt_simple_compile_test_code="int some_variable = 0;"
3139
3140# Code to be used in simple link tests
3141lt_simple_link_test_code='main(){return(0);}'
3142
3143_LT_AC_SYS_COMPILER
3144
3145#
3146# Check for any special shared library compilation flags.
3147#
3148_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3149if test "$GCC" = no; then
3150 case $host_os in
3151 sco3.2v5*)
3152 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3153 ;;
3154 esac
3155fi
3156if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3157 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3158 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
3159 else
3160 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3161 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3162 fi
3163fi
3164
3165
3166#
3167# Check to make sure the static flag actually works.
3168#
3169AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3170 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3171 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3172 [],
3173 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3174
3175
3176AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3177AC_LIBTOOL_PROG_COMPILER_PIC($1)
3178AC_LIBTOOL_PROG_CC_C_O($1)
3179AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3180AC_LIBTOOL_PROG_LD_SHLIBS($1)
3181AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3182AC_LIBTOOL_SYS_LIB_STRIP
3183AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3184AC_LIBTOOL_DLOPEN_SELF($1)
3185
3186# Report which librarie types wil actually be built
3187AC_MSG_CHECKING([if libtool supports shared libraries])
3188AC_MSG_RESULT([$can_build_shared])
3189
3190AC_MSG_CHECKING([whether to build shared libraries])
3191test "$can_build_shared" = "no" && enable_shared=no
3192
3193# On AIX, shared libraries and static libraries use the same namespace, and
3194# are all built from PIC.
3195case "$host_os" in
3196aix3*)
3197 test "$enable_shared" = yes && enable_static=no
3198 if test -n "$RANLIB"; then
3199 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3200 postinstall_cmds='$RANLIB $lib'
3201 fi
3202 ;;
3203
3204aix4*)
3205 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3206 test "$enable_shared" = yes && enable_static=no
3207 fi
3208 ;;
3209esac
3210AC_MSG_RESULT([$enable_shared])
3211
3212AC_MSG_CHECKING([whether to build static libraries])
3213# Make sure either enable_shared or enable_static is yes.
3214test "$enable_shared" = yes || enable_static=yes
3215AC_MSG_RESULT([$enable_static])
3216
3217AC_LIBTOOL_CONFIG($1)
3218
3219AC_LANG_POP
3220CC="$lt_save_CC"
3221])# AC_LIBTOOL_LANG_C_CONFIG
3222
3223
3224# AC_LIBTOOL_LANG_CXX_CONFIG
3225# --------------------------
3226# Ensure that the configuration vars for the C compiler are
3227# suitably defined. Those variables are subsequently used by
3228# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3229AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3230AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3231[AC_LANG_PUSH(C++)
3232AC_REQUIRE([AC_PROG_CXX])
3233AC_REQUIRE([AC_PROG_CXXCPP])
3234
3235_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3236_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3237_LT_AC_TAGVAR(always_export_symbols, $1)=no
3238_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3239_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3240_LT_AC_TAGVAR(hardcode_direct, $1)=no
3241_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3242_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3243_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3244_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3245_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3246_LT_AC_TAGVAR(no_undefined_flag, $1)=
3247_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3248
3249# Dependencies to place before and after the object being linked:
3250_LT_AC_TAGVAR(predep_objects, $1)=
3251_LT_AC_TAGVAR(postdep_objects, $1)=
3252_LT_AC_TAGVAR(predeps, $1)=
3253_LT_AC_TAGVAR(postdeps, $1)=
3254_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3255
3256# Source file extension for C test sources.
3257ac_ext=cc
3258
3259# Object file extension for compiled C test sources.
3260objext=o
3261_LT_AC_TAGVAR(objext, $1)=$objext
3262
3263# Code to be used in simple compile tests
3264lt_simple_compile_test_code="int some_variable = 0;"
3265
3266# Code to be used in simple link tests
3267lt_simple_link_test_code='int main(int char *[]) { return(0); }'
3268
3269# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3270_LT_AC_SYS_COMPILER
3271
3272# Allow CC to be a program name with arguments.
3273lt_save_CC="$CC"
3274CC=${CXX-"c++"}
3275set dummy $CC
3276compiler="[$]2"
3277_LT_AC_TAGVAR(compiler, $1)=$CC
3278cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3279
3280# We don't want -fno-exception wen compiling C++ code, so set the
3281# no_builtin_flag separately
3282if test "$GXX" = yes; then
3283 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3284else
3285 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3286fi
3287
3288if test "$GXX" = yes; then
3289 # Set up default GNU C++ configuration
3290
3291 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3292 # archiving commands below assume that GNU ld is being used.
3293 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
3294 egrep 'GNU ld' > /dev/null; then
3295 with_gnu_ld=yes
3296
3297 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3298 _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'
3299
3300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3301 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3302
3303 # If archive_cmds runs LD, not CC, wlarc should be empty
3304 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3305 # investigate it a little bit more. (MM)
3306 wlarc='${wl}'
3307
3308 # ancient GNU ld didn't support --whole-archive et. al.
3309 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3310 egrep 'no-whole-archive' > /dev/null; then
3311 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3312 else
3313 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3314 fi
3315 else
3316 with_gnu_ld=no
3317 wlarc=
3318
3319 # A generic and very simple default shared library creation
3320 # command for GNU C++ for the case where it uses the native
3321 # linker, instead of GNU ld. If possible, this setting should
3322 # overridden to take advantage of the native linker features on
3323 # the platform it is being used on.
3324 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3325 fi
3326
3327 # Commands to make compiler produce verbose output that lists
3328 # what "hidden" libraries, object files and flags are used when
3329 # linking a shared library.
3330 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3331
3332else
3333 GXX=no
3334 with_gnu_ld=no
3335 wlarc=
3336fi
3337
3338# PORTME: fill in a description of your system's C++ link characteristics
3339AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3340_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3341case $host_os in
3342 aix3*)
3343 # FIXME: insert proper C++ library support
3344 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3345 ;;
3346 aix4* | aix5*)
3347 if test "$host_cpu" = ia64; then
3348 # On IA64, the linker does run time linking by default, so we don't
3349 # have to do anything special.
3350 aix_use_runtimelinking=no
3351 exp_sym_flag='-Bexport'
3352 no_entry_flag=""
3353 else
3354 aix_use_runtimelinking=no
3355
3356 # Test if we are trying to use run time linking or normal
3357 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3358 # need to do runtime linking.
3359 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3360 for ld_flag in $LDFLAGS; do
3361 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3362 aix_use_runtimelinking=yes
3363 break
3364 fi
3365 done
3366 esac
3367
3368 exp_sym_flag='-bexport'
3369 no_entry_flag='-bnoentry'
3370 fi
3371
3372 # When large executables or shared objects are built, AIX ld can
3373 # have problems creating the table of contents. If linking a library
3374 # or program results in "error TOC overflow" add -mminimal-toc to
3375 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3376 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3377
3378 _LT_AC_TAGVAR(archive_cmds, $1)=''
3379 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3380 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3381 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3382
3383 if test "$GXX" = yes; then
3384 case $host_os in aix4.[012]|aix4.[012].*)
3385 # We only want to do this on AIX 4.2 and lower, the check
3386 # below for broken collect2 doesn't work under 4.3+
3387 collect2name=`${CC} -print-prog-name=collect2`
3388 if test -f "$collect2name" && \
3389 strings "$collect2name" | grep resolve_lib_name >/dev/null
3390 then
3391 # We have reworked collect2
3392 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3393 else
3394 # We have old collect2
3395 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3396 # It fails to find uninstalled libraries when the uninstalled
3397 # path is not listed in the libpath. Setting hardcode_minus_L
3398 # to unsupported forces relinking
3399 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3400 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3401 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3402 fi
3403 esac
3404 shared_flag='-shared'
3405 else
3406 # not using gcc
3407 if test "$host_cpu" = ia64; then
3408 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3409 # chokes on -Wl,-G. The following line is correct:
3410 shared_flag='-G'
3411 else
3412 if test "$aix_use_runtimelinking" = yes; then
3413 shared_flag='${wl}-G'
3414 else
3415 shared_flag='${wl}-bM:SRE'
3416 fi
3417 fi
3418 fi
3419
3420 # It seems that -bexpall does not export symbols beginning with
3421 # underscore (_), so it is better to generate a list of symbols to export.
3422 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3423 if test "$aix_use_runtimelinking" = yes; then
3424 # Warning - without using the other runtime loading flags (-brtl),
3425 # -berok will link without error, but may produce a broken library.
3426 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3427 # Determine the default libpath from the value encoded in an empty executable.
3428 _LT_AC_SYS_LIBPATH_AIX
3429 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3430
3431 _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"
3432 else
3433 if test "$host_cpu" = ia64; then
3434 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3435 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3436 _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"
3437 else
3438 # Determine the default libpath from the value encoded in an empty executable.
3439 _LT_AC_SYS_LIBPATH_AIX
3440 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3441 # Warning - without using the other run time loading flags,
3442 # -berok will link without error, but may produce a broken library.
3443 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3444 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3445 # -bexpall does not export symbols beginning with underscore (_)
3446 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3447 # Exported symbols can be pulled into shared objects from archives
3448 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3449 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3450 # This is similar to how AIX traditionally builds it's shared libraries.
3451 _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'
3452 fi
3453 fi
3454 ;;
3455 chorus*)
3456 case $cc_basename in
3457 *)
3458 # FIXME: insert proper C++ library support
3459 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3460 ;;
3461 esac
3462 ;;
3463
3464 cygwin*)
3465 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3466 # as there is no search path for DLLs.
3467 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3468 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3469
3470 if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then
3471 _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'
3472 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib'
3473 else
3474 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3475 fi
3476 ;;
3477
3478 mingw* | pw32*)
3479 # FIXME: insert proper C++ library support
3480 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3481 ;;
3482
3483 dgux*)
3484 case $cc_basename in
3485 ec++)
3486 # FIXME: insert proper C++ library support
3487 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3488 ;;
3489 ghcx)
3490 # Green Hills C++ Compiler
3491 # FIXME: insert proper C++ library support
3492 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3493 ;;
3494 *)
3495 # FIXME: insert proper C++ library support
3496 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3497 ;;
3498 esac
3499 ;;
3500 freebsd[12]*)
3501 # C++ shared libraries reported to be fairly broken before switch to ELF
3502 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3503 ;;
3504 freebsd-elf*)
3505 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3506 ;;
3507 freebsd*)
3508 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3509 # conventions
3510 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3511 ;;
3512 gnu*)
3513 ;;
3514 hpux*)
3515 if test $with_gnu_ld = no; then
3516 if test "$host_cpu" = ia64; then
3517 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3518 else
3519 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3520 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3521 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3522 fi
3523 fi
3524 if test "$host_cpu" = ia64; then
3525 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3526 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3527 else
3528 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3529 fi
3530 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3531 # but as the default
3532 # location of the library.
3533
3534 case $cc_basename in
3535 CC)
3536 # FIXME: insert proper C++ library support
3537 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3538 ;;
3539 aCC)
3540 case $host_os in
3541 hpux9*)
3542 _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'
3543 ;;
3544 *)
3545 if test "$host_cpu" = ia64; then
3546 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3547 else
3548 _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'
3549 fi
3550 ;;
3551 esac
3552 # Commands to make compiler produce verbose output that lists
3553 # what "hidden" libraries, object files and flags are used when
3554 # linking a shared library.
3555 #
3556 # There doesn't appear to be a way to prevent this compiler from
3557 # explicitly linking system object files so we need to strip them
3558 # from the output so that they don't get included in the library
3559 # dependencies.
3560 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'
3561 ;;
3562 *)
3563 if test "$GXX" = yes; then
3564 if test $with_gnu_ld = no; then
3565 case $host_os in
3566 hpux9*)
3567 _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'
3568 ;;
3569 *)
3570 if test "$host_cpu" = ia64; then
3571 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3572 else
3573 _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'
3574 fi
3575 ;;
3576 esac
3577 fi
3578 else
3579 # FIXME: insert proper C++ library support
3580 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3581 fi
3582 ;;
3583 esac
3584 ;;
3585 irix5* | irix6*)
3586 case $cc_basename in
3587 CC)
3588 # SGI C++
3589 _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'
3590
3591 # Archives containing C++ object files must be created using
3592 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3593 # necessary to make sure instantiated templates are included
3594 # in the archive.
3595 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3596 ;;
3597 *)
3598 if test "$GXX" = yes; then
3599 if test "$with_gnu_ld" = no; then
3600 _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'
3601 else
3602 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
3603 fi
3604 fi
3605 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3606 ;;
3607 esac
3608 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3609 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3610 ;;
3611 linux*)
3612 case $cc_basename in
3613 KCC)
3614 # Kuck and Associates, Inc. (KAI) C++ Compiler
3615
3616 # KCC will only create a shared library if the output file
3617 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3618 # to its proper name (with version) after linking.
3619 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3620 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3621
3622 # Commands to make compiler produce verbose output that lists
3623 # what "hidden" libraries, object files and flags are used when
3624 # linking a shared library.
3625 #
3626 # There doesn't appear to be a way to prevent this compiler from
3627 # explicitly linking system object files so we need to strip them
3628 # from the output so that they don't get included in the library
3629 # dependencies.
3630 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3631
3632 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3633 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3634
3635 # Archives containing C++ object files must be created using
3636 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3637 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3638 ;;
3639 cxx)
3640 # Compaq C++
3641 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3642 _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'
3643
3644 runpath_var=LD_RUN_PATH
3645 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3646 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3647
3648 # Commands to make compiler produce verbose output that lists
3649 # what "hidden" libraries, object files and flags are used when
3650 # linking a shared library.
3651 #
3652 # There doesn't appear to be a way to prevent this compiler from
3653 # explicitly linking system object files so we need to strip them
3654 # from the output so that they don't get included in the library
3655 # dependencies.
3656 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'
3657 ;;
3658 esac
3659 ;;
3660 lynxos*)
3661 # FIXME: insert proper C++ library support
3662 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3663 ;;
3664 m88k*)
3665 # FIXME: insert proper C++ library support
3666 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3667 ;;
3668 mvs*)
3669 case $cc_basename in
3670 cxx)
3671 # FIXME: insert proper C++ library support
3672 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3673 ;;
3674 *)
3675 # FIXME: insert proper C++ library support
3676 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3677 ;;
3678 esac
3679 ;;
3680 netbsd*)
3681 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3682 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3683 wlarc=
3684 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3685 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3686 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3687 fi
3688 # Workaround some broken pre-1.5 toolchains
3689 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep conftest.$objext | sed -e "s:-lgcc -lc -lgcc::"'
3690 ;;
3691 osf3*)
3692 case $cc_basename in
3693 KCC)
3694 # Kuck and Associates, Inc. (KAI) C++ Compiler
3695
3696 # KCC will only create a shared library if the output file
3697 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3698 # to its proper name (with version) after linking.
3699 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3700
3701 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3702 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3703
3704 # Archives containing C++ object files must be created using
3705 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3706 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3707
3708 ;;
3709 RCC)
3710 # Rational C++ 2.4.1
3711 # FIXME: insert proper C++ library support
3712 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3713 ;;
3714 cxx)
3715 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3716 _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'
3717
3718 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3719 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3720
3721 # Commands to make compiler produce verbose output that lists
3722 # what "hidden" libraries, object files and flags are used when
3723 # linking a shared library.
3724 #
3725 # There doesn't appear to be a way to prevent this compiler from
3726 # explicitly linking system object files so we need to strip them
3727 # from the output so that they don't get included in the library
3728 # dependencies.
3729 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'
3730 ;;
3731 *)
3732 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3733 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3734 _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'
3735
3736 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3737 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3738
3739 # Commands to make compiler produce verbose output that lists
3740 # what "hidden" libraries, object files and flags are used when
3741 # linking a shared library.
3742 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3743
3744 else
3745 # FIXME: insert proper C++ library support
3746 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3747 fi
3748 ;;
3749 esac
3750 ;;
3751 osf4* | osf5*)
3752 case $cc_basename in
3753 KCC)
3754 # Kuck and Associates, Inc. (KAI) C++ Compiler
3755
3756 # KCC will only create a shared library if the output file
3757 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3758 # to its proper name (with version) after linking.
3759 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3760
3761 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3762 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3763
3764 # Archives containing C++ object files must be created using
3765 # the KAI C++ compiler.
3766 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3767 ;;
3768 RCC)
3769 # Rational C++ 2.4.1
3770 # FIXME: insert proper C++ library support
3771 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3772 ;;
3773 cxx)
3774 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3775 _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'
3776 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
3777 echo "-hidden">> $lib.exp~
3778 $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~
3779 $rm $lib.exp'
3780
3781 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3782 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3783
3784 # Commands to make compiler produce verbose output that lists
3785 # what "hidden" libraries, object files and flags are used when
3786 # linking a shared library.
3787 #
3788 # There doesn't appear to be a way to prevent this compiler from
3789 # explicitly linking system object files so we need to strip them
3790 # from the output so that they don't get included in the library
3791 # dependencies.
3792 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'
3793 ;;
3794 *)
3795 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3796 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3797 _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'
3798
3799 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3800 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3801
3802 # Commands to make compiler produce verbose output that lists
3803 # what "hidden" libraries, object files and flags are used when
3804 # linking a shared library.
3805 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3806
3807 else
3808 # FIXME: insert proper C++ library support
3809 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3810 fi
3811 ;;
3812 esac
3813 ;;
3814 psos*)
3815 # FIXME: insert proper C++ library support
3816 _LT_AC_TAGVAR(ld_shlibs, $1)=no
12f14c3f 3817 ;;
f9e903a3
RC
3818 sco*)
3819 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3820 case $cc_basename in
3821 CC)
3822 # FIXME: insert proper C++ library support
3823 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3824 ;;
3825 *)
3826 # FIXME: insert proper C++ library support
3827 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3828 ;;
12f14c3f
RC
3829 esac
3830 ;;
f9e903a3
RC
3831 sunos4*)
3832 case $cc_basename in
3833 CC)
3834 # Sun C++ 4.x
3835 # FIXME: insert proper C++ library support
3836 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3837 ;;
3838 lcc)
3839 # Lucid
3840 # FIXME: insert proper C++ library support
3841 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3842 ;;
3843 *)
3844 # FIXME: insert proper C++ library support
3845 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3846 ;;
3847 esac
3848 ;;
3849 solaris*)
3850 case $cc_basename in
3851 CC)
3852 # Sun C++ 4.2, 5.x and Centerline C++
3853 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3854 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3855 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3856 $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'
3857
3858 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3859 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3860 case $host_os in
3861 solaris2.[0-5] | solaris2.[0-5].*) ;;
3862 *)
3863 # The C++ compiler is used as linker so we must use $wl
3864 # flag to pass the commands to the underlying system
3865 # linker.
3866 # Supported since Solaris 2.6 (maybe 2.5.1?)
3867 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3868 ;;
3869 esac
3870 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3871
3872 # Commands to make compiler produce verbose output that lists
3873 # what "hidden" libraries, object files and flags are used when
3874 # linking a shared library.
3875 #
3876 # There doesn't appear to be a way to prevent this compiler from
3877 # explicitly linking system object files so we need to strip them
3878 # from the output so that they don't get included in the library
3879 # dependencies.
3880 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3881
3882 # Archives containing C++ object files must be created using
3883 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3884 # necessary to make sure instantiated templates are included
3885 # in the archive.
3886 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3887 ;;
3888 gcx)
3889 # Green Hills C++ Compiler
3890 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6908b7d7 3891
f9e903a3
RC
3892 # The C++ compiler must be used to create the archive.
3893 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3894 ;;
3895 *)
3896 # GNU C++ compiler with Solaris linker
3897 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3898 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3899 if $CC --version | egrep -v '^2\.7' > /dev/null; then
3900 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3901 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3902 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3903
3904 # Commands to make compiler produce verbose output that lists
3905 # what "hidden" libraries, object files and flags are used when
3906 # linking a shared library.
3907 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3908 else
3909 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3910 # platform.
3911 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3912 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3913 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3914
3915 # Commands to make compiler produce verbose output that lists
3916 # what "hidden" libraries, object files and flags are used when
3917 # linking a shared library.
3918 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3919 fi
6908b7d7 3920
f9e903a3
RC
3921 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3922 fi
3923 ;;
3924 esac
3925 ;;
3926 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3927 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3928 ;;
3929 tandem*)
3930 case $cc_basename in
3931 NCC)
3932 # NonStop-UX NCC 3.20
3933 # FIXME: insert proper C++ library support
3934 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3935 ;;
3936 *)
3937 # FIXME: insert proper C++ library support
3938 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3939 ;;
3940 esac
3941 ;;
3942 vxworks*)
3943 # FIXME: insert proper C++ library support
3944 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3945 ;;
3946 *)
3947 # FIXME: insert proper C++ library support
3948 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3949 ;;
3950esac
3951AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3952test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6908b7d7 3953
f9e903a3
RC
3954# Figure out "hidden" C++ library dependencies from verbose
3955# compiler output whening linking a shared library.
3956cat > conftest.$ac_ext <<EOF
3957class Foo
3958{
3959public:
3960 Foo (void) { a = 0; }
3961private:
3962 int a;
3963};
3964EOF
6908b7d7 3965
6908b7d7 3966
f9e903a3
RC
3967if AC_TRY_EVAL(ac_compile); then
3968 # Parse the compiler output and extract the necessary
3969 # objects, libraries and library flags.
3970
3971 # Sentinel used to keep track of whether or not we are before
3972 # the conftest object file.
3973 pre_test_object_deps_done=no
3974
3975 # The `*' in the case matches for architectures that use `case' in
3976 # $output_verbose_cmd can trigger glob expansion during the loop
3977 # eval without this substitution.
3978 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3979
3980 for p in `eval $output_verbose_link_cmd`; do
3981 case $p in
3982
3983 -L* | -R* | -l*)
3984 # Some compilers place space between "-{L,R}" and the path.
3985 # Remove the space.
3986 if test $p = "-L" \
3987 || test $p = "-R"; then
3988 prev=$p
3989 continue
3990 else
3991 prev=
3992 fi
3993
3994 if test "$pre_test_object_deps_done" = no; then
3995 case $p in
3996 -L* | -R*)
3997 # Internal compiler library paths should come after those
3998 # provided the user. The postdeps already come after the
3999 # user supplied libs so there is no need to process them.
4000 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4001 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4002 else
4003 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4004 fi
4005 ;;
4006 # The "-l" case would never come before the object being
4007 # linked, so don't bother handling this case.
4008 esac
4009 else
4010 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4011 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4012 else
4013 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4014 fi
4015 fi
4016 ;;
4017
4018 *.$objext)
4019 # This assumes that the test object file only shows up
4020 # once in the compiler output.
4021 if test "$p" = "conftest.$objext"; then
4022 pre_test_object_deps_done=yes
4023 continue
4024 fi
4025
4026 if test "$pre_test_object_deps_done" = no; then
4027 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4028 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4029 else
4030 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4031 fi
4032 else
4033 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4034 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4035 else
4036 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4037 fi
4038 fi
4039 ;;
4040
4041 *) ;; # Ignore the rest.
6908b7d7 4042
12f14c3f 4043 esac
f9e903a3 4044 done
6908b7d7 4045
f9e903a3
RC
4046 # Clean up.
4047 rm -f a.out a.exe
4048else
4049 echo "libtool.m4: error: problem compiling C++ test program"
4050fi
6908b7d7 4051
f9e903a3 4052$rm -f confest.$objext
6908b7d7 4053
f9e903a3
RC
4054case " $_LT_AC_TAGVAR(postdeps, $1) " in
4055*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4056*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
4057esac
6908b7d7 4058
f9e903a3
RC
4059_LT_AC_TAGVAR(GCC, $1)="$GXX"
4060_LT_AC_TAGVAR(LD, $1)="$LD"
6908b7d7 4061
f9e903a3
RC
4062AC_LIBTOOL_PROG_COMPILER_PIC($1)
4063AC_LIBTOOL_PROG_CC_C_O($1)
4064AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4065AC_LIBTOOL_PROG_LD_SHLIBS($1)
4066AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4067AC_LIBTOOL_SYS_LIB_STRIP
4068AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4069AC_LIBTOOL_DLOPEN_SELF($1)
6908b7d7 4070
f9e903a3 4071AC_LIBTOOL_CONFIG($1)
6908b7d7 4072
f9e903a3
RC
4073AC_LANG_POP
4074CC="$lt_save_CC"
4075])# AC_LIBTOOL_LANG_CXX_CONFIG
6908b7d7 4076
6908b7d7 4077
f9e903a3
RC
4078# AC_LIBTOOL_LANG_GCJ_CONFIG
4079# --------------------------
4080# Ensure that the configuration vars for the C compiler are
4081# suitably defined. Those variables are subsequently used by
4082# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4083AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4084AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4085[AC_LANG_SAVE
6908b7d7 4086
f9e903a3
RC
4087# Source file extension for C test sources.
4088ac_ext=java
6908b7d7 4089
f9e903a3
RC
4090# Object file extension for compiled C test sources.
4091objext=o
4092_LT_AC_TAGVAR(objext, $1)=$objext
6908b7d7 4093
f9e903a3
RC
4094# Code to be used in simple compile tests
4095lt_simple_compile_test_code="class foo {};"
6908b7d7 4096
f9e903a3
RC
4097# Code to be used in simple link tests
4098lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
6908b7d7 4099
f9e903a3
RC
4100# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4101_LT_AC_SYS_COMPILER
6908b7d7 4102
f9e903a3
RC
4103# Allow CC to be a program name with arguments.
4104lt_save_CC="$CC"
4105CC=${GCJ-"gcj"}
4106set dummy $CC
4107compiler="[$]2"
4108_LT_AC_TAGVAR(compiler, $1)=$CC
6908b7d7 4109
f9e903a3
RC
4110# GCJ did not exist at the time GCC didn't implicitly link libc in.
4111_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6908b7d7 4112
f9e903a3
RC
4113AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4114AC_LIBTOOL_PROG_COMPILER_PIC($1)
4115AC_LIBTOOL_PROG_CC_C_O($1)
4116AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4117AC_LIBTOOL_PROG_LD_SHLIBS($1)
4118AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4119AC_LIBTOOL_SYS_LIB_STRIP
4120AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4121AC_LIBTOOL_DLOPEN_SELF($1)
4122
4123AC_LIBTOOL_CONFIG($1)
4124
4125AC_LANG_RESTORE
4126CC="$lt_save_CC"
4127])# AC_LIBTOOL_LANG_GCJ_CONFIG
4128
4129
4130# AC_LIBTOOL_LANG_RC_CONFIG
4131# --------------------------
4132# Ensure that the configuration vars for the Windows resource compiler are
4133# suitably defined. Those variables are subsequently used by
4134# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4135AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4136AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4137[AC_LANG_SAVE
4138
4139# Source file extension for RC test sources.
4140ac_ext=rc
4141
4142# Object file extension for compiled RC test sources.
4143objext=o
4144_LT_AC_TAGVAR(objext, $1)=$objext
4145
4146# Code to be used in simple compile tests
4147lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4148
4149# Code to be used in simple link tests
4150lt_simple_link_test_code="$lt_simple_compile_test_code"
4151
4152# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4153_LT_AC_SYS_COMPILER
4154
4155# Allow CC to be a program name with arguments.
4156lt_save_CC="$CC"
4157CC=${RC-"windres"}
4158set dummy $CC
4159compiler="[$]2"
4160_LT_AC_TAGVAR(compiler, $1)=$CC
4161_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6908b7d7 4162
f9e903a3 4163AC_LIBTOOL_CONFIG($1)
6908b7d7 4164
f9e903a3
RC
4165AC_LANG_RESTORE
4166CC="$lt_save_CC"
4167])# AC_LIBTOOL_LANG_RC_CONFIG
6908b7d7 4168
6908b7d7 4169
f9e903a3
RC
4170# AC_LIBTOOL_CONFIG([TAGNAME])
4171# ----------------------------
4172# If TAGNAME is not passed, then create an initial libtool script
4173# with a default configuration from the untagged config vars. Otherwise
4174# add code to config.status for appending the configuration named by
4175# TAGNAME from the matching tagged config vars.
4176AC_DEFUN([AC_LIBTOOL_CONFIG],
4177[# The else clause should only fire when bootstrapping the
6908b7d7
RC
4178# libtool distribution, otherwise you forgot to ship ltmain.sh
4179# with your package, and you will get complaints that there are
4180# no rules to generate ltmain.sh.
4181if test -f "$ltmain"; then
4182 # Now quote all the things that may contain metacharacters while being
4183 # careful not to overquote the AC_SUBSTed values. We take copies of the
4184 # variables and quote the copies for generation of the libtool script.
f9e903a3
RC
4185 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
4186 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4187 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4188 deplibs_check_method reload_flag reload_cmds need_locks \
4189 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4190 lt_cv_sys_global_symbol_to_c_name_address \
6908b7d7 4191 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
f9e903a3
RC
4192 old_postinstall_cmds old_postuninstall_cmds \
4193 _LT_AC_TAGVAR(compiler, $1) \
4194 _LT_AC_TAGVAR(CC, $1) \
4195 _LT_AC_TAGVAR(LD, $1) \
4196 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4197 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4198 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4199 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4200 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4201 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4202 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4203 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4204 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4205 _LT_AC_TAGVAR(predep_objects, $1) \
4206 _LT_AC_TAGVAR(postdep_objects, $1) \
4207 _LT_AC_TAGVAR(predeps, $1) \
4208 _LT_AC_TAGVAR(postdeps, $1) \
4209 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4210 _LT_AC_TAGVAR(archive_cmds, $1) \
4211 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4212 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4213 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4214 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4215 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4216 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4217 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4218 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4219 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4220 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4221 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4222 _LT_AC_TAGVAR(include_expsyms, $1); do
6908b7d7
RC
4223
4224 case $var in
f9e903a3
RC
4225 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4226 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4227 _LT_AC_TAGVAR(archive_cmds, $1) | \
4228 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4229 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4230 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4231 extract_expsyms_cmds | reload_cmds | finish_cmds | \
12f14c3f 4232 postinstall_cmds | postuninstall_cmds | \
f9e903a3
RC
4233 old_postinstall_cmds | old_postuninstall_cmds | \
4234 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6908b7d7
RC
4235 # Double-quote double-evaled strings.
4236 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4237 ;;
4238 *)
4239 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4240 ;;
4241 esac
4242 done
4243
f9e903a3
RC
4244 case $lt_echo in
4245 *'\[$]0 --fallback-echo"')
4246 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4247 ;;
4248 esac
4249
4250ifelse([$1], [],
4251 [cfgfile="${ofile}T"
4252 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4253 $rm -f "$cfgfile"
4254 AC_MSG_NOTICE([creating $ofile])],
4255 [cfgfile="$ofile"])
6908b7d7 4256
f9e903a3
RC
4257 cat <<__EOF__ >> "$cfgfile"
4258ifelse([$1], [],
4259[#! $SHELL
4260
4261# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6908b7d7
RC
4262# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4263# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4264#
f9e903a3
RC
4265# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4266# Free Software Foundation, Inc.
4267#
4268# This file is part of GNU Libtool:
6908b7d7
RC
4269# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4270#
4271# This program is free software; you can redistribute it and/or modify
4272# it under the terms of the GNU General Public License as published by
4273# the Free Software Foundation; either version 2 of the License, or
4274# (at your option) any later version.
4275#
4276# This program is distributed in the hope that it will be useful, but
4277# WITHOUT ANY WARRANTY; without even the implied warranty of
4278# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4279# General Public License for more details.
4280#
4281# You should have received a copy of the GNU General Public License
4282# along with this program; if not, write to the Free Software
4283# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4284#
4285# As a special exception to the GNU General Public License, if you
4286# distribute this file as part of a program that contains a
4287# configuration script generated by Autoconf, you may include it under
4288# the same distribution terms that you use for the rest of that program.
4289
4290# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4291Xsed="sed -e s/^X//"
4292
4293# The HP-UX ksh and POSIX shell print the target directory to stdout
4294# if CDPATH is set.
4295if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4296
f9e903a3
RC
4297# The names of the tagged configurations supported by this script.
4298available_tags=
4299
4300# ### BEGIN LIBTOOL CONFIG],
4301[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
6908b7d7
RC
4302
4303# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4304
4305# Shell to use when invoking shell scripts.
4306SHELL=$lt_SHELL
4307
4308# Whether or not to build shared libraries.
4309build_libtool_libs=$enable_shared
4310
4311# Whether or not to build static libraries.
4312build_old_libs=$enable_static
4313
4314# Whether or not to add -lc for building shared libraries.
f9e903a3 4315build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
6908b7d7
RC
4316
4317# Whether or not to optimize for fast installation.
4318fast_install=$enable_fast_install
4319
4320# The host system.
4321host_alias=$host_alias
4322host=$host
4323
4324# An echo program that does not interpret backslashes.
4325echo=$lt_echo
4326
4327# The archiver.
4328AR=$lt_AR
4329AR_FLAGS=$lt_AR_FLAGS
4330
f9e903a3
RC
4331# A C compiler.
4332LTCC=$lt_LTCC
4333
4334# A language-specific compiler.
4335CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
6908b7d7
RC
4336
4337# Is the compiler the GNU C compiler?
f9e903a3 4338with_gcc=$_LT_AC_TAGVAR(GCC, $1)
6908b7d7
RC
4339
4340# The linker used to build libraries.
f9e903a3 4341LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
6908b7d7
RC
4342
4343# Whether we need hard or soft links.
4344LN_S=$lt_LN_S
4345
4346# A BSD-compatible nm program.
4347NM=$lt_NM
4348
f9e903a3
RC
4349# A sed program that does not truncate output.
4350SED=$lt_SED
4351
6908b7d7
RC
4352# A symbol stripping program
4353STRIP=$STRIP
4354
4355# Used to examine libraries when file_magic_cmd begins "file"
4356MAGIC_CMD=$MAGIC_CMD
4357
4358# Used on cygwin: DLL creation program.
4359DLLTOOL="$DLLTOOL"
4360
4361# Used on cygwin: object dumper.
4362OBJDUMP="$OBJDUMP"
4363
4364# Used on cygwin: assembler.
4365AS="$AS"
4366
4367# The name of the directory that contains temporary libtool files.
4368objdir=$objdir
4369
4370# How to create reloadable object files.
4371reload_flag=$lt_reload_flag
4372reload_cmds=$lt_reload_cmds
4373
4374# How to pass a linker flag through the compiler.
f9e903a3 4375wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6908b7d7
RC
4376
4377# Object file suffix (normally "o").
4378objext="$ac_objext"
4379
4380# Old archive suffix (normally "a").
4381libext="$libext"
4382
4383# Executable file suffix (normally "").
4384exeext="$exeext"
4385
4386# Additional compiler flags for building library objects.
f9e903a3 4387pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6908b7d7
RC
4388pic_mode=$pic_mode
4389
f9e903a3
RC
4390# What is the maximum length of a command?
4391max_cmd_len=$lt_cv_sys_max_cmd_len
12f14c3f 4392
f9e903a3
RC
4393# Does compiler simultaneously support -c and -o options?
4394compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
6908b7d7
RC
4395
4396# Must we lock files when doing compilation ?
4397need_locks=$lt_need_locks
4398
4399# Do we need the lib prefix for modules?
4400need_lib_prefix=$need_lib_prefix
4401
4402# Do we need a version for libraries?
4403need_version=$need_version
4404
4405# Whether dlopen is supported.
4406dlopen_support=$enable_dlopen
4407
4408# Whether dlopen of programs is supported.
4409dlopen_self=$enable_dlopen_self
4410
4411# Whether dlopen of statically linked programs is supported.
4412dlopen_self_static=$enable_dlopen_self_static
4413
4414# Compiler flag to prevent dynamic linking.
f9e903a3 4415link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
6908b7d7
RC
4416
4417# Compiler flag to turn off builtin functions.
f9e903a3 4418no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
6908b7d7
RC
4419
4420# Compiler flag to allow reflexive dlopens.
f9e903a3 4421export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
6908b7d7
RC
4422
4423# Compiler flag to generate shared objects directly from archives.
f9e903a3 4424whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
6908b7d7
RC
4425
4426# Compiler flag to generate thread-safe objects.
f9e903a3 4427thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
6908b7d7
RC
4428
4429# Library versioning type.
4430version_type=$version_type
4431
4432# Format of library name prefix.
4433libname_spec=$lt_libname_spec
4434
f9e903a3
RC
4435# List of archive names. First name is the real one, the rest are links.
4436# The last name is the one that the linker finds with -lNAME.
4437library_names_spec=$lt_library_names_spec
4438
4439# The coded name of the library, if different from the real name.
4440soname_spec=$lt_soname_spec
4441
4442# Commands used to build and install an old-style archive.
4443RANLIB=$lt_RANLIB
4444old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4445old_postinstall_cmds=$lt_old_postinstall_cmds
4446old_postuninstall_cmds=$lt_old_postuninstall_cmds
4447
4448# Create an old-style archive from a shared archive.
4449old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4450
4451# Create a temporary old-style archive to link instead of a shared archive.
4452old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4453
4454# Commands used to build and install a shared archive.
4455archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4456archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4457postinstall_cmds=$lt_postinstall_cmds
4458postuninstall_cmds=$lt_postuninstall_cmds
4459
4460# Commands to strip libraries.
4461old_striplib=$lt_old_striplib
4462striplib=$lt_striplib
4463
4464# Dependencies to place before the objects being linked to create a
4465# shared library.
4466predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4467
4468# Dependencies to place after the objects being linked to create a
4469# shared library.
4470postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4471
4472# Dependencies to place before the objects being linked to create a
4473# shared library.
4474predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4475
4476# Dependencies to place after the objects being linked to create a
4477# shared library.
4478postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4479
4480# The library search path used internally by the compiler when linking
4481# a shared library.
4482compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4483
4484# Method to check whether dependent libraries are shared objects.
4485deplibs_check_method=$lt_deplibs_check_method
4486
4487# Command to use when deplibs_check_method == file_magic.
4488file_magic_cmd=$lt_file_magic_cmd
4489
4490# Flag that allows shared libraries with undefined symbols to be built.
4491allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4492
4493# Flag that forces no undefined symbols.
4494no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4495
4496# Commands used to finish a libtool library installation in a directory.
4497finish_cmds=$lt_finish_cmds
4498
4499# Same as above, but a single script fragment to be evaled but not shown.
4500finish_eval=$lt_finish_eval
4501
4502# Take the output of nm and produce a listing of raw symbols and C names.
4503global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4504
4505# Transform the output of nm in a proper C declaration
4506global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4507
4508# Transform the output of nm in a C name address pair
4509global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4510
4511# This is the shared library runtime path variable.
4512runpath_var=$runpath_var
4513
4514# This is the shared library path variable.
4515shlibpath_var=$shlibpath_var
4516
4517# Is shlibpath searched before the hard-coded library search path?
4518shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4519
4520# How to hardcode a shared library path into an executable.
4521hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4522
4523# Whether we should hardcode library paths into libraries.
4524hardcode_into_libs=$hardcode_into_libs
4525
4526# Flag to hardcode \$libdir into a binary during linking.
4527# This must work even if \$libdir does not exist.
4528hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4529
4530# Whether we need a single -rpath flag with a separated argument.
4531hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4532
4533# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
4534# resulting binary.
4535hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4536
4537# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4538# resulting binary.
4539hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4540
4541# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4542# the resulting binary.
4543hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4544
4545# Variables whose values should be saved in libtool wrapper scripts and
4546# restored at relink time.
4547variables_saved_for_relink="$variables_saved_for_relink"
4548
4549# Whether libtool must link a program against all its dependency libraries.
4550link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4551
4552# Compile-time system search path for libraries
4553sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4554
4555# Run-time system search path for libraries
4556sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4557
4558# Fix the shell variable \$srcfile for the compiler.
4559fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4560
4561# Set to yes if exported symbols are required.
4562always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4563
4564# The commands to list exported symbols.
4565export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4566
4567# The commands to extract the exported symbol list from a shared archive.
4568extract_expsyms_cmds=$lt_extract_expsyms_cmds
4569
4570# Symbols that should not be listed in the preloaded symbols.
4571exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4572
4573# Symbols that must always be exported.
4574include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4575
4576ifelse([$1],[],
4577[# ### END LIBTOOL CONFIG],
4578[# ### END LIBTOOL TAG CONFIG: $tagname])
4579
4580__EOF__
4581
4582ifelse([$1],[], [
4583 case $host_os in
4584 aix3*)
4585 cat <<\EOF >> "$cfgfile"
4586
4587# AIX sometimes has problems with the GCC collect2 program. For some
4588# reason, if we set the COLLECT_NAMES environment variable, the problems
4589# vanish in a puff of smoke.
4590if test "X${COLLECT_NAMES+set}" != Xset; then
4591 COLLECT_NAMES=
4592 export COLLECT_NAMES
4593fi
4594EOF
4595 ;;
4596
4597 cygwin* | mingw* | pw32* | os2*)
4598 cat <<'EOF' >> "$cfgfile"
4599 # This is a source program that is used to create dlls on Windows
4600 # Don't remove nor modify the starting and closing comments
4601 _LT_AC_FILE_LTDLL_C
4602 # This is a source program that is used to create import libraries
4603 # on Windows for dlls which lack them. Don't remove nor modify the
4604 # starting and closing comments
4605 _LT_AC_FILE_IMPGEN_C
4606EOF
4607 ;;
4608 esac
4609
4610 # We use sed instead of cat because bash on DJGPP gets confused if
4611 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4612 # text mode, it properly converts lines to CR/LF. This bash problem
4613 # is reportedly fixed, but why not run on old versions too?
4614 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4615
4616 mv -f "$cfgfile" "$ofile" || \
4617 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4618 chmod +x "$ofile"
4619])
4620else
4621 # If there is no Makefile yet, we rely on a make rule to execute
4622 # `config.status --recheck' to rerun these tests and create the
4623 # libtool script then.
4624 test -f Makefile && make "$ltmain"
4625fi
4626])# AC_LIBTOOL_CONFIG
4627
4628
4629# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4630# -------------------------------------------
4631AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4632[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4633
4634_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4635
4636if test "$GCC" = yes; then
4637 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4638
4639 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4640 lt_cv_prog_compiler_rtti_exceptions,
4641 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
4642 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4643fi
4644])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4645
4646
4647# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4648# ---------------------------------
4649AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4650[AC_REQUIRE([AC_CANONICAL_HOST])
4651AC_REQUIRE([AC_PROG_NM])
4652AC_REQUIRE([AC_OBJEXT])
4653# Check for command to grab the raw symbol name followed by C symbol from nm.
4654AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4655AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4656[
4657# These are sane defaults that work on at least a few old systems.
4658# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4659
4660# Character class describing NM global symbol codes.
4661symcode='[[BCDEGRST]]'
4662
4663# Regexp to match symbols that can be accessed directly from C.
4664sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4665
4666# Transform the above into a raw symbol and a C symbol.
4667symxfrm='\1 \2\3 \3'
4668
4669# Transform an extracted symbol line into a proper C declaration
4670lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4671
4672# Transform an extracted symbol line into symbol name and symbol address
4673lt_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'"
4674
4675# Define system-specific variables.
4676case $host_os in
4677aix*)
4678 symcode='[[BCDT]]'
4679 ;;
4680cygwin* | mingw* | pw32*)
4681 symcode='[[ABCDGISTW]]'
4682 ;;
4683hpux*) # Its linker distinguishes data from code symbols
4684 if test "$host_cpu" = ia64; then
4685 symcode='[[ABCDEGRST]]'
4686 fi
4687 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4688 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'"
4689 ;;
4690irix* | nonstopux*)
4691 symcode='[[BCDEGRST]]'
4692 ;;
4693solaris* | sysv5*)
4694 symcode='[[BDT]]'
4695 ;;
4696sysv4)
4697 symcode='[[DFNSTU]]'
4698 ;;
4699esac
4700
4701# Handle CRLF in mingw tool chain
4702opt_cr=
4703case $host_os in
4704mingw*)
4705 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4706 ;;
4707esac
4708
4709# If we're using GNU nm, then use its standard symbol codes.
4710if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4711 symcode='[[ABCDGISTW]]'
4712fi
6908b7d7 4713
f9e903a3
RC
4714# Try without a prefix undercore, then with it.
4715for ac_symprfx in "" "_"; do
6908b7d7 4716
f9e903a3
RC
4717 # Write the raw and C identifiers.
4718 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
6908b7d7 4719
f9e903a3
RC
4720 # Check to see that the pipe works correctly.
4721 pipe_works=no
6908b7d7 4722
f9e903a3
RC
4723 rm -f conftest*
4724 cat > conftest.$ac_ext <<EOF
4725#ifdef __cplusplus
4726extern "C" {
4727#endif
4728char nm_test_var;
4729void nm_test_func(){}
4730#ifdef __cplusplus
4731}
4732#endif
4733int main(){nm_test_var='a';nm_test_func();return(0);}
4734EOF
6908b7d7 4735
f9e903a3
RC
4736 if AC_TRY_EVAL(ac_compile); then
4737 # Now try to grab the symbols.
4738 nlist=conftest.nm
4739 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4740 # Try sorting and uniquifying the output.
4741 if sort "$nlist" | uniq > "$nlist"T; then
4742 mv -f "$nlist"T "$nlist"
4743 else
4744 rm -f "$nlist"T
4745 fi
6908b7d7 4746
f9e903a3
RC
4747 # Make sure that we snagged all the symbols we need.
4748 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4749 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4750 cat <<EOF > conftest.$ac_ext
4751#ifdef __cplusplus
4752extern "C" {
4753#endif
6908b7d7 4754
f9e903a3
RC
4755EOF
4756 # Now generate the symbol file.
4757 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6908b7d7 4758
f9e903a3
RC
4759 cat <<EOF >> conftest.$ac_ext
4760#if defined (__STDC__) && __STDC__
4761# define lt_ptr_t void *
4762#else
4763# define lt_ptr_t char *
4764# define const
4765#endif
6908b7d7 4766
f9e903a3
RC
4767/* The mapping between symbol names and symbols. */
4768const struct {
4769 const char *name;
4770 lt_ptr_t address;
4771}
4772lt_preloaded_symbols[[]] =
4773{
4774EOF
4775 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4776 cat <<\EOF >> conftest.$ac_ext
4777 {0, (lt_ptr_t) 0}
4778};
6908b7d7 4779
f9e903a3
RC
4780#ifdef __cplusplus
4781}
4782#endif
4783EOF
4784 # Now try linking the two files.
4785 mv conftest.$ac_objext conftstm.$ac_objext
4786 lt_save_LIBS="$LIBS"
4787 lt_save_CFLAGS="$CFLAGS"
4788 LIBS="conftstm.$ac_objext"
4789 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4790 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4791 pipe_works=yes
4792 fi
4793 LIBS="$lt_save_LIBS"
4794 CFLAGS="$lt_save_CFLAGS"
4795 else
4796 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4797 fi
4798 else
4799 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4800 fi
4801 else
4802 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4803 fi
4804 else
4805 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4806 cat conftest.$ac_ext >&5
4807 fi
4808 rm -f conftest* conftst*
6908b7d7 4809
f9e903a3
RC
4810 # Do not use the global_symbol_pipe unless it works.
4811 if test "$pipe_works" = yes; then
4812 break
4813 else
4814 lt_cv_sys_global_symbol_pipe=
4815 fi
4816done
4817])
4818if test -z "$lt_cv_sys_global_symbol_pipe"; then
4819 lt_cv_sys_global_symbol_to_cdecl=
4820fi
4821if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4822 AC_MSG_RESULT(failed)
4823else
4824 AC_MSG_RESULT(ok)
4825fi
4826]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6908b7d7 4827
6908b7d7 4828
f9e903a3
RC
4829# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4830# ---------------------------------------
4831AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4832[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4833_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4834_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6908b7d7 4835
f9e903a3
RC
4836AC_MSG_CHECKING([for $compiler option to produce PIC])
4837 ifelse([$1],[CXX],[
4838 # C++ specific cases for pic, static, wl, etc.
4839 if test "$GXX" = yes; then
4840 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4841 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6908b7d7 4842
f9e903a3
RC
4843 case $host_os in
4844 aix*)
4845 # All AIX code is PIC.
4846 if test "$host_cpu" = ia64; then
4847 # AIX 5 now supports IA64 processor
4848 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4849 fi
4850 ;;
4851 amigaos*)
4852 # FIXME: we need at least 68020 code to build shared libraries, but
4853 # adding the `-m68020' flag to GCC prevents building anything better,
4854 # like `-m68040'.
4855 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4856 ;;
4857 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4858 # PIC is the default for these OSes.
4859 ;;
4860 mingw* | os2*)
4861 # This hack is so that the source file can tell whether it is being
4862 # built for inclusion in a dll (and should export symbols for example).
4863 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4864 ;;
4865 darwin* | rhapsody*)
4866 # PIC is the default on this platform
4867 # Common symbols not allowed in MH_DYLIB files
4868 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4869 ;;
4870 *djgpp*)
4871 # DJGPP does not support shared libraries at all
4872 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4873 ;;
4874 sysv4*MP*)
4875 if test -d /usr/nec; then
4876 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4877 fi
4878 ;;
4879 hpux*)
4880 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
4881 if test "$host_cpu" != ia64; then
4882 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4883 fi
4884 ;;
4885 *)
4886 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4887 ;;
4888 esac
4889 else
4890 case $host_os in
4891 aix4* | aix5*)
4892 # All AIX code is PIC.
4893 if test "$host_cpu" = ia64; then
4894 # AIX 5 now supports IA64 processor
4895 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4896 else
4897 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4898 fi
4899 ;;
4900 chorus*)
4901 case $cc_basename in
4902 cxch68)
4903 # Green Hills C++ Compiler
4904 # _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"
4905 ;;
4906 esac
4907 ;;
4908 dgux*)
4909 case $cc_basename in
4910 ec++)
4911 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4912 ;;
4913 ghcx)
4914 # Green Hills C++ Compiler
4915 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4916 ;;
4917 *)
4918 ;;
4919 esac
4920 ;;
4921 freebsd*)
4922 # FreeBSD uses GNU C++
4923 ;;
4924 hpux9* | hpux10* | hpux11*)
4925 case $cc_basename in
4926 CC)
4927 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4928 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4929 if test "$host_cpu" != ia64; then
4930 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4931 fi
4932 ;;
4933 aCC)
4934 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4935 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4936 if test "$host_cpu" != ia64; then
4937 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4938 fi
4939 ;;
4940 *)
4941 ;;
4942 esac
4943 ;;
4944 irix5* | irix6* | nonstopux*)
4945 case $cc_basename in
4946 CC)
4947 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4948 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4949 # CC pic flag -KPIC is the default.
4950 ;;
4951 *)
4952 ;;
4953 esac
4954 ;;
4955 linux*)
4956 case $cc_basename in
4957 KCC)
4958 # KAI C++ Compiler
4959 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4960 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4961 ;;
4962 cxx)
4963 # Compaq C++
4964 # Make sure the PIC flag is empty. It appears that all Alpha
4965 # Linux and Compaq Tru64 Unix objects are PIC.
4966 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4967 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4968 ;;
4969 *)
4970 ;;
4971 esac
4972 ;;
4973 lynxos*)
4974 ;;
4975 m88k*)
4976 ;;
4977 mvs*)
4978 case $cc_basename in
4979 cxx)
4980 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4981 ;;
4982 *)
4983 ;;
4984 esac
4985 ;;
4986 netbsd*)
4987 ;;
4988 osf3* | osf4* | osf5*)
4989 case $cc_basename in
4990 KCC)
4991 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4992 ;;
4993 RCC)
4994 # Rational C++ 2.4.1
4995 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4996 ;;
4997 cxx)
4998 # Digital/Compaq C++
4999 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5000 # Make sure the PIC flag is empty. It appears that all Alpha
5001 # Linux and Compaq Tru64 Unix objects are PIC.
5002 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5003 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5004 ;;
5005 *)
5006 ;;
5007 esac
5008 ;;
5009 psos*)
5010 ;;
5011 sco*)
5012 case $cc_basename in
5013 CC)
5014 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5015 ;;
5016 *)
5017 ;;
5018 esac
5019 ;;
5020 solaris*)
5021 case $cc_basename in
5022 CC)
5023 # Sun C++ 4.2, 5.x and Centerline C++
5024 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5025 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5026 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5027 ;;
5028 gcx)
5029 # Green Hills C++ Compiler
5030 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5031 ;;
5032 *)
5033 ;;
5034 esac
5035 ;;
5036 sunos4*)
5037 case $cc_basename in
5038 CC)
5039 # Sun C++ 4.x
5040 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5041 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5042 ;;
5043 lcc)
5044 # Lucid
5045 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5046 ;;
5047 *)
5048 ;;
5049 esac
5050 ;;
5051 tandem*)
5052 case $cc_basename in
5053 NCC)
5054 # NonStop-UX NCC 3.20
5055 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5056 ;;
5057 *)
5058 ;;
5059 esac
5060 ;;
5061 unixware*)
5062 ;;
5063 vxworks*)
5064 ;;
5065 *)
5066 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5067 ;;
5068 esac
5069 fi
5070],
5071[
5072 if test "$GCC" = yes; then
5073 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5074 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6908b7d7 5075
f9e903a3
RC
5076 case $host_os in
5077 aix*)
5078 # All AIX code is PIC.
5079 if test "$host_cpu" = ia64; then
5080 # AIX 5 now supports IA64 processor
5081 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5082 fi
5083 ;;
6908b7d7 5084
f9e903a3
RC
5085 amigaos*)
5086 # FIXME: we need at least 68020 code to build shared libraries, but
5087 # adding the `-m68020' flag to GCC prevents building anything better,
5088 # like `-m68040'.
5089 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5090 ;;
6908b7d7 5091
f9e903a3
RC
5092 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5093 # PIC is the default for these OSes.
5094 ;;
6908b7d7 5095
f9e903a3
RC
5096 mingw* | pw32* | os2*)
5097 # This hack is so that the source file can tell whether it is being
5098 # built for inclusion in a dll (and should export symbols for example).
5099 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5100 ;;
6908b7d7 5101
f9e903a3
RC
5102 darwin* | rhapsody*)
5103 # PIC is the default on this platform
5104 # Common symbols not allowed in MH_DYLIB files
5105 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5106 ;;
6908b7d7 5107
f9e903a3
RC
5108 msdosdjgpp*)
5109 # Just because we use GCC doesn't mean we suddenly get shared libraries
5110 # on systems that don't support them.
5111 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5112 enable_shared=no
5113 ;;
6908b7d7 5114
f9e903a3
RC
5115 sysv4*MP*)
5116 if test -d /usr/nec; then
5117 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5118 fi
5119 ;;
6908b7d7 5120
f9e903a3
RC
5121 hpux*)
5122 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
5123 if test "$host_cpu" != ia64; then
5124 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5125 fi
5126 ;;
6908b7d7 5127
f9e903a3
RC
5128 *)
5129 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5130 ;;
5131 esac
5132 else
5133 # PORTME Check for flag to pass linker flags through the system compiler.
5134 case $host_os in
5135 aix*)
5136 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5137 if test "$host_cpu" = ia64; then
5138 # AIX 5 now supports IA64 processor
5139 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5140 else
5141 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5142 fi
5143 ;;
6908b7d7 5144
f9e903a3
RC
5145 mingw* | pw32* | os2*)
5146 # This hack is so that the source file can tell whether it is being
5147 # built for inclusion in a dll (and should export symbols for example).
5148 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5149 ;;
6908b7d7 5150
f9e903a3
RC
5151 hpux9* | hpux10* | hpux11*)
5152 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5153 if test "$host_cpu" != ia64; then
5154 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5155 fi
5156 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5157 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5158 ;;
5159
5160 irix5* | irix6* | nonstopux*)
5161 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5162 # PIC (with -KPIC) is the default.
5163 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5164 ;;
6908b7d7 5165
f9e903a3
RC
5166 newsos6)
5167 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5168 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5169 ;;
6908b7d7 5170
f9e903a3
RC
5171 osf3* | osf4* | osf5*)
5172 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5173 # All OSF/1 code is PIC.
5174 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5175 ;;
6908b7d7 5176
f9e903a3
RC
5177 sco3.2v5*)
5178 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5179 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5180 ;;
6908b7d7 5181
f9e903a3
RC
5182 solaris*)
5183 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5184 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5185 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5186 ;;
6908b7d7 5187
f9e903a3
RC
5188 sunos4*)
5189 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5190 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5191 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5192 ;;
6908b7d7 5193
f9e903a3
RC
5194 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5195 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5196 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5197 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5198 ;;
6908b7d7 5199
f9e903a3
RC
5200 sysv4*MP*)
5201 if test -d /usr/nec ;then
5202 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5203 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5204 fi
5205 ;;
6908b7d7 5206
f9e903a3
RC
5207 uts4*)
5208 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5209 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5210 ;;
6908b7d7 5211
f9e903a3
RC
5212 *)
5213 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5214 ;;
5215 esac
5216 fi
5217])
5218AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6908b7d7 5219
f9e903a3
RC
5220#
5221# Check to make sure the PIC flag actually works.
5222#
5223if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5224 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5225 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5226 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])], [],
5227 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5228 "" | " "*) ;;
5229 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5230 esac],
5231 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5232 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5233fi
5234case "$host_os" in
5235 # For platforms which do not support PIC, -DPIC is meaningless:
5236 *djgpp*)
5237 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5238 ;;
5239 *)
5240 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])"
5241 ;;
5242esac
5243])
6908b7d7 5244
6908b7d7 5245
f9e903a3
RC
5246# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5247# ------------------------------------
5248# See if the linker supports building shared libraries.
5249AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5250[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5251ifelse([$1],[CXX],[
5252 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
6908b7d7 5253 case $host_os in
f9e903a3
RC
5254 aix4* | aix5*)
5255 # If we're using GNU nm, then we don't want the "-C" option.
5256 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5257 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
5258 _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'
5259 else
5260 _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'
5261 fi
6908b7d7 5262 ;;
f9e903a3
RC
5263 mingw* | pw32*) # and not cygwin. Cygwin uses the $NM incantation, below
5264 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5265 ;;
5266 *)
5267 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5268 ;;
6908b7d7 5269 esac
f9e903a3
RC
5270],[
5271 runpath_var=
5272 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5273
5274 _LT_AC_TAGVAR(archive_cmds, $1)=
5275 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
5276 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5277 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5278 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5279 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5280 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5281 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5282 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5283 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5284 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5285 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5286 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5287 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5288 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5289 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5290 # include_expsyms should be a list of space-separated symbols to be *always*
5291 # included in the symbol list
5292 _LT_AC_TAGVAR(include_expsyms, $1)=
5293 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5294 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5295 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5296 # as well as any symbol that contains `d'.
5297 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5298 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5299 # platforms (ab)use it in PIC code, but their linkers get confused if
5300 # the symbol is explicitly referenced. Since portable code cannot
5301 # rely on this symbol name, it's probably fine to never include it in
5302 # preloaded symbol tables.
5303 extract_expsyms_cmds=
6908b7d7 5304
12f14c3f 5305 case $host_os in
f9e903a3
RC
5306 cygwin* | mingw* | pw32*)
5307 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5308 # When not using gcc, we currently assume that we are using
5309 # Microsoft Visual C++.
5310 if test "$GCC" != yes; then
5311 with_gnu_ld=no
5312 fi
5313 ;;
5314 openbsd*)
5315 with_gnu_ld=no
12f14c3f
RC
5316 ;;
5317 esac
6908b7d7 5318
f9e903a3
RC
5319 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5320 if test "$with_gnu_ld" = yes; then
5321 # If archive_cmds runs LD, not CC, wlarc should be empty
5322 wlarc='${wl}'
5323
5324 # See if GNU ld supports shared libraries.
5325 case $host_os in
5326 aix3* | aix4* | aix5*)
5327 # On AIX/PPC, the GNU linker is very broken
5328 if test "$host_cpu" != ia64; then
5329 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5330 cat <<EOF 1>&2
5331
5332*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5333*** to be unable to reliably create shared libraries on AIX.
5334*** Therefore, libtool is disabling shared libraries support. If you
5335*** really care for shared libraries, you may want to modify your PATH
5336*** so that a non-GNU linker is found, and then restart.
6908b7d7 5337
f9e903a3
RC
5338EOF
5339 fi
5340 ;;
6908b7d7 5341
f9e903a3
RC
5342 amigaos*)
5343 _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)'
5344 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5345 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5346
5347 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5348 # that the semantics of dynamic libraries on AmigaOS, at least up
5349 # to version 4, is to share data among multiple programs linked
5350 # with the same dynamic library. Since this doesn't match the
5351 # behavior of shared libraries on other platforms, we can't use
5352 # them.
5353 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5354 ;;
6908b7d7 5355
f9e903a3
RC
5356 beos*)
5357 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5358 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5359 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5360 # support --undefined. This deserves some investigation. FIXME
5361 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5362 else
5363 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5364 fi
5365 ;;
6908b7d7 5366
f9e903a3
RC
5367 cygwin*)
5368 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5369 # as there is no search path for DLLs.
5370 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5371 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6908b7d7 5372
f9e903a3
RC
5373 if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then
5374 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5375 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib'
5376 else
5377 ld_shlibs=no
5378 fi
5379 ;;
6908b7d7 5380
f9e903a3
RC
5381 mingw* | pw32*)
5382 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
5383 # no search path for DLLs.
5384 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5385 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5386 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6908b7d7 5387
f9e903a3
RC
5388 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5389 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5390 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5391 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5392 else $CC -o impgen impgen.c ; fi)~
5393 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
6908b7d7 5394
f9e903a3 5395 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
6908b7d7 5396
f9e903a3
RC
5397 # FIXME: what about values for MSVC?
5398 dll_entry=__cygwin_dll_entry@12
5399 case $host_os in
5400 mingw*)
5401 # mingw values
5402 dll_entry=_DllMainCRTStartup@12
5403 ;;
5404 esac
6908b7d7 5405
f9e903a3 5406 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
6908b7d7 5407
f9e903a3
RC
5408 # recent cygwin and mingw systems supply a stub DllMain which the user
5409 # can override, but on older systems we have to supply one (in ltdll.c)
5410 if test "x$lt_cv_need_dllmain" = "xyes"; then
5411 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5412 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
5413 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5414 else
5415 ltdll_obj=
5416 ltdll_cmds=
5417 fi
6908b7d7 5418
f9e903a3
RC
5419 # Extract the symbol export list from an `--export-all' def file,
5420 # then regenerate the def file from the symbol export list, so that
5421 # the compiled dll only exports the symbol export list.
5422 # Be careful not to strip the DATA tag left by newer dlltools.
5423 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
5424 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5425 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5426
5427 # If the export-symbols file already is a .def file (1st line
5428 # is EXPORTS), use it as is.
5429 # If DATA tags from a recent dlltool are present, honour them!
5430 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5431 cp $export_symbols $output_objdir/$soname-def;
5432 else
5433 echo EXPORTS > $output_objdir/$soname-def;
5434 _lt_hint=1;
5435 cat $export_symbols | while read symbol; do
5436 set dummy \$symbol;
5437 case \[$]# in
5438 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5439 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5440 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
5441 esac;
5442 _lt_hint=`expr 1 + \$_lt_hint`;
5443 done;
5444 fi~
5445 '"$ltdll_cmds"'
5446 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5447 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
5448 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5449 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
5450 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5451 ;;
6908b7d7 5452
f9e903a3
RC
5453 netbsd*)
5454 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5455 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5456 wlarc=
5457 else
5458 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5459 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5460 fi
5461 ;;
6908b7d7 5462
f9e903a3
RC
5463 solaris* | sysv5*)
5464 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5465 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5466 cat <<EOF 1>&2
6908b7d7 5467
f9e903a3
RC
5468*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5469*** create shared libraries on Solaris systems. Therefore, libtool
5470*** is disabling shared libraries support. We urge you to upgrade GNU
5471*** binutils to release 2.9.1 or newer. Another option is to modify
5472*** your PATH or compiler configuration so that the native linker is
5473*** used, and then restart.
6908b7d7 5474
12f14c3f 5475EOF
f9e903a3
RC
5476 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5477 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5478 _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'
5479 else
5480 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6908b7d7 5481 fi
f9e903a3
RC
5482 ;;
5483
5484 sunos4*)
5485 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5486 wlarc=
5487 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5488 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5489 ;;
6908b7d7 5490
f9e903a3
RC
5491 *)
5492 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5493 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5494 _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'
5495 else
5496 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5497 fi
5498 ;;
5499 esac
6908b7d7 5500
f9e903a3
RC
5501 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5502 runpath_var=LD_RUN_PATH
5503 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5504 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5505 case $host_os in
5506 cygwin* | mingw* | pw32*)
5507 # dlltool doesn't understand --whole-archive et. al.
5508 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5509 ;;
5510 *)
5511 # ancient GNU ld didn't support --whole-archive et. al.
5512 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5513 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5514 else
5515 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5516 fi
5517 ;;
5518 esac
5519 fi
12f14c3f 5520 else
f9e903a3
RC
5521 # PORTME fill in a description of your system's linker (not GNU ld)
5522 case $host_os in
5523 aix3*)
5524 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5525 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5526 _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'
5527 # Note: this linker hardcodes the directories in LIBPATH if there
5528 # are no directories specified by -L.
5529 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5530 if test "$GCC" = yes && test -z "$link_static_flag"; then
5531 # Neither direct hardcoding nor static linking is supported with a
5532 # broken collect2.
5533 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5534 fi
5535 ;;
6908b7d7 5536
f9e903a3
RC
5537 aix4* | aix5*)
5538 if test "$host_cpu" = ia64; then
5539 # On IA64, the linker does run time linking by default, so we don't
5540 # have to do anything special.
5541 aix_use_runtimelinking=no
5542 exp_sym_flag='-Bexport'
5543 no_entry_flag=""
5544 else
5545 # If we're using GNU nm, then we don't want the "-C" option.
5546 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5547 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
5548 _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'
5549 else
5550 _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'
5551 fi
5552 aix_use_runtimelinking=no
5553
5554 # Test if we are trying to use run time linking or normal
5555 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5556 # need to do runtime linking.
5557 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5558 for ld_flag in $LDFLAGS; do
5559 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5560 aix_use_runtimelinking=yes
5561 break
5562 fi
5563 done
5564 esac
6908b7d7 5565
f9e903a3
RC
5566 exp_sym_flag='-bexport'
5567 no_entry_flag='-bnoentry'
5568 fi
5569
5570 # When large executables or shared objects are built, AIX ld can
5571 # have problems creating the table of contents. If linking a library
5572 # or program results in "error TOC overflow" add -mminimal-toc to
5573 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5574 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5575
5576 _LT_AC_TAGVAR(archive_cmds, $1)=''
5577 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5578 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5579 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5580
5581 if test "$GCC" = yes; then
5582 case $host_os in aix4.[012]|aix4.[012].*)
5583 # We only want to do this on AIX 4.2 and lower, the check
5584 # below for broken collect2 doesn't work under 4.3+
5585 collect2name=`${CC} -print-prog-name=collect2`
5586 if test -f "$collect2name" && \
5587 strings "$collect2name" | grep resolve_lib_name >/dev/null
5588 then
5589 # We have reworked collect2
5590 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5591 else
5592 # We have old collect2
5593 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5594 # It fails to find uninstalled libraries when the uninstalled
5595 # path is not listed in the libpath. Setting hardcode_minus_L
5596 # to unsupported forces relinking
5597 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5598 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5599 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5600 fi
5601 esac
5602 shared_flag='-shared'
6908b7d7 5603 else
f9e903a3
RC
5604 # not using gcc
5605 if test "$host_cpu" = ia64; then
5606 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5607 # chokes on -Wl,-G. The following line is correct:
5608 shared_flag='-G'
5609 else
5610 if test "$aix_use_runtimelinking" = yes; then
5611 shared_flag='${wl}-G'
5612 else
5613 shared_flag='${wl}-bM:SRE'
5614 fi
5615 fi
6908b7d7 5616 fi
6908b7d7 5617
f9e903a3
RC
5618 # It seems that -bexpall does not export symbols beginning with
5619 # underscore (_), so it is better to generate a list of symbols to export.
5620 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5621 if test "$aix_use_runtimelinking" = yes; then
5622 # Warning - without using the other runtime loading flags (-brtl),
5623 # -berok will link without error, but may produce a broken library.
5624 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5625 # Determine the default libpath from the value encoded in an empty executable.
5626 _LT_AC_SYS_LIBPATH_AIX
5627 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5628 _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"
5629 else
5630 if test "$host_cpu" = ia64; then
5631 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5632 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5633 _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"
5634 else
5635 # Determine the default libpath from the value encoded in an empty executable.
5636 _LT_AC_SYS_LIBPATH_AIX
5637 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5638 # Warning - without using the other run time loading flags,
5639 # -berok will link without error, but may produce a broken library.
5640 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5641 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5642 # -bexpall does not export symbols beginning with underscore (_)
5643 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5644 # Exported symbols can be pulled into shared objects from archives
5645 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5646 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5647 # This is similar to how AIX traditionally builds it's shared libraries.
5648 _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'
5649 fi
5650 fi
5651 ;;
5652
5653 amigaos*)
5654 _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)'
5655 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5656 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5657 # see comment about different semantics on the GNU ld section
5658 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5659 ;;
5660
5661 bsdi4*)
5662 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5663 ;;
5664
5665 cygwin* | mingw* | pw32*)
5666 # When not using gcc, we currently assume that we are using
5667 # Microsoft Visual C++.
5668 # hardcode_libdir_flag_spec is actually meaningless, as there is
5669 # no search path for DLLs.
5670 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5671 # Tell ltmain to make .lib files, not .a files.
5672 libext=lib
5673 # FIXME: Setting linknames here is a bad hack.
5674 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5675 # The linker will automatically build a .lib file if we build a DLL.
5676 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5677 # FIXME: Should let the user specify the lib program.
5678 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5679 fix_srcfile_path='`cygpath -w "$srcfile"`'
5680 ;;
5681
5682 darwin* | rhapsody*)
5683 case "$host_os" in
5684 rhapsody* | darwin1.[[012]])
5685 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5686 ;;
5687 *) # Darwin 1.3 on
5688 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5689 ;;
5690 esac
5691
5692 # FIXME: Relying on posixy $() will cause problems for
5693 # cross-compilation, but unfortunately the echo tests do not
5694 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
5695 # `"' quotes if we put them in here... so don't!
5696 _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
5697 # We need to add '_' to the symbols in $export_symbols first
5698 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
5699 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5700 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5701 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5702 ;;
5703
5704 dgux*)
5705 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5706 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5707 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5708 ;;
5709
5710 freebsd1*)
5711 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5712 ;;
5713
5714 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5715 # support. Future versions do this automatically, but an explicit c++rt0.o
5716 # does not break anything, and helps significantly (at the cost of a little
5717 # extra space).
5718 freebsd2.2*)
5719 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5720 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5721 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5722 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5723 ;;
5724
5725 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5726 freebsd2*)
5727 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5728 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5729 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5730 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5731 ;;
6908b7d7 5732
f9e903a3
RC
5733 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5734 freebsd*)
5735 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5736 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5737 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5738 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5739 ;;
6908b7d7 5740
f9e903a3
RC
5741 hpux9* | hpux10* | hpux11*)
5742 if test "$GCC" = yes; then
5743 case $host_os in
5744 hpux9*)
5745 _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'
5746 ;;
5747 *)
5748 if test "$host_cpu" = ia64; then
5749 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5750 else
5751 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5752 fi
5753 ;;
5754 esac
5755 else
5756 case $host_os in
5757 hpux9*)
5758 _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'
5759 ;;
5760 *)
5761 if test "$host_cpu" = ia64; then
5762 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5763 else
5764 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5765 fi
5766 ;;
5767 esac
5768 fi
5769 if test "$host_cpu" = ia64; then
5770 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5771 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5772 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5773 else
5774 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5775 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5776 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5777 fi
5778 # hardcode_minus_L: Not really in the search PATH,
5779 # but as the default location of the library.
5780 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5781 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5782 ;;
6908b7d7 5783
f9e903a3
RC
5784 irix5* | irix6* | nonstopux*)
5785 if test "$GCC" = yes; then
5786 _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'
5787 else
5788 _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'
5789 fi
5790 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5791 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5792 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5793 ;;
6908b7d7 5794
f9e903a3
RC
5795 netbsd*)
5796 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5797 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5798 else
5799 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5800 fi
5801 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5802 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5803 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5804 ;;
6908b7d7 5805
f9e903a3
RC
5806 newsos6)
5807 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5808 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5809 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5810 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5811 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5812 ;;
6908b7d7 5813
f9e903a3
RC
5814 openbsd*)
5815 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5816 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6908b7d7 5817
f9e903a3
RC
5818 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5819 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5820 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5821 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5822 else
5823 case $host_os in
5824 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5825 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5826 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5827 ;;
5828 *)
5829 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5830 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5831 ;;
5832 esac
5833 fi
5834 ;;
6908b7d7 5835
f9e903a3
RC
5836 os2*)
5837 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5838 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5839 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5840 _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'
5841 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6908b7d7
RC
5842 ;;
5843
f9e903a3
RC
5844 osf3*)
5845 if test "$GCC" = yes; then
5846 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5847 _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'
5848 else
5849 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5850 _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'
5851 fi
5852 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5853 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5854 ;;
6908b7d7 5855
f9e903a3
RC
5856 osf4* | osf5*) # as osf3* with the addition of -msym flag
5857 if test "$GCC" = yes; then
5858 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5859 _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'
5860 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5861 else
5862 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5863 _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'
5864 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5865 $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'
6908b7d7 5866
f9e903a3
RC
5867 # Both c and cxx compiler support -rpath directly
5868 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5869 fi
5870 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5871 ;;
6908b7d7 5872
f9e903a3
RC
5873 sco3.2v5*)
5874 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5875 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5876 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5877 runpath_var=LD_RUN_PATH
5878 hardcode_runpath_var=yes
5879 ;;
6908b7d7 5880
f9e903a3
RC
5881 solaris*)
5882 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5883 if test "$GCC" = yes; then
5884 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5885 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5886 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5887 else
5888 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5889 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5890 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5891 fi
5892 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5893 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5894 case $host_os in
5895 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5896 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5897 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5898 esac
5899 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5900 ;;
6908b7d7 5901
f9e903a3
RC
5902 sunos4*)
5903 if test "x$host_vendor" = xsequent; then
5904 # Use $CC to link under sequent, because it throws in some extra .o
5905 # files that make .init and .fini sections work.
5906 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5907 else
5908 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5909 fi
5910 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5911 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5912 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5913 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5914 ;;
6908b7d7 5915
f9e903a3
RC
5916 sysv4)
5917 case $host_vendor in
5918 sni)
5919 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5920 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5921 ;;
5922 siemens)
5923 ## LD is ld it makes a PLAMLIB
5924 ## CC just makes a GrossModule.
5925 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5926 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5927 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5928 ;;
5929 motorola)
5930 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5931 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5932 ;;
5933 esac
5934 runpath_var='LD_RUN_PATH'
5935 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5936 ;;
6908b7d7 5937
f9e903a3
RC
5938 sysv4.3*)
5939 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5940 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5941 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5942 ;;
6908b7d7 5943
f9e903a3
RC
5944 sysv4*MP*)
5945 if test -d /usr/nec; then
5946 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5947 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5948 runpath_var=LD_RUN_PATH
5949 hardcode_runpath_var=yes
5950 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5951 fi
5952 ;;
6908b7d7 5953
f9e903a3
RC
5954 sysv4.2uw2*)
5955 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5956 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5957 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5958 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5959 hardcode_runpath_var=yes
5960 runpath_var=LD_RUN_PATH
5961 ;;
6908b7d7 5962
f9e903a3
RC
5963 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5964 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5965 if test "$GCC" = yes; then
5966 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5967 else
5968 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5969 fi
5970 runpath_var='LD_RUN_PATH'
5971 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5972 ;;
6908b7d7 5973
f9e903a3
RC
5974 sysv5*)
5975 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5976 # $CC -shared without GNU ld will not create a library from C++
5977 # object files and a static libstdc++, better avoid it by now
5978 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5979 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5980 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5981 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5982 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5983 runpath_var='LD_RUN_PATH'
5984 ;;
5985
5986 uts4*)
5987 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5988 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5989 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5990 ;;
5991
5992 *)
5993 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5994 ;;
5995 esac
5996 fi
12f14c3f 5997])
f9e903a3
RC
5998AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5999test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6908b7d7 6000
f9e903a3
RC
6001variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6002if test "$GCC" = yes; then
6003 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6004fi
12f14c3f 6005
f9e903a3
RC
6006#
6007# Do we need to explicitly link libc?
6008#
6009_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6010if test "$enable_shared" = yes && test "$GCC" = yes; then
6011 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6012 *'~'*)
6013 # FIXME: we may have to deal with multi-command sequences.
6014 ;;
6015 '$CC '*)
6016 # Test whether the compiler implicitly links with -lc since on some
6017 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6018 # to ld, don't add -lc before -lgcc.
6019 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6020 $rm conftest*
6021 echo 'static int dummy;' > conftest.$ac_ext
6022
6023 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6024 soname=conftest
6025 lib=conftest
6026 libobjs=conftest.$ac_objext
6027 deplibs=
6028 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6029 compiler_flags=-v
6030 linker_flags=-v
6031 verstring=
6032 output_objdir=.
6033 libname=conftest
6034 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6035 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6036 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6037 then
6038 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6908b7d7 6039 else
f9e903a3 6040 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6908b7d7 6041 fi
f9e903a3
RC
6042 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6043 else
6044 cat conftest.err 1>&5
6908b7d7 6045 fi
f9e903a3
RC
6046 $rm conftest*
6047 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6048 ;;
6049 esac
6050fi
6051])# AC_LIBTOOL_PROG_LD_SHLIBS
6908b7d7 6052
6908b7d7 6053
f9e903a3
RC
6054# _LT_AC_FILE_LTDLL_C
6055# -------------------
6056# Be careful that the start marker always follows a newline.
6057AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6058# /* ltdll.c starts here */
6059# #define WIN32_LEAN_AND_MEAN
6060# #include <windows.h>
6061# #undef WIN32_LEAN_AND_MEAN
6062# #include <stdio.h>
6063#
6064# #ifndef __CYGWIN__
6065# # ifdef __CYGWIN32__
6066# # define __CYGWIN__ __CYGWIN32__
6067# # endif
6068# #endif
6069#
6070# #ifdef __cplusplus
6071# extern "C" {
6072# #endif
6073# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6074# #ifdef __cplusplus
6075# }
6076# #endif
6077#
6078# #ifdef __CYGWIN__
6079# #include <cygwin/cygwin_dll.h>
6080# DECLARE_CYGWIN_DLL( DllMain );
6081# #endif
6082# HINSTANCE __hDllInstance_base;
6083#
6084# BOOL APIENTRY
6085# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6086# {
6087# __hDllInstance_base = hInst;
6088# return TRUE;
6089# }
6090# /* ltdll.c ends here */
6091])# _LT_AC_FILE_LTDLL_C
6092
6093
6094# _LT_AC_FILE_IMPGEN_C
6095# --------------------
6096# Be careful that the start marker always follows a newline.
6097AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
6098# /* impgen.c starts here */
6099# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
6100#
6101# This file is part of GNU libtool.
6102#
6103# This program is free software; you can redistribute it and/or modify
6104# it under the terms of the GNU General Public License as published by
6105# the Free Software Foundation; either version 2 of the License, or
6106# (at your option) any later version.
6107#
6108# This program is distributed in the hope that it will be useful,
6109# but WITHOUT ANY WARRANTY; without even the implied warranty of
6110# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6111# GNU General Public License for more details.
6112#
6113# You should have received a copy of the GNU General Public License
6114# along with this program; if not, write to the Free Software
6115# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6116# */
6117#
6118# #include <stdio.h> /* for printf() */
6119# #include <unistd.h> /* for open(), lseek(), read() */
6120# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
6121# #include <string.h> /* for strdup() */
6122#
6123# /* O_BINARY isn't required (or even defined sometimes) under Unix */
6124# #ifndef O_BINARY
6125# #define O_BINARY 0
6126# #endif
6127#
6128# static unsigned int
6129# pe_get16 (fd, offset)
6130# int fd;
6131# int offset;
6132# {
6133# unsigned char b[2];
6134# lseek (fd, offset, SEEK_SET);
6135# read (fd, b, 2);
6136# return b[0] + (b[1]<<8);
6137# }
6138#
6139# static unsigned int
6140# pe_get32 (fd, offset)
6141# int fd;
6142# int offset;
6143# {
6144# unsigned char b[4];
6145# lseek (fd, offset, SEEK_SET);
6146# read (fd, b, 4);
6147# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
6148# }
6149#
6150# static unsigned int
6151# pe_as32 (ptr)
6152# void *ptr;
6153# {
6154# unsigned char *b = ptr;
6155# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
6156# }
6157#
6158# int
6159# main (argc, argv)
6160# int argc;
6161# char *argv[];
6162# {
6163# int dll;
6164# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
6165# unsigned long export_rva, export_size, nsections, secptr, expptr;
6166# unsigned long name_rvas, nexp;
6167# unsigned char *expdata, *erva;
6168# char *filename, *dll_name;
6169#
6170# filename = argv[1];
6171#
6172# dll = open(filename, O_RDONLY|O_BINARY);
6173# if (dll < 1)
6174# return 1;
6175#
6176# dll_name = filename;
6177#
6178# for (i=0; filename[i]; i++)
6179# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
6180# dll_name = filename + i +1;
6181#
6182# pe_header_offset = pe_get32 (dll, 0x3c);
6183# opthdr_ofs = pe_header_offset + 4 + 20;
6184# num_entries = pe_get32 (dll, opthdr_ofs + 92);
6185#
6186# if (num_entries < 1) /* no exports */
6187# return 1;
6188#
6189# export_rva = pe_get32 (dll, opthdr_ofs + 96);
6190# export_size = pe_get32 (dll, opthdr_ofs + 100);
6191# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
6192# secptr = (pe_header_offset + 4 + 20 +
6193# pe_get16 (dll, pe_header_offset + 4 + 16));
6194#
6195# expptr = 0;
6196# for (i = 0; i < nsections; i++)
6197# {
6198# char sname[8];
6199# unsigned long secptr1 = secptr + 40 * i;
6200# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
6201# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
6202# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
6203# lseek(dll, secptr1, SEEK_SET);
6204# read(dll, sname, 8);
6205# if (vaddr <= export_rva && vaddr+vsize > export_rva)
6206# {
6207# expptr = fptr + (export_rva - vaddr);
6208# if (export_rva + export_size > vaddr + vsize)
6209# export_size = vsize - (export_rva - vaddr);
6210# break;
6211# }
6212# }
6213#
6214# expdata = (unsigned char*)malloc(export_size);
6215# lseek (dll, expptr, SEEK_SET);
6216# read (dll, expdata, export_size);
6217# erva = expdata - export_rva;
6218#
6219# nexp = pe_as32 (expdata+24);
6220# name_rvas = pe_as32 (expdata+32);
6221#
6222# printf ("EXPORTS\n");
6223# for (i = 0; i<nexp; i++)
6224# {
6225# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
6226# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
6227# }
6228#
6229# return 0;
6230# }
6231# /* impgen.c ends here */
6232])# _LT_AC_FILE_IMPGEN_C
6233
6234# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6235# ---------------------------------
6236AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6908b7d7
RC
6237
6238
6239# old names
6240AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6241AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6242AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6243AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6244AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6245AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6246AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6247
6248# This is just to silence aclocal about the macro not being used
6249ifelse([AC_DISABLE_FAST_INSTALL])
6250
f9e903a3
RC
6251AC_DEFUN([LT_AC_PROG_GCJ],
6252[AC_CHECK_TOOL(GCJ, gcj, no)
6253 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6254 AC_SUBST(GCJFLAGS)
6255])
6256
6257AC_DEFUN([LT_AC_PROG_RC],
6258[AC_CHECK_TOOL(RC, windres, no)
6259])
6260
6261# NOTE: This macro has been submitted for inclusion into #
6262# GNU Autoconf as AC_PROG_SED. When it is available in #
6263# a released version of Autoconf we should remove this #
6264# macro and use it instead. #
6265# LT_AC_PROG_SED
6266# --------------
6267# Check for a fully-functional sed program, that truncates
6268# as few characters as possible. Prefer GNU sed if found.
6269AC_DEFUN([LT_AC_PROG_SED],
6270[AC_MSG_CHECKING([for a sed that does not truncate output])
6271AC_CACHE_VAL(lt_cv_path_SED,
6272[# Loop through the user's path and test for sed and gsed.
6273# Then use that list of sed's as ones to test for truncation.
6274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6275for as_dir in $PATH
6276do
6277 IFS=$as_save_IFS
6278 test -z "$as_dir" && as_dir=.
6279 for lt_ac_prog in sed gsed; do
6280 for ac_exec_ext in '' $ac_executable_extensions; do
6281 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6282 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6283 fi
6284 done
6285 done
6286done
6287lt_ac_max=0
6288lt_ac_count=0
6289# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6290# along with /bin/sed that truncates output.
6291for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6292 test ! -f $lt_ac_sed && break
6293 cat /dev/null > conftest.in
6294 lt_ac_count=0
6295 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6296 # Check for GNU sed and select it if it is found.
6297 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6298 lt_cv_path_SED=$lt_ac_sed
6299 break;
6300 fi
6301 while true; do
6302 cat conftest.in conftest.in >conftest.tmp
6303 mv conftest.tmp conftest.in
6304 cp conftest.in conftest.nl
6305 echo >>conftest.nl
6306 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6307 cmp -s conftest.out conftest.nl || break
6308 # 10000 chars as input seems more than enough
6309 test $lt_ac_count -gt 10 && break
6310 lt_ac_count=`expr $lt_ac_count + 1`
6311 if test $lt_ac_count -gt $lt_ac_max; then
6312 lt_ac_max=$lt_ac_count
6313 lt_cv_path_SED=$lt_ac_sed
6314 fi
6315 done
6316done
6317SED=$lt_cv_path_SED
6318])
6319AC_MSG_RESULT([$SED])
6320])
6321
This page took 0.700421 seconds and 5 git commands to generate.