source: indexers/trunk/packages/unac/aclocal.m4@ 15562

Last change on this file since 15562 was 13670, checked in by kjdon, 17 years ago

unac package needed for accent folding in mgpp, and possibly for mg in the future

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