blob: 25086a53c076c39975f0d9ed6286562ab43cff35 [file] [log] [blame]
Nicolas Jager95c526b2016-10-20 09:47:03 -04001# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
2
3# Copyright (C) 1996-2013 Free Software Foundation, Inc.
4
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
19You have another version of autoconf. It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# Copyright (C) 2002-2013 Free Software Foundation, Inc.
24#
25# This file is free software; the Free Software Foundation
26# gives unlimited permission to copy and/or distribute it,
27# with or without modifications, as long as this notice is preserved.
28
29# AM_AUTOMAKE_VERSION(VERSION)
30# ----------------------------
31# Automake X.Y traces this macro to ensure aclocal.m4 has been
32# generated from the m4 files accompanying Automake X.Y.
33# (This private macro should not be called outside this file.)
34AC_DEFUN([AM_AUTOMAKE_VERSION],
35[am__api_version='1.14'
36dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37dnl require some minimum version. Point them to the right macro.
38m4_if([$1], [1.14.1], [],
39 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40])
41
42# _AM_AUTOCONF_VERSION(VERSION)
43# -----------------------------
44# aclocal traces this macro to find the Autoconf version.
45# This is a private macro too. Using m4_define simplifies
46# the logic in aclocal, which can simply ignore this definition.
47m4_define([_AM_AUTOCONF_VERSION], [])
48
49# AM_SET_CURRENT_AUTOMAKE_VERSION
50# -------------------------------
51# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54[AM_AUTOMAKE_VERSION([1.14.1])dnl
55m4_ifndef([AC_AUTOCONF_VERSION],
56 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
59# AM_AUX_DIR_EXPAND -*- Autoconf -*-
60
61# Copyright (C) 2001-2013 Free Software Foundation, Inc.
62#
63# This file is free software; the Free Software Foundation
64# gives unlimited permission to copy and/or distribute it,
65# with or without modifications, as long as this notice is preserved.
66
67# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
69# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70#
71# Of course, Automake must honor this variable whenever it calls a
72# tool from the auxiliary directory. The problem is that $srcdir (and
73# therefore $ac_aux_dir as well) can be either absolute or relative,
74# depending on how configure is run. This is pretty annoying, since
75# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76# source directory, any form will work fine, but in subdirectories a
77# relative path needs to be adjusted first.
78#
79# $ac_aux_dir/missing
80# fails when called from a subdirectory if $ac_aux_dir is relative
81# $top_srcdir/$ac_aux_dir/missing
82# fails if $ac_aux_dir is absolute,
83# fails when called from a subdirectory in a VPATH build with
84# a relative $ac_aux_dir
85#
86# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87# are both prefixed by $srcdir. In an in-source build this is usually
88# harmless because $srcdir is '.', but things will broke when you
89# start a VPATH build or use an absolute $srcdir.
90#
91# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
93# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94# and then we would define $MISSING as
95# MISSING="\${SHELL} $am_aux_dir/missing"
96# This will work as long as MISSING is not called from configure, because
97# unfortunately $(top_srcdir) has no meaning in configure.
98# However there are other variables, like CC, which are often used in
99# configure, and could therefore not use this "fixed" $ac_aux_dir.
100#
101# Another solution, used here, is to always expand $ac_aux_dir to an
102# absolute PATH. The drawback is that using absolute paths prevent a
103# configured tree to be moved without reconfiguration.
104
105AC_DEFUN([AM_AUX_DIR_EXPAND],
106[dnl Rely on autoconf to set up CDPATH properly.
107AC_PREREQ([2.50])dnl
108# expand $ac_aux_dir to an absolute path
109am_aux_dir=`cd $ac_aux_dir && pwd`
110])
111
112# AM_CONDITIONAL -*- Autoconf -*-
113
114# Copyright (C) 1997-2013 Free Software Foundation, Inc.
115#
116# This file is free software; the Free Software Foundation
117# gives unlimited permission to copy and/or distribute it,
118# with or without modifications, as long as this notice is preserved.
119
120# AM_CONDITIONAL(NAME, SHELL-CONDITION)
121# -------------------------------------
122# Define a conditional.
123AC_DEFUN([AM_CONDITIONAL],
124[AC_PREREQ([2.52])dnl
125 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
126 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
127AC_SUBST([$1_TRUE])dnl
128AC_SUBST([$1_FALSE])dnl
129_AM_SUBST_NOTMAKE([$1_TRUE])dnl
130_AM_SUBST_NOTMAKE([$1_FALSE])dnl
131m4_define([_AM_COND_VALUE_$1], [$2])dnl
132if $2; then
133 $1_TRUE=
134 $1_FALSE='#'
135else
136 $1_TRUE='#'
137 $1_FALSE=
138fi
139AC_CONFIG_COMMANDS_PRE(
140[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
141 AC_MSG_ERROR([[conditional "$1" was never defined.
142Usually this means the macro was only invoked conditionally.]])
143fi])])
144
145# Copyright (C) 1999-2013 Free Software Foundation, Inc.
146#
147# This file is free software; the Free Software Foundation
148# gives unlimited permission to copy and/or distribute it,
149# with or without modifications, as long as this notice is preserved.
150
151
152# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
153# written in clear, in which case automake, when reading aclocal.m4,
154# will think it sees a *use*, and therefore will trigger all it's
155# C support machinery. Also note that it means that autoscan, seeing
156# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
157
158
159# _AM_DEPENDENCIES(NAME)
160# ----------------------
161# See how the compiler implements dependency checking.
162# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
163# We try a few techniques and use that to set a single cache variable.
164#
165# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
166# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
167# dependency, and given that the user is not expected to run this macro,
168# just rely on AC_PROG_CC.
169AC_DEFUN([_AM_DEPENDENCIES],
170[AC_REQUIRE([AM_SET_DEPDIR])dnl
171AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
172AC_REQUIRE([AM_MAKE_INCLUDE])dnl
173AC_REQUIRE([AM_DEP_TRACK])dnl
174
175m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
176 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
177 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
178 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
179 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
180 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
181 [depcc="$$1" am_compiler_list=])
182
183AC_CACHE_CHECK([dependency style of $depcc],
184 [am_cv_$1_dependencies_compiler_type],
185[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
186 # We make a subdir and do the tests there. Otherwise we can end up
187 # making bogus files that we don't know about and never remove. For
188 # instance it was reported that on HP-UX the gcc test will end up
189 # making a dummy file named 'D' -- because '-MD' means "put the output
190 # in D".
191 rm -rf conftest.dir
192 mkdir conftest.dir
193 # Copy depcomp to subdir because otherwise we won't find it if we're
194 # using a relative directory.
195 cp "$am_depcomp" conftest.dir
196 cd conftest.dir
197 # We will build objects and dependencies in a subdirectory because
198 # it helps to detect inapplicable dependency modes. For instance
199 # both Tru64's cc and ICC support -MD to output dependencies as a
200 # side effect of compilation, but ICC will put the dependencies in
201 # the current directory while Tru64 will put them in the object
202 # directory.
203 mkdir sub
204
205 am_cv_$1_dependencies_compiler_type=none
206 if test "$am_compiler_list" = ""; then
207 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
208 fi
209 am__universal=false
210 m4_case([$1], [CC],
211 [case " $depcc " in #(
212 *\ -arch\ *\ -arch\ *) am__universal=true ;;
213 esac],
214 [CXX],
215 [case " $depcc " in #(
216 *\ -arch\ *\ -arch\ *) am__universal=true ;;
217 esac])
218
219 for depmode in $am_compiler_list; do
220 # Setup a source with many dependencies, because some compilers
221 # like to wrap large dependency lists on column 80 (with \), and
222 # we should not choose a depcomp mode which is confused by this.
223 #
224 # We need to recreate these files for each test, as the compiler may
225 # overwrite some of them when testing with obscure command lines.
226 # This happens at least with the AIX C compiler.
227 : > sub/conftest.c
228 for i in 1 2 3 4 5 6; do
229 echo '#include "conftst'$i'.h"' >> sub/conftest.c
230 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
231 # Solaris 10 /bin/sh.
232 echo '/* dummy */' > sub/conftst$i.h
233 done
234 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
235
236 # We check with '-c' and '-o' for the sake of the "dashmstdout"
237 # mode. It turns out that the SunPro C++ compiler does not properly
238 # handle '-M -o', and we need to detect this. Also, some Intel
239 # versions had trouble with output in subdirs.
240 am__obj=sub/conftest.${OBJEXT-o}
241 am__minus_obj="-o $am__obj"
242 case $depmode in
243 gcc)
244 # This depmode causes a compiler race in universal mode.
245 test "$am__universal" = false || continue
246 ;;
247 nosideeffect)
248 # After this tag, mechanisms are not by side-effect, so they'll
249 # only be used when explicitly requested.
250 if test "x$enable_dependency_tracking" = xyes; then
251 continue
252 else
253 break
254 fi
255 ;;
256 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
257 # This compiler won't grok '-c -o', but also, the minuso test has
258 # not run yet. These depmodes are late enough in the game, and
259 # so weak that their functioning should not be impacted.
260 am__obj=conftest.${OBJEXT-o}
261 am__minus_obj=
262 ;;
263 none) break ;;
264 esac
265 if depmode=$depmode \
266 source=sub/conftest.c object=$am__obj \
267 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
268 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
269 >/dev/null 2>conftest.err &&
270 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
271 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
272 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
273 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
274 # icc doesn't choke on unknown options, it will just issue warnings
275 # or remarks (even with -Werror). So we grep stderr for any message
276 # that says an option was ignored or not supported.
277 # When given -MP, icc 7.0 and 7.1 complain thusly:
278 # icc: Command line warning: ignoring option '-M'; no argument required
279 # The diagnosis changed in icc 8.0:
280 # icc: Command line remark: option '-MP' not supported
281 if (grep 'ignoring option' conftest.err ||
282 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
283 am_cv_$1_dependencies_compiler_type=$depmode
284 break
285 fi
286 fi
287 done
288
289 cd ..
290 rm -rf conftest.dir
291else
292 am_cv_$1_dependencies_compiler_type=none
293fi
294])
295AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
296AM_CONDITIONAL([am__fastdep$1], [
297 test "x$enable_dependency_tracking" != xno \
298 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
299])
300
301
302# AM_SET_DEPDIR
303# -------------
304# Choose a directory name for dependency files.
305# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
306AC_DEFUN([AM_SET_DEPDIR],
307[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
308AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
309])
310
311
312# AM_DEP_TRACK
313# ------------
314AC_DEFUN([AM_DEP_TRACK],
315[AC_ARG_ENABLE([dependency-tracking], [dnl
316AS_HELP_STRING(
317 [--enable-dependency-tracking],
318 [do not reject slow dependency extractors])
319AS_HELP_STRING(
320 [--disable-dependency-tracking],
321 [speeds up one-time build])])
322if test "x$enable_dependency_tracking" != xno; then
323 am_depcomp="$ac_aux_dir/depcomp"
324 AMDEPBACKSLASH='\'
325 am__nodep='_no'
326fi
327AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
328AC_SUBST([AMDEPBACKSLASH])dnl
329_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
330AC_SUBST([am__nodep])dnl
331_AM_SUBST_NOTMAKE([am__nodep])dnl
332])
333
334# Generate code to set up dependency tracking. -*- Autoconf -*-
335
336# Copyright (C) 1999-2013 Free Software Foundation, Inc.
337#
338# This file is free software; the Free Software Foundation
339# gives unlimited permission to copy and/or distribute it,
340# with or without modifications, as long as this notice is preserved.
341
342
343# _AM_OUTPUT_DEPENDENCY_COMMANDS
344# ------------------------------
345AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
346[{
347 # Older Autoconf quotes --file arguments for eval, but not when files
348 # are listed without --file. Let's play safe and only enable the eval
349 # if we detect the quoting.
350 case $CONFIG_FILES in
351 *\'*) eval set x "$CONFIG_FILES" ;;
352 *) set x $CONFIG_FILES ;;
353 esac
354 shift
355 for mf
356 do
357 # Strip MF so we end up with the name of the file.
358 mf=`echo "$mf" | sed -e 's/:.*$//'`
359 # Check whether this is an Automake generated Makefile or not.
360 # We used to match only the files named 'Makefile.in', but
361 # some people rename them; so instead we look at the file content.
362 # Grep'ing the first line is not enough: some people post-process
363 # each Makefile.in and add a new line on top of each file to say so.
364 # Grep'ing the whole file is not good either: AIX grep has a line
365 # limit of 2048, but all sed's we know have understand at least 4000.
366 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
367 dirpart=`AS_DIRNAME("$mf")`
368 else
369 continue
370 fi
371 # Extract the definition of DEPDIR, am__include, and am__quote
372 # from the Makefile without running 'make'.
373 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
374 test -z "$DEPDIR" && continue
375 am__include=`sed -n 's/^am__include = //p' < "$mf"`
376 test -z "$am__include" && continue
377 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
378 # Find all dependency output files, they are included files with
379 # $(DEPDIR) in their names. We invoke sed twice because it is the
380 # simplest approach to changing $(DEPDIR) to its actual value in the
381 # expansion.
382 for file in `sed -n "
383 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
384 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
385 # Make sure the directory exists.
386 test -f "$dirpart/$file" && continue
387 fdir=`AS_DIRNAME(["$file"])`
388 AS_MKDIR_P([$dirpart/$fdir])
389 # echo "creating $dirpart/$file"
390 echo '# dummy' > "$dirpart/$file"
391 done
392 done
393}
394])# _AM_OUTPUT_DEPENDENCY_COMMANDS
395
396
397# AM_OUTPUT_DEPENDENCY_COMMANDS
398# -----------------------------
399# This macro should only be invoked once -- use via AC_REQUIRE.
400#
401# This code is only required when automatic dependency tracking
402# is enabled. FIXME. This creates each '.P' file that we will
403# need in order to bootstrap the dependency handling code.
404AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
405[AC_CONFIG_COMMANDS([depfiles],
406 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
407 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
408])
409
410# Do all the work for Automake. -*- Autoconf -*-
411
412# Copyright (C) 1996-2013 Free Software Foundation, Inc.
413#
414# This file is free software; the Free Software Foundation
415# gives unlimited permission to copy and/or distribute it,
416# with or without modifications, as long as this notice is preserved.
417
418# This macro actually does too much. Some checks are only needed if
419# your package does certain things. But this isn't really a big deal.
420
421dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
422m4_define([AC_PROG_CC],
423m4_defn([AC_PROG_CC])
424[_AM_PROG_CC_C_O
425])
426
427# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
428# AM_INIT_AUTOMAKE([OPTIONS])
429# -----------------------------------------------
430# The call with PACKAGE and VERSION arguments is the old style
431# call (pre autoconf-2.50), which is being phased out. PACKAGE
432# and VERSION should now be passed to AC_INIT and removed from
433# the call to AM_INIT_AUTOMAKE.
434# We support both call styles for the transition. After
435# the next Automake release, Autoconf can make the AC_INIT
436# arguments mandatory, and then we can depend on a new Autoconf
437# release and drop the old call support.
438AC_DEFUN([AM_INIT_AUTOMAKE],
439[AC_PREREQ([2.65])dnl
440dnl Autoconf wants to disallow AM_ names. We explicitly allow
441dnl the ones we care about.
442m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
443AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
444AC_REQUIRE([AC_PROG_INSTALL])dnl
445if test "`cd $srcdir && pwd`" != "`pwd`"; then
446 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
447 # is not polluted with repeated "-I."
448 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
449 # test to see if srcdir already configured
450 if test -f $srcdir/config.status; then
451 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
452 fi
453fi
454
455# test whether we have cygpath
456if test -z "$CYGPATH_W"; then
457 if (cygpath --version) >/dev/null 2>/dev/null; then
458 CYGPATH_W='cygpath -w'
459 else
460 CYGPATH_W=echo
461 fi
462fi
463AC_SUBST([CYGPATH_W])
464
465# Define the identity of the package.
466dnl Distinguish between old-style and new-style calls.
467m4_ifval([$2],
468[AC_DIAGNOSE([obsolete],
469 [$0: two- and three-arguments forms are deprecated.])
470m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
471 AC_SUBST([PACKAGE], [$1])dnl
472 AC_SUBST([VERSION], [$2])],
473[_AM_SET_OPTIONS([$1])dnl
474dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
475m4_if(
476 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
477 [ok:ok],,
478 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
479 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
480 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
481
482_AM_IF_OPTION([no-define],,
483[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
484 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
485
486# Some tools Automake needs.
487AC_REQUIRE([AM_SANITY_CHECK])dnl
488AC_REQUIRE([AC_ARG_PROGRAM])dnl
489AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
490AM_MISSING_PROG([AUTOCONF], [autoconf])
491AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
492AM_MISSING_PROG([AUTOHEADER], [autoheader])
493AM_MISSING_PROG([MAKEINFO], [makeinfo])
494AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
495AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
496AC_REQUIRE([AC_PROG_MKDIR_P])dnl
497# For better backward compatibility. To be removed once Automake 1.9.x
498# dies out for good. For more background, see:
499# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
500# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
501AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
502# We need awk for the "check" target. The system "awk" is bad on
503# some platforms.
504AC_REQUIRE([AC_PROG_AWK])dnl
505AC_REQUIRE([AC_PROG_MAKE_SET])dnl
506AC_REQUIRE([AM_SET_LEADING_DOT])dnl
507_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
508 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
509 [_AM_PROG_TAR([v7])])])
510_AM_IF_OPTION([no-dependencies],,
511[AC_PROVIDE_IFELSE([AC_PROG_CC],
512 [_AM_DEPENDENCIES([CC])],
513 [m4_define([AC_PROG_CC],
514 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
515AC_PROVIDE_IFELSE([AC_PROG_CXX],
516 [_AM_DEPENDENCIES([CXX])],
517 [m4_define([AC_PROG_CXX],
518 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
519AC_PROVIDE_IFELSE([AC_PROG_OBJC],
520 [_AM_DEPENDENCIES([OBJC])],
521 [m4_define([AC_PROG_OBJC],
522 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
523AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
524 [_AM_DEPENDENCIES([OBJCXX])],
525 [m4_define([AC_PROG_OBJCXX],
526 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
527])
528AC_REQUIRE([AM_SILENT_RULES])dnl
529dnl The testsuite driver may need to know about EXEEXT, so add the
530dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
531dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
532AC_CONFIG_COMMANDS_PRE(dnl
533[m4_provide_if([_AM_COMPILER_EXEEXT],
534 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
535
536# POSIX will say in a future version that running "rm -f" with no argument
537# is OK; and we want to be able to make that assumption in our Makefile
538# recipes. So use an aggressive probe to check that the usage we want is
539# actually supported "in the wild" to an acceptable degree.
540# See automake bug#10828.
541# To make any issue more visible, cause the running configure to be aborted
542# by default if the 'rm' program in use doesn't match our expectations; the
543# user can still override this though.
544if rm -f && rm -fr && rm -rf; then : OK; else
545 cat >&2 <<'END'
546Oops!
547
548Your 'rm' program seems unable to run without file operands specified
549on the command line, even when the '-f' option is present. This is contrary
550to the behaviour of most rm programs out there, and not conforming with
551the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
552
553Please tell bug-automake@gnu.org about your system, including the value
554of your $PATH and any error possibly output before this message. This
555can help us improve future automake versions.
556
557END
558 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
559 echo 'Configuration will proceed anyway, since you have set the' >&2
560 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
561 echo >&2
562 else
563 cat >&2 <<'END'
564Aborting the configuration process, to ensure you take notice of the issue.
565
566You can download and install GNU coreutils to get an 'rm' implementation
567that behaves properly: <http://www.gnu.org/software/coreutils/>.
568
569If you want to complete the configuration process using your problematic
570'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
571to "yes", and re-run configure.
572
573END
574 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
575 fi
576fi])
577
578dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
579dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
580dnl mangled by Autoconf and run in a shell conditional statement.
581m4_define([_AC_COMPILER_EXEEXT],
582m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
583
584# When config.status generates a header, we must update the stamp-h file.
585# This file resides in the same directory as the config header
586# that is generated. The stamp files are numbered to have different names.
587
588# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
589# loop where config.status creates the headers, so we can generate
590# our stamp files there.
591AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
592[# Compute $1's index in $config_headers.
593_am_arg=$1
594_am_stamp_count=1
595for _am_header in $config_headers :; do
596 case $_am_header in
597 $_am_arg | $_am_arg:* )
598 break ;;
599 * )
600 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
601 esac
602done
603echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
604
605# Copyright (C) 2001-2013 Free Software Foundation, Inc.
606#
607# This file is free software; the Free Software Foundation
608# gives unlimited permission to copy and/or distribute it,
609# with or without modifications, as long as this notice is preserved.
610
611# AM_PROG_INSTALL_SH
612# ------------------
613# Define $install_sh.
614AC_DEFUN([AM_PROG_INSTALL_SH],
615[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
616if test x"${install_sh}" != xset; then
617 case $am_aux_dir in
618 *\ * | *\ *)
619 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
620 *)
621 install_sh="\${SHELL} $am_aux_dir/install-sh"
622 esac
623fi
624AC_SUBST([install_sh])])
625
626# Copyright (C) 2003-2013 Free Software Foundation, Inc.
627#
628# This file is free software; the Free Software Foundation
629# gives unlimited permission to copy and/or distribute it,
630# with or without modifications, as long as this notice is preserved.
631
632# Check whether the underlying file-system supports filenames
633# with a leading dot. For instance MS-DOS doesn't.
634AC_DEFUN([AM_SET_LEADING_DOT],
635[rm -rf .tst 2>/dev/null
636mkdir .tst 2>/dev/null
637if test -d .tst; then
638 am__leading_dot=.
639else
640 am__leading_dot=_
641fi
642rmdir .tst 2>/dev/null
643AC_SUBST([am__leading_dot])])
644
645# Check to see how 'make' treats includes. -*- Autoconf -*-
646
647# Copyright (C) 2001-2013 Free Software Foundation, Inc.
648#
649# This file is free software; the Free Software Foundation
650# gives unlimited permission to copy and/or distribute it,
651# with or without modifications, as long as this notice is preserved.
652
653# AM_MAKE_INCLUDE()
654# -----------------
655# Check to see how make treats includes.
656AC_DEFUN([AM_MAKE_INCLUDE],
657[am_make=${MAKE-make}
658cat > confinc << 'END'
659am__doit:
660 @echo this is the am__doit target
661.PHONY: am__doit
662END
663# If we don't find an include directive, just comment out the code.
664AC_MSG_CHECKING([for style of include used by $am_make])
665am__include="#"
666am__quote=
667_am_result=none
668# First try GNU make style include.
669echo "include confinc" > confmf
670# Ignore all kinds of additional output from 'make'.
671case `$am_make -s -f confmf 2> /dev/null` in #(
672*the\ am__doit\ target*)
673 am__include=include
674 am__quote=
675 _am_result=GNU
676 ;;
677esac
678# Now try BSD make style include.
679if test "$am__include" = "#"; then
680 echo '.include "confinc"' > confmf
681 case `$am_make -s -f confmf 2> /dev/null` in #(
682 *the\ am__doit\ target*)
683 am__include=.include
684 am__quote="\""
685 _am_result=BSD
686 ;;
687 esac
688fi
689AC_SUBST([am__include])
690AC_SUBST([am__quote])
691AC_MSG_RESULT([$_am_result])
692rm -f confinc confmf
693])
694
695# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
696
697# Copyright (C) 1997-2013 Free Software Foundation, Inc.
698#
699# This file is free software; the Free Software Foundation
700# gives unlimited permission to copy and/or distribute it,
701# with or without modifications, as long as this notice is preserved.
702
703# AM_MISSING_PROG(NAME, PROGRAM)
704# ------------------------------
705AC_DEFUN([AM_MISSING_PROG],
706[AC_REQUIRE([AM_MISSING_HAS_RUN])
707$1=${$1-"${am_missing_run}$2"}
708AC_SUBST($1)])
709
710# AM_MISSING_HAS_RUN
711# ------------------
712# Define MISSING if not defined so far and test if it is modern enough.
713# If it is, set am_missing_run to use it, otherwise, to nothing.
714AC_DEFUN([AM_MISSING_HAS_RUN],
715[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
716AC_REQUIRE_AUX_FILE([missing])dnl
717if test x"${MISSING+set}" != xset; then
718 case $am_aux_dir in
719 *\ * | *\ *)
720 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
721 *)
722 MISSING="\${SHELL} $am_aux_dir/missing" ;;
723 esac
724fi
725# Use eval to expand $SHELL
726if eval "$MISSING --is-lightweight"; then
727 am_missing_run="$MISSING "
728else
729 am_missing_run=
730 AC_MSG_WARN(['missing' script is too old or missing])
731fi
732])
733
734# Helper functions for option handling. -*- Autoconf -*-
735
736# Copyright (C) 2001-2013 Free Software Foundation, Inc.
737#
738# This file is free software; the Free Software Foundation
739# gives unlimited permission to copy and/or distribute it,
740# with or without modifications, as long as this notice is preserved.
741
742# _AM_MANGLE_OPTION(NAME)
743# -----------------------
744AC_DEFUN([_AM_MANGLE_OPTION],
745[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
746
747# _AM_SET_OPTION(NAME)
748# --------------------
749# Set option NAME. Presently that only means defining a flag for this option.
750AC_DEFUN([_AM_SET_OPTION],
751[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
752
753# _AM_SET_OPTIONS(OPTIONS)
754# ------------------------
755# OPTIONS is a space-separated list of Automake options.
756AC_DEFUN([_AM_SET_OPTIONS],
757[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
758
759# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
760# -------------------------------------------
761# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
762AC_DEFUN([_AM_IF_OPTION],
763[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
764
765# Copyright (C) 1999-2013 Free Software Foundation, Inc.
766#
767# This file is free software; the Free Software Foundation
768# gives unlimited permission to copy and/or distribute it,
769# with or without modifications, as long as this notice is preserved.
770
771# _AM_PROG_CC_C_O
772# ---------------
773# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
774# to automatically call this.
775AC_DEFUN([_AM_PROG_CC_C_O],
776[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
777AC_REQUIRE_AUX_FILE([compile])dnl
778AC_LANG_PUSH([C])dnl
779AC_CACHE_CHECK(
780 [whether $CC understands -c and -o together],
781 [am_cv_prog_cc_c_o],
782 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
783 # Make sure it works both with $CC and with simple cc.
784 # Following AC_PROG_CC_C_O, we do the test twice because some
785 # compilers refuse to overwrite an existing .o file with -o,
786 # though they will create one.
787 am_cv_prog_cc_c_o=yes
788 for am_i in 1 2; do
789 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
790 && test -f conftest2.$ac_objext; then
791 : OK
792 else
793 am_cv_prog_cc_c_o=no
794 break
795 fi
796 done
797 rm -f core conftest*
798 unset am_i])
799if test "$am_cv_prog_cc_c_o" != yes; then
800 # Losing compiler, so override with the script.
801 # FIXME: It is wrong to rewrite CC.
802 # But if we don't then we get into trouble of one sort or another.
803 # A longer-term fix would be to have automake use am__CC in this case,
804 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
805 CC="$am_aux_dir/compile $CC"
806fi
807AC_LANG_POP([C])])
808
809# For backward compatibility.
810AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
811
812# Copyright (C) 2001-2013 Free Software Foundation, Inc.
813#
814# This file is free software; the Free Software Foundation
815# gives unlimited permission to copy and/or distribute it,
816# with or without modifications, as long as this notice is preserved.
817
818# AM_RUN_LOG(COMMAND)
819# -------------------
820# Run COMMAND, save the exit status in ac_status, and log it.
821# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
822AC_DEFUN([AM_RUN_LOG],
823[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
824 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
825 ac_status=$?
826 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
827 (exit $ac_status); }])
828
829# Check to make sure that the build environment is sane. -*- Autoconf -*-
830
831# Copyright (C) 1996-2013 Free Software Foundation, Inc.
832#
833# This file is free software; the Free Software Foundation
834# gives unlimited permission to copy and/or distribute it,
835# with or without modifications, as long as this notice is preserved.
836
837# AM_SANITY_CHECK
838# ---------------
839AC_DEFUN([AM_SANITY_CHECK],
840[AC_MSG_CHECKING([whether build environment is sane])
841# Reject unsafe characters in $srcdir or the absolute working directory
842# name. Accept space and tab only in the latter.
843am_lf='
844'
845case `pwd` in
846 *[[\\\"\#\$\&\'\`$am_lf]]*)
847 AC_MSG_ERROR([unsafe absolute working directory name]);;
848esac
849case $srcdir in
850 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
851 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
852esac
853
854# Do 'set' in a subshell so we don't clobber the current shell's
855# arguments. Must try -L first in case configure is actually a
856# symlink; some systems play weird games with the mod time of symlinks
857# (eg FreeBSD returns the mod time of the symlink's containing
858# directory).
859if (
860 am_has_slept=no
861 for am_try in 1 2; do
862 echo "timestamp, slept: $am_has_slept" > conftest.file
863 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
864 if test "$[*]" = "X"; then
865 # -L didn't work.
866 set X `ls -t "$srcdir/configure" conftest.file`
867 fi
868 if test "$[*]" != "X $srcdir/configure conftest.file" \
869 && test "$[*]" != "X conftest.file $srcdir/configure"; then
870
871 # If neither matched, then we have a broken ls. This can happen
872 # if, for instance, CONFIG_SHELL is bash and it inherits a
873 # broken ls alias from the environment. This has actually
874 # happened. Such a system could not be considered "sane".
875 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
876 alias in your environment])
877 fi
878 if test "$[2]" = conftest.file || test $am_try -eq 2; then
879 break
880 fi
881 # Just in case.
882 sleep 1
883 am_has_slept=yes
884 done
885 test "$[2]" = conftest.file
886 )
887then
888 # Ok.
889 :
890else
891 AC_MSG_ERROR([newly created file is older than distributed files!
892Check your system clock])
893fi
894AC_MSG_RESULT([yes])
895# If we didn't sleep, we still need to ensure time stamps of config.status and
896# generated files are strictly newer.
897am_sleep_pid=
898if grep 'slept: no' conftest.file >/dev/null 2>&1; then
899 ( sleep 1 ) &
900 am_sleep_pid=$!
901fi
902AC_CONFIG_COMMANDS_PRE(
903 [AC_MSG_CHECKING([that generated files are newer than configure])
904 if test -n "$am_sleep_pid"; then
905 # Hide warnings about reused PIDs.
906 wait $am_sleep_pid 2>/dev/null
907 fi
908 AC_MSG_RESULT([done])])
909rm -f conftest.file
910])
911
912# Copyright (C) 2009-2013 Free Software Foundation, Inc.
913#
914# This file is free software; the Free Software Foundation
915# gives unlimited permission to copy and/or distribute it,
916# with or without modifications, as long as this notice is preserved.
917
918# AM_SILENT_RULES([DEFAULT])
919# --------------------------
920# Enable less verbose build rules; with the default set to DEFAULT
921# ("yes" being less verbose, "no" or empty being verbose).
922AC_DEFUN([AM_SILENT_RULES],
923[AC_ARG_ENABLE([silent-rules], [dnl
924AS_HELP_STRING(
925 [--enable-silent-rules],
926 [less verbose build output (undo: "make V=1")])
927AS_HELP_STRING(
928 [--disable-silent-rules],
929 [verbose build output (undo: "make V=0")])dnl
930])
931case $enable_silent_rules in @%:@ (((
932 yes) AM_DEFAULT_VERBOSITY=0;;
933 no) AM_DEFAULT_VERBOSITY=1;;
934 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
935esac
936dnl
937dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
938dnl do not support nested variable expansions.
939dnl See automake bug#9928 and bug#10237.
940am_make=${MAKE-make}
941AC_CACHE_CHECK([whether $am_make supports nested variables],
942 [am_cv_make_support_nested_variables],
943 [if AS_ECHO([['TRUE=$(BAR$(V))
944BAR0=false
945BAR1=true
946V=1
947am__doit:
948 @$(TRUE)
949.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
950 am_cv_make_support_nested_variables=yes
951else
952 am_cv_make_support_nested_variables=no
953fi])
954if test $am_cv_make_support_nested_variables = yes; then
955 dnl Using '$V' instead of '$(V)' breaks IRIX make.
956 AM_V='$(V)'
957 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
958else
959 AM_V=$AM_DEFAULT_VERBOSITY
960 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
961fi
962AC_SUBST([AM_V])dnl
963AM_SUBST_NOTMAKE([AM_V])dnl
964AC_SUBST([AM_DEFAULT_V])dnl
965AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
966AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
967AM_BACKSLASH='\'
968AC_SUBST([AM_BACKSLASH])dnl
969_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
970])
971
972# Copyright (C) 2001-2013 Free Software Foundation, Inc.
973#
974# This file is free software; the Free Software Foundation
975# gives unlimited permission to copy and/or distribute it,
976# with or without modifications, as long as this notice is preserved.
977
978# AM_PROG_INSTALL_STRIP
979# ---------------------
980# One issue with vendor 'install' (even GNU) is that you can't
981# specify the program used to strip binaries. This is especially
982# annoying in cross-compiling environments, where the build's strip
983# is unlikely to handle the host's binaries.
984# Fortunately install-sh will honor a STRIPPROG variable, so we
985# always use install-sh in "make install-strip", and initialize
986# STRIPPROG with the value of the STRIP variable (set by the user).
987AC_DEFUN([AM_PROG_INSTALL_STRIP],
988[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
989# Installed binaries are usually stripped using 'strip' when the user
990# run "make install-strip". However 'strip' might not be the right
991# tool to use in cross-compilation environments, therefore Automake
992# will honor the 'STRIP' environment variable to overrule this program.
993dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
994if test "$cross_compiling" != no; then
995 AC_CHECK_TOOL([STRIP], [strip], :)
996fi
997INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
998AC_SUBST([INSTALL_STRIP_PROGRAM])])
999
1000# Copyright (C) 2006-2013 Free Software Foundation, Inc.
1001#
1002# This file is free software; the Free Software Foundation
1003# gives unlimited permission to copy and/or distribute it,
1004# with or without modifications, as long as this notice is preserved.
1005
1006# _AM_SUBST_NOTMAKE(VARIABLE)
1007# ---------------------------
1008# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1009# This macro is traced by Automake.
1010AC_DEFUN([_AM_SUBST_NOTMAKE])
1011
1012# AM_SUBST_NOTMAKE(VARIABLE)
1013# --------------------------
1014# Public sister of _AM_SUBST_NOTMAKE.
1015AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1016
1017# Check how to create a tarball. -*- Autoconf -*-
1018
1019# Copyright (C) 2004-2013 Free Software Foundation, Inc.
1020#
1021# This file is free software; the Free Software Foundation
1022# gives unlimited permission to copy and/or distribute it,
1023# with or without modifications, as long as this notice is preserved.
1024
1025# _AM_PROG_TAR(FORMAT)
1026# --------------------
1027# Check how to create a tarball in format FORMAT.
1028# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1029#
1030# Substitute a variable $(am__tar) that is a command
1031# writing to stdout a FORMAT-tarball containing the directory
1032# $tardir.
1033# tardir=directory && $(am__tar) > result.tar
1034#
1035# Substitute a variable $(am__untar) that extract such
1036# a tarball read from stdin.
1037# $(am__untar) < result.tar
1038#
1039AC_DEFUN([_AM_PROG_TAR],
1040[# Always define AMTAR for backward compatibility. Yes, it's still used
1041# in the wild :-( We should find a proper way to deprecate it ...
1042AC_SUBST([AMTAR], ['$${TAR-tar}'])
1043
1044# We'll loop over all known methods to create a tar archive until one works.
1045_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1046
1047m4_if([$1], [v7],
1048 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1049
1050 [m4_case([$1],
1051 [ustar],
1052 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1053 # There is notably a 21 bits limit for the UID and the GID. In fact,
1054 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1055 # and bug#13588).
1056 am_max_uid=2097151 # 2^21 - 1
1057 am_max_gid=$am_max_uid
1058 # The $UID and $GID variables are not portable, so we need to resort
1059 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1060 # below are definitely unexpected, so allow the users to see them
1061 # (that is, avoid stderr redirection).
1062 am_uid=`id -u || echo unknown`
1063 am_gid=`id -g || echo unknown`
1064 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1065 if test $am_uid -le $am_max_uid; then
1066 AC_MSG_RESULT([yes])
1067 else
1068 AC_MSG_RESULT([no])
1069 _am_tools=none
1070 fi
1071 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1072 if test $am_gid -le $am_max_gid; then
1073 AC_MSG_RESULT([yes])
1074 else
1075 AC_MSG_RESULT([no])
1076 _am_tools=none
1077 fi],
1078
1079 [pax],
1080 [],
1081
1082 [m4_fatal([Unknown tar format])])
1083
1084 AC_MSG_CHECKING([how to create a $1 tar archive])
1085
1086 # Go ahead even if we have the value already cached. We do so because we
1087 # need to set the values for the 'am__tar' and 'am__untar' variables.
1088 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1089
1090 for _am_tool in $_am_tools; do
1091 case $_am_tool in
1092 gnutar)
1093 for _am_tar in tar gnutar gtar; do
1094 AM_RUN_LOG([$_am_tar --version]) && break
1095 done
1096 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1097 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1098 am__untar="$_am_tar -xf -"
1099 ;;
1100 plaintar)
1101 # Must skip GNU tar: if it does not support --format= it doesn't create
1102 # ustar tarball either.
1103 (tar --version) >/dev/null 2>&1 && continue
1104 am__tar='tar chf - "$$tardir"'
1105 am__tar_='tar chf - "$tardir"'
1106 am__untar='tar xf -'
1107 ;;
1108 pax)
1109 am__tar='pax -L -x $1 -w "$$tardir"'
1110 am__tar_='pax -L -x $1 -w "$tardir"'
1111 am__untar='pax -r'
1112 ;;
1113 cpio)
1114 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1115 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1116 am__untar='cpio -i -H $1 -d'
1117 ;;
1118 none)
1119 am__tar=false
1120 am__tar_=false
1121 am__untar=false
1122 ;;
1123 esac
1124
1125 # If the value was cached, stop now. We just wanted to have am__tar
1126 # and am__untar set.
1127 test -n "${am_cv_prog_tar_$1}" && break
1128
1129 # tar/untar a dummy directory, and stop if the command works.
1130 rm -rf conftest.dir
1131 mkdir conftest.dir
1132 echo GrepMe > conftest.dir/file
1133 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1134 rm -rf conftest.dir
1135 if test -s conftest.tar; then
1136 AM_RUN_LOG([$am__untar <conftest.tar])
1137 AM_RUN_LOG([cat conftest.dir/file])
1138 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1139 fi
1140 done
1141 rm -rf conftest.dir
1142
1143 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1144 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1145
1146AC_SUBST([am__tar])
1147AC_SUBST([am__untar])
1148]) # _AM_PROG_TAR
1149
1150# iconv.m4 serial 18 (gettext-0.18.2)
1151dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc.
1152dnl This file is free software; the Free Software Foundation
1153dnl gives unlimited permission to copy and/or distribute it,
1154dnl with or without modifications, as long as this notice is preserved.
1155
1156dnl From Bruno Haible.
1157
1158AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
1159[
1160 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1161 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1162 AC_REQUIRE([AC_LIB_RPATH])
1163
1164 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1165 dnl accordingly.
1166 AC_LIB_LINKFLAGS_BODY([iconv])
1167])
1168
1169AC_DEFUN([AM_ICONV_LINK],
1170[
1171 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
1172 dnl those with the standalone portable GNU libiconv installed).
1173 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
1174
1175 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1176 dnl accordingly.
1177 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1178
1179 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
1180 dnl because if the user has installed libiconv and not disabled its use
1181 dnl via --without-libiconv-prefix, he wants to use it. The first
1182 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
1183 am_save_CPPFLAGS="$CPPFLAGS"
1184 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
1185
1186 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
1187 am_cv_func_iconv="no, consider installing GNU libiconv"
1188 am_cv_lib_iconv=no
1189 AC_LINK_IFELSE(
1190 [AC_LANG_PROGRAM(
1191 [[
1192#include <stdlib.h>
1193#include <iconv.h>
1194 ]],
1195 [[iconv_t cd = iconv_open("","");
1196 iconv(cd,NULL,NULL,NULL,NULL);
1197 iconv_close(cd);]])],
1198 [am_cv_func_iconv=yes])
1199 if test "$am_cv_func_iconv" != yes; then
1200 am_save_LIBS="$LIBS"
1201 LIBS="$LIBS $LIBICONV"
1202 AC_LINK_IFELSE(
1203 [AC_LANG_PROGRAM(
1204 [[
1205#include <stdlib.h>
1206#include <iconv.h>
1207 ]],
1208 [[iconv_t cd = iconv_open("","");
1209 iconv(cd,NULL,NULL,NULL,NULL);
1210 iconv_close(cd);]])],
1211 [am_cv_lib_iconv=yes]
1212 [am_cv_func_iconv=yes])
1213 LIBS="$am_save_LIBS"
1214 fi
1215 ])
1216 if test "$am_cv_func_iconv" = yes; then
1217 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
1218 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
1219 dnl Solaris 10.
1220 am_save_LIBS="$LIBS"
1221 if test $am_cv_lib_iconv = yes; then
1222 LIBS="$LIBS $LIBICONV"
1223 fi
1224 AC_RUN_IFELSE(
1225 [AC_LANG_SOURCE([[
1226#include <iconv.h>
1227#include <string.h>
1228int main ()
1229{
1230 int result = 0;
1231 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
1232 returns. */
1233 {
1234 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
1235 if (cd_utf8_to_88591 != (iconv_t)(-1))
1236 {
1237 static const char input[] = "\342\202\254"; /* EURO SIGN */
1238 char buf[10];
1239 const char *inptr = input;
1240 size_t inbytesleft = strlen (input);
1241 char *outptr = buf;
1242 size_t outbytesleft = sizeof (buf);
1243 size_t res = iconv (cd_utf8_to_88591,
1244 (char **) &inptr, &inbytesleft,
1245 &outptr, &outbytesleft);
1246 if (res == 0)
1247 result |= 1;
1248 iconv_close (cd_utf8_to_88591);
1249 }
1250 }
1251 /* Test against Solaris 10 bug: Failures are not distinguishable from
1252 successful returns. */
1253 {
1254 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
1255 if (cd_ascii_to_88591 != (iconv_t)(-1))
1256 {
1257 static const char input[] = "\263";
1258 char buf[10];
1259 const char *inptr = input;
1260 size_t inbytesleft = strlen (input);
1261 char *outptr = buf;
1262 size_t outbytesleft = sizeof (buf);
1263 size_t res = iconv (cd_ascii_to_88591,
1264 (char **) &inptr, &inbytesleft,
1265 &outptr, &outbytesleft);
1266 if (res == 0)
1267 result |= 2;
1268 iconv_close (cd_ascii_to_88591);
1269 }
1270 }
1271 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
1272 {
1273 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
1274 if (cd_88591_to_utf8 != (iconv_t)(-1))
1275 {
1276 static const char input[] = "\304";
1277 static char buf[2] = { (char)0xDE, (char)0xAD };
1278 const char *inptr = input;
1279 size_t inbytesleft = 1;
1280 char *outptr = buf;
1281 size_t outbytesleft = 1;
1282 size_t res = iconv (cd_88591_to_utf8,
1283 (char **) &inptr, &inbytesleft,
1284 &outptr, &outbytesleft);
1285 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
1286 result |= 4;
1287 iconv_close (cd_88591_to_utf8);
1288 }
1289 }
1290#if 0 /* This bug could be worked around by the caller. */
1291 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
1292 {
1293 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
1294 if (cd_88591_to_utf8 != (iconv_t)(-1))
1295 {
1296 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
1297 char buf[50];
1298 const char *inptr = input;
1299 size_t inbytesleft = strlen (input);
1300 char *outptr = buf;
1301 size_t outbytesleft = sizeof (buf);
1302 size_t res = iconv (cd_88591_to_utf8,
1303 (char **) &inptr, &inbytesleft,
1304 &outptr, &outbytesleft);
1305 if ((int)res > 0)
1306 result |= 8;
1307 iconv_close (cd_88591_to_utf8);
1308 }
1309 }
1310#endif
1311 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
1312 provided. */
1313 if (/* Try standardized names. */
1314 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
1315 /* Try IRIX, OSF/1 names. */
1316 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
1317 /* Try AIX names. */
1318 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
1319 /* Try HP-UX names. */
1320 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
1321 result |= 16;
1322 return result;
1323}]])],
1324 [am_cv_func_iconv_works=yes],
1325 [am_cv_func_iconv_works=no],
1326 [
1327changequote(,)dnl
1328 case "$host_os" in
1329 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
1330 *) am_cv_func_iconv_works="guessing yes" ;;
1331 esac
1332changequote([,])dnl
1333 ])
1334 LIBS="$am_save_LIBS"
1335 ])
1336 case "$am_cv_func_iconv_works" in
1337 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
1338 *) am_func_iconv=yes ;;
1339 esac
1340 else
1341 am_func_iconv=no am_cv_lib_iconv=no
1342 fi
1343 if test "$am_func_iconv" = yes; then
1344 AC_DEFINE([HAVE_ICONV], [1],
1345 [Define if you have the iconv() function and it works.])
1346 fi
1347 if test "$am_cv_lib_iconv" = yes; then
1348 AC_MSG_CHECKING([how to link with libiconv])
1349 AC_MSG_RESULT([$LIBICONV])
1350 else
1351 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
1352 dnl either.
1353 CPPFLAGS="$am_save_CPPFLAGS"
1354 LIBICONV=
1355 LTLIBICONV=
1356 fi
1357 AC_SUBST([LIBICONV])
1358 AC_SUBST([LTLIBICONV])
1359])
1360
1361dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
1362dnl avoid warnings like
1363dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
1364dnl This is tricky because of the way 'aclocal' is implemented:
1365dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
1366dnl Otherwise aclocal's initial scan pass would miss the macro definition.
1367dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
1368dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
1369dnl warnings.
1370m4_define([gl_iconv_AC_DEFUN],
1371 m4_version_prereq([2.64],
1372 [[AC_DEFUN_ONCE(
1373 [$1], [$2])]],
1374 [m4_ifdef([gl_00GNULIB],
1375 [[AC_DEFUN_ONCE(
1376 [$1], [$2])]],
1377 [[AC_DEFUN(
1378 [$1], [$2])]])]))
1379gl_iconv_AC_DEFUN([AM_ICONV],
1380[
1381 AM_ICONV_LINK
1382 if test "$am_cv_func_iconv" = yes; then
1383 AC_MSG_CHECKING([for iconv declaration])
1384 AC_CACHE_VAL([am_cv_proto_iconv], [
1385 AC_COMPILE_IFELSE(
1386 [AC_LANG_PROGRAM(
1387 [[
1388#include <stdlib.h>
1389#include <iconv.h>
1390extern
1391#ifdef __cplusplus
1392"C"
1393#endif
1394#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
1395size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1396#else
1397size_t iconv();
1398#endif
1399 ]],
1400 [[]])],
1401 [am_cv_proto_iconv_arg1=""],
1402 [am_cv_proto_iconv_arg1="const"])
1403 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
1404 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1405 AC_MSG_RESULT([
1406 $am_cv_proto_iconv])
1407 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
1408 [Define as const if the declaration of iconv() needs const.])
1409 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
1410 m4_ifdef([gl_ICONV_H_DEFAULTS],
1411 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
1412 if test -n "$am_cv_proto_iconv_arg1"; then
1413 ICONV_CONST="const"
1414 fi
1415 ])
1416 fi
1417])
1418
1419# lib-ld.m4 serial 6
1420dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc.
1421dnl This file is free software; the Free Software Foundation
1422dnl gives unlimited permission to copy and/or distribute it,
1423dnl with or without modifications, as long as this notice is preserved.
1424
1425dnl Subroutines of libtool.m4,
1426dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
1427dnl collision with libtool.m4.
1428
1429dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
1430AC_DEFUN([AC_LIB_PROG_LD_GNU],
1431[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
1432[# I'd rather use --version here, but apparently some GNU lds only accept -v.
1433case `$LD -v 2>&1 </dev/null` in
1434*GNU* | *'with BFD'*)
1435 acl_cv_prog_gnu_ld=yes
1436 ;;
1437*)
1438 acl_cv_prog_gnu_ld=no
1439 ;;
1440esac])
1441with_gnu_ld=$acl_cv_prog_gnu_ld
1442])
1443
1444dnl From libtool-2.4. Sets the variable LD.
1445AC_DEFUN([AC_LIB_PROG_LD],
1446[AC_REQUIRE([AC_PROG_CC])dnl
1447AC_REQUIRE([AC_CANONICAL_HOST])dnl
1448
1449AC_ARG_WITH([gnu-ld],
1450 [AS_HELP_STRING([--with-gnu-ld],
1451 [assume the C compiler uses GNU ld [default=no]])],
1452 [test "$withval" = no || with_gnu_ld=yes],
1453 [with_gnu_ld=no])dnl
1454
1455# Prepare PATH_SEPARATOR.
1456# The user is always right.
1457if test "${PATH_SEPARATOR+set}" != set; then
1458 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
1459 # contains only /bin. Note that ksh looks also at the FPATH variable,
1460 # so we have to set that as well for the test.
1461 PATH_SEPARATOR=:
1462 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
1463 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
1464 || PATH_SEPARATOR=';'
1465 }
1466fi
1467
1468ac_prog=ld
1469if test "$GCC" = yes; then
1470 # Check if gcc -print-prog-name=ld gives a path.
1471 AC_MSG_CHECKING([for ld used by $CC])
1472 case $host in
1473 *-*-mingw*)
1474 # gcc leaves a trailing carriage return which upsets mingw
1475 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1476 *)
1477 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1478 esac
1479 case $ac_prog in
1480 # Accept absolute paths.
1481 [[\\/]]* | ?:[[\\/]]*)
1482 re_direlt='/[[^/]][[^/]]*/\.\./'
1483 # Canonicalize the pathname of ld
1484 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
1485 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
1486 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1487 done
1488 test -z "$LD" && LD="$ac_prog"
1489 ;;
1490 "")
1491 # If it fails, then pretend we aren't using GCC.
1492 ac_prog=ld
1493 ;;
1494 *)
1495 # If it is relative, then search for the first ld in PATH.
1496 with_gnu_ld=unknown
1497 ;;
1498 esac
1499elif test "$with_gnu_ld" = yes; then
1500 AC_MSG_CHECKING([for GNU ld])
1501else
1502 AC_MSG_CHECKING([for non-GNU ld])
1503fi
1504AC_CACHE_VAL([acl_cv_path_LD],
1505[if test -z "$LD"; then
1506 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1507 for ac_dir in $PATH; do
1508 IFS="$acl_save_ifs"
1509 test -z "$ac_dir" && ac_dir=.
1510 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1511 acl_cv_path_LD="$ac_dir/$ac_prog"
1512 # Check to see if the program is GNU ld. I'd rather use --version,
1513 # but apparently some variants of GNU ld only accept -v.
1514 # Break only if it was the GNU/non-GNU ld that we prefer.
1515 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
1516 *GNU* | *'with BFD'*)
1517 test "$with_gnu_ld" != no && break
1518 ;;
1519 *)
1520 test "$with_gnu_ld" != yes && break
1521 ;;
1522 esac
1523 fi
1524 done
1525 IFS="$acl_save_ifs"
1526else
1527 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1528fi])
1529LD="$acl_cv_path_LD"
1530if test -n "$LD"; then
1531 AC_MSG_RESULT([$LD])
1532else
1533 AC_MSG_RESULT([no])
1534fi
1535test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1536AC_LIB_PROG_LD_GNU
1537])
1538
1539# lib-link.m4 serial 26 (gettext-0.18.2)
1540dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
1541dnl This file is free software; the Free Software Foundation
1542dnl gives unlimited permission to copy and/or distribute it,
1543dnl with or without modifications, as long as this notice is preserved.
1544
1545dnl From Bruno Haible.
1546
1547AC_PREREQ([2.54])
1548
1549dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1550dnl the libraries corresponding to explicit and implicit dependencies.
1551dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1552dnl augments the CPPFLAGS variable.
1553dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1554dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1555AC_DEFUN([AC_LIB_LINKFLAGS],
1556[
1557 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1558 AC_REQUIRE([AC_LIB_RPATH])
1559 pushdef([Name],[m4_translit([$1],[./+-], [____])])
1560 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1561 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1562 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1563 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1564 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1565 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1566 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1567 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1568 ])
1569 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1570 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1571 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1572 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1573 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1574 AC_SUBST([LIB]NAME)
1575 AC_SUBST([LTLIB]NAME)
1576 AC_SUBST([LIB]NAME[_PREFIX])
1577 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1578 dnl results of this search when this library appears as a dependency.
1579 HAVE_LIB[]NAME=yes
1580 popdef([NAME])
1581 popdef([Name])
1582])
1583
1584dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1585dnl searches for libname and the libraries corresponding to explicit and
1586dnl implicit dependencies, together with the specified include files and
1587dnl the ability to compile and link the specified testcode. The missing-message
1588dnl defaults to 'no' and may contain additional hints for the user.
1589dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1590dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1591dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1592dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1593dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1594dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1595AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1596[
1597 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1598 AC_REQUIRE([AC_LIB_RPATH])
1599 pushdef([Name],[m4_translit([$1],[./+-], [____])])
1600 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1601 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1602
1603 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1604 dnl accordingly.
1605 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1606
1607 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1608 dnl because if the user has installed lib[]Name and not disabled its use
1609 dnl via --without-lib[]Name-prefix, he wants to use it.
1610 ac_save_CPPFLAGS="$CPPFLAGS"
1611 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1612
1613 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1614 ac_save_LIBS="$LIBS"
1615 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1616 dnl because these -l options might require -L options that are present in
1617 dnl LIBS. -l options benefit only from the -L options listed before it.
1618 dnl Otherwise, add it to the front of LIBS, because it may be a static
1619 dnl library that depends on another static library that is present in LIBS.
1620 dnl Static libraries benefit only from the static libraries listed after
1621 dnl it.
1622 case " $LIB[]NAME" in
1623 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1624 *) LIBS="$LIB[]NAME $LIBS" ;;
1625 esac
1626 AC_LINK_IFELSE(
1627 [AC_LANG_PROGRAM([[$3]], [[$4]])],
1628 [ac_cv_lib[]Name=yes],
1629 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1630 LIBS="$ac_save_LIBS"
1631 ])
1632 if test "$ac_cv_lib[]Name" = yes; then
1633 HAVE_LIB[]NAME=yes
1634 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1635 AC_MSG_CHECKING([how to link with lib[]$1])
1636 AC_MSG_RESULT([$LIB[]NAME])
1637 else
1638 HAVE_LIB[]NAME=no
1639 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1640 dnl $INC[]NAME either.
1641 CPPFLAGS="$ac_save_CPPFLAGS"
1642 LIB[]NAME=
1643 LTLIB[]NAME=
1644 LIB[]NAME[]_PREFIX=
1645 fi
1646 AC_SUBST([HAVE_LIB]NAME)
1647 AC_SUBST([LIB]NAME)
1648 AC_SUBST([LTLIB]NAME)
1649 AC_SUBST([LIB]NAME[_PREFIX])
1650 popdef([NAME])
1651 popdef([Name])
1652])
1653
1654dnl Determine the platform dependent parameters needed to use rpath:
1655dnl acl_libext,
1656dnl acl_shlibext,
1657dnl acl_libname_spec,
1658dnl acl_library_names_spec,
1659dnl acl_hardcode_libdir_flag_spec,
1660dnl acl_hardcode_libdir_separator,
1661dnl acl_hardcode_direct,
1662dnl acl_hardcode_minus_L.
1663AC_DEFUN([AC_LIB_RPATH],
1664[
1665 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1666 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1667 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1668 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1669 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1670 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1671 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1672 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1673 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1674 . ./conftest.sh
1675 rm -f ./conftest.sh
1676 acl_cv_rpath=done
1677 ])
1678 wl="$acl_cv_wl"
1679 acl_libext="$acl_cv_libext"
1680 acl_shlibext="$acl_cv_shlibext"
1681 acl_libname_spec="$acl_cv_libname_spec"
1682 acl_library_names_spec="$acl_cv_library_names_spec"
1683 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1684 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1685 acl_hardcode_direct="$acl_cv_hardcode_direct"
1686 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1687 dnl Determine whether the user wants rpath handling at all.
1688 AC_ARG_ENABLE([rpath],
1689 [ --disable-rpath do not hardcode runtime library paths],
1690 :, enable_rpath=yes)
1691])
1692
1693dnl AC_LIB_FROMPACKAGE(name, package)
1694dnl declares that libname comes from the given package. The configure file
1695dnl will then not have a --with-libname-prefix option but a
1696dnl --with-package-prefix option. Several libraries can come from the same
1697dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1698dnl macro call that searches for libname.
1699AC_DEFUN([AC_LIB_FROMPACKAGE],
1700[
1701 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1702 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1703 define([acl_frompackage_]NAME, [$2])
1704 popdef([NAME])
1705 pushdef([PACK],[$2])
1706 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1707 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1708 define([acl_libsinpackage_]PACKUP,
1709 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
1710 popdef([PACKUP])
1711 popdef([PACK])
1712])
1713
1714dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1715dnl the libraries corresponding to explicit and implicit dependencies.
1716dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1717dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1718dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1719AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1720[
1721 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1722 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1723 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1724 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1725 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1726 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1727 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1728 dnl Autoconf >= 2.61 supports dots in --with options.
1729 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
1730 dnl By default, look in $includedir and $libdir.
1731 use_additional=yes
1732 AC_LIB_WITH_FINAL_PREFIX([
1733 eval additional_includedir=\"$includedir\"
1734 eval additional_libdir=\"$libdir\"
1735 ])
1736 AC_ARG_WITH(P_A_C_K[-prefix],
1737[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1738 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1739[
1740 if test "X$withval" = "Xno"; then
1741 use_additional=no
1742 else
1743 if test "X$withval" = "X"; then
1744 AC_LIB_WITH_FINAL_PREFIX([
1745 eval additional_includedir=\"$includedir\"
1746 eval additional_libdir=\"$libdir\"
1747 ])
1748 else
1749 additional_includedir="$withval/include"
1750 additional_libdir="$withval/$acl_libdirstem"
1751 if test "$acl_libdirstem2" != "$acl_libdirstem" \
1752 && ! test -d "$withval/$acl_libdirstem"; then
1753 additional_libdir="$withval/$acl_libdirstem2"
1754 fi
1755 fi
1756 fi
1757])
1758 dnl Search the library and its dependencies in $additional_libdir and
1759 dnl $LDFLAGS. Using breadth-first-seach.
1760 LIB[]NAME=
1761 LTLIB[]NAME=
1762 INC[]NAME=
1763 LIB[]NAME[]_PREFIX=
1764 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1765 dnl computed. So it has to be reset here.
1766 HAVE_LIB[]NAME=
1767 rpathdirs=
1768 ltrpathdirs=
1769 names_already_handled=
1770 names_next_round='$1 $2'
1771 while test -n "$names_next_round"; do
1772 names_this_round="$names_next_round"
1773 names_next_round=
1774 for name in $names_this_round; do
1775 already_handled=
1776 for n in $names_already_handled; do
1777 if test "$n" = "$name"; then
1778 already_handled=yes
1779 break
1780 fi
1781 done
1782 if test -z "$already_handled"; then
1783 names_already_handled="$names_already_handled $name"
1784 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1785 dnl or AC_LIB_HAVE_LINKFLAGS call.
1786 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
1787 eval value=\"\$HAVE_LIB$uppername\"
1788 if test -n "$value"; then
1789 if test "$value" = yes; then
1790 eval value=\"\$LIB$uppername\"
1791 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1792 eval value=\"\$LTLIB$uppername\"
1793 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1794 else
1795 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1796 dnl that this library doesn't exist. So just drop it.
1797 :
1798 fi
1799 else
1800 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1801 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1802 found_dir=
1803 found_la=
1804 found_so=
1805 found_a=
1806 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1807 if test -n "$acl_shlibext"; then
1808 shrext=".$acl_shlibext" # typically: shrext=.so
1809 else
1810 shrext=
1811 fi
1812 if test $use_additional = yes; then
1813 dir="$additional_libdir"
1814 dnl The same code as in the loop below:
1815 dnl First look for a shared library.
1816 if test -n "$acl_shlibext"; then
1817 if test -f "$dir/$libname$shrext"; then
1818 found_dir="$dir"
1819 found_so="$dir/$libname$shrext"
1820 else
1821 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1822 ver=`(cd "$dir" && \
1823 for f in "$libname$shrext".*; do echo "$f"; done \
1824 | sed -e "s,^$libname$shrext\\\\.,," \
1825 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1826 | sed 1q ) 2>/dev/null`
1827 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1828 found_dir="$dir"
1829 found_so="$dir/$libname$shrext.$ver"
1830 fi
1831 else
1832 eval library_names=\"$acl_library_names_spec\"
1833 for f in $library_names; do
1834 if test -f "$dir/$f"; then
1835 found_dir="$dir"
1836 found_so="$dir/$f"
1837 break
1838 fi
1839 done
1840 fi
1841 fi
1842 fi
1843 dnl Then look for a static library.
1844 if test "X$found_dir" = "X"; then
1845 if test -f "$dir/$libname.$acl_libext"; then
1846 found_dir="$dir"
1847 found_a="$dir/$libname.$acl_libext"
1848 fi
1849 fi
1850 if test "X$found_dir" != "X"; then
1851 if test -f "$dir/$libname.la"; then
1852 found_la="$dir/$libname.la"
1853 fi
1854 fi
1855 fi
1856 if test "X$found_dir" = "X"; then
1857 for x in $LDFLAGS $LTLIB[]NAME; do
1858 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1859 case "$x" in
1860 -L*)
1861 dir=`echo "X$x" | sed -e 's/^X-L//'`
1862 dnl First look for a shared library.
1863 if test -n "$acl_shlibext"; then
1864 if test -f "$dir/$libname$shrext"; then
1865 found_dir="$dir"
1866 found_so="$dir/$libname$shrext"
1867 else
1868 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1869 ver=`(cd "$dir" && \
1870 for f in "$libname$shrext".*; do echo "$f"; done \
1871 | sed -e "s,^$libname$shrext\\\\.,," \
1872 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1873 | sed 1q ) 2>/dev/null`
1874 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1875 found_dir="$dir"
1876 found_so="$dir/$libname$shrext.$ver"
1877 fi
1878 else
1879 eval library_names=\"$acl_library_names_spec\"
1880 for f in $library_names; do
1881 if test -f "$dir/$f"; then
1882 found_dir="$dir"
1883 found_so="$dir/$f"
1884 break
1885 fi
1886 done
1887 fi
1888 fi
1889 fi
1890 dnl Then look for a static library.
1891 if test "X$found_dir" = "X"; then
1892 if test -f "$dir/$libname.$acl_libext"; then
1893 found_dir="$dir"
1894 found_a="$dir/$libname.$acl_libext"
1895 fi
1896 fi
1897 if test "X$found_dir" != "X"; then
1898 if test -f "$dir/$libname.la"; then
1899 found_la="$dir/$libname.la"
1900 fi
1901 fi
1902 ;;
1903 esac
1904 if test "X$found_dir" != "X"; then
1905 break
1906 fi
1907 done
1908 fi
1909 if test "X$found_dir" != "X"; then
1910 dnl Found the library.
1911 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1912 if test "X$found_so" != "X"; then
1913 dnl Linking with a shared library. We attempt to hardcode its
1914 dnl directory into the executable's runpath, unless it's the
1915 dnl standard /usr/lib.
1916 if test "$enable_rpath" = no \
1917 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
1918 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1919 dnl No hardcoding is needed.
1920 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1921 else
1922 dnl Use an explicit option to hardcode DIR into the resulting
1923 dnl binary.
1924 dnl Potentially add DIR to ltrpathdirs.
1925 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1926 haveit=
1927 for x in $ltrpathdirs; do
1928 if test "X$x" = "X$found_dir"; then
1929 haveit=yes
1930 break
1931 fi
1932 done
1933 if test -z "$haveit"; then
1934 ltrpathdirs="$ltrpathdirs $found_dir"
1935 fi
1936 dnl The hardcoding into $LIBNAME is system dependent.
1937 if test "$acl_hardcode_direct" = yes; then
1938 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1939 dnl resulting binary.
1940 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1941 else
1942 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1943 dnl Use an explicit option to hardcode DIR into the resulting
1944 dnl binary.
1945 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1946 dnl Potentially add DIR to rpathdirs.
1947 dnl The rpathdirs will be appended to $LIBNAME at the end.
1948 haveit=
1949 for x in $rpathdirs; do
1950 if test "X$x" = "X$found_dir"; then
1951 haveit=yes
1952 break
1953 fi
1954 done
1955 if test -z "$haveit"; then
1956 rpathdirs="$rpathdirs $found_dir"
1957 fi
1958 else
1959 dnl Rely on "-L$found_dir".
1960 dnl But don't add it if it's already contained in the LDFLAGS
1961 dnl or the already constructed $LIBNAME
1962 haveit=
1963 for x in $LDFLAGS $LIB[]NAME; do
1964 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1965 if test "X$x" = "X-L$found_dir"; then
1966 haveit=yes
1967 break
1968 fi
1969 done
1970 if test -z "$haveit"; then
1971 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1972 fi
1973 if test "$acl_hardcode_minus_L" != no; then
1974 dnl FIXME: Not sure whether we should use
1975 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1976 dnl here.
1977 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1978 else
1979 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1980 dnl here, because this doesn't fit in flags passed to the
1981 dnl compiler. So give up. No hardcoding. This affects only
1982 dnl very old systems.
1983 dnl FIXME: Not sure whether we should use
1984 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1985 dnl here.
1986 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1987 fi
1988 fi
1989 fi
1990 fi
1991 else
1992 if test "X$found_a" != "X"; then
1993 dnl Linking with a static library.
1994 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1995 else
1996 dnl We shouldn't come here, but anyway it's good to have a
1997 dnl fallback.
1998 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1999 fi
2000 fi
2001 dnl Assume the include files are nearby.
2002 additional_includedir=
2003 case "$found_dir" in
2004 */$acl_libdirstem | */$acl_libdirstem/)
2005 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
2006 if test "$name" = '$1'; then
2007 LIB[]NAME[]_PREFIX="$basedir"
2008 fi
2009 additional_includedir="$basedir/include"
2010 ;;
2011 */$acl_libdirstem2 | */$acl_libdirstem2/)
2012 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
2013 if test "$name" = '$1'; then
2014 LIB[]NAME[]_PREFIX="$basedir"
2015 fi
2016 additional_includedir="$basedir/include"
2017 ;;
2018 esac
2019 if test "X$additional_includedir" != "X"; then
2020 dnl Potentially add $additional_includedir to $INCNAME.
2021 dnl But don't add it
2022 dnl 1. if it's the standard /usr/include,
2023 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
2024 dnl 3. if it's already present in $CPPFLAGS or the already
2025 dnl constructed $INCNAME,
2026 dnl 4. if it doesn't exist as a directory.
2027 if test "X$additional_includedir" != "X/usr/include"; then
2028 haveit=
2029 if test "X$additional_includedir" = "X/usr/local/include"; then
2030 if test -n "$GCC"; then
2031 case $host_os in
2032 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2033 esac
2034 fi
2035 fi
2036 if test -z "$haveit"; then
2037 for x in $CPPFLAGS $INC[]NAME; do
2038 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2039 if test "X$x" = "X-I$additional_includedir"; then
2040 haveit=yes
2041 break
2042 fi
2043 done
2044 if test -z "$haveit"; then
2045 if test -d "$additional_includedir"; then
2046 dnl Really add $additional_includedir to $INCNAME.
2047 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2048 fi
2049 fi
2050 fi
2051 fi
2052 fi
2053 dnl Look for dependencies.
2054 if test -n "$found_la"; then
2055 dnl Read the .la file. It defines the variables
2056 dnl dlname, library_names, old_library, dependency_libs, current,
2057 dnl age, revision, installed, dlopen, dlpreopen, libdir.
2058 save_libdir="$libdir"
2059 case "$found_la" in
2060 */* | *\\*) . "$found_la" ;;
2061 *) . "./$found_la" ;;
2062 esac
2063 libdir="$save_libdir"
2064 dnl We use only dependency_libs.
2065 for dep in $dependency_libs; do
2066 case "$dep" in
2067 -L*)
2068 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2069 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2070 dnl But don't add it
2071 dnl 1. if it's the standard /usr/lib,
2072 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
2073 dnl 3. if it's already present in $LDFLAGS or the already
2074 dnl constructed $LIBNAME,
2075 dnl 4. if it doesn't exist as a directory.
2076 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
2077 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
2078 haveit=
2079 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
2080 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
2081 if test -n "$GCC"; then
2082 case $host_os in
2083 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2084 esac
2085 fi
2086 fi
2087 if test -z "$haveit"; then
2088 haveit=
2089 for x in $LDFLAGS $LIB[]NAME; do
2090 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2091 if test "X$x" = "X-L$additional_libdir"; then
2092 haveit=yes
2093 break
2094 fi
2095 done
2096 if test -z "$haveit"; then
2097 if test -d "$additional_libdir"; then
2098 dnl Really add $additional_libdir to $LIBNAME.
2099 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2100 fi
2101 fi
2102 haveit=
2103 for x in $LDFLAGS $LTLIB[]NAME; do
2104 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2105 if test "X$x" = "X-L$additional_libdir"; then
2106 haveit=yes
2107 break
2108 fi
2109 done
2110 if test -z "$haveit"; then
2111 if test -d "$additional_libdir"; then
2112 dnl Really add $additional_libdir to $LTLIBNAME.
2113 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2114 fi
2115 fi
2116 fi
2117 fi
2118 ;;
2119 -R*)
2120 dir=`echo "X$dep" | sed -e 's/^X-R//'`
2121 if test "$enable_rpath" != no; then
2122 dnl Potentially add DIR to rpathdirs.
2123 dnl The rpathdirs will be appended to $LIBNAME at the end.
2124 haveit=
2125 for x in $rpathdirs; do
2126 if test "X$x" = "X$dir"; then
2127 haveit=yes
2128 break
2129 fi
2130 done
2131 if test -z "$haveit"; then
2132 rpathdirs="$rpathdirs $dir"
2133 fi
2134 dnl Potentially add DIR to ltrpathdirs.
2135 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2136 haveit=
2137 for x in $ltrpathdirs; do
2138 if test "X$x" = "X$dir"; then
2139 haveit=yes
2140 break
2141 fi
2142 done
2143 if test -z "$haveit"; then
2144 ltrpathdirs="$ltrpathdirs $dir"
2145 fi
2146 fi
2147 ;;
2148 -l*)
2149 dnl Handle this in the next round.
2150 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2151 ;;
2152 *.la)
2153 dnl Handle this in the next round. Throw away the .la's
2154 dnl directory; it is already contained in a preceding -L
2155 dnl option.
2156 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2157 ;;
2158 *)
2159 dnl Most likely an immediate library name.
2160 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2161 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2162 ;;
2163 esac
2164 done
2165 fi
2166 else
2167 dnl Didn't find the library; assume it is in the system directories
2168 dnl known to the linker and runtime loader. (All the system
2169 dnl directories known to the linker should also be known to the
2170 dnl runtime loader, otherwise the system is severely misconfigured.)
2171 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2172 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2173 fi
2174 fi
2175 fi
2176 done
2177 done
2178 if test "X$rpathdirs" != "X"; then
2179 if test -n "$acl_hardcode_libdir_separator"; then
2180 dnl Weird platform: only the last -rpath option counts, the user must
2181 dnl pass all path elements in one option. We can arrange that for a
2182 dnl single library, but not when more than one $LIBNAMEs are used.
2183 alldirs=
2184 for found_dir in $rpathdirs; do
2185 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
2186 done
2187 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
2188 acl_save_libdir="$libdir"
2189 libdir="$alldirs"
2190 eval flag=\"$acl_hardcode_libdir_flag_spec\"
2191 libdir="$acl_save_libdir"
2192 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2193 else
2194 dnl The -rpath options are cumulative.
2195 for found_dir in $rpathdirs; do
2196 acl_save_libdir="$libdir"
2197 libdir="$found_dir"
2198 eval flag=\"$acl_hardcode_libdir_flag_spec\"
2199 libdir="$acl_save_libdir"
2200 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2201 done
2202 fi
2203 fi
2204 if test "X$ltrpathdirs" != "X"; then
2205 dnl When using libtool, the option that works for both libraries and
2206 dnl executables is -R. The -R options are cumulative.
2207 for found_dir in $ltrpathdirs; do
2208 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2209 done
2210 fi
2211 popdef([P_A_C_K])
2212 popdef([PACKLIBS])
2213 popdef([PACKUP])
2214 popdef([PACK])
2215 popdef([NAME])
2216])
2217
2218dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2219dnl unless already present in VAR.
2220dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2221dnl contains two or three consecutive elements that belong together.
2222AC_DEFUN([AC_LIB_APPENDTOVAR],
2223[
2224 for element in [$2]; do
2225 haveit=
2226 for x in $[$1]; do
2227 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2228 if test "X$x" = "X$element"; then
2229 haveit=yes
2230 break
2231 fi
2232 done
2233 if test -z "$haveit"; then
2234 [$1]="${[$1]}${[$1]:+ }$element"
2235 fi
2236 done
2237])
2238
2239dnl For those cases where a variable contains several -L and -l options
2240dnl referring to unknown libraries and directories, this macro determines the
2241dnl necessary additional linker options for the runtime path.
2242dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
2243dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
2244dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
2245dnl otherwise linking without libtool is assumed.
2246AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
2247[
2248 AC_REQUIRE([AC_LIB_RPATH])
2249 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2250 $1=
2251 if test "$enable_rpath" != no; then
2252 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
2253 dnl Use an explicit option to hardcode directories into the resulting
2254 dnl binary.
2255 rpathdirs=
2256 next=
2257 for opt in $2; do
2258 if test -n "$next"; then
2259 dir="$next"
2260 dnl No need to hardcode the standard /usr/lib.
2261 if test "X$dir" != "X/usr/$acl_libdirstem" \
2262 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
2263 rpathdirs="$rpathdirs $dir"
2264 fi
2265 next=
2266 else
2267 case $opt in
2268 -L) next=yes ;;
2269 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
2270 dnl No need to hardcode the standard /usr/lib.
2271 if test "X$dir" != "X/usr/$acl_libdirstem" \
2272 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
2273 rpathdirs="$rpathdirs $dir"
2274 fi
2275 next= ;;
2276 *) next= ;;
2277 esac
2278 fi
2279 done
2280 if test "X$rpathdirs" != "X"; then
2281 if test -n ""$3""; then
2282 dnl libtool is used for linking. Use -R options.
2283 for dir in $rpathdirs; do
2284 $1="${$1}${$1:+ }-R$dir"
2285 done
2286 else
2287 dnl The linker is used for linking directly.
2288 if test -n "$acl_hardcode_libdir_separator"; then
2289 dnl Weird platform: only the last -rpath option counts, the user
2290 dnl must pass all path elements in one option.
2291 alldirs=
2292 for dir in $rpathdirs; do
2293 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
2294 done
2295 acl_save_libdir="$libdir"
2296 libdir="$alldirs"
2297 eval flag=\"$acl_hardcode_libdir_flag_spec\"
2298 libdir="$acl_save_libdir"
2299 $1="$flag"
2300 else
2301 dnl The -rpath options are cumulative.
2302 for dir in $rpathdirs; do
2303 acl_save_libdir="$libdir"
2304 libdir="$dir"
2305 eval flag=\"$acl_hardcode_libdir_flag_spec\"
2306 libdir="$acl_save_libdir"
2307 $1="${$1}${$1:+ }$flag"
2308 done
2309 fi
2310 fi
2311 fi
2312 fi
2313 fi
2314 AC_SUBST([$1])
2315])
2316
2317# lib-prefix.m4 serial 7 (gettext-0.18)
2318dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc.
2319dnl This file is free software; the Free Software Foundation
2320dnl gives unlimited permission to copy and/or distribute it,
2321dnl with or without modifications, as long as this notice is preserved.
2322
2323dnl From Bruno Haible.
2324
2325dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
2326dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
2327dnl require excessive bracketing.
2328ifdef([AC_HELP_STRING],
2329[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
2330[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
2331
2332dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
2333dnl to access previously installed libraries. The basic assumption is that
2334dnl a user will want packages to use other packages he previously installed
2335dnl with the same --prefix option.
2336dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
2337dnl libraries, but is otherwise very convenient.
2338AC_DEFUN([AC_LIB_PREFIX],
2339[
2340 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
2341 AC_REQUIRE([AC_PROG_CC])
2342 AC_REQUIRE([AC_CANONICAL_HOST])
2343 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2344 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2345 dnl By default, look in $includedir and $libdir.
2346 use_additional=yes
2347 AC_LIB_WITH_FINAL_PREFIX([
2348 eval additional_includedir=\"$includedir\"
2349 eval additional_libdir=\"$libdir\"
2350 ])
2351 AC_LIB_ARG_WITH([lib-prefix],
2352[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
2353 --without-lib-prefix don't search for libraries in includedir and libdir],
2354[
2355 if test "X$withval" = "Xno"; then
2356 use_additional=no
2357 else
2358 if test "X$withval" = "X"; then
2359 AC_LIB_WITH_FINAL_PREFIX([
2360 eval additional_includedir=\"$includedir\"
2361 eval additional_libdir=\"$libdir\"
2362 ])
2363 else
2364 additional_includedir="$withval/include"
2365 additional_libdir="$withval/$acl_libdirstem"
2366 fi
2367 fi
2368])
2369 if test $use_additional = yes; then
2370 dnl Potentially add $additional_includedir to $CPPFLAGS.
2371 dnl But don't add it
2372 dnl 1. if it's the standard /usr/include,
2373 dnl 2. if it's already present in $CPPFLAGS,
2374 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
2375 dnl 4. if it doesn't exist as a directory.
2376 if test "X$additional_includedir" != "X/usr/include"; then
2377 haveit=
2378 for x in $CPPFLAGS; do
2379 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2380 if test "X$x" = "X-I$additional_includedir"; then
2381 haveit=yes
2382 break
2383 fi
2384 done
2385 if test -z "$haveit"; then
2386 if test "X$additional_includedir" = "X/usr/local/include"; then
2387 if test -n "$GCC"; then
2388 case $host_os in
2389 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2390 esac
2391 fi
2392 fi
2393 if test -z "$haveit"; then
2394 if test -d "$additional_includedir"; then
2395 dnl Really add $additional_includedir to $CPPFLAGS.
2396 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
2397 fi
2398 fi
2399 fi
2400 fi
2401 dnl Potentially add $additional_libdir to $LDFLAGS.
2402 dnl But don't add it
2403 dnl 1. if it's the standard /usr/lib,
2404 dnl 2. if it's already present in $LDFLAGS,
2405 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
2406 dnl 4. if it doesn't exist as a directory.
2407 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
2408 haveit=
2409 for x in $LDFLAGS; do
2410 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2411 if test "X$x" = "X-L$additional_libdir"; then
2412 haveit=yes
2413 break
2414 fi
2415 done
2416 if test -z "$haveit"; then
2417 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
2418 if test -n "$GCC"; then
2419 case $host_os in
2420 linux*) haveit=yes;;
2421 esac
2422 fi
2423 fi
2424 if test -z "$haveit"; then
2425 if test -d "$additional_libdir"; then
2426 dnl Really add $additional_libdir to $LDFLAGS.
2427 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
2428 fi
2429 fi
2430 fi
2431 fi
2432 fi
2433])
2434
2435dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
2436dnl acl_final_exec_prefix, containing the values to which $prefix and
2437dnl $exec_prefix will expand at the end of the configure script.
2438AC_DEFUN([AC_LIB_PREPARE_PREFIX],
2439[
2440 dnl Unfortunately, prefix and exec_prefix get only finally determined
2441 dnl at the end of configure.
2442 if test "X$prefix" = "XNONE"; then
2443 acl_final_prefix="$ac_default_prefix"
2444 else
2445 acl_final_prefix="$prefix"
2446 fi
2447 if test "X$exec_prefix" = "XNONE"; then
2448 acl_final_exec_prefix='${prefix}'
2449 else
2450 acl_final_exec_prefix="$exec_prefix"
2451 fi
2452 acl_save_prefix="$prefix"
2453 prefix="$acl_final_prefix"
2454 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
2455 prefix="$acl_save_prefix"
2456])
2457
2458dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
2459dnl variables prefix and exec_prefix bound to the values they will have
2460dnl at the end of the configure script.
2461AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
2462[
2463 acl_save_prefix="$prefix"
2464 prefix="$acl_final_prefix"
2465 acl_save_exec_prefix="$exec_prefix"
2466 exec_prefix="$acl_final_exec_prefix"
2467 $1
2468 exec_prefix="$acl_save_exec_prefix"
2469 prefix="$acl_save_prefix"
2470])
2471
2472dnl AC_LIB_PREPARE_MULTILIB creates
2473dnl - a variable acl_libdirstem, containing the basename of the libdir, either
2474dnl "lib" or "lib64" or "lib/64",
2475dnl - a variable acl_libdirstem2, as a secondary possible value for
2476dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
2477dnl "lib/amd64".
2478AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
2479[
2480 dnl There is no formal standard regarding lib and lib64.
2481 dnl On glibc systems, the current practice is that on a system supporting
2482 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2483 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
2484 dnl the compiler's default mode by looking at the compiler's library search
2485 dnl path. If at least one of its elements ends in /lib64 or points to a
2486 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
2487 dnl Otherwise we use the default, namely "lib".
2488 dnl On Solaris systems, the current practice is that on a system supporting
2489 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2490 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
2491 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
2492 AC_REQUIRE([AC_CANONICAL_HOST])
2493 acl_libdirstem=lib
2494 acl_libdirstem2=
2495 case "$host_os" in
2496 solaris*)
2497 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
2498 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
2499 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
2500 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
2501 dnl symlink is missing, so we set acl_libdirstem2 too.
2502 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
2503 [AC_EGREP_CPP([sixtyfour bits], [
2504#ifdef _LP64
2505sixtyfour bits
2506#endif
2507 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
2508 ])
2509 if test $gl_cv_solaris_64bit = yes; then
2510 acl_libdirstem=lib/64
2511 case "$host_cpu" in
2512 sparc*) acl_libdirstem2=lib/sparcv9 ;;
2513 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
2514 esac
2515 fi
2516 ;;
2517 *)
2518 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
2519 if test -n "$searchpath"; then
2520 acl_save_IFS="${IFS= }"; IFS=":"
2521 for searchdir in $searchpath; do
2522 if test -d "$searchdir"; then
2523 case "$searchdir" in
2524 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
2525 */../ | */.. )
2526 # Better ignore directories of this form. They are misleading.
2527 ;;
2528 *) searchdir=`cd "$searchdir" && pwd`
2529 case "$searchdir" in
2530 */lib64 ) acl_libdirstem=lib64 ;;
2531 esac ;;
2532 esac
2533 fi
2534 done
2535 IFS="$acl_save_IFS"
2536 fi
2537 ;;
2538 esac
2539 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
2540])
2541
2542# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2543#
2544# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2545# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
2546# Foundation, Inc.
2547# Written by Gordon Matzigkeit, 1996
2548#
2549# This file is free software; the Free Software Foundation gives
2550# unlimited permission to copy and/or distribute it, with or without
2551# modifications, as long as this notice is preserved.
2552
2553m4_define([_LT_COPYING], [dnl
2554# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2555# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
2556# Foundation, Inc.
2557# Written by Gordon Matzigkeit, 1996
2558#
2559# This file is part of GNU Libtool.
2560#
2561# GNU Libtool is free software; you can redistribute it and/or
2562# modify it under the terms of the GNU General Public License as
2563# published by the Free Software Foundation; either version 2 of
2564# the License, or (at your option) any later version.
2565#
2566# As a special exception to the GNU General Public License,
2567# if you distribute this file as part of a program or library that
2568# is built using GNU Libtool, you may include this file under the
2569# same distribution terms that you use for the rest of that program.
2570#
2571# GNU Libtool is distributed in the hope that it will be useful,
2572# but WITHOUT ANY WARRANTY; without even the implied warranty of
2573# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2574# GNU General Public License for more details.
2575#
2576# You should have received a copy of the GNU General Public License
2577# along with GNU Libtool; see the file COPYING. If not, a copy
2578# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2579# obtained by writing to the Free Software Foundation, Inc.,
2580# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2581])
2582
2583# serial 57 LT_INIT
2584
2585
2586# LT_PREREQ(VERSION)
2587# ------------------
2588# Complain and exit if this libtool version is less that VERSION.
2589m4_defun([LT_PREREQ],
2590[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2591 [m4_default([$3],
2592 [m4_fatal([Libtool version $1 or higher is required],
2593 63)])],
2594 [$2])])
2595
2596
2597# _LT_CHECK_BUILDDIR
2598# ------------------
2599# Complain if the absolute build directory name contains unusual characters
2600m4_defun([_LT_CHECK_BUILDDIR],
2601[case `pwd` in
2602 *\ * | *\ *)
2603 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2604esac
2605])
2606
2607
2608# LT_INIT([OPTIONS])
2609# ------------------
2610AC_DEFUN([LT_INIT],
2611[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2612AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2613AC_BEFORE([$0], [LT_LANG])dnl
2614AC_BEFORE([$0], [LT_OUTPUT])dnl
2615AC_BEFORE([$0], [LTDL_INIT])dnl
2616m4_require([_LT_CHECK_BUILDDIR])dnl
2617
2618dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2619m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2620m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2621dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2622dnl unless we require an AC_DEFUNed macro:
2623AC_REQUIRE([LTOPTIONS_VERSION])dnl
2624AC_REQUIRE([LTSUGAR_VERSION])dnl
2625AC_REQUIRE([LTVERSION_VERSION])dnl
2626AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2627m4_require([_LT_PROG_LTMAIN])dnl
2628
2629_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2630
2631dnl Parse OPTIONS
2632_LT_SET_OPTIONS([$0], [$1])
2633
2634# This can be used to rebuild libtool when needed
2635LIBTOOL_DEPS="$ltmain"
2636
2637# Always use our own libtool.
2638LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2639AC_SUBST(LIBTOOL)dnl
2640
2641_LT_SETUP
2642
2643# Only expand once:
2644m4_define([LT_INIT])
2645])# LT_INIT
2646
2647# Old names:
2648AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2649AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2650dnl aclocal-1.4 backwards compatibility:
2651dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2652dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2653
2654
2655# _LT_CC_BASENAME(CC)
2656# -------------------
2657# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
2658m4_defun([_LT_CC_BASENAME],
2659[for cc_temp in $1""; do
2660 case $cc_temp in
2661 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2662 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2663 \-*) ;;
2664 *) break;;
2665 esac
2666done
2667cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2668])
2669
2670
2671# _LT_FILEUTILS_DEFAULTS
2672# ----------------------
2673# It is okay to use these file commands and assume they have been set
2674# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2675m4_defun([_LT_FILEUTILS_DEFAULTS],
2676[: ${CP="cp -f"}
2677: ${MV="mv -f"}
2678: ${RM="rm -f"}
2679])# _LT_FILEUTILS_DEFAULTS
2680
2681
2682# _LT_SETUP
2683# ---------
2684m4_defun([_LT_SETUP],
2685[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2686AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2687AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2688AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2689
2690_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
2691dnl
2692_LT_DECL([], [host_alias], [0], [The host system])dnl
2693_LT_DECL([], [host], [0])dnl
2694_LT_DECL([], [host_os], [0])dnl
2695dnl
2696_LT_DECL([], [build_alias], [0], [The build system])dnl
2697_LT_DECL([], [build], [0])dnl
2698_LT_DECL([], [build_os], [0])dnl
2699dnl
2700AC_REQUIRE([AC_PROG_CC])dnl
2701AC_REQUIRE([LT_PATH_LD])dnl
2702AC_REQUIRE([LT_PATH_NM])dnl
2703dnl
2704AC_REQUIRE([AC_PROG_LN_S])dnl
2705test -z "$LN_S" && LN_S="ln -s"
2706_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2707dnl
2708AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2709_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2710_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2711dnl
2712m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2713m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2714m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
2715m4_require([_LT_CMD_RELOAD])dnl
2716m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2717m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
2718m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2719m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2720m4_require([_LT_WITH_SYSROOT])dnl
2721
2722_LT_CONFIG_LIBTOOL_INIT([
2723# See if we are running on zsh, and set the options which allow our
2724# commands through without removal of \ escapes INIT.
2725if test -n "\${ZSH_VERSION+set}" ; then
2726 setopt NO_GLOB_SUBST
2727fi
2728])
2729if test -n "${ZSH_VERSION+set}" ; then
2730 setopt NO_GLOB_SUBST
2731fi
2732
2733_LT_CHECK_OBJDIR
2734
2735m4_require([_LT_TAG_COMPILER])dnl
2736
2737case $host_os in
2738aix3*)
2739 # AIX sometimes has problems with the GCC collect2 program. For some
2740 # reason, if we set the COLLECT_NAMES environment variable, the problems
2741 # vanish in a puff of smoke.
2742 if test "X${COLLECT_NAMES+set}" != Xset; then
2743 COLLECT_NAMES=
2744 export COLLECT_NAMES
2745 fi
2746 ;;
2747esac
2748
2749# Global variables:
2750ofile=libtool
2751can_build_shared=yes
2752
2753# All known linkers require a `.a' archive for static linking (except MSVC,
2754# which needs '.lib').
2755libext=a
2756
2757with_gnu_ld="$lt_cv_prog_gnu_ld"
2758
2759old_CC="$CC"
2760old_CFLAGS="$CFLAGS"
2761
2762# Set sane defaults for various variables
2763test -z "$CC" && CC=cc
2764test -z "$LTCC" && LTCC=$CC
2765test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2766test -z "$LD" && LD=ld
2767test -z "$ac_objext" && ac_objext=o
2768
2769_LT_CC_BASENAME([$compiler])
2770
2771# Only perform the check for file, if the check method requires it
2772test -z "$MAGIC_CMD" && MAGIC_CMD=file
2773case $deplibs_check_method in
2774file_magic*)
2775 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2776 _LT_PATH_MAGIC
2777 fi
2778 ;;
2779esac
2780
2781# Use C for the default configuration in the libtool script
2782LT_SUPPORTED_TAG([CC])
2783_LT_LANG_C_CONFIG
2784_LT_LANG_DEFAULT_CONFIG
2785_LT_CONFIG_COMMANDS
2786])# _LT_SETUP
2787
2788
2789# _LT_PREPARE_SED_QUOTE_VARS
2790# --------------------------
2791# Define a few sed substitution that help us do robust quoting.
2792m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2793[# Backslashify metacharacters that are still active within
2794# double-quoted strings.
2795sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2796
2797# Same as above, but do not quote variable references.
2798double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2799
2800# Sed substitution to delay expansion of an escaped shell variable in a
2801# double_quote_subst'ed string.
2802delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2803
2804# Sed substitution to delay expansion of an escaped single quote.
2805delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2806
2807# Sed substitution to avoid accidental globbing in evaled expressions
2808no_glob_subst='s/\*/\\\*/g'
2809])
2810
2811# _LT_PROG_LTMAIN
2812# ---------------
2813# Note that this code is called both from `configure', and `config.status'
2814# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
2815# `config.status' has no value for ac_aux_dir unless we are using Automake,
2816# so we pass a copy along to make sure it has a sensible value anyway.
2817m4_defun([_LT_PROG_LTMAIN],
2818[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2819_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2820ltmain="$ac_aux_dir/ltmain.sh"
2821])# _LT_PROG_LTMAIN
2822
2823
2824
2825# So that we can recreate a full libtool script including additional
2826# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2827# in macros and then make a single call at the end using the `libtool'
2828# label.
2829
2830
2831# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2832# ----------------------------------------
2833# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2834m4_define([_LT_CONFIG_LIBTOOL_INIT],
2835[m4_ifval([$1],
2836 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2837 [$1
2838])])])
2839
2840# Initialize.
2841m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2842
2843
2844# _LT_CONFIG_LIBTOOL([COMMANDS])
2845# ------------------------------
2846# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2847m4_define([_LT_CONFIG_LIBTOOL],
2848[m4_ifval([$1],
2849 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2850 [$1
2851])])])
2852
2853# Initialize.
2854m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2855
2856
2857# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2858# -----------------------------------------------------
2859m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2860[_LT_CONFIG_LIBTOOL([$1])
2861_LT_CONFIG_LIBTOOL_INIT([$2])
2862])
2863
2864
2865# _LT_FORMAT_COMMENT([COMMENT])
2866# -----------------------------
2867# Add leading comment marks to the start of each line, and a trailing
2868# full-stop to the whole comment if one is not present already.
2869m4_define([_LT_FORMAT_COMMENT],
2870[m4_ifval([$1], [
2871m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2872 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2873)])
2874
2875
2876
2877
2878
2879# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2880# -------------------------------------------------------------------
2881# CONFIGNAME is the name given to the value in the libtool script.
2882# VARNAME is the (base) name used in the configure script.
2883# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2884# VARNAME. Any other value will be used directly.
2885m4_define([_LT_DECL],
2886[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2887 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2888 [m4_ifval([$1], [$1], [$2])])
2889 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2890 m4_ifval([$4],
2891 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2892 lt_dict_add_subkey([lt_decl_dict], [$2],
2893 [tagged?], [m4_ifval([$5], [yes], [no])])])
2894])
2895
2896
2897# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2898# --------------------------------------------------------
2899m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2900
2901
2902# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2903# ------------------------------------------------
2904m4_define([lt_decl_tag_varnames],
2905[_lt_decl_filter([tagged?], [yes], $@)])
2906
2907
2908# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2909# ---------------------------------------------------------
2910m4_define([_lt_decl_filter],
2911[m4_case([$#],
2912 [0], [m4_fatal([$0: too few arguments: $#])],
2913 [1], [m4_fatal([$0: too few arguments: $#: $1])],
2914 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2915 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2916 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2917])
2918
2919
2920# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2921# --------------------------------------------------
2922m4_define([lt_decl_quote_varnames],
2923[_lt_decl_filter([value], [1], $@)])
2924
2925
2926# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2927# ---------------------------------------------------
2928m4_define([lt_decl_dquote_varnames],
2929[_lt_decl_filter([value], [2], $@)])
2930
2931
2932# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2933# ---------------------------------------------------
2934m4_define([lt_decl_varnames_tagged],
2935[m4_assert([$# <= 2])dnl
2936_$0(m4_quote(m4_default([$1], [[, ]])),
2937 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2938 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2939m4_define([_lt_decl_varnames_tagged],
2940[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2941
2942
2943# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2944# ------------------------------------------------
2945m4_define([lt_decl_all_varnames],
2946[_$0(m4_quote(m4_default([$1], [[, ]])),
2947 m4_if([$2], [],
2948 m4_quote(lt_decl_varnames),
2949 m4_quote(m4_shift($@))))[]dnl
2950])
2951m4_define([_lt_decl_all_varnames],
2952[lt_join($@, lt_decl_varnames_tagged([$1],
2953 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2954])
2955
2956
2957# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2958# ------------------------------------
2959# Quote a variable value, and forward it to `config.status' so that its
2960# declaration there will have the same value as in `configure'. VARNAME
2961# must have a single quote delimited value for this to work.
2962m4_define([_LT_CONFIG_STATUS_DECLARE],
2963[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2964
2965
2966# _LT_CONFIG_STATUS_DECLARATIONS
2967# ------------------------------
2968# We delimit libtool config variables with single quotes, so when
2969# we write them to config.status, we have to be sure to quote all
2970# embedded single quotes properly. In configure, this macro expands
2971# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2972#
2973# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2974m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2975[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2976 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2977
2978
2979# _LT_LIBTOOL_TAGS
2980# ----------------
2981# Output comment and list of tags supported by the script
2982m4_defun([_LT_LIBTOOL_TAGS],
2983[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2984available_tags="_LT_TAGS"dnl
2985])
2986
2987
2988# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2989# -----------------------------------
2990# Extract the dictionary values for VARNAME (optionally with TAG) and
2991# expand to a commented shell variable setting:
2992#
2993# # Some comment about what VAR is for.
2994# visible_name=$lt_internal_name
2995m4_define([_LT_LIBTOOL_DECLARE],
2996[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2997 [description])))[]dnl
2998m4_pushdef([_libtool_name],
2999 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
3000m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
3001 [0], [_libtool_name=[$]$1],
3002 [1], [_libtool_name=$lt_[]$1],
3003 [2], [_libtool_name=$lt_[]$1],
3004 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
3005m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
3006])
3007
3008
3009# _LT_LIBTOOL_CONFIG_VARS
3010# -----------------------
3011# Produce commented declarations of non-tagged libtool config variables
3012# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
3013# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
3014# section) are produced by _LT_LIBTOOL_TAG_VARS.
3015m4_defun([_LT_LIBTOOL_CONFIG_VARS],
3016[m4_foreach([_lt_var],
3017 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
3018 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
3019
3020
3021# _LT_LIBTOOL_TAG_VARS(TAG)
3022# -------------------------
3023m4_define([_LT_LIBTOOL_TAG_VARS],
3024[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
3025 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
3026
3027
3028# _LT_TAGVAR(VARNAME, [TAGNAME])
3029# ------------------------------
3030m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
3031
3032
3033# _LT_CONFIG_COMMANDS
3034# -------------------
3035# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
3036# variables for single and double quote escaping we saved from calls
3037# to _LT_DECL, we can put quote escaped variables declarations
3038# into `config.status', and then the shell code to quote escape them in
3039# for loops in `config.status'. Finally, any additional code accumulated
3040# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
3041m4_defun([_LT_CONFIG_COMMANDS],
3042[AC_PROVIDE_IFELSE([LT_OUTPUT],
3043 dnl If the libtool generation code has been placed in $CONFIG_LT,
3044 dnl instead of duplicating it all over again into config.status,
3045 dnl then we will have config.status run $CONFIG_LT later, so it
3046 dnl needs to know what name is stored there:
3047 [AC_CONFIG_COMMANDS([libtool],
3048 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
3049 dnl If the libtool generation code is destined for config.status,
3050 dnl expand the accumulated commands and init code now:
3051 [AC_CONFIG_COMMANDS([libtool],
3052 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
3053])#_LT_CONFIG_COMMANDS
3054
3055
3056# Initialize.
3057m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
3058[
3059
3060# The HP-UX ksh and POSIX shell print the target directory to stdout
3061# if CDPATH is set.
3062(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3063
3064sed_quote_subst='$sed_quote_subst'
3065double_quote_subst='$double_quote_subst'
3066delay_variable_subst='$delay_variable_subst'
3067_LT_CONFIG_STATUS_DECLARATIONS
3068LTCC='$LTCC'
3069LTCFLAGS='$LTCFLAGS'
3070compiler='$compiler_DEFAULT'
3071
3072# A function that is used when there is no print builtin or printf.
3073func_fallback_echo ()
3074{
3075 eval 'cat <<_LTECHO_EOF
3076\$[]1
3077_LTECHO_EOF'
3078}
3079
3080# Quote evaled strings.
3081for var in lt_decl_all_varnames([[ \
3082]], lt_decl_quote_varnames); do
3083 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3084 *[[\\\\\\\`\\"\\\$]]*)
3085 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
3086 ;;
3087 *)
3088 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3089 ;;
3090 esac
3091done
3092
3093# Double-quote double-evaled strings.
3094for var in lt_decl_all_varnames([[ \
3095]], lt_decl_dquote_varnames); do
3096 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3097 *[[\\\\\\\`\\"\\\$]]*)
3098 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
3099 ;;
3100 *)
3101 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3102 ;;
3103 esac
3104done
3105
3106_LT_OUTPUT_LIBTOOL_INIT
3107])
3108
3109# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
3110# ------------------------------------
3111# Generate a child script FILE with all initialization necessary to
3112# reuse the environment learned by the parent script, and make the
3113# file executable. If COMMENT is supplied, it is inserted after the
3114# `#!' sequence but before initialization text begins. After this
3115# macro, additional text can be appended to FILE to form the body of
3116# the child script. The macro ends with non-zero status if the
3117# file could not be fully written (such as if the disk is full).
3118m4_ifdef([AS_INIT_GENERATED],
3119[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
3120[m4_defun([_LT_GENERATED_FILE_INIT],
3121[m4_require([AS_PREPARE])]dnl
3122[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
3123[lt_write_fail=0
3124cat >$1 <<_ASEOF || lt_write_fail=1
3125#! $SHELL
3126# Generated by $as_me.
3127$2
3128SHELL=\${CONFIG_SHELL-$SHELL}
3129export SHELL
3130_ASEOF
3131cat >>$1 <<\_ASEOF || lt_write_fail=1
3132AS_SHELL_SANITIZE
3133_AS_PREPARE
3134exec AS_MESSAGE_FD>&1
3135_ASEOF
3136test $lt_write_fail = 0 && chmod +x $1[]dnl
3137m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
3138
3139# LT_OUTPUT
3140# ---------
3141# This macro allows early generation of the libtool script (before
3142# AC_OUTPUT is called), incase it is used in configure for compilation
3143# tests.
3144AC_DEFUN([LT_OUTPUT],
3145[: ${CONFIG_LT=./config.lt}
3146AC_MSG_NOTICE([creating $CONFIG_LT])
3147_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
3148[# Run this file to recreate a libtool stub with the current configuration.])
3149
3150cat >>"$CONFIG_LT" <<\_LTEOF
3151lt_cl_silent=false
3152exec AS_MESSAGE_LOG_FD>>config.log
3153{
3154 echo
3155 AS_BOX([Running $as_me.])
3156} >&AS_MESSAGE_LOG_FD
3157
3158lt_cl_help="\
3159\`$as_me' creates a local libtool stub from the current configuration,
3160for use in further configure time tests before the real libtool is
3161generated.
3162
3163Usage: $[0] [[OPTIONS]]
3164
3165 -h, --help print this help, then exit
3166 -V, --version print version number, then exit
3167 -q, --quiet do not print progress messages
3168 -d, --debug don't remove temporary files
3169
3170Report bugs to <bug-libtool@gnu.org>."
3171
3172lt_cl_version="\
3173m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
3174m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
3175configured by $[0], generated by m4_PACKAGE_STRING.
3176
3177Copyright (C) 2011 Free Software Foundation, Inc.
3178This config.lt script is free software; the Free Software Foundation
3179gives unlimited permision to copy, distribute and modify it."
3180
3181while test $[#] != 0
3182do
3183 case $[1] in
3184 --version | --v* | -V )
3185 echo "$lt_cl_version"; exit 0 ;;
3186 --help | --h* | -h )
3187 echo "$lt_cl_help"; exit 0 ;;
3188 --debug | --d* | -d )
3189 debug=: ;;
3190 --quiet | --q* | --silent | --s* | -q )
3191 lt_cl_silent=: ;;
3192
3193 -*) AC_MSG_ERROR([unrecognized option: $[1]
3194Try \`$[0] --help' for more information.]) ;;
3195
3196 *) AC_MSG_ERROR([unrecognized argument: $[1]
3197Try \`$[0] --help' for more information.]) ;;
3198 esac
3199 shift
3200done
3201
3202if $lt_cl_silent; then
3203 exec AS_MESSAGE_FD>/dev/null
3204fi
3205_LTEOF
3206
3207cat >>"$CONFIG_LT" <<_LTEOF
3208_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
3209_LTEOF
3210
3211cat >>"$CONFIG_LT" <<\_LTEOF
3212AC_MSG_NOTICE([creating $ofile])
3213_LT_OUTPUT_LIBTOOL_COMMANDS
3214AS_EXIT(0)
3215_LTEOF
3216chmod +x "$CONFIG_LT"
3217
3218# configure is writing to config.log, but config.lt does its own redirection,
3219# appending to config.log, which fails on DOS, as config.log is still kept
3220# open by configure. Here we exec the FD to /dev/null, effectively closing
3221# config.log, so it can be properly (re)opened and appended to by config.lt.
3222lt_cl_success=:
3223test "$silent" = yes &&
3224 lt_config_lt_args="$lt_config_lt_args --quiet"
3225exec AS_MESSAGE_LOG_FD>/dev/null
3226$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3227exec AS_MESSAGE_LOG_FD>>config.log
3228$lt_cl_success || AS_EXIT(1)
3229])# LT_OUTPUT
3230
3231
3232# _LT_CONFIG(TAG)
3233# ---------------
3234# If TAG is the built-in tag, create an initial libtool script with a
3235# default configuration from the untagged config vars. Otherwise add code
3236# to config.status for appending the configuration named by TAG from the
3237# matching tagged config vars.
3238m4_defun([_LT_CONFIG],
3239[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3240_LT_CONFIG_SAVE_COMMANDS([
3241 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3242 m4_if(_LT_TAG, [C], [
3243 # See if we are running on zsh, and set the options which allow our
3244 # commands through without removal of \ escapes.
3245 if test -n "${ZSH_VERSION+set}" ; then
3246 setopt NO_GLOB_SUBST
3247 fi
3248
3249 cfgfile="${ofile}T"
3250 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3251 $RM "$cfgfile"
3252
3253 cat <<_LT_EOF >> "$cfgfile"
3254#! $SHELL
3255
3256# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3257# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3258# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3259# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3260#
3261_LT_COPYING
3262_LT_LIBTOOL_TAGS
3263
3264# ### BEGIN LIBTOOL CONFIG
3265_LT_LIBTOOL_CONFIG_VARS
3266_LT_LIBTOOL_TAG_VARS
3267# ### END LIBTOOL CONFIG
3268
3269_LT_EOF
3270
3271 case $host_os in
3272 aix3*)
3273 cat <<\_LT_EOF >> "$cfgfile"
3274# AIX sometimes has problems with the GCC collect2 program. For some
3275# reason, if we set the COLLECT_NAMES environment variable, the problems
3276# vanish in a puff of smoke.
3277if test "X${COLLECT_NAMES+set}" != Xset; then
3278 COLLECT_NAMES=
3279 export COLLECT_NAMES
3280fi
3281_LT_EOF
3282 ;;
3283 esac
3284
3285 _LT_PROG_LTMAIN
3286
3287 # We use sed instead of cat because bash on DJGPP gets confused if
3288 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3289 # text mode, it properly converts lines to CR/LF. This bash problem
3290 # is reportedly fixed, but why not run on old versions too?
3291 sed '$q' "$ltmain" >> "$cfgfile" \
3292 || (rm -f "$cfgfile"; exit 1)
3293
3294 _LT_PROG_REPLACE_SHELLFNS
3295
3296 mv -f "$cfgfile" "$ofile" ||
3297 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3298 chmod +x "$ofile"
3299],
3300[cat <<_LT_EOF >> "$ofile"
3301
3302dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3303dnl in a comment (ie after a #).
3304# ### BEGIN LIBTOOL TAG CONFIG: $1
3305_LT_LIBTOOL_TAG_VARS(_LT_TAG)
3306# ### END LIBTOOL TAG CONFIG: $1
3307_LT_EOF
3308])dnl /m4_if
3309],
3310[m4_if([$1], [], [
3311 PACKAGE='$PACKAGE'
3312 VERSION='$VERSION'
3313 TIMESTAMP='$TIMESTAMP'
3314 RM='$RM'
3315 ofile='$ofile'], [])
3316])dnl /_LT_CONFIG_SAVE_COMMANDS
3317])# _LT_CONFIG
3318
3319
3320# LT_SUPPORTED_TAG(TAG)
3321# ---------------------
3322# Trace this macro to discover what tags are supported by the libtool
3323# --tag option, using:
3324# autoconf --trace 'LT_SUPPORTED_TAG:$1'
3325AC_DEFUN([LT_SUPPORTED_TAG], [])
3326
3327
3328# C support is built-in for now
3329m4_define([_LT_LANG_C_enabled], [])
3330m4_define([_LT_TAGS], [])
3331
3332
3333# LT_LANG(LANG)
3334# -------------
3335# Enable libtool support for the given language if not already enabled.
3336AC_DEFUN([LT_LANG],
3337[AC_BEFORE([$0], [LT_OUTPUT])dnl
3338m4_case([$1],
3339 [C], [_LT_LANG(C)],
3340 [C++], [_LT_LANG(CXX)],
3341 [Go], [_LT_LANG(GO)],
3342 [Java], [_LT_LANG(GCJ)],
3343 [Fortran 77], [_LT_LANG(F77)],
3344 [Fortran], [_LT_LANG(FC)],
3345 [Windows Resource], [_LT_LANG(RC)],
3346 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3347 [_LT_LANG($1)],
3348 [m4_fatal([$0: unsupported language: "$1"])])])dnl
3349])# LT_LANG
3350
3351
3352# _LT_LANG(LANGNAME)
3353# ------------------
3354m4_defun([_LT_LANG],
3355[m4_ifdef([_LT_LANG_]$1[_enabled], [],
3356 [LT_SUPPORTED_TAG([$1])dnl
3357 m4_append([_LT_TAGS], [$1 ])dnl
3358 m4_define([_LT_LANG_]$1[_enabled], [])dnl
3359 _LT_LANG_$1_CONFIG($1)])dnl
3360])# _LT_LANG
3361
3362
3363m4_ifndef([AC_PROG_GO], [
3364# NOTE: This macro has been submitted for inclusion into #
3365# GNU Autoconf as AC_PROG_GO. When it is available in #
3366# a released version of Autoconf we should remove this #
3367# macro and use it instead. #
3368m4_defun([AC_PROG_GO],
3369[AC_LANG_PUSH(Go)dnl
3370AC_ARG_VAR([GOC], [Go compiler command])dnl
3371AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
3372_AC_ARG_VAR_LDFLAGS()dnl
3373AC_CHECK_TOOL(GOC, gccgo)
3374if test -z "$GOC"; then
3375 if test -n "$ac_tool_prefix"; then
3376 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
3377 fi
3378fi
3379if test -z "$GOC"; then
3380 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
3381fi
3382])#m4_defun
3383])#m4_ifndef
3384
3385
3386# _LT_LANG_DEFAULT_CONFIG
3387# -----------------------
3388m4_defun([_LT_LANG_DEFAULT_CONFIG],
3389[AC_PROVIDE_IFELSE([AC_PROG_CXX],
3390 [LT_LANG(CXX)],
3391 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3392
3393AC_PROVIDE_IFELSE([AC_PROG_F77],
3394 [LT_LANG(F77)],
3395 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3396
3397AC_PROVIDE_IFELSE([AC_PROG_FC],
3398 [LT_LANG(FC)],
3399 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3400
3401dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3402dnl pulling things in needlessly.
3403AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3404 [LT_LANG(GCJ)],
3405 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3406 [LT_LANG(GCJ)],
3407 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3408 [LT_LANG(GCJ)],
3409 [m4_ifdef([AC_PROG_GCJ],
3410 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3411 m4_ifdef([A][M_PROG_GCJ],
3412 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3413 m4_ifdef([LT_PROG_GCJ],
3414 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3415
3416AC_PROVIDE_IFELSE([AC_PROG_GO],
3417 [LT_LANG(GO)],
3418 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
3419
3420AC_PROVIDE_IFELSE([LT_PROG_RC],
3421 [LT_LANG(RC)],
3422 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3423])# _LT_LANG_DEFAULT_CONFIG
3424
3425# Obsolete macros:
3426AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3427AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3428AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3429AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3430AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3431dnl aclocal-1.4 backwards compatibility:
3432dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3433dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3434dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3435dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3436dnl AC_DEFUN([AC_LIBTOOL_RC], [])
3437
3438
3439# _LT_TAG_COMPILER
3440# ----------------
3441m4_defun([_LT_TAG_COMPILER],
3442[AC_REQUIRE([AC_PROG_CC])dnl
3443
3444_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3445_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3446_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3447_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3448
3449# If no C compiler was specified, use CC.
3450LTCC=${LTCC-"$CC"}
3451
3452# If no C compiler flags were specified, use CFLAGS.
3453LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3454
3455# Allow CC to be a program name with arguments.
3456compiler=$CC
3457])# _LT_TAG_COMPILER
3458
3459
3460# _LT_COMPILER_BOILERPLATE
3461# ------------------------
3462# Check for compiler boilerplate output or warnings with
3463# the simple compiler test code.
3464m4_defun([_LT_COMPILER_BOILERPLATE],
3465[m4_require([_LT_DECL_SED])dnl
3466ac_outfile=conftest.$ac_objext
3467echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3468eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3469_lt_compiler_boilerplate=`cat conftest.err`
3470$RM conftest*
3471])# _LT_COMPILER_BOILERPLATE
3472
3473
3474# _LT_LINKER_BOILERPLATE
3475# ----------------------
3476# Check for linker boilerplate output or warnings with
3477# the simple link test code.
3478m4_defun([_LT_LINKER_BOILERPLATE],
3479[m4_require([_LT_DECL_SED])dnl
3480ac_outfile=conftest.$ac_objext
3481echo "$lt_simple_link_test_code" >conftest.$ac_ext
3482eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3483_lt_linker_boilerplate=`cat conftest.err`
3484$RM -r conftest*
3485])# _LT_LINKER_BOILERPLATE
3486
3487# _LT_REQUIRED_DARWIN_CHECKS
3488# -------------------------
3489m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3490 case $host_os in
3491 rhapsody* | darwin*)
3492 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3493 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3494 AC_CHECK_TOOL([LIPO], [lipo], [:])
3495 AC_CHECK_TOOL([OTOOL], [otool], [:])
3496 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3497 _LT_DECL([], [DSYMUTIL], [1],
3498 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3499 _LT_DECL([], [NMEDIT], [1],
3500 [Tool to change global to local symbols on Mac OS X])
3501 _LT_DECL([], [LIPO], [1],
3502 [Tool to manipulate fat objects and archives on Mac OS X])
3503 _LT_DECL([], [OTOOL], [1],
3504 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3505 _LT_DECL([], [OTOOL64], [1],
3506 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3507
3508 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3509 [lt_cv_apple_cc_single_mod=no
3510 if test -z "${LT_MULTI_MODULE}"; then
3511 # By default we will add the -single_module flag. You can override
3512 # by either setting the environment variable LT_MULTI_MODULE
3513 # non-empty at configure time, or by adding -multi_module to the
3514 # link flags.
3515 rm -rf libconftest.dylib*
3516 echo "int foo(void){return 1;}" > conftest.c
3517 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3518-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3519 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3520 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3521 _lt_result=$?
3522 # If there is a non-empty error log, and "single_module"
3523 # appears in it, assume the flag caused a linker warning
3524 if test -s conftest.err && $GREP single_module conftest.err; then
3525 cat conftest.err >&AS_MESSAGE_LOG_FD
3526 # Otherwise, if the output was created with a 0 exit code from
3527 # the compiler, it worked.
3528 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
3529 lt_cv_apple_cc_single_mod=yes
3530 else
3531 cat conftest.err >&AS_MESSAGE_LOG_FD
3532 fi
3533 rm -rf libconftest.dylib*
3534 rm -f conftest.*
3535 fi])
3536
3537 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3538 [lt_cv_ld_exported_symbols_list],
3539 [lt_cv_ld_exported_symbols_list=no
3540 save_LDFLAGS=$LDFLAGS
3541 echo "_main" > conftest.sym
3542 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3543 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3544 [lt_cv_ld_exported_symbols_list=yes],
3545 [lt_cv_ld_exported_symbols_list=no])
3546 LDFLAGS="$save_LDFLAGS"
3547 ])
3548
3549 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
3550 [lt_cv_ld_force_load=no
3551 cat > conftest.c << _LT_EOF
3552int forced_loaded() { return 2;}
3553_LT_EOF
3554 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
3555 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
3556 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
3557 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
3558 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
3559 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
3560 cat > conftest.c << _LT_EOF
3561int main() { return 0;}
3562_LT_EOF
3563 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
3564 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
3565 _lt_result=$?
3566 if test -s conftest.err && $GREP force_load conftest.err; then
3567 cat conftest.err >&AS_MESSAGE_LOG_FD
3568 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
3569 lt_cv_ld_force_load=yes
3570 else
3571 cat conftest.err >&AS_MESSAGE_LOG_FD
3572 fi
3573 rm -f conftest.err libconftest.a conftest conftest.c
3574 rm -rf conftest.dSYM
3575 ])
3576 case $host_os in
3577 rhapsody* | darwin1.[[012]])
3578 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3579 darwin1.*)
3580 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3581 darwin*) # darwin 5.x on
3582 # if running on 10.5 or later, the deployment target defaults
3583 # to the OS version, if on x86, and 10.4, the deployment
3584 # target defaults to 10.4. Don't you love it?
3585 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3586 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3587 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3588 10.[[012]]*)
3589 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3590 10.*)
3591 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3592 esac
3593 ;;
3594 esac
3595 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3596 _lt_dar_single_mod='$single_module'
3597 fi
3598 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3599 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3600 else
3601 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3602 fi
3603 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
3604 _lt_dsymutil='~$DSYMUTIL $lib || :'
3605 else
3606 _lt_dsymutil=
3607 fi
3608 ;;
3609 esac
3610])
3611
3612
3613# _LT_DARWIN_LINKER_FEATURES([TAG])
3614# ---------------------------------
3615# Checks for linker and compiler features on darwin
3616m4_defun([_LT_DARWIN_LINKER_FEATURES],
3617[
3618 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3619 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3620 _LT_TAGVAR(hardcode_direct, $1)=no
3621 _LT_TAGVAR(hardcode_automatic, $1)=yes
3622 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3623 if test "$lt_cv_ld_force_load" = "yes"; then
3624 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
3625 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
3626 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
3627 else
3628 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3629 fi
3630 _LT_TAGVAR(link_all_deplibs, $1)=yes
3631 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3632 case $cc_basename in
3633 ifort*) _lt_dar_can_shared=yes ;;
3634 *) _lt_dar_can_shared=$GCC ;;
3635 esac
3636 if test "$_lt_dar_can_shared" = "yes"; then
3637 output_verbose_link_cmd=func_echo_all
3638 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
3639 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3640 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
3641 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
3642 m4_if([$1], [CXX],
3643[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3644 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
3645 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
3646 fi
3647],[])
3648 else
3649 _LT_TAGVAR(ld_shlibs, $1)=no
3650 fi
3651])
3652
3653# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
3654# ----------------------------------
3655# Links a minimal program and checks the executable
3656# for the system default hardcoded library path. In most cases,
3657# this is /usr/lib:/lib, but when the MPI compilers are used
3658# the location of the communication and MPI libs are included too.
3659# If we don't find anything, use the default library path according
3660# to the aix ld manual.
3661# Store the results from the different compilers for each TAGNAME.
3662# Allow to override them for all tags through lt_cv_aix_libpath.
3663m4_defun([_LT_SYS_MODULE_PATH_AIX],
3664[m4_require([_LT_DECL_SED])dnl
3665if test "${lt_cv_aix_libpath+set}" = set; then
3666 aix_libpath=$lt_cv_aix_libpath
3667else
3668 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
3669 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
3670 lt_aix_libpath_sed='[
3671 /Import File Strings/,/^$/ {
3672 /^0/ {
3673 s/^0 *\([^ ]*\) *$/\1/
3674 p
3675 }
3676 }]'
3677 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3678 # Check for a 64-bit object if we didn't find anything.
3679 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3680 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3681 fi],[])
3682 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3683 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
3684 fi
3685 ])
3686 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
3687fi
3688])# _LT_SYS_MODULE_PATH_AIX
3689
3690
3691# _LT_SHELL_INIT(ARG)
3692# -------------------
3693m4_define([_LT_SHELL_INIT],
3694[m4_divert_text([M4SH-INIT], [$1
3695])])# _LT_SHELL_INIT
3696
3697
3698
3699# _LT_PROG_ECHO_BACKSLASH
3700# -----------------------
3701# Find how we can fake an echo command that does not interpret backslash.
3702# In particular, with Autoconf 2.60 or later we add some code to the start
3703# of the generated configure script which will find a shell with a builtin
3704# printf (which we can use as an echo command).
3705m4_defun([_LT_PROG_ECHO_BACKSLASH],
3706[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3707ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3708ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3709
3710AC_MSG_CHECKING([how to print strings])
3711# Test print first, because it will be a builtin if present.
3712if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3713 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3714 ECHO='print -r --'
3715elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3716 ECHO='printf %s\n'
3717else
3718 # Use this function as a fallback that always works.
3719 func_fallback_echo ()
3720 {
3721 eval 'cat <<_LTECHO_EOF
3722$[]1
3723_LTECHO_EOF'
3724 }
3725 ECHO='func_fallback_echo'
3726fi
3727
3728# func_echo_all arg...
3729# Invoke $ECHO with all args, space-separated.
3730func_echo_all ()
3731{
3732 $ECHO "$*"
3733}
3734
3735case "$ECHO" in
3736 printf*) AC_MSG_RESULT([printf]) ;;
3737 print*) AC_MSG_RESULT([print -r]) ;;
3738 *) AC_MSG_RESULT([cat]) ;;
3739esac
3740
3741m4_ifdef([_AS_DETECT_SUGGESTED],
3742[_AS_DETECT_SUGGESTED([
3743 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3744 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3745 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3746 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3747 PATH=/empty FPATH=/empty; export PATH FPATH
3748 test "X`printf %s $ECHO`" = "X$ECHO" \
3749 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3750
3751_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3752_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3753])# _LT_PROG_ECHO_BACKSLASH
3754
3755
3756# _LT_WITH_SYSROOT
3757# ----------------
3758AC_DEFUN([_LT_WITH_SYSROOT],
3759[AC_MSG_CHECKING([for sysroot])
3760AC_ARG_WITH([sysroot],
3761[ --with-sysroot[=DIR] Search for dependent libraries within DIR
3762 (or the compiler's sysroot if not specified).],
3763[], [with_sysroot=no])
3764
3765dnl lt_sysroot will always be passed unquoted. We quote it here
3766dnl in case the user passed a directory name.
3767lt_sysroot=
3768case ${with_sysroot} in #(
3769 yes)
3770 if test "$GCC" = yes; then
3771 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
3772 fi
3773 ;; #(
3774 /*)
3775 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
3776 ;; #(
3777 no|'')
3778 ;; #(
3779 *)
3780 AC_MSG_RESULT([${with_sysroot}])
3781 AC_MSG_ERROR([The sysroot must be an absolute path.])
3782 ;;
3783esac
3784
3785 AC_MSG_RESULT([${lt_sysroot:-no}])
3786_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
3787[dependent libraries, and in which our libraries should be installed.])])
3788
3789# _LT_ENABLE_LOCK
3790# ---------------
3791m4_defun([_LT_ENABLE_LOCK],
3792[AC_ARG_ENABLE([libtool-lock],
3793 [AS_HELP_STRING([--disable-libtool-lock],
3794 [avoid locking (might break parallel builds)])])
3795test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3796
3797# Some flags need to be propagated to the compiler or linker for good
3798# libtool support.
3799case $host in
3800ia64-*-hpux*)
3801 # Find out which ABI we are using.
3802 echo 'int i;' > conftest.$ac_ext
3803 if AC_TRY_EVAL(ac_compile); then
3804 case `/usr/bin/file conftest.$ac_objext` in
3805 *ELF-32*)
3806 HPUX_IA64_MODE="32"
3807 ;;
3808 *ELF-64*)
3809 HPUX_IA64_MODE="64"
3810 ;;
3811 esac
3812 fi
3813 rm -rf conftest*
3814 ;;
3815*-*-irix6*)
3816 # Find out which ABI we are using.
3817 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3818 if AC_TRY_EVAL(ac_compile); then
3819 if test "$lt_cv_prog_gnu_ld" = yes; then
3820 case `/usr/bin/file conftest.$ac_objext` in
3821 *32-bit*)
3822 LD="${LD-ld} -melf32bsmip"
3823 ;;
3824 *N32*)
3825 LD="${LD-ld} -melf32bmipn32"
3826 ;;
3827 *64-bit*)
3828 LD="${LD-ld} -melf64bmip"
3829 ;;
3830 esac
3831 else
3832 case `/usr/bin/file conftest.$ac_objext` in
3833 *32-bit*)
3834 LD="${LD-ld} -32"
3835 ;;
3836 *N32*)
3837 LD="${LD-ld} -n32"
3838 ;;
3839 *64-bit*)
3840 LD="${LD-ld} -64"
3841 ;;
3842 esac
3843 fi
3844 fi
3845 rm -rf conftest*
3846 ;;
3847
3848x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
3849s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3850 # Find out which ABI we are using.
3851 echo 'int i;' > conftest.$ac_ext
3852 if AC_TRY_EVAL(ac_compile); then
3853 case `/usr/bin/file conftest.o` in
3854 *32-bit*)
3855 case $host in
3856 x86_64-*kfreebsd*-gnu)
3857 LD="${LD-ld} -m elf_i386_fbsd"
3858 ;;
3859 x86_64-*linux*)
3860 case `/usr/bin/file conftest.o` in
3861 *x86-64*)
3862 LD="${LD-ld} -m elf32_x86_64"
3863 ;;
3864 *)
3865 LD="${LD-ld} -m elf_i386"
3866 ;;
3867 esac
3868 ;;
3869 powerpc64le-*)
3870 LD="${LD-ld} -m elf32lppclinux"
3871 ;;
3872 powerpc64-*)
3873 LD="${LD-ld} -m elf32ppclinux"
3874 ;;
3875 s390x-*linux*)
3876 LD="${LD-ld} -m elf_s390"
3877 ;;
3878 sparc64-*linux*)
3879 LD="${LD-ld} -m elf32_sparc"
3880 ;;
3881 esac
3882 ;;
3883 *64-bit*)
3884 case $host in
3885 x86_64-*kfreebsd*-gnu)
3886 LD="${LD-ld} -m elf_x86_64_fbsd"
3887 ;;
3888 x86_64-*linux*)
3889 LD="${LD-ld} -m elf_x86_64"
3890 ;;
3891 powerpcle-*)
3892 LD="${LD-ld} -m elf64lppc"
3893 ;;
3894 powerpc-*)
3895 LD="${LD-ld} -m elf64ppc"
3896 ;;
3897 s390*-*linux*|s390*-*tpf*)
3898 LD="${LD-ld} -m elf64_s390"
3899 ;;
3900 sparc*-*linux*)
3901 LD="${LD-ld} -m elf64_sparc"
3902 ;;
3903 esac
3904 ;;
3905 esac
3906 fi
3907 rm -rf conftest*
3908 ;;
3909
3910*-*-sco3.2v5*)
3911 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3912 SAVE_CFLAGS="$CFLAGS"
3913 CFLAGS="$CFLAGS -belf"
3914 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3915 [AC_LANG_PUSH(C)
3916 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3917 AC_LANG_POP])
3918 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3919 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3920 CFLAGS="$SAVE_CFLAGS"
3921 fi
3922 ;;
3923*-*solaris*)
3924 # Find out which ABI we are using.
3925 echo 'int i;' > conftest.$ac_ext
3926 if AC_TRY_EVAL(ac_compile); then
3927 case `/usr/bin/file conftest.o` in
3928 *64-bit*)
3929 case $lt_cv_prog_gnu_ld in
3930 yes*)
3931 case $host in
3932 i?86-*-solaris*)
3933 LD="${LD-ld} -m elf_x86_64"
3934 ;;
3935 sparc*-*-solaris*)
3936 LD="${LD-ld} -m elf64_sparc"
3937 ;;
3938 esac
3939 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
3940 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
3941 LD="${LD-ld}_sol2"
3942 fi
3943 ;;
3944 *)
3945 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3946 LD="${LD-ld} -64"
3947 fi
3948 ;;
3949 esac
3950 ;;
3951 esac
3952 fi
3953 rm -rf conftest*
3954 ;;
3955esac
3956
3957need_locks="$enable_libtool_lock"
3958])# _LT_ENABLE_LOCK
3959
3960
3961# _LT_PROG_AR
3962# -----------
3963m4_defun([_LT_PROG_AR],
3964[AC_CHECK_TOOLS(AR, [ar], false)
3965: ${AR=ar}
3966: ${AR_FLAGS=cru}
3967_LT_DECL([], [AR], [1], [The archiver])
3968_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
3969
3970AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
3971 [lt_cv_ar_at_file=no
3972 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
3973 [echo conftest.$ac_objext > conftest.lst
3974 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
3975 AC_TRY_EVAL([lt_ar_try])
3976 if test "$ac_status" -eq 0; then
3977 # Ensure the archiver fails upon bogus file names.
3978 rm -f conftest.$ac_objext libconftest.a
3979 AC_TRY_EVAL([lt_ar_try])
3980 if test "$ac_status" -ne 0; then
3981 lt_cv_ar_at_file=@
3982 fi
3983 fi
3984 rm -f conftest.* libconftest.a
3985 ])
3986 ])
3987
3988if test "x$lt_cv_ar_at_file" = xno; then
3989 archiver_list_spec=
3990else
3991 archiver_list_spec=$lt_cv_ar_at_file
3992fi
3993_LT_DECL([], [archiver_list_spec], [1],
3994 [How to feed a file listing to the archiver])
3995])# _LT_PROG_AR
3996
3997
3998# _LT_CMD_OLD_ARCHIVE
3999# -------------------
4000m4_defun([_LT_CMD_OLD_ARCHIVE],
4001[_LT_PROG_AR
4002
4003AC_CHECK_TOOL(STRIP, strip, :)
4004test -z "$STRIP" && STRIP=:
4005_LT_DECL([], [STRIP], [1], [A symbol stripping program])
4006
4007AC_CHECK_TOOL(RANLIB, ranlib, :)
4008test -z "$RANLIB" && RANLIB=:
4009_LT_DECL([], [RANLIB], [1],
4010 [Commands used to install an old-style archive])
4011
4012# Determine commands to create old-style static archives.
4013old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
4014old_postinstall_cmds='chmod 644 $oldlib'
4015old_postuninstall_cmds=
4016
4017if test -n "$RANLIB"; then
4018 case $host_os in
4019 openbsd*)
4020 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
4021 ;;
4022 *)
4023 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
4024 ;;
4025 esac
4026 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
4027fi
4028
4029case $host_os in
4030 darwin*)
4031 lock_old_archive_extraction=yes ;;
4032 *)
4033 lock_old_archive_extraction=no ;;
4034esac
4035_LT_DECL([], [old_postinstall_cmds], [2])
4036_LT_DECL([], [old_postuninstall_cmds], [2])
4037_LT_TAGDECL([], [old_archive_cmds], [2],
4038 [Commands used to build an old-style archive])
4039_LT_DECL([], [lock_old_archive_extraction], [0],
4040 [Whether to use a lock for old archive extraction])
4041])# _LT_CMD_OLD_ARCHIVE
4042
4043
4044# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
4045# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
4046# ----------------------------------------------------------------
4047# Check whether the given compiler option works
4048AC_DEFUN([_LT_COMPILER_OPTION],
4049[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4050m4_require([_LT_DECL_SED])dnl
4051AC_CACHE_CHECK([$1], [$2],
4052 [$2=no
4053 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
4054 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4055 lt_compiler_flag="$3"
4056 # Insert the option either (1) after the last *FLAGS variable, or
4057 # (2) before a word containing "conftest.", or (3) at the end.
4058 # Note that $ac_compile itself does not contain backslashes and begins
4059 # with a dollar sign (not a hyphen), so the echo should work correctly.
4060 # The option is referenced via a variable to avoid confusing sed.
4061 lt_compile=`echo "$ac_compile" | $SED \
4062 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4063 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4064 -e 's:$: $lt_compiler_flag:'`
4065 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4066 (eval "$lt_compile" 2>conftest.err)
4067 ac_status=$?
4068 cat conftest.err >&AS_MESSAGE_LOG_FD
4069 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4070 if (exit $ac_status) && test -s "$ac_outfile"; then
4071 # The compiler can only warn and ignore the option if not recognized
4072 # So say no if there are warnings other than the usual output.
4073 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
4074 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
4075 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
4076 $2=yes
4077 fi
4078 fi
4079 $RM conftest*
4080])
4081
4082if test x"[$]$2" = xyes; then
4083 m4_if([$5], , :, [$5])
4084else
4085 m4_if([$6], , :, [$6])
4086fi
4087])# _LT_COMPILER_OPTION
4088
4089# Old name:
4090AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
4091dnl aclocal-1.4 backwards compatibility:
4092dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
4093
4094
4095# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
4096# [ACTION-SUCCESS], [ACTION-FAILURE])
4097# ----------------------------------------------------
4098# Check whether the given linker option works
4099AC_DEFUN([_LT_LINKER_OPTION],
4100[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4101m4_require([_LT_DECL_SED])dnl
4102AC_CACHE_CHECK([$1], [$2],
4103 [$2=no
4104 save_LDFLAGS="$LDFLAGS"
4105 LDFLAGS="$LDFLAGS $3"
4106 echo "$lt_simple_link_test_code" > conftest.$ac_ext
4107 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
4108 # The linker can only warn and ignore the option if not recognized
4109 # So say no if there are warnings
4110 if test -s conftest.err; then
4111 # Append any errors to the config.log.
4112 cat conftest.err 1>&AS_MESSAGE_LOG_FD
4113 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
4114 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
4115 if diff conftest.exp conftest.er2 >/dev/null; then
4116 $2=yes
4117 fi
4118 else
4119 $2=yes
4120 fi
4121 fi
4122 $RM -r conftest*
4123 LDFLAGS="$save_LDFLAGS"
4124])
4125
4126if test x"[$]$2" = xyes; then
4127 m4_if([$4], , :, [$4])
4128else
4129 m4_if([$5], , :, [$5])
4130fi
4131])# _LT_LINKER_OPTION
4132
4133# Old name:
4134AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
4135dnl aclocal-1.4 backwards compatibility:
4136dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
4137
4138
4139# LT_CMD_MAX_LEN
4140#---------------
4141AC_DEFUN([LT_CMD_MAX_LEN],
4142[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4143# find the maximum length of command line arguments
4144AC_MSG_CHECKING([the maximum length of command line arguments])
4145AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
4146 i=0
4147 teststring="ABCD"
4148
4149 case $build_os in
4150 msdosdjgpp*)
4151 # On DJGPP, this test can blow up pretty badly due to problems in libc
4152 # (any single argument exceeding 2000 bytes causes a buffer overrun
4153 # during glob expansion). Even if it were fixed, the result of this
4154 # check would be larger than it should be.
4155 lt_cv_sys_max_cmd_len=12288; # 12K is about right
4156 ;;
4157
4158 gnu*)
4159 # Under GNU Hurd, this test is not required because there is
4160 # no limit to the length of command line arguments.
4161 # Libtool will interpret -1 as no limit whatsoever
4162 lt_cv_sys_max_cmd_len=-1;
4163 ;;
4164
4165 cygwin* | mingw* | cegcc*)
4166 # On Win9x/ME, this test blows up -- it succeeds, but takes
4167 # about 5 minutes as the teststring grows exponentially.
4168 # Worse, since 9x/ME are not pre-emptively multitasking,
4169 # you end up with a "frozen" computer, even though with patience
4170 # the test eventually succeeds (with a max line length of 256k).
4171 # Instead, let's just punt: use the minimum linelength reported by
4172 # all of the supported platforms: 8192 (on NT/2K/XP).
4173 lt_cv_sys_max_cmd_len=8192;
4174 ;;
4175
4176 mint*)
4177 # On MiNT this can take a long time and run out of memory.
4178 lt_cv_sys_max_cmd_len=8192;
4179 ;;
4180
4181 amigaos*)
4182 # On AmigaOS with pdksh, this test takes hours, literally.
4183 # So we just punt and use a minimum line length of 8192.
4184 lt_cv_sys_max_cmd_len=8192;
4185 ;;
4186
4187 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
4188 # This has been around since 386BSD, at least. Likely further.
4189 if test -x /sbin/sysctl; then
4190 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
4191 elif test -x /usr/sbin/sysctl; then
4192 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
4193 else
4194 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
4195 fi
4196 # And add a safety zone
4197 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4198 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4199 ;;
4200
4201 interix*)
4202 # We know the value 262144 and hardcode it with a safety zone (like BSD)
4203 lt_cv_sys_max_cmd_len=196608
4204 ;;
4205
4206 os2*)
4207 # The test takes a long time on OS/2.
4208 lt_cv_sys_max_cmd_len=8192
4209 ;;
4210
4211 osf*)
4212 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
4213 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
4214 # nice to cause kernel panics so lets avoid the loop below.
4215 # First set a reasonable default.
4216 lt_cv_sys_max_cmd_len=16384
4217 #
4218 if test -x /sbin/sysconfig; then
4219 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
4220 *1*) lt_cv_sys_max_cmd_len=-1 ;;
4221 esac
4222 fi
4223 ;;
4224 sco3.2v5*)
4225 lt_cv_sys_max_cmd_len=102400
4226 ;;
4227 sysv5* | sco5v6* | sysv4.2uw2*)
4228 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
4229 if test -n "$kargmax"; then
4230 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
4231 else
4232 lt_cv_sys_max_cmd_len=32768
4233 fi
4234 ;;
4235 *)
4236 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
4237 if test -n "$lt_cv_sys_max_cmd_len" && \
4238 test undefined != "$lt_cv_sys_max_cmd_len"; then
4239 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4240 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4241 else
4242 # Make teststring a little bigger before we do anything with it.
4243 # a 1K string should be a reasonable start.
4244 for i in 1 2 3 4 5 6 7 8 ; do
4245 teststring=$teststring$teststring
4246 done
4247 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
4248 # If test is not a shell built-in, we'll probably end up computing a
4249 # maximum length that is only half of the actual maximum length, but
4250 # we can't tell.
4251 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
4252 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
4253 test $i != 17 # 1/2 MB should be enough
4254 do
4255 i=`expr $i + 1`
4256 teststring=$teststring$teststring
4257 done
4258 # Only check the string length outside the loop.
4259 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
4260 teststring=
4261 # Add a significant safety factor because C++ compilers can tack on
4262 # massive amounts of additional arguments before passing them to the
4263 # linker. It appears as though 1/2 is a usable value.
4264 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
4265 fi
4266 ;;
4267 esac
4268])
4269if test -n $lt_cv_sys_max_cmd_len ; then
4270 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
4271else
4272 AC_MSG_RESULT(none)
4273fi
4274max_cmd_len=$lt_cv_sys_max_cmd_len
4275_LT_DECL([], [max_cmd_len], [0],
4276 [What is the maximum length of a command?])
4277])# LT_CMD_MAX_LEN
4278
4279# Old name:
4280AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
4281dnl aclocal-1.4 backwards compatibility:
4282dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
4283
4284
4285# _LT_HEADER_DLFCN
4286# ----------------
4287m4_defun([_LT_HEADER_DLFCN],
4288[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
4289])# _LT_HEADER_DLFCN
4290
4291
4292# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
4293# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
4294# ----------------------------------------------------------------
4295m4_defun([_LT_TRY_DLOPEN_SELF],
4296[m4_require([_LT_HEADER_DLFCN])dnl
4297if test "$cross_compiling" = yes; then :
4298 [$4]
4299else
4300 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4301 lt_status=$lt_dlunknown
4302 cat > conftest.$ac_ext <<_LT_EOF
4303[#line $LINENO "configure"
4304#include "confdefs.h"
4305
4306#if HAVE_DLFCN_H
4307#include <dlfcn.h>
4308#endif
4309
4310#include <stdio.h>
4311
4312#ifdef RTLD_GLOBAL
4313# define LT_DLGLOBAL RTLD_GLOBAL
4314#else
4315# ifdef DL_GLOBAL
4316# define LT_DLGLOBAL DL_GLOBAL
4317# else
4318# define LT_DLGLOBAL 0
4319# endif
4320#endif
4321
4322/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4323 find out it does not work in some platform. */
4324#ifndef LT_DLLAZY_OR_NOW
4325# ifdef RTLD_LAZY
4326# define LT_DLLAZY_OR_NOW RTLD_LAZY
4327# else
4328# ifdef DL_LAZY
4329# define LT_DLLAZY_OR_NOW DL_LAZY
4330# else
4331# ifdef RTLD_NOW
4332# define LT_DLLAZY_OR_NOW RTLD_NOW
4333# else
4334# ifdef DL_NOW
4335# define LT_DLLAZY_OR_NOW DL_NOW
4336# else
4337# define LT_DLLAZY_OR_NOW 0
4338# endif
4339# endif
4340# endif
4341# endif
4342#endif
4343
4344/* When -fvisbility=hidden is used, assume the code has been annotated
4345 correspondingly for the symbols needed. */
4346#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
4347int fnord () __attribute__((visibility("default")));
4348#endif
4349
4350int fnord () { return 42; }
4351int main ()
4352{
4353 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4354 int status = $lt_dlunknown;
4355
4356 if (self)
4357 {
4358 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
4359 else
4360 {
4361 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4362 else puts (dlerror ());
4363 }
4364 /* dlclose (self); */
4365 }
4366 else
4367 puts (dlerror ());
4368
4369 return status;
4370}]
4371_LT_EOF
4372 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4373 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4374 lt_status=$?
4375 case x$lt_status in
4376 x$lt_dlno_uscore) $1 ;;
4377 x$lt_dlneed_uscore) $2 ;;
4378 x$lt_dlunknown|x*) $3 ;;
4379 esac
4380 else :
4381 # compilation failed
4382 $3
4383 fi
4384fi
4385rm -fr conftest*
4386])# _LT_TRY_DLOPEN_SELF
4387
4388
4389# LT_SYS_DLOPEN_SELF
4390# ------------------
4391AC_DEFUN([LT_SYS_DLOPEN_SELF],
4392[m4_require([_LT_HEADER_DLFCN])dnl
4393if test "x$enable_dlopen" != xyes; then
4394 enable_dlopen=unknown
4395 enable_dlopen_self=unknown
4396 enable_dlopen_self_static=unknown
4397else
4398 lt_cv_dlopen=no
4399 lt_cv_dlopen_libs=
4400
4401 case $host_os in
4402 beos*)
4403 lt_cv_dlopen="load_add_on"
4404 lt_cv_dlopen_libs=
4405 lt_cv_dlopen_self=yes
4406 ;;
4407
4408 mingw* | pw32* | cegcc*)
4409 lt_cv_dlopen="LoadLibrary"
4410 lt_cv_dlopen_libs=
4411 ;;
4412
4413 cygwin*)
4414 lt_cv_dlopen="dlopen"
4415 lt_cv_dlopen_libs=
4416 ;;
4417
4418 darwin*)
4419 # if libdl is installed we need to link against it
4420 AC_CHECK_LIB([dl], [dlopen],
4421 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4422 lt_cv_dlopen="dyld"
4423 lt_cv_dlopen_libs=
4424 lt_cv_dlopen_self=yes
4425 ])
4426 ;;
4427
4428 *)
4429 AC_CHECK_FUNC([shl_load],
4430 [lt_cv_dlopen="shl_load"],
4431 [AC_CHECK_LIB([dld], [shl_load],
4432 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4433 [AC_CHECK_FUNC([dlopen],
4434 [lt_cv_dlopen="dlopen"],
4435 [AC_CHECK_LIB([dl], [dlopen],
4436 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4437 [AC_CHECK_LIB([svld], [dlopen],
4438 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4439 [AC_CHECK_LIB([dld], [dld_link],
4440 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4441 ])
4442 ])
4443 ])
4444 ])
4445 ])
4446 ;;
4447 esac
4448
4449 if test "x$lt_cv_dlopen" != xno; then
4450 enable_dlopen=yes
4451 else
4452 enable_dlopen=no
4453 fi
4454
4455 case $lt_cv_dlopen in
4456 dlopen)
4457 save_CPPFLAGS="$CPPFLAGS"
4458 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4459
4460 save_LDFLAGS="$LDFLAGS"
4461 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4462
4463 save_LIBS="$LIBS"
4464 LIBS="$lt_cv_dlopen_libs $LIBS"
4465
4466 AC_CACHE_CHECK([whether a program can dlopen itself],
4467 lt_cv_dlopen_self, [dnl
4468 _LT_TRY_DLOPEN_SELF(
4469 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4470 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4471 ])
4472
4473 if test "x$lt_cv_dlopen_self" = xyes; then
4474 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4475 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4476 lt_cv_dlopen_self_static, [dnl
4477 _LT_TRY_DLOPEN_SELF(
4478 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4479 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
4480 ])
4481 fi
4482
4483 CPPFLAGS="$save_CPPFLAGS"
4484 LDFLAGS="$save_LDFLAGS"
4485 LIBS="$save_LIBS"
4486 ;;
4487 esac
4488
4489 case $lt_cv_dlopen_self in
4490 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4491 *) enable_dlopen_self=unknown ;;
4492 esac
4493
4494 case $lt_cv_dlopen_self_static in
4495 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4496 *) enable_dlopen_self_static=unknown ;;
4497 esac
4498fi
4499_LT_DECL([dlopen_support], [enable_dlopen], [0],
4500 [Whether dlopen is supported])
4501_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4502 [Whether dlopen of programs is supported])
4503_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4504 [Whether dlopen of statically linked programs is supported])
4505])# LT_SYS_DLOPEN_SELF
4506
4507# Old name:
4508AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4509dnl aclocal-1.4 backwards compatibility:
4510dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4511
4512
4513# _LT_COMPILER_C_O([TAGNAME])
4514# ---------------------------
4515# Check to see if options -c and -o are simultaneously supported by compiler.
4516# This macro does not hard code the compiler like AC_PROG_CC_C_O.
4517m4_defun([_LT_COMPILER_C_O],
4518[m4_require([_LT_DECL_SED])dnl
4519m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4520m4_require([_LT_TAG_COMPILER])dnl
4521AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4522 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4523 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4524 $RM -r conftest 2>/dev/null
4525 mkdir conftest
4526 cd conftest
4527 mkdir out
4528 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4529
4530 lt_compiler_flag="-o out/conftest2.$ac_objext"
4531 # Insert the option either (1) after the last *FLAGS variable, or
4532 # (2) before a word containing "conftest.", or (3) at the end.
4533 # Note that $ac_compile itself does not contain backslashes and begins
4534 # with a dollar sign (not a hyphen), so the echo should work correctly.
4535 lt_compile=`echo "$ac_compile" | $SED \
4536 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4537 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4538 -e 's:$: $lt_compiler_flag:'`
4539 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4540 (eval "$lt_compile" 2>out/conftest.err)
4541 ac_status=$?
4542 cat out/conftest.err >&AS_MESSAGE_LOG_FD
4543 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4544 if (exit $ac_status) && test -s out/conftest2.$ac_objext
4545 then
4546 # The compiler can only warn and ignore the option if not recognized
4547 # So say no if there are warnings
4548 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
4549 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4550 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4551 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4552 fi
4553 fi
4554 chmod u+w . 2>&AS_MESSAGE_LOG_FD
4555 $RM conftest*
4556 # SGI C++ compiler will create directory out/ii_files/ for
4557 # template instantiation
4558 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4559 $RM out/* && rmdir out
4560 cd ..
4561 $RM -r conftest
4562 $RM conftest*
4563])
4564_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4565 [Does compiler simultaneously support -c and -o options?])
4566])# _LT_COMPILER_C_O
4567
4568
4569# _LT_COMPILER_FILE_LOCKS([TAGNAME])
4570# ----------------------------------
4571# Check to see if we can do hard links to lock some files if needed
4572m4_defun([_LT_COMPILER_FILE_LOCKS],
4573[m4_require([_LT_ENABLE_LOCK])dnl
4574m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4575_LT_COMPILER_C_O([$1])
4576
4577hard_links="nottested"
4578if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4579 # do not overwrite the value of need_locks provided by the user
4580 AC_MSG_CHECKING([if we can lock with hard links])
4581 hard_links=yes
4582 $RM conftest*
4583 ln conftest.a conftest.b 2>/dev/null && hard_links=no
4584 touch conftest.a
4585 ln conftest.a conftest.b 2>&5 || hard_links=no
4586 ln conftest.a conftest.b 2>/dev/null && hard_links=no
4587 AC_MSG_RESULT([$hard_links])
4588 if test "$hard_links" = no; then
4589 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4590 need_locks=warn
4591 fi
4592else
4593 need_locks=no
4594fi
4595_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4596])# _LT_COMPILER_FILE_LOCKS
4597
4598
4599# _LT_CHECK_OBJDIR
4600# ----------------
4601m4_defun([_LT_CHECK_OBJDIR],
4602[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4603[rm -f .libs 2>/dev/null
4604mkdir .libs 2>/dev/null
4605if test -d .libs; then
4606 lt_cv_objdir=.libs
4607else
4608 # MS-DOS does not allow filenames that begin with a dot.
4609 lt_cv_objdir=_libs
4610fi
4611rmdir .libs 2>/dev/null])
4612objdir=$lt_cv_objdir
4613_LT_DECL([], [objdir], [0],
4614 [The name of the directory that contains temporary libtool files])dnl
4615m4_pattern_allow([LT_OBJDIR])dnl
4616AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4617 [Define to the sub-directory in which libtool stores uninstalled libraries.])
4618])# _LT_CHECK_OBJDIR
4619
4620
4621# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4622# --------------------------------------
4623# Check hardcoding attributes.
4624m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4625[AC_MSG_CHECKING([how to hardcode library paths into programs])
4626_LT_TAGVAR(hardcode_action, $1)=
4627if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4628 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4629 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4630
4631 # We can hardcode non-existent directories.
4632 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4633 # If the only mechanism to avoid hardcoding is shlibpath_var, we
4634 # have to relink, otherwise we might link with an installed library
4635 # when we should be linking with a yet-to-be-installed one
4636 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4637 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4638 # Linking always hardcodes the temporary library directory.
4639 _LT_TAGVAR(hardcode_action, $1)=relink
4640 else
4641 # We can link without hardcoding, and we can hardcode nonexisting dirs.
4642 _LT_TAGVAR(hardcode_action, $1)=immediate
4643 fi
4644else
4645 # We cannot hardcode anything, or else we can only hardcode existing
4646 # directories.
4647 _LT_TAGVAR(hardcode_action, $1)=unsupported
4648fi
4649AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4650
4651if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4652 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4653 # Fast installation is not supported
4654 enable_fast_install=no
4655elif test "$shlibpath_overrides_runpath" = yes ||
4656 test "$enable_shared" = no; then
4657 # Fast installation is not necessary
4658 enable_fast_install=needless
4659fi
4660_LT_TAGDECL([], [hardcode_action], [0],
4661 [How to hardcode a shared library path into an executable])
4662])# _LT_LINKER_HARDCODE_LIBPATH
4663
4664
4665# _LT_CMD_STRIPLIB
4666# ----------------
4667m4_defun([_LT_CMD_STRIPLIB],
4668[m4_require([_LT_DECL_EGREP])
4669striplib=
4670old_striplib=
4671AC_MSG_CHECKING([whether stripping libraries is possible])
4672if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4673 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4674 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4675 AC_MSG_RESULT([yes])
4676else
4677# FIXME - insert some real tests, host_os isn't really good enough
4678 case $host_os in
4679 darwin*)
4680 if test -n "$STRIP" ; then
4681 striplib="$STRIP -x"
4682 old_striplib="$STRIP -S"
4683 AC_MSG_RESULT([yes])
4684 else
4685 AC_MSG_RESULT([no])
4686 fi
4687 ;;
4688 *)
4689 AC_MSG_RESULT([no])
4690 ;;
4691 esac
4692fi
4693_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4694_LT_DECL([], [striplib], [1])
4695])# _LT_CMD_STRIPLIB
4696
4697
4698# _LT_SYS_DYNAMIC_LINKER([TAG])
4699# -----------------------------
4700# PORTME Fill in your ld.so characteristics
4701m4_defun([_LT_SYS_DYNAMIC_LINKER],
4702[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4703m4_require([_LT_DECL_EGREP])dnl
4704m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4705m4_require([_LT_DECL_OBJDUMP])dnl
4706m4_require([_LT_DECL_SED])dnl
4707m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4708AC_MSG_CHECKING([dynamic linker characteristics])
4709m4_if([$1],
4710 [], [
4711if test "$GCC" = yes; then
4712 case $host_os in
4713 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4714 *) lt_awk_arg="/^libraries:/" ;;
4715 esac
4716 case $host_os in
4717 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
4718 *) lt_sed_strip_eq="s,=/,/,g" ;;
4719 esac
4720 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4721 case $lt_search_path_spec in
4722 *\;*)
4723 # if the path contains ";" then we assume it to be the separator
4724 # otherwise default to the standard path separator (i.e. ":") - it is
4725 # assumed that no part of a normal pathname contains ";" but that should
4726 # okay in the real world where ";" in dirpaths is itself problematic.
4727 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4728 ;;
4729 *)
4730 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4731 ;;
4732 esac
4733 # Ok, now we have the path, separated by spaces, we can step through it
4734 # and add multilib dir if necessary.
4735 lt_tmp_lt_search_path_spec=
4736 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4737 for lt_sys_path in $lt_search_path_spec; do
4738 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4739 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4740 else
4741 test -d "$lt_sys_path" && \
4742 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4743 fi
4744 done
4745 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4746BEGIN {RS=" "; FS="/|\n";} {
4747 lt_foo="";
4748 lt_count=0;
4749 for (lt_i = NF; lt_i > 0; lt_i--) {
4750 if ($lt_i != "" && $lt_i != ".") {
4751 if ($lt_i == "..") {
4752 lt_count++;
4753 } else {
4754 if (lt_count == 0) {
4755 lt_foo="/" $lt_i lt_foo;
4756 } else {
4757 lt_count--;
4758 }
4759 }
4760 }
4761 }
4762 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4763 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4764}'`
4765 # AWK program above erroneously prepends '/' to C:/dos/paths
4766 # for these hosts.
4767 case $host_os in
4768 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4769 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
4770 esac
4771 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4772else
4773 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4774fi])
4775library_names_spec=
4776libname_spec='lib$name'
4777soname_spec=
4778shrext_cmds=".so"
4779postinstall_cmds=
4780postuninstall_cmds=
4781finish_cmds=
4782finish_eval=
4783shlibpath_var=
4784shlibpath_overrides_runpath=unknown
4785version_type=none
4786dynamic_linker="$host_os ld.so"
4787sys_lib_dlsearch_path_spec="/lib /usr/lib"
4788need_lib_prefix=unknown
4789hardcode_into_libs=no
4790
4791# when you set need_version to no, make sure it does not cause -set_version
4792# flags to be left without arguments
4793need_version=unknown
4794
4795case $host_os in
4796aix3*)
4797 version_type=linux # correct to gnu/linux during the next big refactor
4798 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4799 shlibpath_var=LIBPATH
4800
4801 # AIX 3 has no versioning support, so we append a major version to the name.
4802 soname_spec='${libname}${release}${shared_ext}$major'
4803 ;;
4804
4805aix[[4-9]]*)
4806 version_type=linux # correct to gnu/linux during the next big refactor
4807 need_lib_prefix=no
4808 need_version=no
4809 hardcode_into_libs=yes
4810 if test "$host_cpu" = ia64; then
4811 # AIX 5 supports IA64
4812 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4813 shlibpath_var=LD_LIBRARY_PATH
4814 else
4815 # With GCC up to 2.95.x, collect2 would create an import file
4816 # for dependence libraries. The import file would start with
4817 # the line `#! .'. This would cause the generated library to
4818 # depend on `.', always an invalid library. This was fixed in
4819 # development snapshots of GCC prior to 3.0.
4820 case $host_os in
4821 aix4 | aix4.[[01]] | aix4.[[01]].*)
4822 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4823 echo ' yes '
4824 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4825 :
4826 else
4827 can_build_shared=no
4828 fi
4829 ;;
4830 esac
4831 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4832 # soname into executable. Probably we can add versioning support to
4833 # collect2, so additional links can be useful in future.
4834 if test "$aix_use_runtimelinking" = yes; then
4835 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4836 # instead of lib<name>.a to let people know that these are not
4837 # typical AIX shared libraries.
4838 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4839 else
4840 # We preserve .a as extension for shared libraries through AIX4.2
4841 # and later when we are not doing run time linking.
4842 library_names_spec='${libname}${release}.a $libname.a'
4843 soname_spec='${libname}${release}${shared_ext}$major'
4844 fi
4845 shlibpath_var=LIBPATH
4846 fi
4847 ;;
4848
4849amigaos*)
4850 case $host_cpu in
4851 powerpc)
4852 # Since July 2007 AmigaOS4 officially supports .so libraries.
4853 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4854 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4855 ;;
4856 m68k)
4857 library_names_spec='$libname.ixlibrary $libname.a'
4858 # Create ${libname}_ixlibrary.a entries in /sys/libs.
4859 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
4860 ;;
4861 esac
4862 ;;
4863
4864beos*)
4865 library_names_spec='${libname}${shared_ext}'
4866 dynamic_linker="$host_os ld.so"
4867 shlibpath_var=LIBRARY_PATH
4868 ;;
4869
4870bsdi[[45]]*)
4871 version_type=linux # correct to gnu/linux during the next big refactor
4872 need_version=no
4873 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4874 soname_spec='${libname}${release}${shared_ext}$major'
4875 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4876 shlibpath_var=LD_LIBRARY_PATH
4877 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4878 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4879 # the default ld.so.conf also contains /usr/contrib/lib and
4880 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4881 # libtool to hard-code these into programs
4882 ;;
4883
4884cygwin* | mingw* | pw32* | cegcc*)
4885 version_type=windows
4886 shrext_cmds=".dll"
4887 need_version=no
4888 need_lib_prefix=no
4889
4890 case $GCC,$cc_basename in
4891 yes,*)
4892 # gcc
4893 library_names_spec='$libname.dll.a'
4894 # DLL is installed to $(libdir)/../bin by postinstall_cmds
4895 postinstall_cmds='base_file=`basename \${file}`~
4896 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4897 dldir=$destdir/`dirname \$dlpath`~
4898 test -d \$dldir || mkdir -p \$dldir~
4899 $install_prog $dir/$dlname \$dldir/$dlname~
4900 chmod a+x \$dldir/$dlname~
4901 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4902 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4903 fi'
4904 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4905 dlpath=$dir/\$dldll~
4906 $RM \$dlpath'
4907 shlibpath_overrides_runpath=yes
4908
4909 case $host_os in
4910 cygwin*)
4911 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4912 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4913m4_if([$1], [],[
4914 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4915 ;;
4916 mingw* | cegcc*)
4917 # MinGW DLLs use traditional 'lib' prefix
4918 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4919 ;;
4920 pw32*)
4921 # pw32 DLLs use 'pw' prefix rather than 'lib'
4922 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4923 ;;
4924 esac
4925 dynamic_linker='Win32 ld.exe'
4926 ;;
4927
4928 *,cl*)
4929 # Native MSVC
4930 libname_spec='$name'
4931 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4932 library_names_spec='${libname}.dll.lib'
4933
4934 case $build_os in
4935 mingw*)
4936 sys_lib_search_path_spec=
4937 lt_save_ifs=$IFS
4938 IFS=';'
4939 for lt_path in $LIB
4940 do
4941 IFS=$lt_save_ifs
4942 # Let DOS variable expansion print the short 8.3 style file name.
4943 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
4944 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
4945 done
4946 IFS=$lt_save_ifs
4947 # Convert to MSYS style.
4948 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
4949 ;;
4950 cygwin*)
4951 # Convert to unix form, then to dos form, then back to unix form
4952 # but this time dos style (no spaces!) so that the unix form looks
4953 # like /cygdrive/c/PROGRA~1:/cygdr...
4954 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
4955 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
4956 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4957 ;;
4958 *)
4959 sys_lib_search_path_spec="$LIB"
4960 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4961 # It is most probably a Windows format PATH.
4962 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4963 else
4964 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4965 fi
4966 # FIXME: find the short name or the path components, as spaces are
4967 # common. (e.g. "Program Files" -> "PROGRA~1")
4968 ;;
4969 esac
4970
4971 # DLL is installed to $(libdir)/../bin by postinstall_cmds
4972 postinstall_cmds='base_file=`basename \${file}`~
4973 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4974 dldir=$destdir/`dirname \$dlpath`~
4975 test -d \$dldir || mkdir -p \$dldir~
4976 $install_prog $dir/$dlname \$dldir/$dlname'
4977 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4978 dlpath=$dir/\$dldll~
4979 $RM \$dlpath'
4980 shlibpath_overrides_runpath=yes
4981 dynamic_linker='Win32 link.exe'
4982 ;;
4983
4984 *)
4985 # Assume MSVC wrapper
4986 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4987 dynamic_linker='Win32 ld.exe'
4988 ;;
4989 esac
4990 # FIXME: first we should search . and the directory the executable is in
4991 shlibpath_var=PATH
4992 ;;
4993
4994darwin* | rhapsody*)
4995 dynamic_linker="$host_os dyld"
4996 version_type=darwin
4997 need_lib_prefix=no
4998 need_version=no
4999 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
5000 soname_spec='${libname}${release}${major}$shared_ext'
5001 shlibpath_overrides_runpath=yes
5002 shlibpath_var=DYLD_LIBRARY_PATH
5003 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
5004m4_if([$1], [],[
5005 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
5006 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
5007 ;;
5008
5009dgux*)
5010 version_type=linux # correct to gnu/linux during the next big refactor
5011 need_lib_prefix=no
5012 need_version=no
5013 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
5014 soname_spec='${libname}${release}${shared_ext}$major'
5015 shlibpath_var=LD_LIBRARY_PATH
5016 ;;
5017
5018freebsd* | dragonfly*)
5019 # DragonFly does not have aout. When/if they implement a new
5020 # versioning mechanism, adjust this.
5021 if test -x /usr/bin/objformat; then
5022 objformat=`/usr/bin/objformat`
5023 else
5024 case $host_os in
5025 freebsd[[23]].*) objformat=aout ;;
5026 *) objformat=elf ;;
5027 esac
5028 fi
5029 version_type=freebsd-$objformat
5030 case $version_type in
5031 freebsd-elf*)
5032 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5033 need_version=no
5034 need_lib_prefix=no
5035 ;;
5036 freebsd-*)
5037 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
5038 need_version=yes
5039 ;;
5040 esac
5041 shlibpath_var=LD_LIBRARY_PATH
5042 case $host_os in
5043 freebsd2.*)
5044 shlibpath_overrides_runpath=yes
5045 ;;
5046 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
5047 shlibpath_overrides_runpath=yes
5048 hardcode_into_libs=yes
5049 ;;
5050 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
5051 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
5052 shlibpath_overrides_runpath=no
5053 hardcode_into_libs=yes
5054 ;;
5055 *) # from 4.6 on, and DragonFly
5056 shlibpath_overrides_runpath=yes
5057 hardcode_into_libs=yes
5058 ;;
5059 esac
5060 ;;
5061
5062haiku*)
5063 version_type=linux # correct to gnu/linux during the next big refactor
5064 need_lib_prefix=no
5065 need_version=no
5066 dynamic_linker="$host_os runtime_loader"
5067 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
5068 soname_spec='${libname}${release}${shared_ext}$major'
5069 shlibpath_var=LIBRARY_PATH
5070 shlibpath_overrides_runpath=yes
5071 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
5072 hardcode_into_libs=yes
5073 ;;
5074
5075hpux9* | hpux10* | hpux11*)
5076 # Give a soname corresponding to the major version so that dld.sl refuses to
5077 # link against other versions.
5078 version_type=sunos
5079 need_lib_prefix=no
5080 need_version=no
5081 case $host_cpu in
5082 ia64*)
5083 shrext_cmds='.so'
5084 hardcode_into_libs=yes
5085 dynamic_linker="$host_os dld.so"
5086 shlibpath_var=LD_LIBRARY_PATH
5087 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
5088 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5089 soname_spec='${libname}${release}${shared_ext}$major'
5090 if test "X$HPUX_IA64_MODE" = X32; then
5091 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
5092 else
5093 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
5094 fi
5095 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
5096 ;;
5097 hppa*64*)
5098 shrext_cmds='.sl'
5099 hardcode_into_libs=yes
5100 dynamic_linker="$host_os dld.sl"
5101 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
5102 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
5103 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5104 soname_spec='${libname}${release}${shared_ext}$major'
5105 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
5106 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
5107 ;;
5108 *)
5109 shrext_cmds='.sl'
5110 dynamic_linker="$host_os dld.sl"
5111 shlibpath_var=SHLIB_PATH
5112 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
5113 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5114 soname_spec='${libname}${release}${shared_ext}$major'
5115 ;;
5116 esac
5117 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
5118 postinstall_cmds='chmod 555 $lib'
5119 # or fails outright, so override atomically:
5120 install_override_mode=555
5121 ;;
5122
5123interix[[3-9]]*)
5124 version_type=linux # correct to gnu/linux during the next big refactor
5125 need_lib_prefix=no
5126 need_version=no
5127 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
5128 soname_spec='${libname}${release}${shared_ext}$major'
5129 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
5130 shlibpath_var=LD_LIBRARY_PATH
5131 shlibpath_overrides_runpath=no
5132 hardcode_into_libs=yes
5133 ;;
5134
5135irix5* | irix6* | nonstopux*)
5136 case $host_os in
5137 nonstopux*) version_type=nonstopux ;;
5138 *)
5139 if test "$lt_cv_prog_gnu_ld" = yes; then
5140 version_type=linux # correct to gnu/linux during the next big refactor
5141 else
5142 version_type=irix
5143 fi ;;
5144 esac
5145 need_lib_prefix=no
5146 need_version=no
5147 soname_spec='${libname}${release}${shared_ext}$major'
5148 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
5149 case $host_os in
5150 irix5* | nonstopux*)
5151 libsuff= shlibsuff=
5152 ;;
5153 *)
5154 case $LD in # libtool.m4 will add one of these switches to LD
5155 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
5156 libsuff= shlibsuff= libmagic=32-bit;;
5157 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
5158 libsuff=32 shlibsuff=N32 libmagic=N32;;
5159 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
5160 libsuff=64 shlibsuff=64 libmagic=64-bit;;
5161 *) libsuff= shlibsuff= libmagic=never-match;;
5162 esac
5163 ;;
5164 esac
5165 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
5166 shlibpath_overrides_runpath=no
5167 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
5168 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
5169 hardcode_into_libs=yes
5170 ;;
5171
5172# No shared lib support for Linux oldld, aout, or coff.
5173linux*oldld* | linux*aout* | linux*coff*)
5174 dynamic_linker=no
5175 ;;
5176
5177# This must be glibc/ELF.
5178linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5179 version_type=linux # correct to gnu/linux during the next big refactor
5180 need_lib_prefix=no
5181 need_version=no
5182 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5183 soname_spec='${libname}${release}${shared_ext}$major'
5184 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
5185 shlibpath_var=LD_LIBRARY_PATH
5186 shlibpath_overrides_runpath=no
5187
5188 # Some binutils ld are patched to set DT_RUNPATH
5189 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
5190 [lt_cv_shlibpath_overrides_runpath=no
5191 save_LDFLAGS=$LDFLAGS
5192 save_libdir=$libdir
5193 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
5194 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
5195 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
5196 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
5197 [lt_cv_shlibpath_overrides_runpath=yes])])
5198 LDFLAGS=$save_LDFLAGS
5199 libdir=$save_libdir
5200 ])
5201 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
5202
5203 # This implies no fast_install, which is unacceptable.
5204 # Some rework will be needed to allow for fast_install
5205 # before this can be enabled.
5206 hardcode_into_libs=yes
5207
5208 # Append ld.so.conf contents to the search path
5209 if test -f /etc/ld.so.conf; then
5210 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
5211 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
5212 fi
5213
5214 # We used to test for /lib/ld.so.1 and disable shared libraries on
5215 # powerpc, because MkLinux only supported shared libraries with the
5216 # GNU dynamic linker. Since this was broken with cross compilers,
5217 # most powerpc-linux boxes support dynamic linking these days and
5218 # people can always --disable-shared, the test was removed, and we
5219 # assume the GNU/Linux dynamic linker is in use.
5220 dynamic_linker='GNU/Linux ld.so'
5221 ;;
5222
5223netbsdelf*-gnu)
5224 version_type=linux
5225 need_lib_prefix=no
5226 need_version=no
5227 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
5228 soname_spec='${libname}${release}${shared_ext}$major'
5229 shlibpath_var=LD_LIBRARY_PATH
5230 shlibpath_overrides_runpath=no
5231 hardcode_into_libs=yes
5232 dynamic_linker='NetBSD ld.elf_so'
5233 ;;
5234
5235netbsd*)
5236 version_type=sunos
5237 need_lib_prefix=no
5238 need_version=no
5239 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5240 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5241 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5242 dynamic_linker='NetBSD (a.out) ld.so'
5243 else
5244 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
5245 soname_spec='${libname}${release}${shared_ext}$major'
5246 dynamic_linker='NetBSD ld.elf_so'
5247 fi
5248 shlibpath_var=LD_LIBRARY_PATH
5249 shlibpath_overrides_runpath=yes
5250 hardcode_into_libs=yes
5251 ;;
5252
5253newsos6)
5254 version_type=linux # correct to gnu/linux during the next big refactor
5255 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5256 shlibpath_var=LD_LIBRARY_PATH
5257 shlibpath_overrides_runpath=yes
5258 ;;
5259
5260*nto* | *qnx*)
5261 version_type=qnx
5262 need_lib_prefix=no
5263 need_version=no
5264 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5265 soname_spec='${libname}${release}${shared_ext}$major'
5266 shlibpath_var=LD_LIBRARY_PATH
5267 shlibpath_overrides_runpath=no
5268 hardcode_into_libs=yes
5269 dynamic_linker='ldqnx.so'
5270 ;;
5271
5272openbsd*)
5273 version_type=sunos
5274 sys_lib_dlsearch_path_spec="/usr/lib"
5275 need_lib_prefix=no
5276 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
5277 case $host_os in
5278 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
5279 *) need_version=no ;;
5280 esac
5281 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5282 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5283 shlibpath_var=LD_LIBRARY_PATH
5284 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5285 case $host_os in
5286 openbsd2.[[89]] | openbsd2.[[89]].*)
5287 shlibpath_overrides_runpath=no
5288 ;;
5289 *)
5290 shlibpath_overrides_runpath=yes
5291 ;;
5292 esac
5293 else
5294 shlibpath_overrides_runpath=yes
5295 fi
5296 ;;
5297
5298os2*)
5299 libname_spec='$name'
5300 shrext_cmds=".dll"
5301 need_lib_prefix=no
5302 library_names_spec='$libname${shared_ext} $libname.a'
5303 dynamic_linker='OS/2 ld.exe'
5304 shlibpath_var=LIBPATH
5305 ;;
5306
5307osf3* | osf4* | osf5*)
5308 version_type=osf
5309 need_lib_prefix=no
5310 need_version=no
5311 soname_spec='${libname}${release}${shared_ext}$major'
5312 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5313 shlibpath_var=LD_LIBRARY_PATH
5314 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
5315 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
5316 ;;
5317
5318rdos*)
5319 dynamic_linker=no
5320 ;;
5321
5322solaris*)
5323 version_type=linux # correct to gnu/linux during the next big refactor
5324 need_lib_prefix=no
5325 need_version=no
5326 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5327 soname_spec='${libname}${release}${shared_ext}$major'
5328 shlibpath_var=LD_LIBRARY_PATH
5329 shlibpath_overrides_runpath=yes
5330 hardcode_into_libs=yes
5331 # ldd complains unless libraries are executable
5332 postinstall_cmds='chmod +x $lib'
5333 ;;
5334
5335sunos4*)
5336 version_type=sunos
5337 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5338 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
5339 shlibpath_var=LD_LIBRARY_PATH
5340 shlibpath_overrides_runpath=yes
5341 if test "$with_gnu_ld" = yes; then
5342 need_lib_prefix=no
5343 fi
5344 need_version=yes
5345 ;;
5346
5347sysv4 | sysv4.3*)
5348 version_type=linux # correct to gnu/linux during the next big refactor
5349 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5350 soname_spec='${libname}${release}${shared_ext}$major'
5351 shlibpath_var=LD_LIBRARY_PATH
5352 case $host_vendor in
5353 sni)
5354 shlibpath_overrides_runpath=no
5355 need_lib_prefix=no
5356 runpath_var=LD_RUN_PATH
5357 ;;
5358 siemens)
5359 need_lib_prefix=no
5360 ;;
5361 motorola)
5362 need_lib_prefix=no
5363 need_version=no
5364 shlibpath_overrides_runpath=no
5365 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
5366 ;;
5367 esac
5368 ;;
5369
5370sysv4*MP*)
5371 if test -d /usr/nec ;then
5372 version_type=linux # correct to gnu/linux during the next big refactor
5373 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
5374 soname_spec='$libname${shared_ext}.$major'
5375 shlibpath_var=LD_LIBRARY_PATH
5376 fi
5377 ;;
5378
5379sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5380 version_type=freebsd-elf
5381 need_lib_prefix=no
5382 need_version=no
5383 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5384 soname_spec='${libname}${release}${shared_ext}$major'
5385 shlibpath_var=LD_LIBRARY_PATH
5386 shlibpath_overrides_runpath=yes
5387 hardcode_into_libs=yes
5388 if test "$with_gnu_ld" = yes; then
5389 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5390 else
5391 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5392 case $host_os in
5393 sco3.2v5*)
5394 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5395 ;;
5396 esac
5397 fi
5398 sys_lib_dlsearch_path_spec='/usr/lib'
5399 ;;
5400
5401tpf*)
5402 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
5403 version_type=linux # correct to gnu/linux during the next big refactor
5404 need_lib_prefix=no
5405 need_version=no
5406 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5407 shlibpath_var=LD_LIBRARY_PATH
5408 shlibpath_overrides_runpath=no
5409 hardcode_into_libs=yes
5410 ;;
5411
5412uts4*)
5413 version_type=linux # correct to gnu/linux during the next big refactor
5414 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5415 soname_spec='${libname}${release}${shared_ext}$major'
5416 shlibpath_var=LD_LIBRARY_PATH
5417 ;;
5418
5419*)
5420 dynamic_linker=no
5421 ;;
5422esac
5423AC_MSG_RESULT([$dynamic_linker])
5424test "$dynamic_linker" = no && can_build_shared=no
5425
5426variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5427if test "$GCC" = yes; then
5428 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5429fi
5430
5431if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5432 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5433fi
5434if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5435 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5436fi
5437
5438_LT_DECL([], [variables_saved_for_relink], [1],
5439 [Variables whose values should be saved in libtool wrapper scripts and
5440 restored at link time])
5441_LT_DECL([], [need_lib_prefix], [0],
5442 [Do we need the "lib" prefix for modules?])
5443_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5444_LT_DECL([], [version_type], [0], [Library versioning type])
5445_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
5446_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5447_LT_DECL([], [shlibpath_overrides_runpath], [0],
5448 [Is shlibpath searched before the hard-coded library search path?])
5449_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5450_LT_DECL([], [library_names_spec], [1],
5451 [[List of archive names. First name is the real one, the rest are links.
5452 The last name is the one that the linker finds with -lNAME]])
5453_LT_DECL([], [soname_spec], [1],
5454 [[The coded name of the library, if different from the real name]])
5455_LT_DECL([], [install_override_mode], [1],
5456 [Permission mode override for installation of shared libraries])
5457_LT_DECL([], [postinstall_cmds], [2],
5458 [Command to use after installation of a shared archive])
5459_LT_DECL([], [postuninstall_cmds], [2],
5460 [Command to use after uninstallation of a shared archive])
5461_LT_DECL([], [finish_cmds], [2],
5462 [Commands used to finish a libtool library installation in a directory])
5463_LT_DECL([], [finish_eval], [1],
5464 [[As "finish_cmds", except a single script fragment to be evaled but
5465 not shown]])
5466_LT_DECL([], [hardcode_into_libs], [0],
5467 [Whether we should hardcode library paths into libraries])
5468_LT_DECL([], [sys_lib_search_path_spec], [2],
5469 [Compile-time system search path for libraries])
5470_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5471 [Run-time system search path for libraries])
5472])# _LT_SYS_DYNAMIC_LINKER
5473
5474
5475# _LT_PATH_TOOL_PREFIX(TOOL)
5476# --------------------------
5477# find a file program which can recognize shared library
5478AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5479[m4_require([_LT_DECL_EGREP])dnl
5480AC_MSG_CHECKING([for $1])
5481AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5482[case $MAGIC_CMD in
5483[[\\/*] | ?:[\\/]*])
5484 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5485 ;;
5486*)
5487 lt_save_MAGIC_CMD="$MAGIC_CMD"
5488 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5489dnl $ac_dummy forces splitting on constant user-supplied paths.
5490dnl POSIX.2 word splitting is done only on the output of word expansions,
5491dnl not every word. This closes a longstanding sh security hole.
5492 ac_dummy="m4_if([$2], , $PATH, [$2])"
5493 for ac_dir in $ac_dummy; do
5494 IFS="$lt_save_ifs"
5495 test -z "$ac_dir" && ac_dir=.
5496 if test -f $ac_dir/$1; then
5497 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5498 if test -n "$file_magic_test_file"; then
5499 case $deplibs_check_method in
5500 "file_magic "*)
5501 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5502 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5503 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5504 $EGREP "$file_magic_regex" > /dev/null; then
5505 :
5506 else
5507 cat <<_LT_EOF 1>&2
5508
5509*** Warning: the command libtool uses to detect shared libraries,
5510*** $file_magic_cmd, produces output that libtool cannot recognize.
5511*** The result is that libtool may fail to recognize shared libraries
5512*** as such. This will affect the creation of libtool libraries that
5513*** depend on shared libraries, but programs linked with such libtool
5514*** libraries will work regardless of this problem. Nevertheless, you
5515*** may want to report the problem to your system manager and/or to
5516*** bug-libtool@gnu.org
5517
5518_LT_EOF
5519 fi ;;
5520 esac
5521 fi
5522 break
5523 fi
5524 done
5525 IFS="$lt_save_ifs"
5526 MAGIC_CMD="$lt_save_MAGIC_CMD"
5527 ;;
5528esac])
5529MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5530if test -n "$MAGIC_CMD"; then
5531 AC_MSG_RESULT($MAGIC_CMD)
5532else
5533 AC_MSG_RESULT(no)
5534fi
5535_LT_DECL([], [MAGIC_CMD], [0],
5536 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5537])# _LT_PATH_TOOL_PREFIX
5538
5539# Old name:
5540AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5541dnl aclocal-1.4 backwards compatibility:
5542dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5543
5544
5545# _LT_PATH_MAGIC
5546# --------------
5547# find a file program which can recognize a shared library
5548m4_defun([_LT_PATH_MAGIC],
5549[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5550if test -z "$lt_cv_path_MAGIC_CMD"; then
5551 if test -n "$ac_tool_prefix"; then
5552 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5553 else
5554 MAGIC_CMD=:
5555 fi
5556fi
5557])# _LT_PATH_MAGIC
5558
5559
5560# LT_PATH_LD
5561# ----------
5562# find the pathname to the GNU or non-GNU linker
5563AC_DEFUN([LT_PATH_LD],
5564[AC_REQUIRE([AC_PROG_CC])dnl
5565AC_REQUIRE([AC_CANONICAL_HOST])dnl
5566AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5567m4_require([_LT_DECL_SED])dnl
5568m4_require([_LT_DECL_EGREP])dnl
5569m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5570
5571AC_ARG_WITH([gnu-ld],
5572 [AS_HELP_STRING([--with-gnu-ld],
5573 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
5574 [test "$withval" = no || with_gnu_ld=yes],
5575 [with_gnu_ld=no])dnl
5576
5577ac_prog=ld
5578if test "$GCC" = yes; then
5579 # Check if gcc -print-prog-name=ld gives a path.
5580 AC_MSG_CHECKING([for ld used by $CC])
5581 case $host in
5582 *-*-mingw*)
5583 # gcc leaves a trailing carriage return which upsets mingw
5584 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5585 *)
5586 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5587 esac
5588 case $ac_prog in
5589 # Accept absolute paths.
5590 [[\\/]]* | ?:[[\\/]]*)
5591 re_direlt='/[[^/]][[^/]]*/\.\./'
5592 # Canonicalize the pathname of ld
5593 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5594 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5595 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5596 done
5597 test -z "$LD" && LD="$ac_prog"
5598 ;;
5599 "")
5600 # If it fails, then pretend we aren't using GCC.
5601 ac_prog=ld
5602 ;;
5603 *)
5604 # If it is relative, then search for the first ld in PATH.
5605 with_gnu_ld=unknown
5606 ;;
5607 esac
5608elif test "$with_gnu_ld" = yes; then
5609 AC_MSG_CHECKING([for GNU ld])
5610else
5611 AC_MSG_CHECKING([for non-GNU ld])
5612fi
5613AC_CACHE_VAL(lt_cv_path_LD,
5614[if test -z "$LD"; then
5615 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5616 for ac_dir in $PATH; do
5617 IFS="$lt_save_ifs"
5618 test -z "$ac_dir" && ac_dir=.
5619 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5620 lt_cv_path_LD="$ac_dir/$ac_prog"
5621 # Check to see if the program is GNU ld. I'd rather use --version,
5622 # but apparently some variants of GNU ld only accept -v.
5623 # Break only if it was the GNU/non-GNU ld that we prefer.
5624 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5625 *GNU* | *'with BFD'*)
5626 test "$with_gnu_ld" != no && break
5627 ;;
5628 *)
5629 test "$with_gnu_ld" != yes && break
5630 ;;
5631 esac
5632 fi
5633 done
5634 IFS="$lt_save_ifs"
5635else
5636 lt_cv_path_LD="$LD" # Let the user override the test with a path.
5637fi])
5638LD="$lt_cv_path_LD"
5639if test -n "$LD"; then
5640 AC_MSG_RESULT($LD)
5641else
5642 AC_MSG_RESULT(no)
5643fi
5644test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5645_LT_PATH_LD_GNU
5646AC_SUBST([LD])
5647
5648_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5649])# LT_PATH_LD
5650
5651# Old names:
5652AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5653AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5654dnl aclocal-1.4 backwards compatibility:
5655dnl AC_DEFUN([AM_PROG_LD], [])
5656dnl AC_DEFUN([AC_PROG_LD], [])
5657
5658
5659# _LT_PATH_LD_GNU
5660#- --------------
5661m4_defun([_LT_PATH_LD_GNU],
5662[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5663[# I'd rather use --version here, but apparently some GNU lds only accept -v.
5664case `$LD -v 2>&1 </dev/null` in
5665*GNU* | *'with BFD'*)
5666 lt_cv_prog_gnu_ld=yes
5667 ;;
5668*)
5669 lt_cv_prog_gnu_ld=no
5670 ;;
5671esac])
5672with_gnu_ld=$lt_cv_prog_gnu_ld
5673])# _LT_PATH_LD_GNU
5674
5675
5676# _LT_CMD_RELOAD
5677# --------------
5678# find reload flag for linker
5679# -- PORTME Some linkers may need a different reload flag.
5680m4_defun([_LT_CMD_RELOAD],
5681[AC_CACHE_CHECK([for $LD option to reload object files],
5682 lt_cv_ld_reload_flag,
5683 [lt_cv_ld_reload_flag='-r'])
5684reload_flag=$lt_cv_ld_reload_flag
5685case $reload_flag in
5686"" | " "*) ;;
5687*) reload_flag=" $reload_flag" ;;
5688esac
5689reload_cmds='$LD$reload_flag -o $output$reload_objs'
5690case $host_os in
5691 cygwin* | mingw* | pw32* | cegcc*)
5692 if test "$GCC" != yes; then
5693 reload_cmds=false
5694 fi
5695 ;;
5696 darwin*)
5697 if test "$GCC" = yes; then
5698 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5699 else
5700 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5701 fi
5702 ;;
5703esac
5704_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5705_LT_TAGDECL([], [reload_cmds], [2])dnl
5706])# _LT_CMD_RELOAD
5707
5708
5709# _LT_CHECK_MAGIC_METHOD
5710# ----------------------
5711# how to check for library dependencies
5712# -- PORTME fill in with the dynamic library characteristics
5713m4_defun([_LT_CHECK_MAGIC_METHOD],
5714[m4_require([_LT_DECL_EGREP])
5715m4_require([_LT_DECL_OBJDUMP])
5716AC_CACHE_CHECK([how to recognize dependent libraries],
5717lt_cv_deplibs_check_method,
5718[lt_cv_file_magic_cmd='$MAGIC_CMD'
5719lt_cv_file_magic_test_file=
5720lt_cv_deplibs_check_method='unknown'
5721# Need to set the preceding variable on all platforms that support
5722# interlibrary dependencies.
5723# 'none' -- dependencies not supported.
5724# `unknown' -- same as none, but documents that we really don't know.
5725# 'pass_all' -- all dependencies passed with no checks.
5726# 'test_compile' -- check by making test program.
5727# 'file_magic [[regex]]' -- check by looking for files in library path
5728# which responds to the $file_magic_cmd with a given extended regex.
5729# If you have `file' or equivalent on your system and you're not sure
5730# whether `pass_all' will *always* work, you probably want this one.
5731
5732case $host_os in
5733aix[[4-9]]*)
5734 lt_cv_deplibs_check_method=pass_all
5735 ;;
5736
5737beos*)
5738 lt_cv_deplibs_check_method=pass_all
5739 ;;
5740
5741bsdi[[45]]*)
5742 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5743 lt_cv_file_magic_cmd='/usr/bin/file -L'
5744 lt_cv_file_magic_test_file=/shlib/libc.so
5745 ;;
5746
5747cygwin*)
5748 # func_win32_libid is a shell function defined in ltmain.sh
5749 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5750 lt_cv_file_magic_cmd='func_win32_libid'
5751 ;;
5752
5753mingw* | pw32*)
5754 # Base MSYS/MinGW do not provide the 'file' command needed by
5755 # func_win32_libid shell function, so use a weaker test based on 'objdump',
5756 # unless we find 'file', for example because we are cross-compiling.
5757 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5758 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5759 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5760 lt_cv_file_magic_cmd='func_win32_libid'
5761 else
5762 # Keep this pattern in sync with the one in func_win32_libid.
5763 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5764 lt_cv_file_magic_cmd='$OBJDUMP -f'
5765 fi
5766 ;;
5767
5768cegcc*)
5769 # use the weaker test based on 'objdump'. See mingw*.
5770 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5771 lt_cv_file_magic_cmd='$OBJDUMP -f'
5772 ;;
5773
5774darwin* | rhapsody*)
5775 lt_cv_deplibs_check_method=pass_all
5776 ;;
5777
5778freebsd* | dragonfly*)
5779 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5780 case $host_cpu in
5781 i*86 )
5782 # Not sure whether the presence of OpenBSD here was a mistake.
5783 # Let's accept both of them until this is cleared up.
5784 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5785 lt_cv_file_magic_cmd=/usr/bin/file
5786 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5787 ;;
5788 esac
5789 else
5790 lt_cv_deplibs_check_method=pass_all
5791 fi
5792 ;;
5793
5794haiku*)
5795 lt_cv_deplibs_check_method=pass_all
5796 ;;
5797
5798hpux10.20* | hpux11*)
5799 lt_cv_file_magic_cmd=/usr/bin/file
5800 case $host_cpu in
5801 ia64*)
5802 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5803 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5804 ;;
5805 hppa*64*)
5806 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
5807 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5808 ;;
5809 *)
5810 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5811 lt_cv_file_magic_test_file=/usr/lib/libc.sl
5812 ;;
5813 esac
5814 ;;
5815
5816interix[[3-9]]*)
5817 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5818 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5819 ;;
5820
5821irix5* | irix6* | nonstopux*)
5822 case $LD in
5823 *-32|*"-32 ") libmagic=32-bit;;
5824 *-n32|*"-n32 ") libmagic=N32;;
5825 *-64|*"-64 ") libmagic=64-bit;;
5826 *) libmagic=never-match;;
5827 esac
5828 lt_cv_deplibs_check_method=pass_all
5829 ;;
5830
5831# This must be glibc/ELF.
5832linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5833 lt_cv_deplibs_check_method=pass_all
5834 ;;
5835
5836netbsd* | netbsdelf*-gnu)
5837 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5838 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5839 else
5840 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5841 fi
5842 ;;
5843
5844newos6*)
5845 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5846 lt_cv_file_magic_cmd=/usr/bin/file
5847 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5848 ;;
5849
5850*nto* | *qnx*)
5851 lt_cv_deplibs_check_method=pass_all
5852 ;;
5853
5854openbsd*)
5855 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5856 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5857 else
5858 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5859 fi
5860 ;;
5861
5862osf3* | osf4* | osf5*)
5863 lt_cv_deplibs_check_method=pass_all
5864 ;;
5865
5866rdos*)
5867 lt_cv_deplibs_check_method=pass_all
5868 ;;
5869
5870solaris*)
5871 lt_cv_deplibs_check_method=pass_all
5872 ;;
5873
5874sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5875 lt_cv_deplibs_check_method=pass_all
5876 ;;
5877
5878sysv4 | sysv4.3*)
5879 case $host_vendor in
5880 motorola)
5881 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]]'
5882 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5883 ;;
5884 ncr)
5885 lt_cv_deplibs_check_method=pass_all
5886 ;;
5887 sequent)
5888 lt_cv_file_magic_cmd='/bin/file'
5889 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5890 ;;
5891 sni)
5892 lt_cv_file_magic_cmd='/bin/file'
5893 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5894 lt_cv_file_magic_test_file=/lib/libc.so
5895 ;;
5896 siemens)
5897 lt_cv_deplibs_check_method=pass_all
5898 ;;
5899 pc)
5900 lt_cv_deplibs_check_method=pass_all
5901 ;;
5902 esac
5903 ;;
5904
5905tpf*)
5906 lt_cv_deplibs_check_method=pass_all
5907 ;;
5908esac
5909])
5910
5911file_magic_glob=
5912want_nocaseglob=no
5913if test "$build" = "$host"; then
5914 case $host_os in
5915 mingw* | pw32*)
5916 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5917 want_nocaseglob=yes
5918 else
5919 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
5920 fi
5921 ;;
5922 esac
5923fi
5924
5925file_magic_cmd=$lt_cv_file_magic_cmd
5926deplibs_check_method=$lt_cv_deplibs_check_method
5927test -z "$deplibs_check_method" && deplibs_check_method=unknown
5928
5929_LT_DECL([], [deplibs_check_method], [1],
5930 [Method to check whether dependent libraries are shared objects])
5931_LT_DECL([], [file_magic_cmd], [1],
5932 [Command to use when deplibs_check_method = "file_magic"])
5933_LT_DECL([], [file_magic_glob], [1],
5934 [How to find potential files when deplibs_check_method = "file_magic"])
5935_LT_DECL([], [want_nocaseglob], [1],
5936 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
5937])# _LT_CHECK_MAGIC_METHOD
5938
5939
5940# LT_PATH_NM
5941# ----------
5942# find the pathname to a BSD- or MS-compatible name lister
5943AC_DEFUN([LT_PATH_NM],
5944[AC_REQUIRE([AC_PROG_CC])dnl
5945AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5946[if test -n "$NM"; then
5947 # Let the user override the test.
5948 lt_cv_path_NM="$NM"
5949else
5950 lt_nm_to_check="${ac_tool_prefix}nm"
5951 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5952 lt_nm_to_check="$lt_nm_to_check nm"
5953 fi
5954 for lt_tmp_nm in $lt_nm_to_check; do
5955 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5956 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5957 IFS="$lt_save_ifs"
5958 test -z "$ac_dir" && ac_dir=.
5959 tmp_nm="$ac_dir/$lt_tmp_nm"
5960 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5961 # Check to see if the nm accepts a BSD-compat flag.
5962 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5963 # nm: unknown option "B" ignored
5964 # Tru64's nm complains that /dev/null is an invalid object file
5965 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5966 */dev/null* | *'Invalid file or object type'*)
5967 lt_cv_path_NM="$tmp_nm -B"
5968 break
5969 ;;
5970 *)
5971 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5972 */dev/null*)
5973 lt_cv_path_NM="$tmp_nm -p"
5974 break
5975 ;;
5976 *)
5977 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5978 continue # so that we can try to find one that supports BSD flags
5979 ;;
5980 esac
5981 ;;
5982 esac
5983 fi
5984 done
5985 IFS="$lt_save_ifs"
5986 done
5987 : ${lt_cv_path_NM=no}
5988fi])
5989if test "$lt_cv_path_NM" != "no"; then
5990 NM="$lt_cv_path_NM"
5991else
5992 # Didn't find any BSD compatible name lister, look for dumpbin.
5993 if test -n "$DUMPBIN"; then :
5994 # Let the user override the test.
5995 else
5996 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5997 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5998 *COFF*)
5999 DUMPBIN="$DUMPBIN -symbols"
6000 ;;
6001 *)
6002 DUMPBIN=:
6003 ;;
6004 esac
6005 fi
6006 AC_SUBST([DUMPBIN])
6007 if test "$DUMPBIN" != ":"; then
6008 NM="$DUMPBIN"
6009 fi
6010fi
6011test -z "$NM" && NM=nm
6012AC_SUBST([NM])
6013_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
6014
6015AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
6016 [lt_cv_nm_interface="BSD nm"
6017 echo "int some_variable = 0;" > conftest.$ac_ext
6018 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
6019 (eval "$ac_compile" 2>conftest.err)
6020 cat conftest.err >&AS_MESSAGE_LOG_FD
6021 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
6022 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
6023 cat conftest.err >&AS_MESSAGE_LOG_FD
6024 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
6025 cat conftest.out >&AS_MESSAGE_LOG_FD
6026 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
6027 lt_cv_nm_interface="MS dumpbin"
6028 fi
6029 rm -f conftest*])
6030])# LT_PATH_NM
6031
6032# Old names:
6033AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
6034AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
6035dnl aclocal-1.4 backwards compatibility:
6036dnl AC_DEFUN([AM_PROG_NM], [])
6037dnl AC_DEFUN([AC_PROG_NM], [])
6038
6039# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
6040# --------------------------------
6041# how to determine the name of the shared library
6042# associated with a specific link library.
6043# -- PORTME fill in with the dynamic library characteristics
6044m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
6045[m4_require([_LT_DECL_EGREP])
6046m4_require([_LT_DECL_OBJDUMP])
6047m4_require([_LT_DECL_DLLTOOL])
6048AC_CACHE_CHECK([how to associate runtime and link libraries],
6049lt_cv_sharedlib_from_linklib_cmd,
6050[lt_cv_sharedlib_from_linklib_cmd='unknown'
6051
6052case $host_os in
6053cygwin* | mingw* | pw32* | cegcc*)
6054 # two different shell functions defined in ltmain.sh
6055 # decide which to use based on capabilities of $DLLTOOL
6056 case `$DLLTOOL --help 2>&1` in
6057 *--identify-strict*)
6058 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
6059 ;;
6060 *)
6061 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
6062 ;;
6063 esac
6064 ;;
6065*)
6066 # fallback: assume linklib IS sharedlib
6067 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
6068 ;;
6069esac
6070])
6071sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
6072test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
6073
6074_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
6075 [Command to associate shared and link libraries])
6076])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
6077
6078
6079# _LT_PATH_MANIFEST_TOOL
6080# ----------------------
6081# locate the manifest tool
6082m4_defun([_LT_PATH_MANIFEST_TOOL],
6083[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
6084test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
6085AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
6086 [lt_cv_path_mainfest_tool=no
6087 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
6088 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
6089 cat conftest.err >&AS_MESSAGE_LOG_FD
6090 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
6091 lt_cv_path_mainfest_tool=yes
6092 fi
6093 rm -f conftest*])
6094if test "x$lt_cv_path_mainfest_tool" != xyes; then
6095 MANIFEST_TOOL=:
6096fi
6097_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
6098])# _LT_PATH_MANIFEST_TOOL
6099
6100
6101# LT_LIB_M
6102# --------
6103# check for math library
6104AC_DEFUN([LT_LIB_M],
6105[AC_REQUIRE([AC_CANONICAL_HOST])dnl
6106LIBM=
6107case $host in
6108*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
6109 # These system don't have libm, or don't need it
6110 ;;
6111*-ncr-sysv4.3*)
6112 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
6113 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
6114 ;;
6115*)
6116 AC_CHECK_LIB(m, cos, LIBM="-lm")
6117 ;;
6118esac
6119AC_SUBST([LIBM])
6120])# LT_LIB_M
6121
6122# Old name:
6123AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
6124dnl aclocal-1.4 backwards compatibility:
6125dnl AC_DEFUN([AC_CHECK_LIBM], [])
6126
6127
6128# _LT_COMPILER_NO_RTTI([TAGNAME])
6129# -------------------------------
6130m4_defun([_LT_COMPILER_NO_RTTI],
6131[m4_require([_LT_TAG_COMPILER])dnl
6132
6133_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6134
6135if test "$GCC" = yes; then
6136 case $cc_basename in
6137 nvcc*)
6138 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
6139 *)
6140 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
6141 esac
6142
6143 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6144 lt_cv_prog_compiler_rtti_exceptions,
6145 [-fno-rtti -fno-exceptions], [],
6146 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6147fi
6148_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
6149 [Compiler flag to turn off builtin functions])
6150])# _LT_COMPILER_NO_RTTI
6151
6152
6153# _LT_CMD_GLOBAL_SYMBOLS
6154# ----------------------
6155m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
6156[AC_REQUIRE([AC_CANONICAL_HOST])dnl
6157AC_REQUIRE([AC_PROG_CC])dnl
6158AC_REQUIRE([AC_PROG_AWK])dnl
6159AC_REQUIRE([LT_PATH_NM])dnl
6160AC_REQUIRE([LT_PATH_LD])dnl
6161m4_require([_LT_DECL_SED])dnl
6162m4_require([_LT_DECL_EGREP])dnl
6163m4_require([_LT_TAG_COMPILER])dnl
6164
6165# Check for command to grab the raw symbol name followed by C symbol from nm.
6166AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6167AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6168[
6169# These are sane defaults that work on at least a few old systems.
6170# [They come from Ultrix. What could be older than Ultrix?!! ;)]
6171
6172# Character class describing NM global symbol codes.
6173symcode='[[BCDEGRST]]'
6174
6175# Regexp to match symbols that can be accessed directly from C.
6176sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6177
6178# Define system-specific variables.
6179case $host_os in
6180aix*)
6181 symcode='[[BCDT]]'
6182 ;;
6183cygwin* | mingw* | pw32* | cegcc*)
6184 symcode='[[ABCDGISTW]]'
6185 ;;
6186hpux*)
6187 if test "$host_cpu" = ia64; then
6188 symcode='[[ABCDEGRST]]'
6189 fi
6190 ;;
6191irix* | nonstopux*)
6192 symcode='[[BCDEGRST]]'
6193 ;;
6194osf*)
6195 symcode='[[BCDEGQRST]]'
6196 ;;
6197solaris*)
6198 symcode='[[BDRT]]'
6199 ;;
6200sco3.2v5*)
6201 symcode='[[DT]]'
6202 ;;
6203sysv4.2uw2*)
6204 symcode='[[DT]]'
6205 ;;
6206sysv5* | sco5v6* | unixware* | OpenUNIX*)
6207 symcode='[[ABDT]]'
6208 ;;
6209sysv4)
6210 symcode='[[DFNSTU]]'
6211 ;;
6212esac
6213
6214# If we're using GNU nm, then use its standard symbol codes.
6215case `$NM -V 2>&1` in
6216*GNU* | *'with BFD'*)
6217 symcode='[[ABCDGIRSTW]]' ;;
6218esac
6219
6220# Transform an extracted symbol line into a proper C declaration.
6221# Some systems (esp. on ia64) link data and code symbols differently,
6222# so use this general approach.
6223lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6224
6225# Transform an extracted symbol line into symbol name and symbol address
6226lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
6227lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
6228
6229# Handle CRLF in mingw tool chain
6230opt_cr=
6231case $build_os in
6232mingw*)
6233 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6234 ;;
6235esac
6236
6237# Try without a prefix underscore, then with it.
6238for ac_symprfx in "" "_"; do
6239
6240 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6241 symxfrm="\\1 $ac_symprfx\\2 \\2"
6242
6243 # Write the raw and C identifiers.
6244 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6245 # Fake it for dumpbin and say T for any non-static function
6246 # and D for any global variable.
6247 # Also find C++ and __fastcall symbols from MSVC++,
6248 # which start with @ or ?.
6249 lt_cv_sys_global_symbol_pipe="$AWK ['"\
6250" {last_section=section; section=\$ 3};"\
6251" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
6252" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
6253" \$ 0!~/External *\|/{next};"\
6254" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
6255" {if(hide[section]) next};"\
6256" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
6257" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
6258" s[1]~/^[@?]/{print s[1], s[1]; next};"\
6259" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
6260" ' prfx=^$ac_symprfx]"
6261 else
6262 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6263 fi
6264 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
6265
6266 # Check to see that the pipe works correctly.
6267 pipe_works=no
6268
6269 rm -f conftest*
6270 cat > conftest.$ac_ext <<_LT_EOF
6271#ifdef __cplusplus
6272extern "C" {
6273#endif
6274char nm_test_var;
6275void nm_test_func(void);
6276void nm_test_func(void){}
6277#ifdef __cplusplus
6278}
6279#endif
6280int main(){nm_test_var='a';nm_test_func();return(0);}
6281_LT_EOF
6282
6283 if AC_TRY_EVAL(ac_compile); then
6284 # Now try to grab the symbols.
6285 nlist=conftest.nm
6286 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
6287 # Try sorting and uniquifying the output.
6288 if sort "$nlist" | uniq > "$nlist"T; then
6289 mv -f "$nlist"T "$nlist"
6290 else
6291 rm -f "$nlist"T
6292 fi
6293
6294 # Make sure that we snagged all the symbols we need.
6295 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
6296 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
6297 cat <<_LT_EOF > conftest.$ac_ext
6298/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
6299#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
6300/* DATA imports from DLLs on WIN32 con't be const, because runtime
6301 relocations are performed -- see ld's documentation on pseudo-relocs. */
6302# define LT@&t@_DLSYM_CONST
6303#elif defined(__osf__)
6304/* This system does not cope well with relocations in const data. */
6305# define LT@&t@_DLSYM_CONST
6306#else
6307# define LT@&t@_DLSYM_CONST const
6308#endif
6309
6310#ifdef __cplusplus
6311extern "C" {
6312#endif
6313
6314_LT_EOF
6315 # Now generate the symbol file.
6316 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
6317
6318 cat <<_LT_EOF >> conftest.$ac_ext
6319
6320/* The mapping between symbol names and symbols. */
6321LT@&t@_DLSYM_CONST struct {
6322 const char *name;
6323 void *address;
6324}
6325lt__PROGRAM__LTX_preloaded_symbols[[]] =
6326{
6327 { "@PROGRAM@", (void *) 0 },
6328_LT_EOF
6329 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
6330 cat <<\_LT_EOF >> conftest.$ac_ext
6331 {0, (void *) 0}
6332};
6333
6334/* This works around a problem in FreeBSD linker */
6335#ifdef FREEBSD_WORKAROUND
6336static const void *lt_preloaded_setup() {
6337 return lt__PROGRAM__LTX_preloaded_symbols;
6338}
6339#endif
6340
6341#ifdef __cplusplus
6342}
6343#endif
6344_LT_EOF
6345 # Now try linking the two files.
6346 mv conftest.$ac_objext conftstm.$ac_objext
6347 lt_globsym_save_LIBS=$LIBS
6348 lt_globsym_save_CFLAGS=$CFLAGS
6349 LIBS="conftstm.$ac_objext"
6350 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6351 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6352 pipe_works=yes
6353 fi
6354 LIBS=$lt_globsym_save_LIBS
6355 CFLAGS=$lt_globsym_save_CFLAGS
6356 else
6357 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6358 fi
6359 else
6360 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6361 fi
6362 else
6363 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6364 fi
6365 else
6366 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6367 cat conftest.$ac_ext >&5
6368 fi
6369 rm -rf conftest* conftst*
6370
6371 # Do not use the global_symbol_pipe unless it works.
6372 if test "$pipe_works" = yes; then
6373 break
6374 else
6375 lt_cv_sys_global_symbol_pipe=
6376 fi
6377done
6378])
6379if test -z "$lt_cv_sys_global_symbol_pipe"; then
6380 lt_cv_sys_global_symbol_to_cdecl=
6381fi
6382if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6383 AC_MSG_RESULT(failed)
6384else
6385 AC_MSG_RESULT(ok)
6386fi
6387
6388# Response file support.
6389if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6390 nm_file_list_spec='@'
6391elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
6392 nm_file_list_spec='@'
6393fi
6394
6395_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
6396 [Take the output of nm and produce a listing of raw symbols and C names])
6397_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
6398 [Transform the output of nm in a proper C declaration])
6399_LT_DECL([global_symbol_to_c_name_address],
6400 [lt_cv_sys_global_symbol_to_c_name_address], [1],
6401 [Transform the output of nm in a C name address pair])
6402_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
6403 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
6404 [Transform the output of nm in a C name address pair when lib prefix is needed])
6405_LT_DECL([], [nm_file_list_spec], [1],
6406 [Specify filename containing input files for $NM])
6407]) # _LT_CMD_GLOBAL_SYMBOLS
6408
6409
6410# _LT_COMPILER_PIC([TAGNAME])
6411# ---------------------------
6412m4_defun([_LT_COMPILER_PIC],
6413[m4_require([_LT_TAG_COMPILER])dnl
6414_LT_TAGVAR(lt_prog_compiler_wl, $1)=
6415_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6416_LT_TAGVAR(lt_prog_compiler_static, $1)=
6417
6418m4_if([$1], [CXX], [
6419 # C++ specific cases for pic, static, wl, etc.
6420 if test "$GXX" = yes; then
6421 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6422 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6423
6424 case $host_os in
6425 aix*)
6426 # All AIX code is PIC.
6427 if test "$host_cpu" = ia64; then
6428 # AIX 5 now supports IA64 processor
6429 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6430 fi
6431 ;;
6432
6433 amigaos*)
6434 case $host_cpu in
6435 powerpc)
6436 # see comment about AmigaOS4 .so support
6437 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6438 ;;
6439 m68k)
6440 # FIXME: we need at least 68020 code to build shared libraries, but
6441 # adding the `-m68020' flag to GCC prevents building anything better,
6442 # like `-m68040'.
6443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6444 ;;
6445 esac
6446 ;;
6447
6448 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6449 # PIC is the default for these OSes.
6450 ;;
6451 mingw* | cygwin* | os2* | pw32* | cegcc*)
6452 # This hack is so that the source file can tell whether it is being
6453 # built for inclusion in a dll (and should export symbols for example).
6454 # Although the cygwin gcc ignores -fPIC, still need this for old-style
6455 # (--disable-auto-import) libraries
6456 m4_if([$1], [GCJ], [],
6457 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6458 ;;
6459 darwin* | rhapsody*)
6460 # PIC is the default on this platform
6461 # Common symbols not allowed in MH_DYLIB files
6462 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6463 ;;
6464 *djgpp*)
6465 # DJGPP does not support shared libraries at all
6466 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6467 ;;
6468 haiku*)
6469 # PIC is the default for Haiku.
6470 # The "-static" flag exists, but is broken.
6471 _LT_TAGVAR(lt_prog_compiler_static, $1)=
6472 ;;
6473 interix[[3-9]]*)
6474 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6475 # Instead, we relocate shared libraries at runtime.
6476 ;;
6477 sysv4*MP*)
6478 if test -d /usr/nec; then
6479 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6480 fi
6481 ;;
6482 hpux*)
6483 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6484 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
6485 # sets the default TLS model and affects inlining.
6486 case $host_cpu in
6487 hppa*64*)
6488 ;;
6489 *)
6490 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6491 ;;
6492 esac
6493 ;;
6494 *qnx* | *nto*)
6495 # QNX uses GNU C++, but need to define -shared option too, otherwise
6496 # it will coredump.
6497 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6498 ;;
6499 *)
6500 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6501 ;;
6502 esac
6503 else
6504 case $host_os in
6505 aix[[4-9]]*)
6506 # All AIX code is PIC.
6507 if test "$host_cpu" = ia64; then
6508 # AIX 5 now supports IA64 processor
6509 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6510 else
6511 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6512 fi
6513 ;;
6514 chorus*)
6515 case $cc_basename in
6516 cxch68*)
6517 # Green Hills C++ Compiler
6518 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
6519 ;;
6520 esac
6521 ;;
6522 mingw* | cygwin* | os2* | pw32* | cegcc*)
6523 # This hack is so that the source file can tell whether it is being
6524 # built for inclusion in a dll (and should export symbols for example).
6525 m4_if([$1], [GCJ], [],
6526 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6527 ;;
6528 dgux*)
6529 case $cc_basename in
6530 ec++*)
6531 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6532 ;;
6533 ghcx*)
6534 # Green Hills C++ Compiler
6535 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6536 ;;
6537 *)
6538 ;;
6539 esac
6540 ;;
6541 freebsd* | dragonfly*)
6542 # FreeBSD uses GNU C++
6543 ;;
6544 hpux9* | hpux10* | hpux11*)
6545 case $cc_basename in
6546 CC*)
6547 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6548 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6549 if test "$host_cpu" != ia64; then
6550 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6551 fi
6552 ;;
6553 aCC*)
6554 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6555 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6556 case $host_cpu in
6557 hppa*64*|ia64*)
6558 # +Z the default
6559 ;;
6560 *)
6561 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6562 ;;
6563 esac
6564 ;;
6565 *)
6566 ;;
6567 esac
6568 ;;
6569 interix*)
6570 # This is c89, which is MS Visual C++ (no shared libs)
6571 # Anyone wants to do a port?
6572 ;;
6573 irix5* | irix6* | nonstopux*)
6574 case $cc_basename in
6575 CC*)
6576 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6577 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6578 # CC pic flag -KPIC is the default.
6579 ;;
6580 *)
6581 ;;
6582 esac
6583 ;;
6584 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6585 case $cc_basename in
6586 KCC*)
6587 # KAI C++ Compiler
6588 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6589 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6590 ;;
6591 ecpc* )
6592 # old Intel C++ for x86_64 which still supported -KPIC.
6593 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6594 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6595 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6596 ;;
6597 icpc* )
6598 # Intel C++, used to be incompatible with GCC.
6599 # ICC 10 doesn't accept -KPIC any more.
6600 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6601 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6602 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6603 ;;
6604 pgCC* | pgcpp*)
6605 # Portland Group C++ compiler
6606 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6607 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6608 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6609 ;;
6610 cxx*)
6611 # Compaq C++
6612 # Make sure the PIC flag is empty. It appears that all Alpha
6613 # Linux and Compaq Tru64 Unix objects are PIC.
6614 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6615 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6616 ;;
6617 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6618 # IBM XL 8.0, 9.0 on PPC and BlueGene
6619 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6620 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6621 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6622 ;;
6623 *)
6624 case `$CC -V 2>&1 | sed 5q` in
6625 *Sun\ C*)
6626 # Sun C++ 5.9
6627 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6628 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6629 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6630 ;;
6631 esac
6632 ;;
6633 esac
6634 ;;
6635 lynxos*)
6636 ;;
6637 m88k*)
6638 ;;
6639 mvs*)
6640 case $cc_basename in
6641 cxx*)
6642 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6643 ;;
6644 *)
6645 ;;
6646 esac
6647 ;;
6648 netbsd* | netbsdelf*-gnu)
6649 ;;
6650 *qnx* | *nto*)
6651 # QNX uses GNU C++, but need to define -shared option too, otherwise
6652 # it will coredump.
6653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6654 ;;
6655 osf3* | osf4* | osf5*)
6656 case $cc_basename in
6657 KCC*)
6658 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6659 ;;
6660 RCC*)
6661 # Rational C++ 2.4.1
6662 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6663 ;;
6664 cxx*)
6665 # Digital/Compaq C++
6666 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6667 # Make sure the PIC flag is empty. It appears that all Alpha
6668 # Linux and Compaq Tru64 Unix objects are PIC.
6669 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6670 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6671 ;;
6672 *)
6673 ;;
6674 esac
6675 ;;
6676 psos*)
6677 ;;
6678 solaris*)
6679 case $cc_basename in
6680 CC* | sunCC*)
6681 # Sun C++ 4.2, 5.x and Centerline C++
6682 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6683 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6684 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6685 ;;
6686 gcx*)
6687 # Green Hills C++ Compiler
6688 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6689 ;;
6690 *)
6691 ;;
6692 esac
6693 ;;
6694 sunos4*)
6695 case $cc_basename in
6696 CC*)
6697 # Sun C++ 4.x
6698 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6699 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6700 ;;
6701 lcc*)
6702 # Lucid
6703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6704 ;;
6705 *)
6706 ;;
6707 esac
6708 ;;
6709 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6710 case $cc_basename in
6711 CC*)
6712 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6713 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6714 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6715 ;;
6716 esac
6717 ;;
6718 tandem*)
6719 case $cc_basename in
6720 NCC*)
6721 # NonStop-UX NCC 3.20
6722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6723 ;;
6724 *)
6725 ;;
6726 esac
6727 ;;
6728 vxworks*)
6729 ;;
6730 *)
6731 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6732 ;;
6733 esac
6734 fi
6735],
6736[
6737 if test "$GCC" = yes; then
6738 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6740
6741 case $host_os in
6742 aix*)
6743 # All AIX code is PIC.
6744 if test "$host_cpu" = ia64; then
6745 # AIX 5 now supports IA64 processor
6746 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6747 fi
6748 ;;
6749
6750 amigaos*)
6751 case $host_cpu in
6752 powerpc)
6753 # see comment about AmigaOS4 .so support
6754 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6755 ;;
6756 m68k)
6757 # FIXME: we need at least 68020 code to build shared libraries, but
6758 # adding the `-m68020' flag to GCC prevents building anything better,
6759 # like `-m68040'.
6760 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6761 ;;
6762 esac
6763 ;;
6764
6765 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6766 # PIC is the default for these OSes.
6767 ;;
6768
6769 mingw* | cygwin* | pw32* | os2* | cegcc*)
6770 # This hack is so that the source file can tell whether it is being
6771 # built for inclusion in a dll (and should export symbols for example).
6772 # Although the cygwin gcc ignores -fPIC, still need this for old-style
6773 # (--disable-auto-import) libraries
6774 m4_if([$1], [GCJ], [],
6775 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6776 ;;
6777
6778 darwin* | rhapsody*)
6779 # PIC is the default on this platform
6780 # Common symbols not allowed in MH_DYLIB files
6781 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6782 ;;
6783
6784 haiku*)
6785 # PIC is the default for Haiku.
6786 # The "-static" flag exists, but is broken.
6787 _LT_TAGVAR(lt_prog_compiler_static, $1)=
6788 ;;
6789
6790 hpux*)
6791 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6792 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
6793 # sets the default TLS model and affects inlining.
6794 case $host_cpu in
6795 hppa*64*)
6796 # +Z the default
6797 ;;
6798 *)
6799 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6800 ;;
6801 esac
6802 ;;
6803
6804 interix[[3-9]]*)
6805 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6806 # Instead, we relocate shared libraries at runtime.
6807 ;;
6808
6809 msdosdjgpp*)
6810 # Just because we use GCC doesn't mean we suddenly get shared libraries
6811 # on systems that don't support them.
6812 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6813 enable_shared=no
6814 ;;
6815
6816 *nto* | *qnx*)
6817 # QNX uses GNU C++, but need to define -shared option too, otherwise
6818 # it will coredump.
6819 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6820 ;;
6821
6822 sysv4*MP*)
6823 if test -d /usr/nec; then
6824 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6825 fi
6826 ;;
6827
6828 *)
6829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6830 ;;
6831 esac
6832
6833 case $cc_basename in
6834 nvcc*) # Cuda Compiler Driver 2.2
6835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6836 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6837 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
6838 fi
6839 ;;
6840 esac
6841 else
6842 # PORTME Check for flag to pass linker flags through the system compiler.
6843 case $host_os in
6844 aix*)
6845 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6846 if test "$host_cpu" = ia64; then
6847 # AIX 5 now supports IA64 processor
6848 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6849 else
6850 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6851 fi
6852 ;;
6853
6854 mingw* | cygwin* | pw32* | os2* | cegcc*)
6855 # This hack is so that the source file can tell whether it is being
6856 # built for inclusion in a dll (and should export symbols for example).
6857 m4_if([$1], [GCJ], [],
6858 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6859 ;;
6860
6861 hpux9* | hpux10* | hpux11*)
6862 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6863 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6864 # not for PA HP-UX.
6865 case $host_cpu in
6866 hppa*64*|ia64*)
6867 # +Z the default
6868 ;;
6869 *)
6870 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6871 ;;
6872 esac
6873 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6874 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6875 ;;
6876
6877 irix5* | irix6* | nonstopux*)
6878 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6879 # PIC (with -KPIC) is the default.
6880 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6881 ;;
6882
6883 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6884 case $cc_basename in
6885 # old Intel for x86_64 which still supported -KPIC.
6886 ecc*)
6887 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6888 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6889 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6890 ;;
6891 # icc used to be incompatible with GCC.
6892 # ICC 10 doesn't accept -KPIC any more.
6893 icc* | ifort*)
6894 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6895 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6896 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6897 ;;
6898 # Lahey Fortran 8.1.
6899 lf95*)
6900 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6901 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6902 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6903 ;;
6904 nagfor*)
6905 # NAG Fortran compiler
6906 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6907 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6908 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6909 ;;
6910 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6911 # Portland Group compilers (*not* the Pentium gcc compiler,
6912 # which looks to be a dead project)
6913 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6914 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6915 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6916 ;;
6917 ccc*)
6918 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6919 # All Alpha code is PIC.
6920 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6921 ;;
6922 xl* | bgxl* | bgf* | mpixl*)
6923 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6924 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6925 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6926 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6927 ;;
6928 *)
6929 case `$CC -V 2>&1 | sed 5q` in
6930 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
6931 # Sun Fortran 8.3 passes all unrecognized flags to the linker
6932 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6933 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6934 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6935 ;;
6936 *Sun\ F* | *Sun*Fortran*)
6937 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6938 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6939 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6940 ;;
6941 *Sun\ C*)
6942 # Sun C 5.9
6943 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6944 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6946 ;;
6947 *Intel*\ [[CF]]*Compiler*)
6948 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6949 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6950 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6951 ;;
6952 *Portland\ Group*)
6953 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6954 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6955 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6956 ;;
6957 esac
6958 ;;
6959 esac
6960 ;;
6961
6962 newsos6)
6963 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6964 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6965 ;;
6966
6967 *nto* | *qnx*)
6968 # QNX uses GNU C++, but need to define -shared option too, otherwise
6969 # it will coredump.
6970 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6971 ;;
6972
6973 osf3* | osf4* | osf5*)
6974 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6975 # All OSF/1 code is PIC.
6976 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6977 ;;
6978
6979 rdos*)
6980 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6981 ;;
6982
6983 solaris*)
6984 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6985 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6986 case $cc_basename in
6987 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6988 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6989 *)
6990 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6991 esac
6992 ;;
6993
6994 sunos4*)
6995 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6996 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6997 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6998 ;;
6999
7000 sysv4 | sysv4.2uw2* | sysv4.3*)
7001 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7002 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7003 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7004 ;;
7005
7006 sysv4*MP*)
7007 if test -d /usr/nec ;then
7008 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
7009 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7010 fi
7011 ;;
7012
7013 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7014 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7015 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7016 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7017 ;;
7018
7019 unicos*)
7020 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7021 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7022 ;;
7023
7024 uts4*)
7025 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7026 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7027 ;;
7028
7029 *)
7030 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7031 ;;
7032 esac
7033 fi
7034])
7035case $host_os in
7036 # For platforms which do not support PIC, -DPIC is meaningless:
7037 *djgpp*)
7038 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7039 ;;
7040 *)
7041 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
7042 ;;
7043esac
7044
7045AC_CACHE_CHECK([for $compiler option to produce PIC],
7046 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
7047 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
7048_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
7049
7050#
7051# Check to make sure the PIC flag actually works.
7052#
7053if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
7054 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
7055 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
7056 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
7057 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
7058 "" | " "*) ;;
7059 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
7060 esac],
7061 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
7062 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
7063fi
7064_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
7065 [Additional compiler flags for building library objects])
7066
7067_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
7068 [How to pass a linker flag through the compiler])
7069#
7070# Check to make sure the static flag actually works.
7071#
7072wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
7073_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
7074 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
7075 $lt_tmp_static_flag,
7076 [],
7077 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
7078_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
7079 [Compiler flag to prevent dynamic linking])
7080])# _LT_COMPILER_PIC
7081
7082
7083# _LT_LINKER_SHLIBS([TAGNAME])
7084# ----------------------------
7085# See if the linker supports building shared libraries.
7086m4_defun([_LT_LINKER_SHLIBS],
7087[AC_REQUIRE([LT_PATH_LD])dnl
7088AC_REQUIRE([LT_PATH_NM])dnl
7089m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7090m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7091m4_require([_LT_DECL_EGREP])dnl
7092m4_require([_LT_DECL_SED])dnl
7093m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
7094m4_require([_LT_TAG_COMPILER])dnl
7095AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7096m4_if([$1], [CXX], [
7097 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7098 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7099 case $host_os in
7100 aix[[4-9]]*)
7101 # If we're using GNU nm, then we don't want the "-C" option.
7102 # -C means demangle to AIX nm, but means don't demangle with GNU nm
7103 # Also, AIX nm treats weak defined symbols like other global defined
7104 # symbols, whereas GNU nm marks them as "W".
7105 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7106 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
7107 else
7108 _LT_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'
7109 fi
7110 ;;
7111 pw32*)
7112 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
7113 ;;
7114 cygwin* | mingw* | cegcc*)
7115 case $cc_basename in
7116 cl*)
7117 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7118 ;;
7119 *)
7120 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
7121 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7122 ;;
7123 esac
7124 ;;
7125 linux* | k*bsd*-gnu | gnu*)
7126 _LT_TAGVAR(link_all_deplibs, $1)=no
7127 ;;
7128 *)
7129 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7130 ;;
7131 esac
7132], [
7133 runpath_var=
7134 _LT_TAGVAR(allow_undefined_flag, $1)=
7135 _LT_TAGVAR(always_export_symbols, $1)=no
7136 _LT_TAGVAR(archive_cmds, $1)=
7137 _LT_TAGVAR(archive_expsym_cmds, $1)=
7138 _LT_TAGVAR(compiler_needs_object, $1)=no
7139 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7140 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7141 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7142 _LT_TAGVAR(hardcode_automatic, $1)=no
7143 _LT_TAGVAR(hardcode_direct, $1)=no
7144 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7145 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7146 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7147 _LT_TAGVAR(hardcode_minus_L, $1)=no
7148 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7149 _LT_TAGVAR(inherit_rpath, $1)=no
7150 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7151 _LT_TAGVAR(module_cmds, $1)=
7152 _LT_TAGVAR(module_expsym_cmds, $1)=
7153 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
7154 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7155 _LT_TAGVAR(thread_safe_flag_spec, $1)=
7156 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7157 # include_expsyms should be a list of space-separated symbols to be *always*
7158 # included in the symbol list
7159 _LT_TAGVAR(include_expsyms, $1)=
7160 # exclude_expsyms can be an extended regexp of symbols to exclude
7161 # it will be wrapped by ` (' and `)$', so one must not match beginning or
7162 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7163 # as well as any symbol that contains `d'.
7164 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7165 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7166 # platforms (ab)use it in PIC code, but their linkers get confused if
7167 # the symbol is explicitly referenced. Since portable code cannot
7168 # rely on this symbol name, it's probably fine to never include it in
7169 # preloaded symbol tables.
7170 # Exclude shared library initialization/finalization symbols.
7171dnl Note also adjust exclude_expsyms for C++ above.
7172 extract_expsyms_cmds=
7173
7174 case $host_os in
7175 cygwin* | mingw* | pw32* | cegcc*)
7176 # FIXME: the MSVC++ port hasn't been tested in a loooong time
7177 # When not using gcc, we currently assume that we are using
7178 # Microsoft Visual C++.
7179 if test "$GCC" != yes; then
7180 with_gnu_ld=no
7181 fi
7182 ;;
7183 interix*)
7184 # we just hope/assume this is gcc and not c89 (= MSVC++)
7185 with_gnu_ld=yes
7186 ;;
7187 openbsd*)
7188 with_gnu_ld=no
7189 ;;
7190 linux* | k*bsd*-gnu | gnu*)
7191 _LT_TAGVAR(link_all_deplibs, $1)=no
7192 ;;
7193 esac
7194
7195 _LT_TAGVAR(ld_shlibs, $1)=yes
7196
7197 # On some targets, GNU ld is compatible enough with the native linker
7198 # that we're better off using the native interface for both.
7199 lt_use_gnu_ld_interface=no
7200 if test "$with_gnu_ld" = yes; then
7201 case $host_os in
7202 aix*)
7203 # The AIX port of GNU ld has always aspired to compatibility
7204 # with the native linker. However, as the warning in the GNU ld
7205 # block says, versions before 2.19.5* couldn't really create working
7206 # shared libraries, regardless of the interface used.
7207 case `$LD -v 2>&1` in
7208 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
7209 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
7210 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
7211 *)
7212 lt_use_gnu_ld_interface=yes
7213 ;;
7214 esac
7215 ;;
7216 *)
7217 lt_use_gnu_ld_interface=yes
7218 ;;
7219 esac
7220 fi
7221
7222 if test "$lt_use_gnu_ld_interface" = yes; then
7223 # If archive_cmds runs LD, not CC, wlarc should be empty
7224 wlarc='${wl}'
7225
7226 # Set some defaults for GNU ld with shared library support. These
7227 # are reset later if shared libraries are not supported. Putting them
7228 # here allows them to be overridden if necessary.
7229 runpath_var=LD_RUN_PATH
7230 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7231 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7232 # ancient GNU ld didn't support --whole-archive et. al.
7233 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
7234 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7235 else
7236 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7237 fi
7238 supports_anon_versioning=no
7239 case `$LD -v 2>&1` in
7240 *GNU\ gold*) supports_anon_versioning=yes ;;
7241 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7242 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7243 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7244 *\ 2.11.*) ;; # other 2.11 versions
7245 *) supports_anon_versioning=yes ;;
7246 esac
7247
7248 # See if GNU ld supports shared libraries.
7249 case $host_os in
7250 aix[[3-9]]*)
7251 # On AIX/PPC, the GNU linker is very broken
7252 if test "$host_cpu" != ia64; then
7253 _LT_TAGVAR(ld_shlibs, $1)=no
7254 cat <<_LT_EOF 1>&2
7255
7256*** Warning: the GNU linker, at least up to release 2.19, is reported
7257*** to be unable to reliably create shared libraries on AIX.
7258*** Therefore, libtool is disabling shared libraries support. If you
7259*** really care for shared libraries, you may want to install binutils
7260*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
7261*** You will then need to restart the configuration process.
7262
7263_LT_EOF
7264 fi
7265 ;;
7266
7267 amigaos*)
7268 case $host_cpu in
7269 powerpc)
7270 # see comment about AmigaOS4 .so support
7271 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7272 _LT_TAGVAR(archive_expsym_cmds, $1)=''
7273 ;;
7274 m68k)
7275 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7276 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7277 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7278 ;;
7279 esac
7280 ;;
7281
7282 beos*)
7283 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7284 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7285 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7286 # support --undefined. This deserves some investigation. FIXME
7287 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7288 else
7289 _LT_TAGVAR(ld_shlibs, $1)=no
7290 fi
7291 ;;
7292
7293 cygwin* | mingw* | pw32* | cegcc*)
7294 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7295 # as there is no search path for DLLs.
7296 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7297 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7298 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7299 _LT_TAGVAR(always_export_symbols, $1)=no
7300 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7301 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
7302 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7303
7304 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7305 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7306 # If the export-symbols file already is a .def file (1st line
7307 # is EXPORTS), use it as is; otherwise, prepend...
7308 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7309 cp $export_symbols $output_objdir/$soname.def;
7310 else
7311 echo EXPORTS > $output_objdir/$soname.def;
7312 cat $export_symbols >> $output_objdir/$soname.def;
7313 fi~
7314 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7315 else
7316 _LT_TAGVAR(ld_shlibs, $1)=no
7317 fi
7318 ;;
7319
7320 haiku*)
7321 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7322 _LT_TAGVAR(link_all_deplibs, $1)=yes
7323 ;;
7324
7325 interix[[3-9]]*)
7326 _LT_TAGVAR(hardcode_direct, $1)=no
7327 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7328 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7329 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7330 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7331 # Instead, shared libraries are loaded at an image base (0x10000000 by
7332 # default) and relocated if they conflict, which is a slow very memory
7333 # consuming and fragmenting process. To avoid this, we pick a random,
7334 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7335 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7336 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7337 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7338 ;;
7339
7340 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
7341 tmp_diet=no
7342 if test "$host_os" = linux-dietlibc; then
7343 case $cc_basename in
7344 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
7345 esac
7346 fi
7347 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
7348 && test "$tmp_diet" = no
7349 then
7350 tmp_addflag=' $pic_flag'
7351 tmp_sharedflag='-shared'
7352 case $cc_basename,$host_cpu in
7353 pgcc*) # Portland Group C compiler
7354 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7355 tmp_addflag=' $pic_flag'
7356 ;;
7357 pgf77* | pgf90* | pgf95* | pgfortran*)
7358 # Portland Group f77 and f90 compilers
7359 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7360 tmp_addflag=' $pic_flag -Mnomain' ;;
7361 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
7362 tmp_addflag=' -i_dynamic' ;;
7363 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
7364 tmp_addflag=' -i_dynamic -nofor_main' ;;
7365 ifc* | ifort*) # Intel Fortran compiler
7366 tmp_addflag=' -nofor_main' ;;
7367 lf95*) # Lahey Fortran 8.1
7368 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7369 tmp_sharedflag='--shared' ;;
7370 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
7371 tmp_sharedflag='-qmkshrobj'
7372 tmp_addflag= ;;
7373 nvcc*) # Cuda Compiler Driver 2.2
7374 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7375 _LT_TAGVAR(compiler_needs_object, $1)=yes
7376 ;;
7377 esac
7378 case `$CC -V 2>&1 | sed 5q` in
7379 *Sun\ C*) # Sun C 5.9
7380 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7381 _LT_TAGVAR(compiler_needs_object, $1)=yes
7382 tmp_sharedflag='-G' ;;
7383 *Sun\ F*) # Sun Fortran 8.3
7384 tmp_sharedflag='-G' ;;
7385 esac
7386 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7387
7388 if test "x$supports_anon_versioning" = xyes; then
7389 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7390 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7391 echo "local: *; };" >> $output_objdir/$libname.ver~
7392 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7393 fi
7394
7395 case $cc_basename in
7396 xlf* | bgf* | bgxlf* | mpixlf*)
7397 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
7398 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
7399 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7400 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
7401 if test "x$supports_anon_versioning" = xyes; then
7402 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7403 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7404 echo "local: *; };" >> $output_objdir/$libname.ver~
7405 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
7406 fi
7407 ;;
7408 esac
7409 else
7410 _LT_TAGVAR(ld_shlibs, $1)=no
7411 fi
7412 ;;
7413
7414 netbsd* | netbsdelf*-gnu)
7415 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7416 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7417 wlarc=
7418 else
7419 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7420 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7421 fi
7422 ;;
7423
7424 solaris*)
7425 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
7426 _LT_TAGVAR(ld_shlibs, $1)=no
7427 cat <<_LT_EOF 1>&2
7428
7429*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7430*** create shared libraries on Solaris systems. Therefore, libtool
7431*** is disabling shared libraries support. We urge you to upgrade GNU
7432*** binutils to release 2.9.1 or newer. Another option is to modify
7433*** your PATH or compiler configuration so that the native linker is
7434*** used, and then restart.
7435
7436_LT_EOF
7437 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7438 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7439 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7440 else
7441 _LT_TAGVAR(ld_shlibs, $1)=no
7442 fi
7443 ;;
7444
7445 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7446 case `$LD -v 2>&1` in
7447 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7448 _LT_TAGVAR(ld_shlibs, $1)=no
7449 cat <<_LT_EOF 1>&2
7450
7451*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7452*** reliably create shared libraries on SCO systems. Therefore, libtool
7453*** is disabling shared libraries support. We urge you to upgrade GNU
7454*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
7455*** your PATH or compiler configuration so that the native linker is
7456*** used, and then restart.
7457
7458_LT_EOF
7459 ;;
7460 *)
7461 # For security reasons, it is highly recommended that you always
7462 # use absolute paths for naming shared libraries, and exclude the
7463 # DT_RUNPATH tag from executables and libraries. But doing so
7464 # requires that you compile everything twice, which is a pain.
7465 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7466 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7467 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7468 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7469 else
7470 _LT_TAGVAR(ld_shlibs, $1)=no
7471 fi
7472 ;;
7473 esac
7474 ;;
7475
7476 sunos4*)
7477 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7478 wlarc=
7479 _LT_TAGVAR(hardcode_direct, $1)=yes
7480 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7481 ;;
7482
7483 *)
7484 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7485 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7486 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7487 else
7488 _LT_TAGVAR(ld_shlibs, $1)=no
7489 fi
7490 ;;
7491 esac
7492
7493 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
7494 runpath_var=
7495 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7496 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7497 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7498 fi
7499 else
7500 # PORTME fill in a description of your system's linker (not GNU ld)
7501 case $host_os in
7502 aix3*)
7503 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7504 _LT_TAGVAR(always_export_symbols, $1)=yes
7505 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
7506 # Note: this linker hardcodes the directories in LIBPATH if there
7507 # are no directories specified by -L.
7508 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7509 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7510 # Neither direct hardcoding nor static linking is supported with a
7511 # broken collect2.
7512 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7513 fi
7514 ;;
7515
7516 aix[[4-9]]*)
7517 if test "$host_cpu" = ia64; then
7518 # On IA64, the linker does run time linking by default, so we don't
7519 # have to do anything special.
7520 aix_use_runtimelinking=no
7521 exp_sym_flag='-Bexport'
7522 no_entry_flag=""
7523 else
7524 # If we're using GNU nm, then we don't want the "-C" option.
7525 # -C means demangle to AIX nm, but means don't demangle with GNU nm
7526 # Also, AIX nm treats weak defined symbols like other global
7527 # defined symbols, whereas GNU nm marks them as "W".
7528 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7529 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
7530 else
7531 _LT_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'
7532 fi
7533 aix_use_runtimelinking=no
7534
7535 # Test if we are trying to use run time linking or normal
7536 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7537 # need to do runtime linking.
7538 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7539 for ld_flag in $LDFLAGS; do
7540 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7541 aix_use_runtimelinking=yes
7542 break
7543 fi
7544 done
7545 ;;
7546 esac
7547
7548 exp_sym_flag='-bexport'
7549 no_entry_flag='-bnoentry'
7550 fi
7551
7552 # When large executables or shared objects are built, AIX ld can
7553 # have problems creating the table of contents. If linking a library
7554 # or program results in "error TOC overflow" add -mminimal-toc to
7555 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7556 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7557
7558 _LT_TAGVAR(archive_cmds, $1)=''
7559 _LT_TAGVAR(hardcode_direct, $1)=yes
7560 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7561 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7562 _LT_TAGVAR(link_all_deplibs, $1)=yes
7563 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7564
7565 if test "$GCC" = yes; then
7566 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7567 # We only want to do this on AIX 4.2 and lower, the check
7568 # below for broken collect2 doesn't work under 4.3+
7569 collect2name=`${CC} -print-prog-name=collect2`
7570 if test -f "$collect2name" &&
7571 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7572 then
7573 # We have reworked collect2
7574 :
7575 else
7576 # We have old collect2
7577 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7578 # It fails to find uninstalled libraries when the uninstalled
7579 # path is not listed in the libpath. Setting hardcode_minus_L
7580 # to unsupported forces relinking
7581 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7583 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7584 fi
7585 ;;
7586 esac
7587 shared_flag='-shared'
7588 if test "$aix_use_runtimelinking" = yes; then
7589 shared_flag="$shared_flag "'${wl}-G'
7590 fi
7591 _LT_TAGVAR(link_all_deplibs, $1)=no
7592 else
7593 # not using gcc
7594 if test "$host_cpu" = ia64; then
7595 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7596 # chokes on -Wl,-G. The following line is correct:
7597 shared_flag='-G'
7598 else
7599 if test "$aix_use_runtimelinking" = yes; then
7600 shared_flag='${wl}-G'
7601 else
7602 shared_flag='${wl}-bM:SRE'
7603 fi
7604 fi
7605 fi
7606
7607 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7608 # It seems that -bexpall does not export symbols beginning with
7609 # underscore (_), so it is better to generate a list of symbols to export.
7610 _LT_TAGVAR(always_export_symbols, $1)=yes
7611 if test "$aix_use_runtimelinking" = yes; then
7612 # Warning - without using the other runtime loading flags (-brtl),
7613 # -berok will link without error, but may produce a broken library.
7614 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7615 # Determine the default libpath from the value encoded in an
7616 # empty executable.
7617 _LT_SYS_MODULE_PATH_AIX([$1])
7618 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7619 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7620 else
7621 if test "$host_cpu" = ia64; then
7622 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7623 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7624 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7625 else
7626 # Determine the default libpath from the value encoded in an
7627 # empty executable.
7628 _LT_SYS_MODULE_PATH_AIX([$1])
7629 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7630 # Warning - without using the other run time loading flags,
7631 # -berok will link without error, but may produce a broken library.
7632 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7633 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7634 if test "$with_gnu_ld" = yes; then
7635 # We only use this code for GNU lds that support --whole-archive.
7636 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7637 else
7638 # Exported symbols can be pulled into shared objects from archives
7639 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7640 fi
7641 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7642 # This is similar to how AIX traditionally builds its shared libraries.
7643 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7644 fi
7645 fi
7646 ;;
7647
7648 amigaos*)
7649 case $host_cpu in
7650 powerpc)
7651 # see comment about AmigaOS4 .so support
7652 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7653 _LT_TAGVAR(archive_expsym_cmds, $1)=''
7654 ;;
7655 m68k)
7656 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7658 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7659 ;;
7660 esac
7661 ;;
7662
7663 bsdi[[45]]*)
7664 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7665 ;;
7666
7667 cygwin* | mingw* | pw32* | cegcc*)
7668 # When not using gcc, we currently assume that we are using
7669 # Microsoft Visual C++.
7670 # hardcode_libdir_flag_spec is actually meaningless, as there is
7671 # no search path for DLLs.
7672 case $cc_basename in
7673 cl*)
7674 # Native MSVC
7675 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7676 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7677 _LT_TAGVAR(always_export_symbols, $1)=yes
7678 _LT_TAGVAR(file_list_spec, $1)='@'
7679 # Tell ltmain to make .lib files, not .a files.
7680 libext=lib
7681 # Tell ltmain to make .dll files, not .so files.
7682 shrext_cmds=".dll"
7683 # FIXME: Setting linknames here is a bad hack.
7684 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7685 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7686 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7687 else
7688 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7689 fi~
7690 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7691 linknames='
7692 # The linker will not automatically build a static lib if we build a DLL.
7693 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7694 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7695 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7696 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
7697 # Don't use ranlib
7698 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7699 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7700 lt_tool_outputfile="@TOOL_OUTPUT@"~
7701 case $lt_outputfile in
7702 *.exe|*.EXE) ;;
7703 *)
7704 lt_outputfile="$lt_outputfile.exe"
7705 lt_tool_outputfile="$lt_tool_outputfile.exe"
7706 ;;
7707 esac~
7708 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7709 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7710 $RM "$lt_outputfile.manifest";
7711 fi'
7712 ;;
7713 *)
7714 # Assume MSVC wrapper
7715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7716 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7717 # Tell ltmain to make .lib files, not .a files.
7718 libext=lib
7719 # Tell ltmain to make .dll files, not .so files.
7720 shrext_cmds=".dll"
7721 # FIXME: Setting linknames here is a bad hack.
7722 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7723 # The linker will automatically build a .lib file if we build a DLL.
7724 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7725 # FIXME: Should let the user specify the lib program.
7726 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7727 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7728 ;;
7729 esac
7730 ;;
7731
7732 darwin* | rhapsody*)
7733 _LT_DARWIN_LINKER_FEATURES($1)
7734 ;;
7735
7736 dgux*)
7737 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7738 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7739 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7740 ;;
7741
7742 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7743 # support. Future versions do this automatically, but an explicit c++rt0.o
7744 # does not break anything, and helps significantly (at the cost of a little
7745 # extra space).
7746 freebsd2.2*)
7747 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7748 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7749 _LT_TAGVAR(hardcode_direct, $1)=yes
7750 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7751 ;;
7752
7753 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7754 freebsd2.*)
7755 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7756 _LT_TAGVAR(hardcode_direct, $1)=yes
7757 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7758 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7759 ;;
7760
7761 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7762 freebsd* | dragonfly*)
7763 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7764 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7765 _LT_TAGVAR(hardcode_direct, $1)=yes
7766 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7767 ;;
7768
7769 hpux9*)
7770 if test "$GCC" = yes; then
7771 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7772 else
7773 _LT_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'
7774 fi
7775 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7776 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7777 _LT_TAGVAR(hardcode_direct, $1)=yes
7778
7779 # hardcode_minus_L: Not really in the search PATH,
7780 # but as the default location of the library.
7781 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7782 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7783 ;;
7784
7785 hpux10*)
7786 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7787 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7788 else
7789 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7790 fi
7791 if test "$with_gnu_ld" = no; then
7792 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7793 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7794 _LT_TAGVAR(hardcode_direct, $1)=yes
7795 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7796 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7797 # hardcode_minus_L: Not really in the search PATH,
7798 # but as the default location of the library.
7799 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7800 fi
7801 ;;
7802
7803 hpux11*)
7804 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7805 case $host_cpu in
7806 hppa*64*)
7807 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7808 ;;
7809 ia64*)
7810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7811 ;;
7812 *)
7813 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7814 ;;
7815 esac
7816 else
7817 case $host_cpu in
7818 hppa*64*)
7819 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7820 ;;
7821 ia64*)
7822 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7823 ;;
7824 *)
7825 m4_if($1, [], [
7826 # Older versions of the 11.00 compiler do not understand -b yet
7827 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7828 _LT_LINKER_OPTION([if $CC understands -b],
7829 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7830 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7831 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7832 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7833 ;;
7834 esac
7835 fi
7836 if test "$with_gnu_ld" = no; then
7837 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7838 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7839
7840 case $host_cpu in
7841 hppa*64*|ia64*)
7842 _LT_TAGVAR(hardcode_direct, $1)=no
7843 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7844 ;;
7845 *)
7846 _LT_TAGVAR(hardcode_direct, $1)=yes
7847 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7848 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7849
7850 # hardcode_minus_L: Not really in the search PATH,
7851 # but as the default location of the library.
7852 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7853 ;;
7854 esac
7855 fi
7856 ;;
7857
7858 irix5* | irix6* | nonstopux*)
7859 if test "$GCC" = yes; then
7860 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7861 # Try to use the -exported_symbol ld option, if it does not
7862 # work, assume that -exports_file does not work either and
7863 # implicitly export all symbols.
7864 # This should be the same for all languages, so no per-tag cache variable.
7865 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
7866 [lt_cv_irix_exported_symbol],
7867 [save_LDFLAGS="$LDFLAGS"
7868 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7869 AC_LINK_IFELSE(
7870 [AC_LANG_SOURCE(
7871 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
7872 [C++], [[int foo (void) { return 0; }]],
7873 [Fortran 77], [[
7874 subroutine foo
7875 end]],
7876 [Fortran], [[
7877 subroutine foo
7878 end]])])],
7879 [lt_cv_irix_exported_symbol=yes],
7880 [lt_cv_irix_exported_symbol=no])
7881 LDFLAGS="$save_LDFLAGS"])
7882 if test "$lt_cv_irix_exported_symbol" = yes; then
7883 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7884 fi
7885 else
7886 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7887 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
7888 fi
7889 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7890 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7891 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7892 _LT_TAGVAR(inherit_rpath, $1)=yes
7893 _LT_TAGVAR(link_all_deplibs, $1)=yes
7894 ;;
7895
7896 netbsd* | netbsdelf*-gnu)
7897 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7898 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7899 else
7900 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7901 fi
7902 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7903 _LT_TAGVAR(hardcode_direct, $1)=yes
7904 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7905 ;;
7906
7907 newsos6)
7908 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7909 _LT_TAGVAR(hardcode_direct, $1)=yes
7910 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7911 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7912 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7913 ;;
7914
7915 *nto* | *qnx*)
7916 ;;
7917
7918 openbsd*)
7919 if test -f /usr/libexec/ld.so; then
7920 _LT_TAGVAR(hardcode_direct, $1)=yes
7921 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7922 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7923 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7925 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7926 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7927 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7928 else
7929 case $host_os in
7930 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7931 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7932 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7933 ;;
7934 *)
7935 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7936 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7937 ;;
7938 esac
7939 fi
7940 else
7941 _LT_TAGVAR(ld_shlibs, $1)=no
7942 fi
7943 ;;
7944
7945 os2*)
7946 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7947 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7948 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7949 _LT_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'
7950 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7951 ;;
7952
7953 osf3*)
7954 if test "$GCC" = yes; then
7955 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7956 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7957 else
7958 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7959 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7960 fi
7961 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7962 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7963 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7964 ;;
7965
7966 osf4* | osf5*) # as osf3* with the addition of -msym flag
7967 if test "$GCC" = yes; then
7968 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7969 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7970 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7971 else
7972 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7973 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7974 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
7975 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
7976
7977 # Both c and cxx compiler support -rpath directly
7978 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7979 fi
7980 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7981 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7982 ;;
7983
7984 solaris*)
7985 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7986 if test "$GCC" = yes; then
7987 wlarc='${wl}'
7988 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7989 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7990 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7991 else
7992 case `$CC -V 2>&1` in
7993 *"Compilers 5.0"*)
7994 wlarc=''
7995 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7996 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7997 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7998 ;;
7999 *)
8000 wlarc='${wl}'
8001 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
8002 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8003 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
8004 ;;
8005 esac
8006 fi
8007 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8008 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8009 case $host_os in
8010 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8011 *)
8012 # The compiler driver will combine and reorder linker options,
8013 # but understands `-z linker_flag'. GCC discards it without `$wl',
8014 # but is careful enough not to reorder.
8015 # Supported since Solaris 2.6 (maybe 2.5.1?)
8016 if test "$GCC" = yes; then
8017 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8018 else
8019 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8020 fi
8021 ;;
8022 esac
8023 _LT_TAGVAR(link_all_deplibs, $1)=yes
8024 ;;
8025
8026 sunos4*)
8027 if test "x$host_vendor" = xsequent; then
8028 # Use $CC to link under sequent, because it throws in some extra .o
8029 # files that make .init and .fini sections work.
8030 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8031 else
8032 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8033 fi
8034 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8035 _LT_TAGVAR(hardcode_direct, $1)=yes
8036 _LT_TAGVAR(hardcode_minus_L, $1)=yes
8037 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8038 ;;
8039
8040 sysv4)
8041 case $host_vendor in
8042 sni)
8043 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8044 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
8045 ;;
8046 siemens)
8047 ## LD is ld it makes a PLAMLIB
8048 ## CC just makes a GrossModule.
8049 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8050 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
8051 _LT_TAGVAR(hardcode_direct, $1)=no
8052 ;;
8053 motorola)
8054 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8055 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
8056 ;;
8057 esac
8058 runpath_var='LD_RUN_PATH'
8059 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8060 ;;
8061
8062 sysv4.3*)
8063 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8064 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8065 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
8066 ;;
8067
8068 sysv4*MP*)
8069 if test -d /usr/nec; then
8070 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8071 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8072 runpath_var=LD_RUN_PATH
8073 hardcode_runpath_var=yes
8074 _LT_TAGVAR(ld_shlibs, $1)=yes
8075 fi
8076 ;;
8077
8078 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8079 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8080 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8081 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8082 runpath_var='LD_RUN_PATH'
8083
8084 if test "$GCC" = yes; then
8085 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8086 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8087 else
8088 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8089 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8090 fi
8091 ;;
8092
8093 sysv5* | sco3.2v5* | sco5v6*)
8094 # Note: We can NOT use -z defs as we might desire, because we do not
8095 # link with -lc, and that would cause any symbols used from libc to
8096 # always be unresolved, which means just about no library would
8097 # ever link correctly. If we're not using GNU ld we use -z text
8098 # though, which does catch some bad symbols but isn't as heavy-handed
8099 # as -z defs.
8100 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8101 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8102 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8103 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8104 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8105 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8106 _LT_TAGVAR(link_all_deplibs, $1)=yes
8107 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8108 runpath_var='LD_RUN_PATH'
8109
8110 if test "$GCC" = yes; then
8111 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8112 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8113 else
8114 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8115 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8116 fi
8117 ;;
8118
8119 uts4*)
8120 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8122 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8123 ;;
8124
8125 *)
8126 _LT_TAGVAR(ld_shlibs, $1)=no
8127 ;;
8128 esac
8129
8130 if test x$host_vendor = xsni; then
8131 case $host in
8132 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8133 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
8134 ;;
8135 esac
8136 fi
8137 fi
8138])
8139AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8140test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8141
8142_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
8143
8144_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
8145_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
8146_LT_DECL([], [extract_expsyms_cmds], [2],
8147 [The commands to extract the exported symbol list from a shared archive])
8148
8149#
8150# Do we need to explicitly link libc?
8151#
8152case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
8153x|xyes)
8154 # Assume -lc should be added
8155 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8156
8157 if test "$enable_shared" = yes && test "$GCC" = yes; then
8158 case $_LT_TAGVAR(archive_cmds, $1) in
8159 *'~'*)
8160 # FIXME: we may have to deal with multi-command sequences.
8161 ;;
8162 '$CC '*)
8163 # Test whether the compiler implicitly links with -lc since on some
8164 # systems, -lgcc has to come before -lc. If gcc already passes -lc
8165 # to ld, don't add -lc before -lgcc.
8166 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
8167 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
8168 [$RM conftest*
8169 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8170
8171 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
8172 soname=conftest
8173 lib=conftest
8174 libobjs=conftest.$ac_objext
8175 deplibs=
8176 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
8177 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
8178 compiler_flags=-v
8179 linker_flags=-v
8180 verstring=
8181 output_objdir=.
8182 libname=conftest
8183 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
8184 _LT_TAGVAR(allow_undefined_flag, $1)=
8185 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
8186 then
8187 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8188 else
8189 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8190 fi
8191 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
8192 else
8193 cat conftest.err 1>&5
8194 fi
8195 $RM conftest*
8196 ])
8197 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
8198 ;;
8199 esac
8200 fi
8201 ;;
8202esac
8203
8204_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
8205 [Whether or not to add -lc for building shared libraries])
8206_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
8207 [enable_shared_with_static_runtimes], [0],
8208 [Whether or not to disallow shared libs when runtime libs are static])
8209_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
8210 [Compiler flag to allow reflexive dlopens])
8211_LT_TAGDECL([], [whole_archive_flag_spec], [1],
8212 [Compiler flag to generate shared objects directly from archives])
8213_LT_TAGDECL([], [compiler_needs_object], [1],
8214 [Whether the compiler copes with passing no objects directly])
8215_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
8216 [Create an old-style archive from a shared archive])
8217_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
8218 [Create a temporary old-style archive to link instead of a shared archive])
8219_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
8220_LT_TAGDECL([], [archive_expsym_cmds], [2])
8221_LT_TAGDECL([], [module_cmds], [2],
8222 [Commands used to build a loadable module if different from building
8223 a shared archive.])
8224_LT_TAGDECL([], [module_expsym_cmds], [2])
8225_LT_TAGDECL([], [with_gnu_ld], [1],
8226 [Whether we are building with GNU ld or not])
8227_LT_TAGDECL([], [allow_undefined_flag], [1],
8228 [Flag that allows shared libraries with undefined symbols to be built])
8229_LT_TAGDECL([], [no_undefined_flag], [1],
8230 [Flag that enforces no undefined symbols])
8231_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
8232 [Flag to hardcode $libdir into a binary during linking.
8233 This must work even if $libdir does not exist])
8234_LT_TAGDECL([], [hardcode_libdir_separator], [1],
8235 [Whether we need a single "-rpath" flag with a separated argument])
8236_LT_TAGDECL([], [hardcode_direct], [0],
8237 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
8238 DIR into the resulting binary])
8239_LT_TAGDECL([], [hardcode_direct_absolute], [0],
8240 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
8241 DIR into the resulting binary and the resulting library dependency is
8242 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
8243 library is relocated])
8244_LT_TAGDECL([], [hardcode_minus_L], [0],
8245 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
8246 into the resulting binary])
8247_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
8248 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
8249 into the resulting binary])
8250_LT_TAGDECL([], [hardcode_automatic], [0],
8251 [Set to "yes" if building a shared library automatically hardcodes DIR
8252 into the library and all subsequent libraries and executables linked
8253 against it])
8254_LT_TAGDECL([], [inherit_rpath], [0],
8255 [Set to yes if linker adds runtime paths of dependent libraries
8256 to runtime path list])
8257_LT_TAGDECL([], [link_all_deplibs], [0],
8258 [Whether libtool must link a program against all its dependency libraries])
8259_LT_TAGDECL([], [always_export_symbols], [0],
8260 [Set to "yes" if exported symbols are required])
8261_LT_TAGDECL([], [export_symbols_cmds], [2],
8262 [The commands to list exported symbols])
8263_LT_TAGDECL([], [exclude_expsyms], [1],
8264 [Symbols that should not be listed in the preloaded symbols])
8265_LT_TAGDECL([], [include_expsyms], [1],
8266 [Symbols that must always be exported])
8267_LT_TAGDECL([], [prelink_cmds], [2],
8268 [Commands necessary for linking programs (against libraries) with templates])
8269_LT_TAGDECL([], [postlink_cmds], [2],
8270 [Commands necessary for finishing linking programs])
8271_LT_TAGDECL([], [file_list_spec], [1],
8272 [Specify filename containing input files])
8273dnl FIXME: Not yet implemented
8274dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
8275dnl [Compiler flag to generate thread safe objects])
8276])# _LT_LINKER_SHLIBS
8277
8278
8279# _LT_LANG_C_CONFIG([TAG])
8280# ------------------------
8281# Ensure that the configuration variables for a C compiler are suitably
8282# defined. These variables are subsequently used by _LT_CONFIG to write
8283# the compiler configuration to `libtool'.
8284m4_defun([_LT_LANG_C_CONFIG],
8285[m4_require([_LT_DECL_EGREP])dnl
8286lt_save_CC="$CC"
8287AC_LANG_PUSH(C)
8288
8289# Source file extension for C test sources.
8290ac_ext=c
8291
8292# Object file extension for compiled C test sources.
8293objext=o
8294_LT_TAGVAR(objext, $1)=$objext
8295
8296# Code to be used in simple compile tests
8297lt_simple_compile_test_code="int some_variable = 0;"
8298
8299# Code to be used in simple link tests
8300lt_simple_link_test_code='int main(){return(0);}'
8301
8302_LT_TAG_COMPILER
8303# Save the default compiler, since it gets overwritten when the other
8304# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
8305compiler_DEFAULT=$CC
8306
8307# save warnings/boilerplate of simple test code
8308_LT_COMPILER_BOILERPLATE
8309_LT_LINKER_BOILERPLATE
8310
8311if test -n "$compiler"; then
8312 _LT_COMPILER_NO_RTTI($1)
8313 _LT_COMPILER_PIC($1)
8314 _LT_COMPILER_C_O($1)
8315 _LT_COMPILER_FILE_LOCKS($1)
8316 _LT_LINKER_SHLIBS($1)
8317 _LT_SYS_DYNAMIC_LINKER($1)
8318 _LT_LINKER_HARDCODE_LIBPATH($1)
8319 LT_SYS_DLOPEN_SELF
8320 _LT_CMD_STRIPLIB
8321
8322 # Report which library types will actually be built
8323 AC_MSG_CHECKING([if libtool supports shared libraries])
8324 AC_MSG_RESULT([$can_build_shared])
8325
8326 AC_MSG_CHECKING([whether to build shared libraries])
8327 test "$can_build_shared" = "no" && enable_shared=no
8328
8329 # On AIX, shared libraries and static libraries use the same namespace, and
8330 # are all built from PIC.
8331 case $host_os in
8332 aix3*)
8333 test "$enable_shared" = yes && enable_static=no
8334 if test -n "$RANLIB"; then
8335 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8336 postinstall_cmds='$RANLIB $lib'
8337 fi
8338 ;;
8339
8340 aix[[4-9]]*)
8341 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8342 test "$enable_shared" = yes && enable_static=no
8343 fi
8344 ;;
8345 esac
8346 AC_MSG_RESULT([$enable_shared])
8347
8348 AC_MSG_CHECKING([whether to build static libraries])
8349 # Make sure either enable_shared or enable_static is yes.
8350 test "$enable_shared" = yes || enable_static=yes
8351 AC_MSG_RESULT([$enable_static])
8352
8353 _LT_CONFIG($1)
8354fi
8355AC_LANG_POP
8356CC="$lt_save_CC"
8357])# _LT_LANG_C_CONFIG
8358
8359
8360# _LT_LANG_CXX_CONFIG([TAG])
8361# --------------------------
8362# Ensure that the configuration variables for a C++ compiler are suitably
8363# defined. These variables are subsequently used by _LT_CONFIG to write
8364# the compiler configuration to `libtool'.
8365m4_defun([_LT_LANG_CXX_CONFIG],
8366[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8367m4_require([_LT_DECL_EGREP])dnl
8368m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8369if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
8370 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
8371 (test "X$CXX" != "Xg++"))) ; then
8372 AC_PROG_CXXCPP
8373else
8374 _lt_caught_CXX_error=yes
8375fi
8376
8377AC_LANG_PUSH(C++)
8378_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8379_LT_TAGVAR(allow_undefined_flag, $1)=
8380_LT_TAGVAR(always_export_symbols, $1)=no
8381_LT_TAGVAR(archive_expsym_cmds, $1)=
8382_LT_TAGVAR(compiler_needs_object, $1)=no
8383_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8384_LT_TAGVAR(hardcode_direct, $1)=no
8385_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8386_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8387_LT_TAGVAR(hardcode_libdir_separator, $1)=
8388_LT_TAGVAR(hardcode_minus_L, $1)=no
8389_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8390_LT_TAGVAR(hardcode_automatic, $1)=no
8391_LT_TAGVAR(inherit_rpath, $1)=no
8392_LT_TAGVAR(module_cmds, $1)=
8393_LT_TAGVAR(module_expsym_cmds, $1)=
8394_LT_TAGVAR(link_all_deplibs, $1)=unknown
8395_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8396_LT_TAGVAR(reload_flag, $1)=$reload_flag
8397_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8398_LT_TAGVAR(no_undefined_flag, $1)=
8399_LT_TAGVAR(whole_archive_flag_spec, $1)=
8400_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8401
8402# Source file extension for C++ test sources.
8403ac_ext=cpp
8404
8405# Object file extension for compiled C++ test sources.
8406objext=o
8407_LT_TAGVAR(objext, $1)=$objext
8408
8409# No sense in running all these tests if we already determined that
8410# the CXX compiler isn't working. Some variables (like enable_shared)
8411# are currently assumed to apply to all compilers on this platform,
8412# and will be corrupted by setting them based on a non-working compiler.
8413if test "$_lt_caught_CXX_error" != yes; then
8414 # Code to be used in simple compile tests
8415 lt_simple_compile_test_code="int some_variable = 0;"
8416
8417 # Code to be used in simple link tests
8418 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
8419
8420 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8421 _LT_TAG_COMPILER
8422
8423 # save warnings/boilerplate of simple test code
8424 _LT_COMPILER_BOILERPLATE
8425 _LT_LINKER_BOILERPLATE
8426
8427 # Allow CC to be a program name with arguments.
8428 lt_save_CC=$CC
8429 lt_save_CFLAGS=$CFLAGS
8430 lt_save_LD=$LD
8431 lt_save_GCC=$GCC
8432 GCC=$GXX
8433 lt_save_with_gnu_ld=$with_gnu_ld
8434 lt_save_path_LD=$lt_cv_path_LD
8435 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8436 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8437 else
8438 $as_unset lt_cv_prog_gnu_ld
8439 fi
8440 if test -n "${lt_cv_path_LDCXX+set}"; then
8441 lt_cv_path_LD=$lt_cv_path_LDCXX
8442 else
8443 $as_unset lt_cv_path_LD
8444 fi
8445 test -z "${LDCXX+set}" || LD=$LDCXX
8446 CC=${CXX-"c++"}
8447 CFLAGS=$CXXFLAGS
8448 compiler=$CC
8449 _LT_TAGVAR(compiler, $1)=$CC
8450 _LT_CC_BASENAME([$compiler])
8451
8452 if test -n "$compiler"; then
8453 # We don't want -fno-exception when compiling C++ code, so set the
8454 # no_builtin_flag separately
8455 if test "$GXX" = yes; then
8456 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8457 else
8458 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8459 fi
8460
8461 if test "$GXX" = yes; then
8462 # Set up default GNU C++ configuration
8463
8464 LT_PATH_LD
8465
8466 # Check if GNU C++ uses GNU ld as the underlying linker, since the
8467 # archiving commands below assume that GNU ld is being used.
8468 if test "$with_gnu_ld" = yes; then
8469 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8470 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8471
8472 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8473 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8474
8475 # If archive_cmds runs LD, not CC, wlarc should be empty
8476 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8477 # investigate it a little bit more. (MM)
8478 wlarc='${wl}'
8479
8480 # ancient GNU ld didn't support --whole-archive et. al.
8481 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
8482 $GREP 'no-whole-archive' > /dev/null; then
8483 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8484 else
8485 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8486 fi
8487 else
8488 with_gnu_ld=no
8489 wlarc=
8490
8491 # A generic and very simple default shared library creation
8492 # command for GNU C++ for the case where it uses the native
8493 # linker, instead of GNU ld. If possible, this setting should
8494 # overridden to take advantage of the native linker features on
8495 # the platform it is being used on.
8496 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8497 fi
8498
8499 # Commands to make compiler produce verbose output that lists
8500 # what "hidden" libraries, object files and flags are used when
8501 # linking a shared library.
8502 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8503
8504 else
8505 GXX=no
8506 with_gnu_ld=no
8507 wlarc=
8508 fi
8509
8510 # PORTME: fill in a description of your system's C++ link characteristics
8511 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8512 _LT_TAGVAR(ld_shlibs, $1)=yes
8513 case $host_os in
8514 aix3*)
8515 # FIXME: insert proper C++ library support
8516 _LT_TAGVAR(ld_shlibs, $1)=no
8517 ;;
8518 aix[[4-9]]*)
8519 if test "$host_cpu" = ia64; then
8520 # On IA64, the linker does run time linking by default, so we don't
8521 # have to do anything special.
8522 aix_use_runtimelinking=no
8523 exp_sym_flag='-Bexport'
8524 no_entry_flag=""
8525 else
8526 aix_use_runtimelinking=no
8527
8528 # Test if we are trying to use run time linking or normal
8529 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8530 # need to do runtime linking.
8531 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8532 for ld_flag in $LDFLAGS; do
8533 case $ld_flag in
8534 *-brtl*)
8535 aix_use_runtimelinking=yes
8536 break
8537 ;;
8538 esac
8539 done
8540 ;;
8541 esac
8542
8543 exp_sym_flag='-bexport'
8544 no_entry_flag='-bnoentry'
8545 fi
8546
8547 # When large executables or shared objects are built, AIX ld can
8548 # have problems creating the table of contents. If linking a library
8549 # or program results in "error TOC overflow" add -mminimal-toc to
8550 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8551 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8552
8553 _LT_TAGVAR(archive_cmds, $1)=''
8554 _LT_TAGVAR(hardcode_direct, $1)=yes
8555 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8556 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8557 _LT_TAGVAR(link_all_deplibs, $1)=yes
8558 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
8559
8560 if test "$GXX" = yes; then
8561 case $host_os in aix4.[[012]]|aix4.[[012]].*)
8562 # We only want to do this on AIX 4.2 and lower, the check
8563 # below for broken collect2 doesn't work under 4.3+
8564 collect2name=`${CC} -print-prog-name=collect2`
8565 if test -f "$collect2name" &&
8566 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8567 then
8568 # We have reworked collect2
8569 :
8570 else
8571 # We have old collect2
8572 _LT_TAGVAR(hardcode_direct, $1)=unsupported
8573 # It fails to find uninstalled libraries when the uninstalled
8574 # path is not listed in the libpath. Setting hardcode_minus_L
8575 # to unsupported forces relinking
8576 _LT_TAGVAR(hardcode_minus_L, $1)=yes
8577 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8578 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8579 fi
8580 esac
8581 shared_flag='-shared'
8582 if test "$aix_use_runtimelinking" = yes; then
8583 shared_flag="$shared_flag "'${wl}-G'
8584 fi
8585 else
8586 # not using gcc
8587 if test "$host_cpu" = ia64; then
8588 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8589 # chokes on -Wl,-G. The following line is correct:
8590 shared_flag='-G'
8591 else
8592 if test "$aix_use_runtimelinking" = yes; then
8593 shared_flag='${wl}-G'
8594 else
8595 shared_flag='${wl}-bM:SRE'
8596 fi
8597 fi
8598 fi
8599
8600 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8601 # It seems that -bexpall does not export symbols beginning with
8602 # underscore (_), so it is better to generate a list of symbols to
8603 # export.
8604 _LT_TAGVAR(always_export_symbols, $1)=yes
8605 if test "$aix_use_runtimelinking" = yes; then
8606 # Warning - without using the other runtime loading flags (-brtl),
8607 # -berok will link without error, but may produce a broken library.
8608 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8609 # Determine the default libpath from the value encoded in an empty
8610 # executable.
8611 _LT_SYS_MODULE_PATH_AIX([$1])
8612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8613
8614 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8615 else
8616 if test "$host_cpu" = ia64; then
8617 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8618 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8619 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
8620 else
8621 # Determine the default libpath from the value encoded in an
8622 # empty executable.
8623 _LT_SYS_MODULE_PATH_AIX([$1])
8624 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8625 # Warning - without using the other run time loading flags,
8626 # -berok will link without error, but may produce a broken library.
8627 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8628 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8629 if test "$with_gnu_ld" = yes; then
8630 # We only use this code for GNU lds that support --whole-archive.
8631 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8632 else
8633 # Exported symbols can be pulled into shared objects from archives
8634 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8635 fi
8636 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8637 # This is similar to how AIX traditionally builds its shared
8638 # libraries.
8639 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8640 fi
8641 fi
8642 ;;
8643
8644 beos*)
8645 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8646 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8647 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8648 # support --undefined. This deserves some investigation. FIXME
8649 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8650 else
8651 _LT_TAGVAR(ld_shlibs, $1)=no
8652 fi
8653 ;;
8654
8655 chorus*)
8656 case $cc_basename in
8657 *)
8658 # FIXME: insert proper C++ library support
8659 _LT_TAGVAR(ld_shlibs, $1)=no
8660 ;;
8661 esac
8662 ;;
8663
8664 cygwin* | mingw* | pw32* | cegcc*)
8665 case $GXX,$cc_basename in
8666 ,cl* | no,cl*)
8667 # Native MSVC
8668 # hardcode_libdir_flag_spec is actually meaningless, as there is
8669 # no search path for DLLs.
8670 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8671 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8672 _LT_TAGVAR(always_export_symbols, $1)=yes
8673 _LT_TAGVAR(file_list_spec, $1)='@'
8674 # Tell ltmain to make .lib files, not .a files.
8675 libext=lib
8676 # Tell ltmain to make .dll files, not .so files.
8677 shrext_cmds=".dll"
8678 # FIXME: Setting linknames here is a bad hack.
8679 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
8680 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8681 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
8682 else
8683 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
8684 fi~
8685 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8686 linknames='
8687 # The linker will not automatically build a static lib if we build a DLL.
8688 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8689 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8690 # Don't use ranlib
8691 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
8692 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
8693 lt_tool_outputfile="@TOOL_OUTPUT@"~
8694 case $lt_outputfile in
8695 *.exe|*.EXE) ;;
8696 *)
8697 lt_outputfile="$lt_outputfile.exe"
8698 lt_tool_outputfile="$lt_tool_outputfile.exe"
8699 ;;
8700 esac~
8701 func_to_tool_file "$lt_outputfile"~
8702 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
8703 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8704 $RM "$lt_outputfile.manifest";
8705 fi'
8706 ;;
8707 *)
8708 # g++
8709 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8710 # as there is no search path for DLLs.
8711 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8712 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8713 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8714 _LT_TAGVAR(always_export_symbols, $1)=no
8715 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8716
8717 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8718 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8719 # If the export-symbols file already is a .def file (1st line
8720 # is EXPORTS), use it as is; otherwise, prepend...
8721 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8722 cp $export_symbols $output_objdir/$soname.def;
8723 else
8724 echo EXPORTS > $output_objdir/$soname.def;
8725 cat $export_symbols >> $output_objdir/$soname.def;
8726 fi~
8727 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8728 else
8729 _LT_TAGVAR(ld_shlibs, $1)=no
8730 fi
8731 ;;
8732 esac
8733 ;;
8734 darwin* | rhapsody*)
8735 _LT_DARWIN_LINKER_FEATURES($1)
8736 ;;
8737
8738 dgux*)
8739 case $cc_basename in
8740 ec++*)
8741 # FIXME: insert proper C++ library support
8742 _LT_TAGVAR(ld_shlibs, $1)=no
8743 ;;
8744 ghcx*)
8745 # Green Hills C++ Compiler
8746 # FIXME: insert proper C++ library support
8747 _LT_TAGVAR(ld_shlibs, $1)=no
8748 ;;
8749 *)
8750 # FIXME: insert proper C++ library support
8751 _LT_TAGVAR(ld_shlibs, $1)=no
8752 ;;
8753 esac
8754 ;;
8755
8756 freebsd2.*)
8757 # C++ shared libraries reported to be fairly broken before
8758 # switch to ELF
8759 _LT_TAGVAR(ld_shlibs, $1)=no
8760 ;;
8761
8762 freebsd-elf*)
8763 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8764 ;;
8765
8766 freebsd* | dragonfly*)
8767 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8768 # conventions
8769 _LT_TAGVAR(ld_shlibs, $1)=yes
8770 ;;
8771
8772 haiku*)
8773 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8774 _LT_TAGVAR(link_all_deplibs, $1)=yes
8775 ;;
8776
8777 hpux9*)
8778 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8779 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8780 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8781 _LT_TAGVAR(hardcode_direct, $1)=yes
8782 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8783 # but as the default
8784 # location of the library.
8785
8786 case $cc_basename in
8787 CC*)
8788 # FIXME: insert proper C++ library support
8789 _LT_TAGVAR(ld_shlibs, $1)=no
8790 ;;
8791 aCC*)
8792 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8793 # Commands to make compiler produce verbose output that lists
8794 # what "hidden" libraries, object files and flags are used when
8795 # linking a shared library.
8796 #
8797 # There doesn't appear to be a way to prevent this compiler from
8798 # explicitly linking system object files so we need to strip them
8799 # from the output so that they don't get included in the library
8800 # dependencies.
8801 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
8802 ;;
8803 *)
8804 if test "$GXX" = yes; then
8805 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8806 else
8807 # FIXME: insert proper C++ library support
8808 _LT_TAGVAR(ld_shlibs, $1)=no
8809 fi
8810 ;;
8811 esac
8812 ;;
8813
8814 hpux10*|hpux11*)
8815 if test $with_gnu_ld = no; then
8816 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8817 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8818
8819 case $host_cpu in
8820 hppa*64*|ia64*)
8821 ;;
8822 *)
8823 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8824 ;;
8825 esac
8826 fi
8827 case $host_cpu in
8828 hppa*64*|ia64*)
8829 _LT_TAGVAR(hardcode_direct, $1)=no
8830 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8831 ;;
8832 *)
8833 _LT_TAGVAR(hardcode_direct, $1)=yes
8834 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8835 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8836 # but as the default
8837 # location of the library.
8838 ;;
8839 esac
8840
8841 case $cc_basename in
8842 CC*)
8843 # FIXME: insert proper C++ library support
8844 _LT_TAGVAR(ld_shlibs, $1)=no
8845 ;;
8846 aCC*)
8847 case $host_cpu in
8848 hppa*64*)
8849 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8850 ;;
8851 ia64*)
8852 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8853 ;;
8854 *)
8855 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8856 ;;
8857 esac
8858 # Commands to make compiler produce verbose output that lists
8859 # what "hidden" libraries, object files and flags are used when
8860 # linking a shared library.
8861 #
8862 # There doesn't appear to be a way to prevent this compiler from
8863 # explicitly linking system object files so we need to strip them
8864 # from the output so that they don't get included in the library
8865 # dependencies.
8866 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
8867 ;;
8868 *)
8869 if test "$GXX" = yes; then
8870 if test $with_gnu_ld = no; then
8871 case $host_cpu in
8872 hppa*64*)
8873 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8874 ;;
8875 ia64*)
8876 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8877 ;;
8878 *)
8879 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8880 ;;
8881 esac
8882 fi
8883 else
8884 # FIXME: insert proper C++ library support
8885 _LT_TAGVAR(ld_shlibs, $1)=no
8886 fi
8887 ;;
8888 esac
8889 ;;
8890
8891 interix[[3-9]]*)
8892 _LT_TAGVAR(hardcode_direct, $1)=no
8893 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8895 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8896 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8897 # Instead, shared libraries are loaded at an image base (0x10000000 by
8898 # default) and relocated if they conflict, which is a slow very memory
8899 # consuming and fragmenting process. To avoid this, we pick a random,
8900 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8901 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8902 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8903 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8904 ;;
8905 irix5* | irix6*)
8906 case $cc_basename in
8907 CC*)
8908 # SGI C++
8909 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8910
8911 # Archives containing C++ object files must be created using
8912 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
8913 # necessary to make sure instantiated templates are included
8914 # in the archive.
8915 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8916 ;;
8917 *)
8918 if test "$GXX" = yes; then
8919 if test "$with_gnu_ld" = no; then
8920 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8921 else
8922 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
8923 fi
8924 fi
8925 _LT_TAGVAR(link_all_deplibs, $1)=yes
8926 ;;
8927 esac
8928 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8929 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8930 _LT_TAGVAR(inherit_rpath, $1)=yes
8931 ;;
8932
8933 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8934 case $cc_basename in
8935 KCC*)
8936 # Kuck and Associates, Inc. (KAI) C++ Compiler
8937
8938 # KCC will only create a shared library if the output file
8939 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8940 # to its proper name (with version) after linking.
8941 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8942 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8943 # Commands to make compiler produce verbose output that lists
8944 # what "hidden" libraries, object files and flags are used when
8945 # linking a shared library.
8946 #
8947 # There doesn't appear to be a way to prevent this compiler from
8948 # explicitly linking system object files so we need to strip them
8949 # from the output so that they don't get included in the library
8950 # dependencies.
8951 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
8952
8953 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8954 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8955
8956 # Archives containing C++ object files must be created using
8957 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8958 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8959 ;;
8960 icpc* | ecpc* )
8961 # Intel C++
8962 with_gnu_ld=yes
8963 # version 8.0 and above of icpc choke on multiply defined symbols
8964 # if we add $predep_objects and $postdep_objects, however 7.1 and
8965 # earlier do not add the objects themselves.
8966 case `$CC -V 2>&1` in
8967 *"Version 7."*)
8968 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8969 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8970 ;;
8971 *) # Version 8.0 or newer
8972 tmp_idyn=
8973 case $host_cpu in
8974 ia64*) tmp_idyn=' -i_dynamic';;
8975 esac
8976 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8977 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8978 ;;
8979 esac
8980 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8981 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8982 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8983 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8984 ;;
8985 pgCC* | pgcpp*)
8986 # Portland Group C++ compiler
8987 case `$CC -V` in
8988 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8989 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8990 rm -rf $tpldir~
8991 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8992 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8993 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8994 rm -rf $tpldir~
8995 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8996 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8997 $RANLIB $oldlib'
8998 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8999 rm -rf $tpldir~
9000 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
9001 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
9002 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
9003 rm -rf $tpldir~
9004 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
9005 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
9006 ;;
9007 *) # Version 6 and above use weak symbols
9008 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
9009 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
9010 ;;
9011 esac
9012
9013 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
9014 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9015 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9016 ;;
9017 cxx*)
9018 # Compaq C++
9019 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
9020 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
9021
9022 runpath_var=LD_RUN_PATH
9023 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9024 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9025
9026 # Commands to make compiler produce verbose output that lists
9027 # what "hidden" libraries, object files and flags are used when
9028 # linking a shared library.
9029 #
9030 # There doesn't appear to be a way to prevent this compiler from
9031 # explicitly linking system object files so we need to strip them
9032 # from the output so that they don't get included in the library
9033 # dependencies.
9034 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
9035 ;;
9036 xl* | mpixl* | bgxl*)
9037 # IBM XL 8.0 on PPC, with GNU ld
9038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9039 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9040 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9041 if test "x$supports_anon_versioning" = xyes; then
9042 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
9043 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9044 echo "local: *; };" >> $output_objdir/$libname.ver~
9045 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9046 fi
9047 ;;
9048 *)
9049 case `$CC -V 2>&1 | sed 5q` in
9050 *Sun\ C*)
9051 # Sun C++ 5.9
9052 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9053 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9054 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
9055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9056 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9057 _LT_TAGVAR(compiler_needs_object, $1)=yes
9058
9059 # Not sure whether something based on
9060 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
9061 # would be better.
9062 output_verbose_link_cmd='func_echo_all'
9063
9064 # Archives containing C++ object files must be created using
9065 # "CC -xar", where "CC" is the Sun C++ compiler. This is
9066 # necessary to make sure instantiated templates are included
9067 # in the archive.
9068 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9069 ;;
9070 esac
9071 ;;
9072 esac
9073 ;;
9074
9075 lynxos*)
9076 # FIXME: insert proper C++ library support
9077 _LT_TAGVAR(ld_shlibs, $1)=no
9078 ;;
9079
9080 m88k*)
9081 # FIXME: insert proper C++ library support
9082 _LT_TAGVAR(ld_shlibs, $1)=no
9083 ;;
9084
9085 mvs*)
9086 case $cc_basename in
9087 cxx*)
9088 # FIXME: insert proper C++ library support
9089 _LT_TAGVAR(ld_shlibs, $1)=no
9090 ;;
9091 *)
9092 # FIXME: insert proper C++ library support
9093 _LT_TAGVAR(ld_shlibs, $1)=no
9094 ;;
9095 esac
9096 ;;
9097
9098 netbsd*)
9099 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9100 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
9101 wlarc=
9102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9103 _LT_TAGVAR(hardcode_direct, $1)=yes
9104 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9105 fi
9106 # Workaround some broken pre-1.5 toolchains
9107 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
9108 ;;
9109
9110 *nto* | *qnx*)
9111 _LT_TAGVAR(ld_shlibs, $1)=yes
9112 ;;
9113
9114 openbsd2*)
9115 # C++ shared libraries are fairly broken
9116 _LT_TAGVAR(ld_shlibs, $1)=no
9117 ;;
9118
9119 openbsd*)
9120 if test -f /usr/libexec/ld.so; then
9121 _LT_TAGVAR(hardcode_direct, $1)=yes
9122 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9123 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9124 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
9125 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9126 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9127 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
9128 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9129 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9130 fi
9131 output_verbose_link_cmd=func_echo_all
9132 else
9133 _LT_TAGVAR(ld_shlibs, $1)=no
9134 fi
9135 ;;
9136
9137 osf3* | osf4* | osf5*)
9138 case $cc_basename in
9139 KCC*)
9140 # Kuck and Associates, Inc. (KAI) C++ Compiler
9141
9142 # KCC will only create a shared library if the output file
9143 # ends with ".so" (or ".sl" for HP-UX), so rename the library
9144 # to its proper name (with version) after linking.
9145 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
9146
9147 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9148 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9149
9150 # Archives containing C++ object files must be created using
9151 # the KAI C++ compiler.
9152 case $host in
9153 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
9154 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
9155 esac
9156 ;;
9157 RCC*)
9158 # Rational C++ 2.4.1
9159 # FIXME: insert proper C++ library support
9160 _LT_TAGVAR(ld_shlibs, $1)=no
9161 ;;
9162 cxx*)
9163 case $host in
9164 osf3*)
9165 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9166 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9167 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9168 ;;
9169 *)
9170 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9171 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9172 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9173 echo "-hidden">> $lib.exp~
9174 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
9175 $RM $lib.exp'
9176 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9177 ;;
9178 esac
9179
9180 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9181
9182 # Commands to make compiler produce verbose output that lists
9183 # what "hidden" libraries, object files and flags are used when
9184 # linking a shared library.
9185 #
9186 # There doesn't appear to be a way to prevent this compiler from
9187 # explicitly linking system object files so we need to strip them
9188 # from the output so that they don't get included in the library
9189 # dependencies.
9190 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
9191 ;;
9192 *)
9193 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9194 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9195 case $host in
9196 osf3*)
9197 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9198 ;;
9199 *)
9200 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9201 ;;
9202 esac
9203
9204 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9205 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9206
9207 # Commands to make compiler produce verbose output that lists
9208 # what "hidden" libraries, object files and flags are used when
9209 # linking a shared library.
9210 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9211
9212 else
9213 # FIXME: insert proper C++ library support
9214 _LT_TAGVAR(ld_shlibs, $1)=no
9215 fi
9216 ;;
9217 esac
9218 ;;
9219
9220 psos*)
9221 # FIXME: insert proper C++ library support
9222 _LT_TAGVAR(ld_shlibs, $1)=no
9223 ;;
9224
9225 sunos4*)
9226 case $cc_basename in
9227 CC*)
9228 # Sun C++ 4.x
9229 # FIXME: insert proper C++ library support
9230 _LT_TAGVAR(ld_shlibs, $1)=no
9231 ;;
9232 lcc*)
9233 # Lucid
9234 # FIXME: insert proper C++ library support
9235 _LT_TAGVAR(ld_shlibs, $1)=no
9236 ;;
9237 *)
9238 # FIXME: insert proper C++ library support
9239 _LT_TAGVAR(ld_shlibs, $1)=no
9240 ;;
9241 esac
9242 ;;
9243
9244 solaris*)
9245 case $cc_basename in
9246 CC* | sunCC*)
9247 # Sun C++ 4.2, 5.x and Centerline C++
9248 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
9249 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9250 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9251 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9252 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
9253
9254 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9255 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9256 case $host_os in
9257 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9258 *)
9259 # The compiler driver will combine and reorder linker options,
9260 # but understands `-z linker_flag'.
9261 # Supported since Solaris 2.6 (maybe 2.5.1?)
9262 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9263 ;;
9264 esac
9265 _LT_TAGVAR(link_all_deplibs, $1)=yes
9266
9267 output_verbose_link_cmd='func_echo_all'
9268
9269 # Archives containing C++ object files must be created using
9270 # "CC -xar", where "CC" is the Sun C++ compiler. This is
9271 # necessary to make sure instantiated templates are included
9272 # in the archive.
9273 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9274 ;;
9275 gcx*)
9276 # Green Hills C++ Compiler
9277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9278
9279 # The C++ compiler must be used to create the archive.
9280 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9281 ;;
9282 *)
9283 # GNU C++ compiler with Solaris linker
9284 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9285 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9286 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
9287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9288 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9289 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
9290
9291 # Commands to make compiler produce verbose output that lists
9292 # what "hidden" libraries, object files and flags are used when
9293 # linking a shared library.
9294 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9295 else
9296 # g++ 2.7 appears to require `-G' NOT `-shared' on this
9297 # platform.
9298 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9299 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9300 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
9301
9302 # Commands to make compiler produce verbose output that lists
9303 # what "hidden" libraries, object files and flags are used when
9304 # linking a shared library.
9305 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9306 fi
9307
9308 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9309 case $host_os in
9310 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9311 *)
9312 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9313 ;;
9314 esac
9315 fi
9316 ;;
9317 esac
9318 ;;
9319
9320 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9321 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9322 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9323 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9324 runpath_var='LD_RUN_PATH'
9325
9326 case $cc_basename in
9327 CC*)
9328 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9329 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9330 ;;
9331 *)
9332 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9333 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9334 ;;
9335 esac
9336 ;;
9337
9338 sysv5* | sco3.2v5* | sco5v6*)
9339 # Note: We can NOT use -z defs as we might desire, because we do not
9340 # link with -lc, and that would cause any symbols used from libc to
9341 # always be unresolved, which means just about no library would
9342 # ever link correctly. If we're not using GNU ld we use -z text
9343 # though, which does catch some bad symbols but isn't as heavy-handed
9344 # as -z defs.
9345 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9346 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
9347 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9348 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9349 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
9350 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9351 _LT_TAGVAR(link_all_deplibs, $1)=yes
9352 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
9353 runpath_var='LD_RUN_PATH'
9354
9355 case $cc_basename in
9356 CC*)
9357 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9358 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9359 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
9360 '"$_LT_TAGVAR(old_archive_cmds, $1)"
9361 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
9362 '"$_LT_TAGVAR(reload_cmds, $1)"
9363 ;;
9364 *)
9365 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9366 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9367 ;;
9368 esac
9369 ;;
9370
9371 tandem*)
9372 case $cc_basename in
9373 NCC*)
9374 # NonStop-UX NCC 3.20
9375 # FIXME: insert proper C++ library support
9376 _LT_TAGVAR(ld_shlibs, $1)=no
9377 ;;
9378 *)
9379 # FIXME: insert proper C++ library support
9380 _LT_TAGVAR(ld_shlibs, $1)=no
9381 ;;
9382 esac
9383 ;;
9384
9385 vxworks*)
9386 # FIXME: insert proper C++ library support
9387 _LT_TAGVAR(ld_shlibs, $1)=no
9388 ;;
9389
9390 *)
9391 # FIXME: insert proper C++ library support
9392 _LT_TAGVAR(ld_shlibs, $1)=no
9393 ;;
9394 esac
9395
9396 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
9397 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9398
9399 _LT_TAGVAR(GCC, $1)="$GXX"
9400 _LT_TAGVAR(LD, $1)="$LD"
9401
9402 ## CAVEAT EMPTOR:
9403 ## There is no encapsulation within the following macros, do not change
9404 ## the running order or otherwise move them around unless you know exactly
9405 ## what you are doing...
9406 _LT_SYS_HIDDEN_LIBDEPS($1)
9407 _LT_COMPILER_PIC($1)
9408 _LT_COMPILER_C_O($1)
9409 _LT_COMPILER_FILE_LOCKS($1)
9410 _LT_LINKER_SHLIBS($1)
9411 _LT_SYS_DYNAMIC_LINKER($1)
9412 _LT_LINKER_HARDCODE_LIBPATH($1)
9413
9414 _LT_CONFIG($1)
9415 fi # test -n "$compiler"
9416
9417 CC=$lt_save_CC
9418 CFLAGS=$lt_save_CFLAGS
9419 LDCXX=$LD
9420 LD=$lt_save_LD
9421 GCC=$lt_save_GCC
9422 with_gnu_ld=$lt_save_with_gnu_ld
9423 lt_cv_path_LDCXX=$lt_cv_path_LD
9424 lt_cv_path_LD=$lt_save_path_LD
9425 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9426 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9427fi # test "$_lt_caught_CXX_error" != yes
9428
9429AC_LANG_POP
9430])# _LT_LANG_CXX_CONFIG
9431
9432
9433# _LT_FUNC_STRIPNAME_CNF
9434# ----------------------
9435# func_stripname_cnf prefix suffix name
9436# strip PREFIX and SUFFIX off of NAME.
9437# PREFIX and SUFFIX must not contain globbing or regex special
9438# characters, hashes, percent signs, but SUFFIX may contain a leading
9439# dot (in which case that matches only a dot).
9440#
9441# This function is identical to the (non-XSI) version of func_stripname,
9442# except this one can be used by m4 code that may be executed by configure,
9443# rather than the libtool script.
9444m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
9445AC_REQUIRE([_LT_DECL_SED])
9446AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
9447func_stripname_cnf ()
9448{
9449 case ${2} in
9450 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
9451 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
9452 esac
9453} # func_stripname_cnf
9454])# _LT_FUNC_STRIPNAME_CNF
9455
9456# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
9457# ---------------------------------
9458# Figure out "hidden" library dependencies from verbose
9459# compiler output when linking a shared library.
9460# Parse the compiler output and extract the necessary
9461# objects, libraries and library flags.
9462m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
9463[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
9464AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
9465# Dependencies to place before and after the object being linked:
9466_LT_TAGVAR(predep_objects, $1)=
9467_LT_TAGVAR(postdep_objects, $1)=
9468_LT_TAGVAR(predeps, $1)=
9469_LT_TAGVAR(postdeps, $1)=
9470_LT_TAGVAR(compiler_lib_search_path, $1)=
9471
9472dnl we can't use the lt_simple_compile_test_code here,
9473dnl because it contains code intended for an executable,
9474dnl not a library. It's possible we should let each
9475dnl tag define a new lt_????_link_test_code variable,
9476dnl but it's only used here...
9477m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
9478int a;
9479void foo (void) { a = 0; }
9480_LT_EOF
9481], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
9482class Foo
9483{
9484public:
9485 Foo (void) { a = 0; }
9486private:
9487 int a;
9488};
9489_LT_EOF
9490], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
9491 subroutine foo
9492 implicit none
9493 integer*4 a
9494 a=0
9495 return
9496 end
9497_LT_EOF
9498], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
9499 subroutine foo
9500 implicit none
9501 integer a
9502 a=0
9503 return
9504 end
9505_LT_EOF
9506], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
9507public class foo {
9508 private int a;
9509 public void bar (void) {
9510 a = 0;
9511 }
9512};
9513_LT_EOF
9514], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
9515package foo
9516func foo() {
9517}
9518_LT_EOF
9519])
9520
9521_lt_libdeps_save_CFLAGS=$CFLAGS
9522case "$CC $CFLAGS " in #(
9523*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
9524*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
9525*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
9526esac
9527
9528dnl Parse the compiler output and extract the necessary
9529dnl objects, libraries and library flags.
9530if AC_TRY_EVAL(ac_compile); then
9531 # Parse the compiler output and extract the necessary
9532 # objects, libraries and library flags.
9533
9534 # Sentinel used to keep track of whether or not we are before
9535 # the conftest object file.
9536 pre_test_object_deps_done=no
9537
9538 for p in `eval "$output_verbose_link_cmd"`; do
9539 case ${prev}${p} in
9540
9541 -L* | -R* | -l*)
9542 # Some compilers place space between "-{L,R}" and the path.
9543 # Remove the space.
9544 if test $p = "-L" ||
9545 test $p = "-R"; then
9546 prev=$p
9547 continue
9548 fi
9549
9550 # Expand the sysroot to ease extracting the directories later.
9551 if test -z "$prev"; then
9552 case $p in
9553 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
9554 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
9555 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
9556 esac
9557 fi
9558 case $p in
9559 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
9560 esac
9561 if test "$pre_test_object_deps_done" = no; then
9562 case ${prev} in
9563 -L | -R)
9564 # Internal compiler library paths should come after those
9565 # provided the user. The postdeps already come after the
9566 # user supplied libs so there is no need to process them.
9567 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
9568 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9569 else
9570 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9571 fi
9572 ;;
9573 # The "-l" case would never come before the object being
9574 # linked, so don't bother handling this case.
9575 esac
9576 else
9577 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
9578 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
9579 else
9580 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
9581 fi
9582 fi
9583 prev=
9584 ;;
9585
9586 *.lto.$objext) ;; # Ignore GCC LTO objects
9587 *.$objext)
9588 # This assumes that the test object file only shows up
9589 # once in the compiler output.
9590 if test "$p" = "conftest.$objext"; then
9591 pre_test_object_deps_done=yes
9592 continue
9593 fi
9594
9595 if test "$pre_test_object_deps_done" = no; then
9596 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
9597 _LT_TAGVAR(predep_objects, $1)="$p"
9598 else
9599 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
9600 fi
9601 else
9602 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
9603 _LT_TAGVAR(postdep_objects, $1)="$p"
9604 else
9605 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
9606 fi
9607 fi
9608 ;;
9609
9610 *) ;; # Ignore the rest.
9611
9612 esac
9613 done
9614
9615 # Clean up.
9616 rm -f a.out a.exe
9617else
9618 echo "libtool.m4: error: problem compiling $1 test program"
9619fi
9620
9621$RM -f confest.$objext
9622CFLAGS=$_lt_libdeps_save_CFLAGS
9623
9624# PORTME: override above test on systems where it is broken
9625m4_if([$1], [CXX],
9626[case $host_os in
9627interix[[3-9]]*)
9628 # Interix 3.5 installs completely hosed .la files for C++, so rather than
9629 # hack all around it, let's just trust "g++" to DTRT.
9630 _LT_TAGVAR(predep_objects,$1)=
9631 _LT_TAGVAR(postdep_objects,$1)=
9632 _LT_TAGVAR(postdeps,$1)=
9633 ;;
9634
9635linux*)
9636 case `$CC -V 2>&1 | sed 5q` in
9637 *Sun\ C*)
9638 # Sun C++ 5.9
9639
9640 # The more standards-conforming stlport4 library is
9641 # incompatible with the Cstd library. Avoid specifying
9642 # it if it's in CXXFLAGS. Ignore libCrun as
9643 # -library=stlport4 depends on it.
9644 case " $CXX $CXXFLAGS " in
9645 *" -library=stlport4 "*)
9646 solaris_use_stlport4=yes
9647 ;;
9648 esac
9649
9650 if test "$solaris_use_stlport4" != yes; then
9651 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9652 fi
9653 ;;
9654 esac
9655 ;;
9656
9657solaris*)
9658 case $cc_basename in
9659 CC* | sunCC*)
9660 # The more standards-conforming stlport4 library is
9661 # incompatible with the Cstd library. Avoid specifying
9662 # it if it's in CXXFLAGS. Ignore libCrun as
9663 # -library=stlport4 depends on it.
9664 case " $CXX $CXXFLAGS " in
9665 *" -library=stlport4 "*)
9666 solaris_use_stlport4=yes
9667 ;;
9668 esac
9669
9670 # Adding this requires a known-good setup of shared libraries for
9671 # Sun compiler versions before 5.6, else PIC objects from an old
9672 # archive will be linked into the output, leading to subtle bugs.
9673 if test "$solaris_use_stlport4" != yes; then
9674 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9675 fi
9676 ;;
9677 esac
9678 ;;
9679esac
9680])
9681
9682case " $_LT_TAGVAR(postdeps, $1) " in
9683*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9684esac
9685 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9686if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9687 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
9688fi
9689_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9690 [The directories searched by this compiler when creating a shared library])
9691_LT_TAGDECL([], [predep_objects], [1],
9692 [Dependencies to place before and after the objects being linked to
9693 create a shared library])
9694_LT_TAGDECL([], [postdep_objects], [1])
9695_LT_TAGDECL([], [predeps], [1])
9696_LT_TAGDECL([], [postdeps], [1])
9697_LT_TAGDECL([], [compiler_lib_search_path], [1],
9698 [The library search path used internally by the compiler when linking
9699 a shared library])
9700])# _LT_SYS_HIDDEN_LIBDEPS
9701
9702
9703# _LT_LANG_F77_CONFIG([TAG])
9704# --------------------------
9705# Ensure that the configuration variables for a Fortran 77 compiler are
9706# suitably defined. These variables are subsequently used by _LT_CONFIG
9707# to write the compiler configuration to `libtool'.
9708m4_defun([_LT_LANG_F77_CONFIG],
9709[AC_LANG_PUSH(Fortran 77)
9710if test -z "$F77" || test "X$F77" = "Xno"; then
9711 _lt_disable_F77=yes
9712fi
9713
9714_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9715_LT_TAGVAR(allow_undefined_flag, $1)=
9716_LT_TAGVAR(always_export_symbols, $1)=no
9717_LT_TAGVAR(archive_expsym_cmds, $1)=
9718_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9719_LT_TAGVAR(hardcode_direct, $1)=no
9720_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9721_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9722_LT_TAGVAR(hardcode_libdir_separator, $1)=
9723_LT_TAGVAR(hardcode_minus_L, $1)=no
9724_LT_TAGVAR(hardcode_automatic, $1)=no
9725_LT_TAGVAR(inherit_rpath, $1)=no
9726_LT_TAGVAR(module_cmds, $1)=
9727_LT_TAGVAR(module_expsym_cmds, $1)=
9728_LT_TAGVAR(link_all_deplibs, $1)=unknown
9729_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9730_LT_TAGVAR(reload_flag, $1)=$reload_flag
9731_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9732_LT_TAGVAR(no_undefined_flag, $1)=
9733_LT_TAGVAR(whole_archive_flag_spec, $1)=
9734_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9735
9736# Source file extension for f77 test sources.
9737ac_ext=f
9738
9739# Object file extension for compiled f77 test sources.
9740objext=o
9741_LT_TAGVAR(objext, $1)=$objext
9742
9743# No sense in running all these tests if we already determined that
9744# the F77 compiler isn't working. Some variables (like enable_shared)
9745# are currently assumed to apply to all compilers on this platform,
9746# and will be corrupted by setting them based on a non-working compiler.
9747if test "$_lt_disable_F77" != yes; then
9748 # Code to be used in simple compile tests
9749 lt_simple_compile_test_code="\
9750 subroutine t
9751 return
9752 end
9753"
9754
9755 # Code to be used in simple link tests
9756 lt_simple_link_test_code="\
9757 program t
9758 end
9759"
9760
9761 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9762 _LT_TAG_COMPILER
9763
9764 # save warnings/boilerplate of simple test code
9765 _LT_COMPILER_BOILERPLATE
9766 _LT_LINKER_BOILERPLATE
9767
9768 # Allow CC to be a program name with arguments.
9769 lt_save_CC="$CC"
9770 lt_save_GCC=$GCC
9771 lt_save_CFLAGS=$CFLAGS
9772 CC=${F77-"f77"}
9773 CFLAGS=$FFLAGS
9774 compiler=$CC
9775 _LT_TAGVAR(compiler, $1)=$CC
9776 _LT_CC_BASENAME([$compiler])
9777 GCC=$G77
9778 if test -n "$compiler"; then
9779 AC_MSG_CHECKING([if libtool supports shared libraries])
9780 AC_MSG_RESULT([$can_build_shared])
9781
9782 AC_MSG_CHECKING([whether to build shared libraries])
9783 test "$can_build_shared" = "no" && enable_shared=no
9784
9785 # On AIX, shared libraries and static libraries use the same namespace, and
9786 # are all built from PIC.
9787 case $host_os in
9788 aix3*)
9789 test "$enable_shared" = yes && enable_static=no
9790 if test -n "$RANLIB"; then
9791 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9792 postinstall_cmds='$RANLIB $lib'
9793 fi
9794 ;;
9795 aix[[4-9]]*)
9796 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9797 test "$enable_shared" = yes && enable_static=no
9798 fi
9799 ;;
9800 esac
9801 AC_MSG_RESULT([$enable_shared])
9802
9803 AC_MSG_CHECKING([whether to build static libraries])
9804 # Make sure either enable_shared or enable_static is yes.
9805 test "$enable_shared" = yes || enable_static=yes
9806 AC_MSG_RESULT([$enable_static])
9807
9808 _LT_TAGVAR(GCC, $1)="$G77"
9809 _LT_TAGVAR(LD, $1)="$LD"
9810
9811 ## CAVEAT EMPTOR:
9812 ## There is no encapsulation within the following macros, do not change
9813 ## the running order or otherwise move them around unless you know exactly
9814 ## what you are doing...
9815 _LT_COMPILER_PIC($1)
9816 _LT_COMPILER_C_O($1)
9817 _LT_COMPILER_FILE_LOCKS($1)
9818 _LT_LINKER_SHLIBS($1)
9819 _LT_SYS_DYNAMIC_LINKER($1)
9820 _LT_LINKER_HARDCODE_LIBPATH($1)
9821
9822 _LT_CONFIG($1)
9823 fi # test -n "$compiler"
9824
9825 GCC=$lt_save_GCC
9826 CC="$lt_save_CC"
9827 CFLAGS="$lt_save_CFLAGS"
9828fi # test "$_lt_disable_F77" != yes
9829
9830AC_LANG_POP
9831])# _LT_LANG_F77_CONFIG
9832
9833
9834# _LT_LANG_FC_CONFIG([TAG])
9835# -------------------------
9836# Ensure that the configuration variables for a Fortran compiler are
9837# suitably defined. These variables are subsequently used by _LT_CONFIG
9838# to write the compiler configuration to `libtool'.
9839m4_defun([_LT_LANG_FC_CONFIG],
9840[AC_LANG_PUSH(Fortran)
9841
9842if test -z "$FC" || test "X$FC" = "Xno"; then
9843 _lt_disable_FC=yes
9844fi
9845
9846_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9847_LT_TAGVAR(allow_undefined_flag, $1)=
9848_LT_TAGVAR(always_export_symbols, $1)=no
9849_LT_TAGVAR(archive_expsym_cmds, $1)=
9850_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9851_LT_TAGVAR(hardcode_direct, $1)=no
9852_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9853_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9854_LT_TAGVAR(hardcode_libdir_separator, $1)=
9855_LT_TAGVAR(hardcode_minus_L, $1)=no
9856_LT_TAGVAR(hardcode_automatic, $1)=no
9857_LT_TAGVAR(inherit_rpath, $1)=no
9858_LT_TAGVAR(module_cmds, $1)=
9859_LT_TAGVAR(module_expsym_cmds, $1)=
9860_LT_TAGVAR(link_all_deplibs, $1)=unknown
9861_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9862_LT_TAGVAR(reload_flag, $1)=$reload_flag
9863_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9864_LT_TAGVAR(no_undefined_flag, $1)=
9865_LT_TAGVAR(whole_archive_flag_spec, $1)=
9866_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9867
9868# Source file extension for fc test sources.
9869ac_ext=${ac_fc_srcext-f}
9870
9871# Object file extension for compiled fc test sources.
9872objext=o
9873_LT_TAGVAR(objext, $1)=$objext
9874
9875# No sense in running all these tests if we already determined that
9876# the FC compiler isn't working. Some variables (like enable_shared)
9877# are currently assumed to apply to all compilers on this platform,
9878# and will be corrupted by setting them based on a non-working compiler.
9879if test "$_lt_disable_FC" != yes; then
9880 # Code to be used in simple compile tests
9881 lt_simple_compile_test_code="\
9882 subroutine t
9883 return
9884 end
9885"
9886
9887 # Code to be used in simple link tests
9888 lt_simple_link_test_code="\
9889 program t
9890 end
9891"
9892
9893 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9894 _LT_TAG_COMPILER
9895
9896 # save warnings/boilerplate of simple test code
9897 _LT_COMPILER_BOILERPLATE
9898 _LT_LINKER_BOILERPLATE
9899
9900 # Allow CC to be a program name with arguments.
9901 lt_save_CC="$CC"
9902 lt_save_GCC=$GCC
9903 lt_save_CFLAGS=$CFLAGS
9904 CC=${FC-"f95"}
9905 CFLAGS=$FCFLAGS
9906 compiler=$CC
9907 GCC=$ac_cv_fc_compiler_gnu
9908
9909 _LT_TAGVAR(compiler, $1)=$CC
9910 _LT_CC_BASENAME([$compiler])
9911
9912 if test -n "$compiler"; then
9913 AC_MSG_CHECKING([if libtool supports shared libraries])
9914 AC_MSG_RESULT([$can_build_shared])
9915
9916 AC_MSG_CHECKING([whether to build shared libraries])
9917 test "$can_build_shared" = "no" && enable_shared=no
9918
9919 # On AIX, shared libraries and static libraries use the same namespace, and
9920 # are all built from PIC.
9921 case $host_os in
9922 aix3*)
9923 test "$enable_shared" = yes && enable_static=no
9924 if test -n "$RANLIB"; then
9925 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9926 postinstall_cmds='$RANLIB $lib'
9927 fi
9928 ;;
9929 aix[[4-9]]*)
9930 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9931 test "$enable_shared" = yes && enable_static=no
9932 fi
9933 ;;
9934 esac
9935 AC_MSG_RESULT([$enable_shared])
9936
9937 AC_MSG_CHECKING([whether to build static libraries])
9938 # Make sure either enable_shared or enable_static is yes.
9939 test "$enable_shared" = yes || enable_static=yes
9940 AC_MSG_RESULT([$enable_static])
9941
9942 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9943 _LT_TAGVAR(LD, $1)="$LD"
9944
9945 ## CAVEAT EMPTOR:
9946 ## There is no encapsulation within the following macros, do not change
9947 ## the running order or otherwise move them around unless you know exactly
9948 ## what you are doing...
9949 _LT_SYS_HIDDEN_LIBDEPS($1)
9950 _LT_COMPILER_PIC($1)
9951 _LT_COMPILER_C_O($1)
9952 _LT_COMPILER_FILE_LOCKS($1)
9953 _LT_LINKER_SHLIBS($1)
9954 _LT_SYS_DYNAMIC_LINKER($1)
9955 _LT_LINKER_HARDCODE_LIBPATH($1)
9956
9957 _LT_CONFIG($1)
9958 fi # test -n "$compiler"
9959
9960 GCC=$lt_save_GCC
9961 CC=$lt_save_CC
9962 CFLAGS=$lt_save_CFLAGS
9963fi # test "$_lt_disable_FC" != yes
9964
9965AC_LANG_POP
9966])# _LT_LANG_FC_CONFIG
9967
9968
9969# _LT_LANG_GCJ_CONFIG([TAG])
9970# --------------------------
9971# Ensure that the configuration variables for the GNU Java Compiler compiler
9972# are suitably defined. These variables are subsequently used by _LT_CONFIG
9973# to write the compiler configuration to `libtool'.
9974m4_defun([_LT_LANG_GCJ_CONFIG],
9975[AC_REQUIRE([LT_PROG_GCJ])dnl
9976AC_LANG_SAVE
9977
9978# Source file extension for Java test sources.
9979ac_ext=java
9980
9981# Object file extension for compiled Java test sources.
9982objext=o
9983_LT_TAGVAR(objext, $1)=$objext
9984
9985# Code to be used in simple compile tests
9986lt_simple_compile_test_code="class foo {}"
9987
9988# Code to be used in simple link tests
9989lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9990
9991# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9992_LT_TAG_COMPILER
9993
9994# save warnings/boilerplate of simple test code
9995_LT_COMPILER_BOILERPLATE
9996_LT_LINKER_BOILERPLATE
9997
9998# Allow CC to be a program name with arguments.
9999lt_save_CC=$CC
10000lt_save_CFLAGS=$CFLAGS
10001lt_save_GCC=$GCC
10002GCC=yes
10003CC=${GCJ-"gcj"}
10004CFLAGS=$GCJFLAGS
10005compiler=$CC
10006_LT_TAGVAR(compiler, $1)=$CC
10007_LT_TAGVAR(LD, $1)="$LD"
10008_LT_CC_BASENAME([$compiler])
10009
10010# GCJ did not exist at the time GCC didn't implicitly link libc in.
10011_LT_TAGVAR(archive_cmds_need_lc, $1)=no
10012
10013_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10014_LT_TAGVAR(reload_flag, $1)=$reload_flag
10015_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10016
10017if test -n "$compiler"; then
10018 _LT_COMPILER_NO_RTTI($1)
10019 _LT_COMPILER_PIC($1)
10020 _LT_COMPILER_C_O($1)
10021 _LT_COMPILER_FILE_LOCKS($1)
10022 _LT_LINKER_SHLIBS($1)
10023 _LT_LINKER_HARDCODE_LIBPATH($1)
10024
10025 _LT_CONFIG($1)
10026fi
10027
10028AC_LANG_RESTORE
10029
10030GCC=$lt_save_GCC
10031CC=$lt_save_CC
10032CFLAGS=$lt_save_CFLAGS
10033])# _LT_LANG_GCJ_CONFIG
10034
10035
10036# _LT_LANG_GO_CONFIG([TAG])
10037# --------------------------
10038# Ensure that the configuration variables for the GNU Go compiler
10039# are suitably defined. These variables are subsequently used by _LT_CONFIG
10040# to write the compiler configuration to `libtool'.
10041m4_defun([_LT_LANG_GO_CONFIG],
10042[AC_REQUIRE([LT_PROG_GO])dnl
10043AC_LANG_SAVE
10044
10045# Source file extension for Go test sources.
10046ac_ext=go
10047
10048# Object file extension for compiled Go test sources.
10049objext=o
10050_LT_TAGVAR(objext, $1)=$objext
10051
10052# Code to be used in simple compile tests
10053lt_simple_compile_test_code="package main; func main() { }"
10054
10055# Code to be used in simple link tests
10056lt_simple_link_test_code='package main; func main() { }'
10057
10058# ltmain only uses $CC for tagged configurations so make sure $CC is set.
10059_LT_TAG_COMPILER
10060
10061# save warnings/boilerplate of simple test code
10062_LT_COMPILER_BOILERPLATE
10063_LT_LINKER_BOILERPLATE
10064
10065# Allow CC to be a program name with arguments.
10066lt_save_CC=$CC
10067lt_save_CFLAGS=$CFLAGS
10068lt_save_GCC=$GCC
10069GCC=yes
10070CC=${GOC-"gccgo"}
10071CFLAGS=$GOFLAGS
10072compiler=$CC
10073_LT_TAGVAR(compiler, $1)=$CC
10074_LT_TAGVAR(LD, $1)="$LD"
10075_LT_CC_BASENAME([$compiler])
10076
10077# Go did not exist at the time GCC didn't implicitly link libc in.
10078_LT_TAGVAR(archive_cmds_need_lc, $1)=no
10079
10080_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10081_LT_TAGVAR(reload_flag, $1)=$reload_flag
10082_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10083
10084if test -n "$compiler"; then
10085 _LT_COMPILER_NO_RTTI($1)
10086 _LT_COMPILER_PIC($1)
10087 _LT_COMPILER_C_O($1)
10088 _LT_COMPILER_FILE_LOCKS($1)
10089 _LT_LINKER_SHLIBS($1)
10090 _LT_LINKER_HARDCODE_LIBPATH($1)
10091
10092 _LT_CONFIG($1)
10093fi
10094
10095AC_LANG_RESTORE
10096
10097GCC=$lt_save_GCC
10098CC=$lt_save_CC
10099CFLAGS=$lt_save_CFLAGS
10100])# _LT_LANG_GO_CONFIG
10101
10102
10103# _LT_LANG_RC_CONFIG([TAG])
10104# -------------------------
10105# Ensure that the configuration variables for the Windows resource compiler
10106# are suitably defined. These variables are subsequently used by _LT_CONFIG
10107# to write the compiler configuration to `libtool'.
10108m4_defun([_LT_LANG_RC_CONFIG],
10109[AC_REQUIRE([LT_PROG_RC])dnl
10110AC_LANG_SAVE
10111
10112# Source file extension for RC test sources.
10113ac_ext=rc
10114
10115# Object file extension for compiled RC test sources.
10116objext=o
10117_LT_TAGVAR(objext, $1)=$objext
10118
10119# Code to be used in simple compile tests
10120lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
10121
10122# Code to be used in simple link tests
10123lt_simple_link_test_code="$lt_simple_compile_test_code"
10124
10125# ltmain only uses $CC for tagged configurations so make sure $CC is set.
10126_LT_TAG_COMPILER
10127
10128# save warnings/boilerplate of simple test code
10129_LT_COMPILER_BOILERPLATE
10130_LT_LINKER_BOILERPLATE
10131
10132# Allow CC to be a program name with arguments.
10133lt_save_CC="$CC"
10134lt_save_CFLAGS=$CFLAGS
10135lt_save_GCC=$GCC
10136GCC=
10137CC=${RC-"windres"}
10138CFLAGS=
10139compiler=$CC
10140_LT_TAGVAR(compiler, $1)=$CC
10141_LT_CC_BASENAME([$compiler])
10142_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
10143
10144if test -n "$compiler"; then
10145 :
10146 _LT_CONFIG($1)
10147fi
10148
10149GCC=$lt_save_GCC
10150AC_LANG_RESTORE
10151CC=$lt_save_CC
10152CFLAGS=$lt_save_CFLAGS
10153])# _LT_LANG_RC_CONFIG
10154
10155
10156# LT_PROG_GCJ
10157# -----------
10158AC_DEFUN([LT_PROG_GCJ],
10159[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
10160 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
10161 [AC_CHECK_TOOL(GCJ, gcj,)
10162 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
10163 AC_SUBST(GCJFLAGS)])])[]dnl
10164])
10165
10166# Old name:
10167AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
10168dnl aclocal-1.4 backwards compatibility:
10169dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
10170
10171
10172# LT_PROG_GO
10173# ----------
10174AC_DEFUN([LT_PROG_GO],
10175[AC_CHECK_TOOL(GOC, gccgo,)
10176])
10177
10178
10179# LT_PROG_RC
10180# ----------
10181AC_DEFUN([LT_PROG_RC],
10182[AC_CHECK_TOOL(RC, windres,)
10183])
10184
10185# Old name:
10186AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
10187dnl aclocal-1.4 backwards compatibility:
10188dnl AC_DEFUN([LT_AC_PROG_RC], [])
10189
10190
10191# _LT_DECL_EGREP
10192# --------------
10193# If we don't have a new enough Autoconf to choose the best grep
10194# available, choose the one first in the user's PATH.
10195m4_defun([_LT_DECL_EGREP],
10196[AC_REQUIRE([AC_PROG_EGREP])dnl
10197AC_REQUIRE([AC_PROG_FGREP])dnl
10198test -z "$GREP" && GREP=grep
10199_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
10200_LT_DECL([], [EGREP], [1], [An ERE matcher])
10201_LT_DECL([], [FGREP], [1], [A literal string matcher])
10202dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
10203AC_SUBST([GREP])
10204])
10205
10206
10207# _LT_DECL_OBJDUMP
10208# --------------
10209# If we don't have a new enough Autoconf to choose the best objdump
10210# available, choose the one first in the user's PATH.
10211m4_defun([_LT_DECL_OBJDUMP],
10212[AC_CHECK_TOOL(OBJDUMP, objdump, false)
10213test -z "$OBJDUMP" && OBJDUMP=objdump
10214_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
10215AC_SUBST([OBJDUMP])
10216])
10217
10218# _LT_DECL_DLLTOOL
10219# ----------------
10220# Ensure DLLTOOL variable is set.
10221m4_defun([_LT_DECL_DLLTOOL],
10222[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10223test -z "$DLLTOOL" && DLLTOOL=dlltool
10224_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
10225AC_SUBST([DLLTOOL])
10226])
10227
10228# _LT_DECL_SED
10229# ------------
10230# Check for a fully-functional sed program, that truncates
10231# as few characters as possible. Prefer GNU sed if found.
10232m4_defun([_LT_DECL_SED],
10233[AC_PROG_SED
10234test -z "$SED" && SED=sed
10235Xsed="$SED -e 1s/^X//"
10236_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
10237_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
10238 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
10239])# _LT_DECL_SED
10240
10241m4_ifndef([AC_PROG_SED], [
10242# NOTE: This macro has been submitted for inclusion into #
10243# GNU Autoconf as AC_PROG_SED. When it is available in #
10244# a released version of Autoconf we should remove this #
10245# macro and use it instead. #
10246
10247m4_defun([AC_PROG_SED],
10248[AC_MSG_CHECKING([for a sed that does not truncate output])
10249AC_CACHE_VAL(lt_cv_path_SED,
10250[# Loop through the user's path and test for sed and gsed.
10251# Then use that list of sed's as ones to test for truncation.
10252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253for as_dir in $PATH
10254do
10255 IFS=$as_save_IFS
10256 test -z "$as_dir" && as_dir=.
10257 for lt_ac_prog in sed gsed; do
10258 for ac_exec_ext in '' $ac_executable_extensions; do
10259 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
10260 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
10261 fi
10262 done
10263 done
10264done
10265IFS=$as_save_IFS
10266lt_ac_max=0
10267lt_ac_count=0
10268# Add /usr/xpg4/bin/sed as it is typically found on Solaris
10269# along with /bin/sed that truncates output.
10270for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
10271 test ! -f $lt_ac_sed && continue
10272 cat /dev/null > conftest.in
10273 lt_ac_count=0
10274 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
10275 # Check for GNU sed and select it if it is found.
10276 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
10277 lt_cv_path_SED=$lt_ac_sed
10278 break
10279 fi
10280 while true; do
10281 cat conftest.in conftest.in >conftest.tmp
10282 mv conftest.tmp conftest.in
10283 cp conftest.in conftest.nl
10284 echo >>conftest.nl
10285 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
10286 cmp -s conftest.out conftest.nl || break
10287 # 10000 chars as input seems more than enough
10288 test $lt_ac_count -gt 10 && break
10289 lt_ac_count=`expr $lt_ac_count + 1`
10290 if test $lt_ac_count -gt $lt_ac_max; then
10291 lt_ac_max=$lt_ac_count
10292 lt_cv_path_SED=$lt_ac_sed
10293 fi
10294 done
10295done
10296])
10297SED=$lt_cv_path_SED
10298AC_SUBST([SED])
10299AC_MSG_RESULT([$SED])
10300])#AC_PROG_SED
10301])#m4_ifndef
10302
10303# Old name:
10304AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
10305dnl aclocal-1.4 backwards compatibility:
10306dnl AC_DEFUN([LT_AC_PROG_SED], [])
10307
10308
10309# _LT_CHECK_SHELL_FEATURES
10310# ------------------------
10311# Find out whether the shell is Bourne or XSI compatible,
10312# or has some other useful features.
10313m4_defun([_LT_CHECK_SHELL_FEATURES],
10314[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
10315# Try some XSI features
10316xsi_shell=no
10317( _lt_dummy="a/b/c"
10318 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
10319 = c,a/b,b/c, \
10320 && eval 'test $(( 1 + 1 )) -eq 2 \
10321 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
10322 && xsi_shell=yes
10323AC_MSG_RESULT([$xsi_shell])
10324_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
10325
10326AC_MSG_CHECKING([whether the shell understands "+="])
10327lt_shell_append=no
10328( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
10329 >/dev/null 2>&1 \
10330 && lt_shell_append=yes
10331AC_MSG_RESULT([$lt_shell_append])
10332_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
10333
10334if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10335 lt_unset=unset
10336else
10337 lt_unset=false
10338fi
10339_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
10340
10341# test EBCDIC or ASCII
10342case `echo X|tr X '\101'` in
10343 A) # ASCII based system
10344 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
10345 lt_SP2NL='tr \040 \012'
10346 lt_NL2SP='tr \015\012 \040\040'
10347 ;;
10348 *) # EBCDIC based system
10349 lt_SP2NL='tr \100 \n'
10350 lt_NL2SP='tr \r\n \100\100'
10351 ;;
10352esac
10353_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
10354_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
10355])# _LT_CHECK_SHELL_FEATURES
10356
10357
10358# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
10359# ------------------------------------------------------
10360# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
10361# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
10362m4_defun([_LT_PROG_FUNCTION_REPLACE],
10363[dnl {
10364sed -e '/^$1 ()$/,/^} # $1 /c\
10365$1 ()\
10366{\
10367m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
10368} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
10369 && mv -f "$cfgfile.tmp" "$cfgfile" \
10370 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10371test 0 -eq $? || _lt_function_replace_fail=:
10372])
10373
10374
10375# _LT_PROG_REPLACE_SHELLFNS
10376# -------------------------
10377# Replace existing portable implementations of several shell functions with
10378# equivalent extended shell implementations where those features are available..
10379m4_defun([_LT_PROG_REPLACE_SHELLFNS],
10380[if test x"$xsi_shell" = xyes; then
10381 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
10382 case ${1} in
10383 */*) func_dirname_result="${1%/*}${2}" ;;
10384 * ) func_dirname_result="${3}" ;;
10385 esac])
10386
10387 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
10388 func_basename_result="${1##*/}"])
10389
10390 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
10391 case ${1} in
10392 */*) func_dirname_result="${1%/*}${2}" ;;
10393 * ) func_dirname_result="${3}" ;;
10394 esac
10395 func_basename_result="${1##*/}"])
10396
10397 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
10398 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
10399 # positional parameters, so assign one to ordinary parameter first.
10400 func_stripname_result=${3}
10401 func_stripname_result=${func_stripname_result#"${1}"}
10402 func_stripname_result=${func_stripname_result%"${2}"}])
10403
10404 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
10405 func_split_long_opt_name=${1%%=*}
10406 func_split_long_opt_arg=${1#*=}])
10407
10408 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
10409 func_split_short_opt_arg=${1#??}
10410 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
10411
10412 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
10413 case ${1} in
10414 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
10415 *) func_lo2o_result=${1} ;;
10416 esac])
10417
10418 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
10419
10420 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
10421
10422 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
10423fi
10424
10425if test x"$lt_shell_append" = xyes; then
10426 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
10427
10428 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
10429 func_quote_for_eval "${2}"
10430dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
10431 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
10432
10433 # Save a `func_append' function call where possible by direct use of '+='
10434 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
10435 && mv -f "$cfgfile.tmp" "$cfgfile" \
10436 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10437 test 0 -eq $? || _lt_function_replace_fail=:
10438else
10439 # Save a `func_append' function call even when '+=' is not available
10440 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
10441 && mv -f "$cfgfile.tmp" "$cfgfile" \
10442 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10443 test 0 -eq $? || _lt_function_replace_fail=:
10444fi
10445
10446if test x"$_lt_function_replace_fail" = x":"; then
10447 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
10448fi
10449])
10450
10451# _LT_PATH_CONVERSION_FUNCTIONS
10452# -----------------------------
10453# Determine which file name conversion functions should be used by
10454# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
10455# for certain cross-compile configurations and native mingw.
10456m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
10457[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10458AC_REQUIRE([AC_CANONICAL_BUILD])dnl
10459AC_MSG_CHECKING([how to convert $build file names to $host format])
10460AC_CACHE_VAL(lt_cv_to_host_file_cmd,
10461[case $host in
10462 *-*-mingw* )
10463 case $build in
10464 *-*-mingw* ) # actually msys
10465 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
10466 ;;
10467 *-*-cygwin* )
10468 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
10469 ;;
10470 * ) # otherwise, assume *nix
10471 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
10472 ;;
10473 esac
10474 ;;
10475 *-*-cygwin* )
10476 case $build in
10477 *-*-mingw* ) # actually msys
10478 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
10479 ;;
10480 *-*-cygwin* )
10481 lt_cv_to_host_file_cmd=func_convert_file_noop
10482 ;;
10483 * ) # otherwise, assume *nix
10484 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
10485 ;;
10486 esac
10487 ;;
10488 * ) # unhandled hosts (and "normal" native builds)
10489 lt_cv_to_host_file_cmd=func_convert_file_noop
10490 ;;
10491esac
10492])
10493to_host_file_cmd=$lt_cv_to_host_file_cmd
10494AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
10495_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
10496 [0], [convert $build file names to $host format])dnl
10497
10498AC_MSG_CHECKING([how to convert $build file names to toolchain format])
10499AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
10500[#assume ordinary cross tools, or native build.
10501lt_cv_to_tool_file_cmd=func_convert_file_noop
10502case $host in
10503 *-*-mingw* )
10504 case $build in
10505 *-*-mingw* ) # actually msys
10506 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
10507 ;;
10508 esac
10509 ;;
10510esac
10511])
10512to_tool_file_cmd=$lt_cv_to_tool_file_cmd
10513AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
10514_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
10515 [0], [convert $build files to toolchain format])dnl
10516])# _LT_PATH_CONVERSION_FUNCTIONS
10517
10518# Helper functions for option handling. -*- Autoconf -*-
10519#
10520# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
10521# Inc.
10522# Written by Gary V. Vaughan, 2004
10523#
10524# This file is free software; the Free Software Foundation gives
10525# unlimited permission to copy and/or distribute it, with or without
10526# modifications, as long as this notice is preserved.
10527
10528# serial 7 ltoptions.m4
10529
10530# This is to help aclocal find these macros, as it can't see m4_define.
10531AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
10532
10533
10534# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
10535# ------------------------------------------
10536m4_define([_LT_MANGLE_OPTION],
10537[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
10538
10539
10540# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
10541# ---------------------------------------
10542# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
10543# matching handler defined, dispatch to it. Other OPTION-NAMEs are
10544# saved as a flag.
10545m4_define([_LT_SET_OPTION],
10546[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
10547m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
10548 _LT_MANGLE_DEFUN([$1], [$2]),
10549 [m4_warning([Unknown $1 option `$2'])])[]dnl
10550])
10551
10552
10553# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
10554# ------------------------------------------------------------
10555# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10556m4_define([_LT_IF_OPTION],
10557[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
10558
10559
10560# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
10561# -------------------------------------------------------
10562# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
10563# are set.
10564m4_define([_LT_UNLESS_OPTIONS],
10565[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10566 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
10567 [m4_define([$0_found])])])[]dnl
10568m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
10569])[]dnl
10570])
10571
10572
10573# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
10574# ----------------------------------------
10575# OPTION-LIST is a space-separated list of Libtool options associated
10576# with MACRO-NAME. If any OPTION has a matching handler declared with
10577# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
10578# the unknown option and exit.
10579m4_defun([_LT_SET_OPTIONS],
10580[# Set options
10581m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10582 [_LT_SET_OPTION([$1], _LT_Option)])
10583
10584m4_if([$1],[LT_INIT],[
10585 dnl
10586 dnl Simply set some default values (i.e off) if boolean options were not
10587 dnl specified:
10588 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
10589 ])
10590 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
10591 ])
10592 dnl
10593 dnl If no reference was made to various pairs of opposing options, then
10594 dnl we run the default mode handler for the pair. For example, if neither
10595 dnl `shared' nor `disable-shared' was passed, we enable building of shared
10596 dnl archives by default:
10597 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
10598 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
10599 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
10600 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
10601 [_LT_ENABLE_FAST_INSTALL])
10602 ])
10603])# _LT_SET_OPTIONS
10604
10605
10606
10607# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
10608# -----------------------------------------
10609m4_define([_LT_MANGLE_DEFUN],
10610[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
10611
10612
10613# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
10614# -----------------------------------------------
10615m4_define([LT_OPTION_DEFINE],
10616[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
10617])# LT_OPTION_DEFINE
10618
10619
10620# dlopen
10621# ------
10622LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
10623])
10624
10625AU_DEFUN([AC_LIBTOOL_DLOPEN],
10626[_LT_SET_OPTION([LT_INIT], [dlopen])
10627AC_DIAGNOSE([obsolete],
10628[$0: Remove this warning and the call to _LT_SET_OPTION when you
10629put the `dlopen' option into LT_INIT's first parameter.])
10630])
10631
10632dnl aclocal-1.4 backwards compatibility:
10633dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
10634
10635
10636# win32-dll
10637# ---------
10638# Declare package support for building win32 dll's.
10639LT_OPTION_DEFINE([LT_INIT], [win32-dll],
10640[enable_win32_dll=yes
10641
10642case $host in
10643*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
10644 AC_CHECK_TOOL(AS, as, false)
10645 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10646 AC_CHECK_TOOL(OBJDUMP, objdump, false)
10647 ;;
10648esac
10649
10650test -z "$AS" && AS=as
10651_LT_DECL([], [AS], [1], [Assembler program])dnl
10652
10653test -z "$DLLTOOL" && DLLTOOL=dlltool
10654_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
10655
10656test -z "$OBJDUMP" && OBJDUMP=objdump
10657_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
10658])# win32-dll
10659
10660AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
10661[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10662_LT_SET_OPTION([LT_INIT], [win32-dll])
10663AC_DIAGNOSE([obsolete],
10664[$0: Remove this warning and the call to _LT_SET_OPTION when you
10665put the `win32-dll' option into LT_INIT's first parameter.])
10666])
10667
10668dnl aclocal-1.4 backwards compatibility:
10669dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
10670
10671
10672# _LT_ENABLE_SHARED([DEFAULT])
10673# ----------------------------
10674# implement the --enable-shared flag, and supports the `shared' and
10675# `disable-shared' LT_INIT options.
10676# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
10677m4_define([_LT_ENABLE_SHARED],
10678[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
10679AC_ARG_ENABLE([shared],
10680 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
10681 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
10682 [p=${PACKAGE-default}
10683 case $enableval in
10684 yes) enable_shared=yes ;;
10685 no) enable_shared=no ;;
10686 *)
10687 enable_shared=no
10688 # Look at the argument we got. We use all the common list separators.
10689 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10690 for pkg in $enableval; do
10691 IFS="$lt_save_ifs"
10692 if test "X$pkg" = "X$p"; then
10693 enable_shared=yes
10694 fi
10695 done
10696 IFS="$lt_save_ifs"
10697 ;;
10698 esac],
10699 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
10700
10701 _LT_DECL([build_libtool_libs], [enable_shared], [0],
10702 [Whether or not to build shared libraries])
10703])# _LT_ENABLE_SHARED
10704
10705LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
10706LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
10707
10708# Old names:
10709AC_DEFUN([AC_ENABLE_SHARED],
10710[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
10711])
10712
10713AC_DEFUN([AC_DISABLE_SHARED],
10714[_LT_SET_OPTION([LT_INIT], [disable-shared])
10715])
10716
10717AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10718AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10719
10720dnl aclocal-1.4 backwards compatibility:
10721dnl AC_DEFUN([AM_ENABLE_SHARED], [])
10722dnl AC_DEFUN([AM_DISABLE_SHARED], [])
10723
10724
10725
10726# _LT_ENABLE_STATIC([DEFAULT])
10727# ----------------------------
10728# implement the --enable-static flag, and support the `static' and
10729# `disable-static' LT_INIT options.
10730# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
10731m4_define([_LT_ENABLE_STATIC],
10732[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10733AC_ARG_ENABLE([static],
10734 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10735 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10736 [p=${PACKAGE-default}
10737 case $enableval in
10738 yes) enable_static=yes ;;
10739 no) enable_static=no ;;
10740 *)
10741 enable_static=no
10742 # Look at the argument we got. We use all the common list separators.
10743 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10744 for pkg in $enableval; do
10745 IFS="$lt_save_ifs"
10746 if test "X$pkg" = "X$p"; then
10747 enable_static=yes
10748 fi
10749 done
10750 IFS="$lt_save_ifs"
10751 ;;
10752 esac],
10753 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10754
10755 _LT_DECL([build_old_libs], [enable_static], [0],
10756 [Whether or not to build static libraries])
10757])# _LT_ENABLE_STATIC
10758
10759LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10760LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10761
10762# Old names:
10763AC_DEFUN([AC_ENABLE_STATIC],
10764[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10765])
10766
10767AC_DEFUN([AC_DISABLE_STATIC],
10768[_LT_SET_OPTION([LT_INIT], [disable-static])
10769])
10770
10771AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10772AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10773
10774dnl aclocal-1.4 backwards compatibility:
10775dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10776dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10777
10778
10779
10780# _LT_ENABLE_FAST_INSTALL([DEFAULT])
10781# ----------------------------------
10782# implement the --enable-fast-install flag, and support the `fast-install'
10783# and `disable-fast-install' LT_INIT options.
10784# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
10785m4_define([_LT_ENABLE_FAST_INSTALL],
10786[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10787AC_ARG_ENABLE([fast-install],
10788 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10789 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10790 [p=${PACKAGE-default}
10791 case $enableval in
10792 yes) enable_fast_install=yes ;;
10793 no) enable_fast_install=no ;;
10794 *)
10795 enable_fast_install=no
10796 # Look at the argument we got. We use all the common list separators.
10797 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10798 for pkg in $enableval; do
10799 IFS="$lt_save_ifs"
10800 if test "X$pkg" = "X$p"; then
10801 enable_fast_install=yes
10802 fi
10803 done
10804 IFS="$lt_save_ifs"
10805 ;;
10806 esac],
10807 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10808
10809_LT_DECL([fast_install], [enable_fast_install], [0],
10810 [Whether or not to optimize for fast installation])dnl
10811])# _LT_ENABLE_FAST_INSTALL
10812
10813LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10814LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10815
10816# Old names:
10817AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10818[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10819AC_DIAGNOSE([obsolete],
10820[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10821the `fast-install' option into LT_INIT's first parameter.])
10822])
10823
10824AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10825[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10826AC_DIAGNOSE([obsolete],
10827[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10828the `disable-fast-install' option into LT_INIT's first parameter.])
10829])
10830
10831dnl aclocal-1.4 backwards compatibility:
10832dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10833dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10834
10835
10836# _LT_WITH_PIC([MODE])
10837# --------------------
10838# implement the --with-pic flag, and support the `pic-only' and `no-pic'
10839# LT_INIT options.
10840# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
10841m4_define([_LT_WITH_PIC],
10842[AC_ARG_WITH([pic],
10843 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
10844 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10845 [lt_p=${PACKAGE-default}
10846 case $withval in
10847 yes|no) pic_mode=$withval ;;
10848 *)
10849 pic_mode=default
10850 # Look at the argument we got. We use all the common list separators.
10851 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10852 for lt_pkg in $withval; do
10853 IFS="$lt_save_ifs"
10854 if test "X$lt_pkg" = "X$lt_p"; then
10855 pic_mode=yes
10856 fi
10857 done
10858 IFS="$lt_save_ifs"
10859 ;;
10860 esac],
10861 [pic_mode=default])
10862
10863test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10864
10865_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10866])# _LT_WITH_PIC
10867
10868LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10869LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10870
10871# Old name:
10872AU_DEFUN([AC_LIBTOOL_PICMODE],
10873[_LT_SET_OPTION([LT_INIT], [pic-only])
10874AC_DIAGNOSE([obsolete],
10875[$0: Remove this warning and the call to _LT_SET_OPTION when you
10876put the `pic-only' option into LT_INIT's first parameter.])
10877])
10878
10879dnl aclocal-1.4 backwards compatibility:
10880dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10881
10882
10883m4_define([_LTDL_MODE], [])
10884LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10885 [m4_define([_LTDL_MODE], [nonrecursive])])
10886LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10887 [m4_define([_LTDL_MODE], [recursive])])
10888LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10889 [m4_define([_LTDL_MODE], [subproject])])
10890
10891m4_define([_LTDL_TYPE], [])
10892LT_OPTION_DEFINE([LTDL_INIT], [installable],
10893 [m4_define([_LTDL_TYPE], [installable])])
10894LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10895 [m4_define([_LTDL_TYPE], [convenience])])
10896
10897# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
10898#
10899# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10900# Written by Gary V. Vaughan, 2004
10901#
10902# This file is free software; the Free Software Foundation gives
10903# unlimited permission to copy and/or distribute it, with or without
10904# modifications, as long as this notice is preserved.
10905
10906# serial 6 ltsugar.m4
10907
10908# This is to help aclocal find these macros, as it can't see m4_define.
10909AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10910
10911
10912# lt_join(SEP, ARG1, [ARG2...])
10913# -----------------------------
10914# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10915# associated separator.
10916# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10917# versions in m4sugar had bugs.
10918m4_define([lt_join],
10919[m4_if([$#], [1], [],
10920 [$#], [2], [[$2]],
10921 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10922m4_define([_lt_join],
10923[m4_if([$#$2], [2], [],
10924 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10925
10926
10927# lt_car(LIST)
10928# lt_cdr(LIST)
10929# ------------
10930# Manipulate m4 lists.
10931# These macros are necessary as long as will still need to support
10932# Autoconf-2.59 which quotes differently.
10933m4_define([lt_car], [[$1]])
10934m4_define([lt_cdr],
10935[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10936 [$#], 1, [],
10937 [m4_dquote(m4_shift($@))])])
10938m4_define([lt_unquote], $1)
10939
10940
10941# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10942# ------------------------------------------
10943# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10944# Note that neither SEPARATOR nor STRING are expanded; they are appended
10945# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10946# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10947# than defined and empty).
10948#
10949# This macro is needed until we can rely on Autoconf 2.62, since earlier
10950# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10951m4_define([lt_append],
10952[m4_define([$1],
10953 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10954
10955
10956
10957# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10958# ----------------------------------------------------------
10959# Produce a SEP delimited list of all paired combinations of elements of
10960# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
10961# has the form PREFIXmINFIXSUFFIXn.
10962# Needed until we can rely on m4_combine added in Autoconf 2.62.
10963m4_define([lt_combine],
10964[m4_if(m4_eval([$# > 3]), [1],
10965 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10966[[m4_foreach([_Lt_prefix], [$2],
10967 [m4_foreach([_Lt_suffix],
10968 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10969 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10970
10971
10972# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10973# -----------------------------------------------------------------------
10974# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10975# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10976m4_define([lt_if_append_uniq],
10977[m4_ifdef([$1],
10978 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10979 [lt_append([$1], [$2], [$3])$4],
10980 [$5])],
10981 [lt_append([$1], [$2], [$3])$4])])
10982
10983
10984# lt_dict_add(DICT, KEY, VALUE)
10985# -----------------------------
10986m4_define([lt_dict_add],
10987[m4_define([$1($2)], [$3])])
10988
10989
10990# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10991# --------------------------------------------
10992m4_define([lt_dict_add_subkey],
10993[m4_define([$1($2:$3)], [$4])])
10994
10995
10996# lt_dict_fetch(DICT, KEY, [SUBKEY])
10997# ----------------------------------
10998m4_define([lt_dict_fetch],
10999[m4_ifval([$3],
11000 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
11001 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
11002
11003
11004# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
11005# -----------------------------------------------------------------
11006m4_define([lt_if_dict_fetch],
11007[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
11008 [$5],
11009 [$6])])
11010
11011
11012# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
11013# --------------------------------------------------------------
11014m4_define([lt_dict_filter],
11015[m4_if([$5], [], [],
11016 [lt_join(m4_quote(m4_default([$4], [[, ]])),
11017 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
11018 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
11019])
11020
11021# ltversion.m4 -- version numbers -*- Autoconf -*-
11022#
11023# Copyright (C) 2004 Free Software Foundation, Inc.
11024# Written by Scott James Remnant, 2004
11025#
11026# This file is free software; the Free Software Foundation gives
11027# unlimited permission to copy and/or distribute it, with or without
11028# modifications, as long as this notice is preserved.
11029
11030# @configure_input@
11031
11032# serial 3337 ltversion.m4
11033# This file is part of GNU Libtool
11034
11035m4_define([LT_PACKAGE_VERSION], [2.4.2])
11036m4_define([LT_PACKAGE_REVISION], [1.3337])
11037
11038AC_DEFUN([LTVERSION_VERSION],
11039[macro_version='2.4.2'
11040macro_revision='1.3337'
11041_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
11042_LT_DECL(, macro_revision, 0)
11043])
11044
11045# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
11046#
11047# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
11048# Written by Scott James Remnant, 2004.
11049#
11050# This file is free software; the Free Software Foundation gives
11051# unlimited permission to copy and/or distribute it, with or without
11052# modifications, as long as this notice is preserved.
11053
11054# serial 5 lt~obsolete.m4
11055
11056# These exist entirely to fool aclocal when bootstrapping libtool.
11057#
11058# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
11059# which have later been changed to m4_define as they aren't part of the
11060# exported API, or moved to Autoconf or Automake where they belong.
11061#
11062# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
11063# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
11064# using a macro with the same name in our local m4/libtool.m4 it'll
11065# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
11066# and doesn't know about Autoconf macros at all.)
11067#
11068# So we provide this file, which has a silly filename so it's always
11069# included after everything else. This provides aclocal with the
11070# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
11071# because those macros already exist, or will be overwritten later.
11072# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
11073#
11074# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
11075# Yes, that means every name once taken will need to remain here until
11076# we give up compatibility with versions before 1.7, at which point
11077# we need to keep only those names which we still refer to.
11078
11079# This is to help aclocal find these macros, as it can't see m4_define.
11080AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
11081
11082m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
11083m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
11084m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
11085m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
11086m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
11087m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
11088m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
11089m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
11090m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
11091m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
11092m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
11093m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
11094m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
11095m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
11096m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
11097m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
11098m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
11099m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
11100m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
11101m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
11102m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
11103m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
11104m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
11105m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
11106m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
11107m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
11108m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
11109m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
11110m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
11111m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
11112m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
11113m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
11114m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
11115m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
11116m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
11117m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
11118m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
11119m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
11120m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
11121m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
11122m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
11123m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
11124m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
11125m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
11126m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
11127m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
11128m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
11129m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
11130m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
11131m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
11132m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
11133m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
11134m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
11135m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
11136m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
11137m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
11138m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
11139m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
11140m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
11141m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
11142m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
11143
11144# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
11145# serial 1 (pkg-config-0.24)
11146#
11147# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
11148#
11149# This program is free software; you can redistribute it and/or modify
11150# it under the terms of the GNU General Public License as published by
11151# the Free Software Foundation; either version 2 of the License, or
11152# (at your option) any later version.
11153#
11154# This program is distributed in the hope that it will be useful, but
11155# WITHOUT ANY WARRANTY; without even the implied warranty of
11156# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11157# General Public License for more details.
11158#
11159# You should have received a copy of the GNU General Public License
11160# along with this program; if not, write to the Free Software
11161# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
11162#
11163# As a special exception to the GNU General Public License, if you
11164# distribute this file as part of a program that contains a
11165# configuration script generated by Autoconf, you may include it under
11166# the same distribution terms that you use for the rest of that program.
11167
11168# PKG_PROG_PKG_CONFIG([MIN-VERSION])
11169# ----------------------------------
11170AC_DEFUN([PKG_PROG_PKG_CONFIG],
11171[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
11172m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
11173m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
11174AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
11175AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
11176AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
11177
11178if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11179 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
11180fi
11181if test -n "$PKG_CONFIG"; then
11182 _pkg_min_version=m4_default([$1], [0.9.0])
11183 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
11184 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11185 AC_MSG_RESULT([yes])
11186 else
11187 AC_MSG_RESULT([no])
11188 PKG_CONFIG=""
11189 fi
11190fi[]dnl
11191])# PKG_PROG_PKG_CONFIG
11192
11193# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
11194#
11195# Check to see whether a particular set of modules exists. Similar
11196# to PKG_CHECK_MODULES(), but does not set variables or print errors.
11197#
11198# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11199# only at the first occurence in configure.ac, so if the first place
11200# it's called might be skipped (such as if it is within an "if", you
11201# have to call PKG_CHECK_EXISTS manually
11202# --------------------------------------------------------------
11203AC_DEFUN([PKG_CHECK_EXISTS],
11204[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11205if test -n "$PKG_CONFIG" && \
11206 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
11207 m4_default([$2], [:])
11208m4_ifvaln([$3], [else
11209 $3])dnl
11210fi])
11211
11212# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
11213# ---------------------------------------------
11214m4_define([_PKG_CONFIG],
11215[if test -n "$$1"; then
11216 pkg_cv_[]$1="$$1"
11217 elif test -n "$PKG_CONFIG"; then
11218 PKG_CHECK_EXISTS([$3],
11219 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
11220 test "x$?" != "x0" && pkg_failed=yes ],
11221 [pkg_failed=yes])
11222 else
11223 pkg_failed=untried
11224fi[]dnl
11225])# _PKG_CONFIG
11226
11227# _PKG_SHORT_ERRORS_SUPPORTED
11228# -----------------------------
11229AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
11230[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11231if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11232 _pkg_short_errors_supported=yes
11233else
11234 _pkg_short_errors_supported=no
11235fi[]dnl
11236])# _PKG_SHORT_ERRORS_SUPPORTED
11237
11238
11239# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
11240# [ACTION-IF-NOT-FOUND])
11241#
11242#
11243# Note that if there is a possibility the first call to
11244# PKG_CHECK_MODULES might not happen, you should be sure to include an
11245# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
11246#
11247#
11248# --------------------------------------------------------------
11249AC_DEFUN([PKG_CHECK_MODULES],
11250[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11251AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
11252AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
11253
11254pkg_failed=no
11255AC_MSG_CHECKING([for $1])
11256
11257_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
11258_PKG_CONFIG([$1][_LIBS], [libs], [$2])
11259
11260m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
11261and $1[]_LIBS to avoid the need to call pkg-config.
11262See the pkg-config man page for more details.])
11263
11264if test $pkg_failed = yes; then
11265 AC_MSG_RESULT([no])
11266 _PKG_SHORT_ERRORS_SUPPORTED
11267 if test $_pkg_short_errors_supported = yes; then
11268 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
11269 else
11270 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
11271 fi
11272 # Put the nasty error message in config.log where it belongs
11273 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
11274
11275 m4_default([$4], [AC_MSG_ERROR(
11276[Package requirements ($2) were not met:
11277
11278$$1_PKG_ERRORS
11279
11280Consider adjusting the PKG_CONFIG_PATH environment variable if you
11281installed software in a non-standard prefix.
11282
11283_PKG_TEXT])[]dnl
11284 ])
11285elif test $pkg_failed = untried; then
11286 AC_MSG_RESULT([no])
11287 m4_default([$4], [AC_MSG_FAILURE(
11288[The pkg-config script could not be found or is too old. Make sure it
11289is in your PATH or set the PKG_CONFIG environment variable to the full
11290path to pkg-config.
11291
11292_PKG_TEXT
11293
11294To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
11295 ])
11296else
11297 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
11298 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
11299 AC_MSG_RESULT([yes])
11300 $3
11301fi[]dnl
11302])# PKG_CHECK_MODULES
11303
11304# Configure paths for SDL
11305# Sam Lantinga 9/21/99
11306# stolen from Manish Singh
11307# stolen back from Frank Belew
11308# stolen from Manish Singh
11309# Shamelessly stolen from Owen Taylor
11310
11311# serial 1
11312
11313dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
11314dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
11315dnl
11316AC_DEFUN([AM_PATH_SDL],
11317[dnl
11318dnl Get the cflags and libraries from the sdl-config script
11319dnl
11320AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
11321 sdl_prefix="$withval", sdl_prefix="")
11322AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
11323 sdl_exec_prefix="$withval", sdl_exec_prefix="")
11324AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
11325 , enable_sdltest=yes)
11326
11327 if test x$sdl_exec_prefix != x ; then
11328 sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
11329 if test x${SDL_CONFIG+set} != xset ; then
11330 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
11331 fi
11332 fi
11333 if test x$sdl_prefix != x ; then
11334 sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
11335 if test x${SDL_CONFIG+set} != xset ; then
11336 SDL_CONFIG=$sdl_prefix/bin/sdl-config
11337 fi
11338 fi
11339
11340 as_save_PATH="$PATH"
11341 if test "x$prefix" != xNONE; then
11342 PATH="$prefix/bin:$prefix/usr/bin:$PATH"
11343 fi
11344 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
11345 PATH="$as_save_PATH"
11346 min_sdl_version=ifelse([$1], ,0.11.0,$1)
11347 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
11348 no_sdl=""
11349 if test "$SDL_CONFIG" = "no" ; then
11350 no_sdl=yes
11351 else
11352 SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
11353 SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
11354
11355 sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
11356 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
11357 sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
11358 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
11359 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
11360 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
11361 if test "x$enable_sdltest" = "xyes" ; then
11362 ac_save_CFLAGS="$CFLAGS"
11363 ac_save_CXXFLAGS="$CXXFLAGS"
11364 ac_save_LIBS="$LIBS"
11365 CFLAGS="$CFLAGS $SDL_CFLAGS"
11366 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
11367 LIBS="$LIBS $SDL_LIBS"
11368dnl
11369dnl Now check if the installed SDL is sufficiently new. (Also sanity
11370dnl checks the results of sdl-config to some extent
11371dnl
11372 rm -f conf.sdltest
11373 AC_TRY_RUN([
11374#include <stdio.h>
11375#include <stdlib.h>
11376#include <string.h>
11377#include "SDL.h"
11378
11379char*
11380my_strdup (char *str)
11381{
11382 char *new_str;
11383
11384 if (str)
11385 {
11386 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
11387 strcpy (new_str, str);
11388 }
11389 else
11390 new_str = NULL;
11391
11392 return new_str;
11393}
11394
11395int main (int argc, char *argv[])
11396{
11397 int major, minor, micro;
11398 char *tmp_version;
11399
11400 /* This hangs on some systems (?)
11401 system ("touch conf.sdltest");
11402 */
11403 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
11404
11405 /* HP/UX 9 (%@#!) writes to sscanf strings */
11406 tmp_version = my_strdup("$min_sdl_version");
11407 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
11408 printf("%s, bad version string\n", "$min_sdl_version");
11409 exit(1);
11410 }
11411
11412 if (($sdl_major_version > major) ||
11413 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
11414 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
11415 {
11416 return 0;
11417 }
11418 else
11419 {
11420 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
11421 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
11422 printf("*** best to upgrade to the required version.\n");
11423 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
11424 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
11425 printf("*** config.cache before re-running configure\n");
11426 return 1;
11427 }
11428}
11429
11430],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
11431 CFLAGS="$ac_save_CFLAGS"
11432 CXXFLAGS="$ac_save_CXXFLAGS"
11433 LIBS="$ac_save_LIBS"
11434 fi
11435 fi
11436 if test "x$no_sdl" = x ; then
11437 AC_MSG_RESULT(yes)
11438 ifelse([$2], , :, [$2])
11439 else
11440 AC_MSG_RESULT(no)
11441 if test "$SDL_CONFIG" = "no" ; then
11442 echo "*** The sdl-config script installed by SDL could not be found"
11443 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
11444 echo "*** your path, or set the SDL_CONFIG environment variable to the"
11445 echo "*** full path to sdl-config."
11446 else
11447 if test -f conf.sdltest ; then
11448 :
11449 else
11450 echo "*** Could not run SDL test program, checking why..."
11451 CFLAGS="$CFLAGS $SDL_CFLAGS"
11452 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
11453 LIBS="$LIBS $SDL_LIBS"
11454 AC_TRY_LINK([
11455#include <stdio.h>
11456#include "SDL.h"
11457
11458int main(int argc, char *argv[])
11459{ return 0; }
11460#undef main
11461#define main K_and_R_C_main
11462], [ return 0; ],
11463 [ echo "*** The test program compiled, but did not run. This usually means"
11464 echo "*** that the run-time linker is not finding SDL or finding the wrong"
11465 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
11466 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
11467 echo "*** to the installed location Also, make sure you have run ldconfig if that"
11468 echo "*** is required on your system"
11469 echo "***"
11470 echo "*** If you have an old version installed, it is best to remove it, although"
11471 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
11472 [ echo "*** The test program failed to compile or link. See the file config.log for the"
11473 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
11474 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
11475 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
11476 CFLAGS="$ac_save_CFLAGS"
11477 CXXFLAGS="$ac_save_CXXFLAGS"
11478 LIBS="$ac_save_LIBS"
11479 fi
11480 fi
11481 SDL_CFLAGS=""
11482 SDL_LIBS=""
11483 ifelse([$3], , :, [$3])
11484 fi
11485 AC_SUBST(SDL_CFLAGS)
11486 AC_SUBST(SDL_LIBS)
11487 rm -f conf.sdltest
11488])
11489
11490m4_include([acinclude.m4])