1 # aclocal.m4 generated automatically by aclocal 1.5
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.
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
14 # Do all the work for Automake. This macro actually does too much --
15 # some checks are only needed if your package does certain things.
16 # But this isn't really a big deal.
20 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
21 # written in clear, in which case automake, when reading aclocal.m4,
22 # will think it sees a *use*, and therefore will trigger all it's
23 # C support machinery. Also note that it means that autoscan, seeing
24 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
27 # We require 2.13 because we rely on SHELL being computed by configure.
30 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
31 # -----------------------------------------------------------
32 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
33 # The purpose of this macro is to provide the user with a means to
34 # check macros which are provided without letting her know how the
35 # information is coded.
36 # If this macro is not defined by Autoconf, define it here.
37 ifdef([AC_PROVIDE_IFELSE],
39 [define([AC_PROVIDE_IFELSE],
40 [ifdef([AC_PROVIDE_$1],
44 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
45 # ----------------------------------------------
46 AC_DEFUN([AM_INIT_AUTOMAKE],
47 [AC_REQUIRE([AC_PROG_INSTALL])dnl
48 # test to see if srcdir already configured
49 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
50 test -f $srcdir/config.status; then
51 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
54 # Define the identity of the package.
60 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
61 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
63 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
64 # the ones we care about.
65 ifdef([m4_pattern_allow],
66 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
68 # Autoconf 2.50 always computes EXEEXT. However we need to be
69 # compatible with 2.13, for now. So we always define EXEEXT, but we
72 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
73 # requests that it be used. This is a bit dumb.
77 # Some tools Automake needs.
78 AC_REQUIRE([AM_SANITY_CHECK])dnl
79 AC_REQUIRE([AC_ARG_PROGRAM])dnl
80 AM_MISSING_PROG(ACLOCAL, aclocal)
81 AM_MISSING_PROG(AUTOCONF, autoconf)
82 AM_MISSING_PROG(AUTOMAKE, automake)
83 AM_MISSING_PROG(AUTOHEADER, autoheader)
84 AM_MISSING_PROG(MAKEINFO, makeinfo)
85 AM_MISSING_PROG(AMTAR, tar)
88 # We need awk for the "check" target. The system "awk" is bad on
90 AC_REQUIRE([AC_PROG_AWK])dnl
91 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
92 AC_REQUIRE([AM_DEP_TRACK])dnl
93 AC_REQUIRE([AM_SET_DEPDIR])dnl
94 AC_PROVIDE_IFELSE([AC_PROG_][CC],
95 [_AM_DEPENDENCIES(CC)],
96 [define([AC_PROG_][CC],
97 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
98 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
99 [_AM_DEPENDENCIES(CXX)],
100 [define([AC_PROG_][CXX],
101 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
105 # Check to make sure that the build environment is sane.
112 AC_DEFUN([AM_SANITY_CHECK],
113 [AC_MSG_CHECKING([whether build environment is sane])
116 echo timestamp > conftest.file
117 # Do `set' in a subshell so we don't clobber the current shell's
118 # arguments. Must try -L first in case configure is actually a
119 # symlink; some systems play weird games with the mod time of symlinks
120 # (eg FreeBSD returns the mod time of the symlink's containing
123 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
124 if test "$[*]" = "X"; then
126 set X `ls -t $srcdir/configure conftest.file`
129 if test "$[*]" != "X $srcdir/configure conftest.file" \
130 && test "$[*]" != "X conftest.file $srcdir/configure"; then
132 # If neither matched, then we have a broken ls. This can happen
133 # if, for instance, CONFIG_SHELL is bash and it inherits a
134 # broken ls alias from the environment. This has actually
135 # happened. Such a system could not be considered "sane".
136 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
137 alias in your environment])
140 test "$[2]" = conftest.file
146 AC_MSG_ERROR([newly created file is older than distributed files!
147 Check your system clock])
154 # AM_MISSING_PROG(NAME, PROGRAM)
155 # ------------------------------
156 AC_DEFUN([AM_MISSING_PROG],
157 [AC_REQUIRE([AM_MISSING_HAS_RUN])
158 $1=${$1-"${am_missing_run}$2"}
164 # Define MISSING if not defined so far and test if it supports --run.
165 # If it does, set am_missing_run to use it, otherwise, to nothing.
166 AC_DEFUN([AM_MISSING_HAS_RUN],
167 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
168 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
169 # Use eval to expand $SHELL
170 if eval "$MISSING --run true"; then
171 am_missing_run="$MISSING --run "
175 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
181 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
182 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
183 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
185 # Of course, Automake must honor this variable whenever it calls a
186 # tool from the auxiliary directory. The problem is that $srcdir (and
187 # therefore $ac_aux_dir as well) can be either absolute or relative,
188 # depending on how configure is run. This is pretty annoying, since
189 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
190 # source directory, any form will work fine, but in subdirectories a
191 # relative path needs to be adjusted first.
193 # $ac_aux_dir/missing
194 # fails when called from a subdirectory if $ac_aux_dir is relative
195 # $top_srcdir/$ac_aux_dir/missing
196 # fails if $ac_aux_dir is absolute,
197 # fails when called from a subdirectory in a VPATH build with
198 # a relative $ac_aux_dir
200 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
201 # are both prefixed by $srcdir. In an in-source build this is usually
202 # harmless because $srcdir is `.', but things will broke when you
203 # start a VPATH build or use an absolute $srcdir.
205 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
206 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
207 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
208 # and then we would define $MISSING as
209 # MISSING="\${SHELL} $am_aux_dir/missing"
210 # This will work as long as MISSING is not called from configure, because
211 # unfortunately $(top_srcdir) has no meaning in configure.
212 # However there are other variables, like CC, which are often used in
213 # configure, and could therefore not use this "fixed" $ac_aux_dir.
215 # Another solution, used here, is to always expand $ac_aux_dir to an
216 # absolute PATH. The drawback is that using absolute paths prevent a
217 # configured tree to be moved without reconfiguration.
219 AC_DEFUN([AM_AUX_DIR_EXPAND], [
220 # expand $ac_aux_dir to an absolute path
221 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
226 # Define $install_sh.
227 AC_DEFUN([AM_PROG_INSTALL_SH],
228 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
229 install_sh=${install_sh-"$am_aux_dir/install-sh"}
230 AC_SUBST(install_sh)])
232 # One issue with vendor `install' (even GNU) is that you can't
233 # specify the program used to strip binaries. This is especially
234 # annoying in cross-compiling environments, where the build's strip
235 # is unlikely to handle the host's binaries.
236 # Fortunately install-sh will honor a STRIPPROG variable, so we
237 # always use install-sh in `make install-strip', and initialize
238 # STRIPPROG with the value of the STRIP variable (set by the user).
239 AC_DEFUN([AM_PROG_INSTALL_STRIP],
240 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
241 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
242 AC_SUBST([INSTALL_STRIP_PROGRAM])])
244 # serial 4 -*- Autoconf -*-
248 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
249 # written in clear, in which case automake, when reading aclocal.m4,
250 # will think it sees a *use*, and therefore will trigger all it's
251 # C support machinery. Also note that it means that autoscan, seeing
252 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
256 # _AM_DEPENDENCIES(NAME)
257 # ---------------------
258 # See how the compiler implements dependency checking.
259 # NAME is "CC", "CXX" or "OBJC".
260 # We try a few techniques and use that to set a single cache variable.
262 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
263 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
264 # dependency, and given that the user is not expected to run this macro,
265 # just rely on AC_PROG_CC.
266 AC_DEFUN([_AM_DEPENDENCIES],
267 [AC_REQUIRE([AM_SET_DEPDIR])dnl
268 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
269 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
270 AC_REQUIRE([AM_DEP_TRACK])dnl
272 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
273 [$1], CXX, [depcc="$CXX" am_compiler_list=],
274 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
275 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
276 [depcc="$$1" am_compiler_list=])
278 AC_CACHE_CHECK([dependency style of $depcc],
279 [am_cv_$1_dependencies_compiler_type],
280 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
281 # We make a subdir and do the tests there. Otherwise we can end up
282 # making bogus files that we don't know about and never remove. For
283 # instance it was reported that on HP-UX the gcc test will end up
284 # making a dummy file named `D' -- because `-MD' means `put the output
287 # Copy depcomp to subdir because otherwise we won't find it if we're
288 # using a relative directory.
289 cp "$am_depcomp" conftest.dir
292 am_cv_$1_dependencies_compiler_type=none
293 if test "$am_compiler_list" = ""; then
294 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
296 for depmode in $am_compiler_list; do
297 # We need to recreate these files for each test, as the compiler may
298 # overwrite some of them when testing with obscure command lines.
299 # This happens at least with the AIX C compiler.
300 echo '#include "conftest.h"' > conftest.c
301 echo 'int i;' > conftest.h
302 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
306 # after this tag, mechanisms are not by side-effect, so they'll
307 # only be used when explicitly requested
308 if test "x$enable_dependency_tracking" = xyes; then
316 # We check with `-c' and `-o' for the sake of the "dashmstdout"
317 # mode. It turns out that the SunPro C++ compiler does not properly
318 # handle `-M -o', and we need to detect this.
319 if depmode=$depmode \
320 source=conftest.c object=conftest.o \
321 depfile=conftest.Po tmpdepfile=conftest.TPo \
322 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
323 grep conftest.h conftest.Po > /dev/null 2>&1 &&
324 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
325 am_cv_$1_dependencies_compiler_type=$depmode
333 am_cv_$1_dependencies_compiler_type=none
336 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
337 AC_SUBST([$1DEPMODE])
343 # Choose a directory name for dependency files.
344 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
345 AC_DEFUN([AM_SET_DEPDIR],
346 [rm -f .deps 2>/dev/null
347 mkdir .deps 2>/dev/null
348 if test -d .deps; then
351 # MS-DOS does not allow filenames that begin with a dot.
354 rmdir .deps 2>/dev/null
361 AC_DEFUN([AM_DEP_TRACK],
362 [AC_ARG_ENABLE(dependency-tracking,
363 [ --disable-dependency-tracking Speeds up one-time builds
364 --enable-dependency-tracking Do not reject slow dependency extractors])
365 if test "x$enable_dependency_tracking" != xno; then
366 am_depcomp="$ac_aux_dir/depcomp"
369 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
370 pushdef([subst], defn([AC_SUBST]))
371 subst(AMDEPBACKSLASH)
375 # Generate code to set up dependency tracking.
376 # This macro should only be invoked once -- use via AC_REQUIRE.
378 # AM_OUTPUT_DEPENDENCY_COMMANDS
381 # This code is only required when automatic dependency tracking
382 # is enabled. FIXME. This creates each `.P' file that we will
383 # need in order to bootstrap the dependency handling code.
384 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
386 test x"$AMDEP_TRUE" != x"" ||
387 for mf in $CONFIG_FILES; do
389 Makefile) dirpart=.;;
390 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
393 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
394 # Extract the definition of DEP_FILES from the Makefile without
396 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
397 test -z "$DEPDIR" && continue
398 # When using ansi2knr, U may be empty or an underscore; expand it
399 U=`sed -n -e '/^U = / s///p' < "$mf"`
400 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
401 # We invoke sed twice because it is the simplest approach to
402 # changing $(DEPDIR) to its actual value in the expansion.
403 for file in `sed -n -e '
404 /^DEP_FILES = .*\\\\$/ {
413 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
414 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
415 # Make sure the directory exists.
416 test -f "$dirpart/$file" && continue
417 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
418 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
419 # echo "creating $dirpart/$file"
420 echo '# dummy' > "$dirpart/$file"
423 ], [AMDEP_TRUE="$AMDEP_TRUE"
424 ac_aux_dir="$ac_aux_dir"])])
428 # Check to see how make treats includes.
429 AC_DEFUN([AM_MAKE_INCLUDE],
430 [am_make=${MAKE-make}
431 cat > confinc << 'END'
435 # If we don't find an include directive, just comment out the code.
436 AC_MSG_CHECKING([for style of include used by $am_make])
440 # First try GNU make style include.
441 echo "include confinc" > confmf
442 # We grep out `Entering directory' and `Leaving directory'
443 # messages which can occur if `w' ends up in MAKEFLAGS.
444 # In particular we don't look at `^make:' because GNU make might
445 # be invoked under some other name (usually "gmake"), in which
446 # case it prints its new name instead of `make'.
447 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
452 # Now try BSD make style include.
453 if test "$am__include" = "#"; then
454 echo '.include "confinc"' > confmf
455 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
461 AC_SUBST(am__include)
463 AC_MSG_RESULT($_am_result)
469 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
470 # -------------------------------------
471 # Define a conditional.
473 # FIXME: Once using 2.50, use this:
474 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
475 AC_DEFUN([AM_CONDITIONAL],
476 [ifelse([$1], [TRUE],
477 [errprint(__file__:__line__: [$0: invalid condition: $1
480 ifelse([$1], [FALSE],
481 [errprint(__file__:__line__: [$0: invalid condition: $1
494 # Like AC_CONFIG_HEADER, but automatically create stamp file.
498 # When config.status generates a header, we must update the stamp-h file.
499 # This file resides in the same directory as the config header
500 # that is generated. We must strip everything past the first ":",
501 # and everything past the last "/".
505 AC_DEFUN([AM_CONFIG_HEADER],
506 [ifdef([AC_FOREACH],dnl
507 [dnl init our file count if it isn't already
508 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
509 dnl prepare to store our destination file list for use in config.status
510 AC_FOREACH([_AM_File], [$1],
511 [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
512 m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
513 dnl and add it to the list of files AC keeps track of, along
515 AC_CONFIG_HEADERS(_AM_File,
516 dnl COMMANDS, [, INIT-CMDS]
517 [# update the timestamp
518 echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
519 ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
520 m4_popdef([_AM_Dest])])],dnl
521 [AC_CONFIG_HEADER([$1])
523 ifelse(patsubst([$1], [[^ ]], []),
525 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
526 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
528 for am_file in $1; do
529 case " \$CONFIG_HEADERS " in
531 am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
532 if test -n "\$am_dir"; then
533 am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
534 for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
535 am_tmpdir=\$am_tmpdir\$am_subdir/
536 if test ! -d \$am_tmpdir; then
541 echo timestamp > "\$am_dir"stamp-h\$am_indx
544 am_indx=\`expr \$am_indx + 1\`
546 ])]) # AM_CONFIG_HEADER
550 # Like AS_DIRNAME, only do it during macro expansion
551 AC_DEFUN([_AM_DIRNAME],
552 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
553 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
554 m4_if(m4_regexp([$1], [^/.*]), -1,
556 m4_patsubst([$1], [^\(/\).*], [\1])),
557 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
558 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
562 # This test replaces the one in autoconf.
563 # Currently this macro should have the same name as the autoconf macro
564 # because gettext's gettext.m4 (distributed in the automake package)
565 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
566 # give these diagnostics:
567 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
568 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
570 undefine([AC_ISC_POSIX])
572 AC_DEFUN([AC_ISC_POSIX],
574 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
575 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
582 AC_DEFUN([AM_C_PROTOTYPES],
583 [AC_REQUIRE([AM_PROG_CC_STDC])
584 AC_REQUIRE([AC_PROG_CPP])
585 AC_MSG_CHECKING([for function prototypes])
586 if test "$am_cv_prog_cc_stdc" != no; then
588 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
592 U=_ ANSI2KNR=./ansi2knr
594 # Ensure some checks needed by ansi2knr itself.
596 AC_CHECK_HEADERS(string.h)
598 AC_SUBST(ANSI2KNR)dnl
604 # @defmac AC_PROG_CC_STDC
605 # @maindex PROG_CC_STDC
607 # If the C compiler in not in ANSI C mode by default, try to add an option
608 # to output variable @code{CC} to make it so. This macro tries various
609 # options that select ANSI C on some system or another. It considers the
610 # compiler to be in ANSI C mode if it handles function prototypes correctly.
612 # If you use this macro, you should check after calling it whether the C
613 # compiler has been set to accept ANSI C; if not, the shell variable
614 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
615 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
616 # program @code{ansi2knr}, which comes with Ghostscript.
619 AC_DEFUN([AM_PROG_CC_STDC],
620 [AC_REQUIRE([AC_PROG_CC])
621 AC_BEFORE([$0], [AC_C_INLINE])
622 AC_BEFORE([$0], [AC_C_CONST])
623 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
624 dnl a magic option to avoid problems with ANSI preprocessor commands
626 dnl FIXME: can't do this because then AC_AIX won't work due to a
627 dnl circular dependency.
628 dnl AC_BEFORE([$0], [AC_PROG_CPP])
629 AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
630 AC_CACHE_VAL(am_cv_prog_cc_stdc,
631 [am_cv_prog_cc_stdc=no
633 # Don't try gcc -ansi; that turns off useful extensions and
634 # breaks some systems' header files.
636 # Ultrix and OSF/1 -std1
637 # HP-UX 10.20 and later -Ae
638 # HP-UX older versions -Aa -D_HPUX_SOURCE
639 # SVR4 -Xc -D__EXTENSIONS__
640 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
642 CC="$ac_save_CC $ac_arg"
646 #include <sys/types.h>
647 #include <sys/stat.h>
648 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
649 struct buf { int x; };
650 FILE * (*rcsopen) (struct buf *, struct stat *, int);
651 static char *e (p, i)
657 static char *f (char * (*g) (char **, int), char **p, ...)
662 s = g (p, va_arg (v,int));
666 int test (int i, double x);
667 struct s1 {int (*f) (int a);};
668 struct s2 {int (*f) (double a);};
669 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
673 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
675 [am_cv_prog_cc_stdc="$ac_arg"; break])
679 if test -z "$am_cv_prog_cc_stdc"; then
680 AC_MSG_RESULT([none needed])
682 AC_MSG_RESULT([$am_cv_prog_cc_stdc])
684 case "x$am_cv_prog_cc_stdc" in
686 *) CC="$CC $am_cv_prog_cc_stdc" ;;
690 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
692 # serial 46 AC_PROG_LIBTOOL
694 AC_DEFUN([AC_PROG_LIBTOOL],
695 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
697 # This can be used to rebuild libtool when needed
698 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
700 # Always use our own libtool.
701 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
704 # Prevent multiple expansion
705 define([AC_PROG_LIBTOOL], [])
708 AC_DEFUN([AC_LIBTOOL_SETUP],
710 AC_REQUIRE([AC_ENABLE_SHARED])dnl
711 AC_REQUIRE([AC_ENABLE_STATIC])dnl
712 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
713 AC_REQUIRE([AC_CANONICAL_HOST])dnl
714 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
715 AC_REQUIRE([AC_PROG_CC])dnl
716 AC_REQUIRE([AC_PROG_LD])dnl
717 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
718 AC_REQUIRE([AC_PROG_NM])dnl
719 AC_REQUIRE([AC_PROG_LN_S])dnl
720 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
721 AC_REQUIRE([AC_OBJEXT])dnl
722 AC_REQUIRE([AC_EXEEXT])dnl
725 _LT_AC_PROG_ECHO_BACKSLASH
726 # Only perform the check for file, if the check method requires it
727 case $deplibs_check_method in
729 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
735 AC_CHECK_TOOL(RANLIB, ranlib, :)
736 AC_CHECK_TOOL(STRIP, strip, :)
738 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
739 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
740 enable_win32_dll=yes, enable_win32_dll=no)
742 AC_ARG_ENABLE(libtool-lock,
743 [ --disable-libtool-lock avoid locking (might break parallel builds)])
744 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
746 # Some flags need to be propagated to the compiler or linker for good
750 # Find out which ABI we are using.
751 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
752 if AC_TRY_EVAL(ac_compile); then
753 case `/usr/bin/file conftest.$ac_objext` in
769 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
770 SAVE_CFLAGS="$CFLAGS"
771 CFLAGS="$CFLAGS -belf"
772 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
775 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
777 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
778 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
779 CFLAGS="$SAVE_CFLAGS"
783 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
784 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
785 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
786 AC_CHECK_TOOL(AS, as, false)
787 AC_CHECK_TOOL(OBJDUMP, objdump, false)
789 # recent cygwin and mingw systems supply a stub DllMain which the user
790 # can override, but on older systems we have to supply one
791 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
793 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
795 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
798 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
799 # old mingw systems require "-dll" to link a DLL, while more recent ones
801 SAVE_CFLAGS="$CFLAGS"
802 CFLAGS="$CFLAGS -mdll"
803 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
804 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
805 CFLAGS="$SAVE_CFLAGS" ;;
806 *-*-cygwin* | *-*-pw32*)
807 # cygwin systems need to pass --dll to the linker, and not link
808 # crt.o which will require a WinMain@16 definition.
809 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
819 # AC_LIBTOOL_HEADER_ASSERT
820 # ------------------------
821 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
822 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
823 [lt_cv_func_assert_works],
826 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
827 case `$CC --version 2>/dev/null` in
828 [[12]].*) lt_cv_func_assert_works=no ;;
829 *) lt_cv_func_assert_works=yes ;;
835 if test "x$lt_cv_func_assert_works" = xyes; then
836 AC_CHECK_HEADERS(assert.h)
838 ])# AC_LIBTOOL_HEADER_ASSERT
841 # --------------------
842 AC_DEFUN([_LT_AC_CHECK_DLFCN],
843 [AC_CHECK_HEADERS(dlfcn.h)
844 ])# _LT_AC_CHECK_DLFCN
846 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
847 # ---------------------------------
848 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
849 [AC_REQUIRE([AC_CANONICAL_HOST])
850 AC_REQUIRE([AC_PROG_NM])
851 AC_REQUIRE([AC_OBJEXT])
852 # Check for command to grab the raw symbol name followed by C symbol from nm.
853 AC_MSG_CHECKING([command to parse $NM output])
854 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
856 # These are sane defaults that work on at least a few old systems.
857 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
859 # Character class describing NM global symbol codes.
860 symcode='[[BCDEGRST]]'
862 # Regexp to match symbols that can be accessed directly from C.
863 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
865 # Transform the above into a raw symbol and a C symbol.
868 # Transform an extracted symbol line into a proper C declaration
869 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
871 # Transform an extracted symbol line into symbol name and symbol address
872 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'"
874 # Define system-specific variables.
879 cygwin* | mingw* | pw32*)
880 symcode='[[ABCDGISTW]]'
882 hpux*) # Its linker distinguishes data from code symbols
883 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
884 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'"
887 symcode='[[BCDEGRST]]'
897 # Handle CRLF in mingw tool chain
901 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
905 # If we're using GNU nm, then use its standard symbol codes.
906 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
907 symcode='[[ABCDGISTW]]'
910 # Try without a prefix undercore, then with it.
911 for ac_symprfx in "" "_"; do
913 # Write the raw and C identifiers.
914 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
916 # Check to see that the pipe works correctly.
919 cat > conftest.$ac_ext <<EOF
924 void nm_test_func(){}
928 int main(){nm_test_var='a';nm_test_func();return(0);}
931 if AC_TRY_EVAL(ac_compile); then
932 # Now try to grab the symbols.
934 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
935 # Try sorting and uniquifying the output.
936 if sort "$nlist" | uniq > "$nlist"T; then
937 mv -f "$nlist"T "$nlist"
942 # Make sure that we snagged all the symbols we need.
943 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
944 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
945 cat <<EOF > conftest.$ac_ext
951 # Now generate the symbol file.
952 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
954 cat <<EOF >> conftest.$ac_ext
955 #if defined (__STDC__) && __STDC__
956 # define lt_ptr void *
958 # define lt_ptr char *
962 /* The mapping between symbol names and symbols. */
967 lt_preloaded_symbols[[]] =
970 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
971 cat <<\EOF >> conftest.$ac_ext
979 # Now try linking the two files.
980 mv conftest.$ac_objext conftstm.$ac_objext
982 save_CFLAGS="$CFLAGS"
983 LIBS="conftstm.$ac_objext"
984 CFLAGS="$CFLAGS$no_builtin_flag"
985 if AC_TRY_EVAL(ac_link) && test -s conftest; then
989 CFLAGS="$save_CFLAGS"
991 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
994 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
997 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1000 echo "$progname: failed program was:" >&AC_FD_CC
1001 cat conftest.$ac_ext >&5
1003 rm -f conftest* conftst*
1005 # Do not use the global_symbol_pipe unless it works.
1006 if test "$pipe_works" = yes; then
1009 lt_cv_sys_global_symbol_pipe=
1013 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1014 if test -z "$lt_cv_sys_global_symbol_pipe"; then
1015 global_symbol_to_cdecl=
1016 global_symbol_to_c_name_address=
1018 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1019 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1021 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1023 AC_MSG_RESULT(failed)
1027 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1029 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1030 # ---------------------------------
1031 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1032 [# Find the correct PATH separator. Usually this is `:', but
1033 # DJGPP uses `;' like DOS.
1034 if test "X${PATH_SEPARATOR+set}" != Xset; then
1035 UNAME=${UNAME-`uname 2>/dev/null`}
1037 *-DOS) lt_cv_sys_path_separator=';' ;;
1038 *) lt_cv_sys_path_separator=':' ;;
1040 PATH_SEPARATOR=$lt_cv_sys_path_separator
1042 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1044 # _LT_AC_PROG_ECHO_BACKSLASH
1045 # --------------------------
1046 # Add some code to the start of the generated configure script which
1047 # will find an echo command which doesn't interpret backslashes.
1048 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1049 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1050 [AC_DIVERT_PUSH(NOTICE)])
1051 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1053 # Check that we are running under the correct shell.
1054 SHELL=${CONFIG_SHELL-/bin/sh}
1058 # Remove one level of quotation (which was required for Make).
1059 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1064 if test "X[$]1" = X--no-reexec; then
1065 # Discard the --no-reexec flag, and continue.
1067 elif test "X[$]1" = X--fallback-echo; then
1068 # Avoid inline document here, it may be left over
1070 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1071 # Yippee, $echo works!
1074 # Restart under the correct shell.
1075 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1078 if test "X[$]1" = X--fallback-echo; then
1079 # used as fallback echo
1087 # The HP-UX ksh and POSIX shell print the target directory to stdout
1089 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1091 if test -z "$ECHO"; then
1092 if test "X${echo_test_string+set}" != Xset; then
1093 # find a string as large as possible, as long as the shell can cope with it
1094 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1095 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1096 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1097 echo_test_string="`eval $cmd`" &&
1098 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1105 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1106 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1107 test "X$echo_testing_string" = "X$echo_test_string"; then
1110 # The Solaris, AIX, and Digital Unix default echo programs unquote
1111 # backslashes. This makes it impossible to quote backslashes using
1112 # echo "$something" | sed 's/\\/\\\\/g'
1114 # So, first we look for a working echo in the user's PATH.
1116 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1117 for dir in $PATH /usr/ucb; do
1118 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1119 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1120 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1121 test "X$echo_testing_string" = "X$echo_test_string"; then
1128 if test "X$echo" = Xecho; then
1129 # We didn't find a better echo, so look for alternatives.
1130 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1131 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1132 test "X$echo_testing_string" = "X$echo_test_string"; then
1133 # This shell has a builtin print -r that does the trick.
1135 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1136 test "X$CONFIG_SHELL" != X/bin/ksh; then
1137 # If we have ksh, try running configure again with it.
1138 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1139 export ORIGINAL_CONFIG_SHELL
1140 CONFIG_SHELL=/bin/ksh
1142 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1146 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1147 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1148 test "X$echo_testing_string" = "X$echo_test_string"; then
1149 # Cool, printf works
1151 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1152 test "X$echo_testing_string" = 'X\t' &&
1153 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1154 test "X$echo_testing_string" = "X$echo_test_string"; then
1155 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1157 SHELL="$CONFIG_SHELL"
1159 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1160 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1161 test "X$echo_testing_string" = 'X\t' &&
1162 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1163 test "X$echo_testing_string" = "X$echo_test_string"; then
1164 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1166 # maybe with a smaller string...
1169 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1170 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1177 if test "$prev" != 'sed 50q "[$]0"'; then
1178 echo_test_string=`eval $prev`
1179 export echo_test_string
1180 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1182 # Oops. We lost completely, so just stick with echo.
1191 # Copy echo and quote the copy suitably for passing to libtool from
1192 # the Makefile, instead of quoting the original, which is used later.
1194 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1195 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1200 ])# _LT_AC_PROG_ECHO_BACKSLASH
1202 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1203 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1204 # ------------------------------------------------------------------
1205 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1206 [if test "$cross_compiling" = yes; then :
1209 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1210 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1211 lt_status=$lt_dlunknown
1212 cat > conftest.$ac_ext <<EOF
1213 [#line __oline__ "configure"
1214 #include "confdefs.h"
1223 # define LT_DLGLOBAL RTLD_GLOBAL
1226 # define LT_DLGLOBAL DL_GLOBAL
1228 # define LT_DLGLOBAL 0
1232 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1233 find out it does not work in some platform. */
1234 #ifndef LT_DLLAZY_OR_NOW
1236 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1239 # define LT_DLLAZY_OR_NOW DL_LAZY
1242 # define LT_DLLAZY_OR_NOW RTLD_NOW
1245 # define LT_DLLAZY_OR_NOW DL_NOW
1247 # define LT_DLLAZY_OR_NOW 0
1255 extern "C" void exit (int);
1258 void fnord() { int i=42;}
1261 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1262 int status = $lt_dlunknown;
1266 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1267 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1268 /* dlclose (self); */
1274 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1275 (./conftest; exit; ) 2>/dev/null
1278 x$lt_dlno_uscore) $1 ;;
1279 x$lt_dlneed_uscore) $2 ;;
1280 x$lt_unknown|x*) $3 ;;
1283 # compilation failed
1288 ])# _LT_AC_TRY_DLOPEN_SELF
1290 # AC_LIBTOOL_DLOPEN_SELF
1291 # -------------------
1292 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1293 [if test "x$enable_dlopen" != xyes; then
1294 enable_dlopen=unknown
1295 enable_dlopen_self=unknown
1296 enable_dlopen_self_static=unknown
1303 lt_cv_dlopen="load_add_on"
1305 lt_cv_dlopen_self=yes
1308 cygwin* | mingw* | pw32*)
1309 lt_cv_dlopen="LoadLibrary"
1314 AC_CHECK_FUNC([shl_load],
1315 [lt_cv_dlopen="shl_load"],
1316 [AC_CHECK_LIB([dld], [shl_load],
1317 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1318 [AC_CHECK_FUNC([dlopen],
1319 [lt_cv_dlopen="dlopen"],
1320 [AC_CHECK_LIB([dl], [dlopen],
1321 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1322 [AC_CHECK_LIB([svld], [dlopen],
1323 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1324 [AC_CHECK_LIB([dld], [dld_link],
1325 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1334 if test "x$lt_cv_dlopen" != xno; then
1340 case $lt_cv_dlopen in
1342 save_CPPFLAGS="$CPPFLAGS"
1343 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1344 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1346 save_LDFLAGS="$LDFLAGS"
1347 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1350 LIBS="$lt_cv_dlopen_libs $LIBS"
1352 AC_CACHE_CHECK([whether a program can dlopen itself],
1353 lt_cv_dlopen_self, [dnl
1354 _LT_AC_TRY_DLOPEN_SELF(
1355 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1356 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1359 if test "x$lt_cv_dlopen_self" = xyes; then
1360 LDFLAGS="$LDFLAGS $link_static_flag"
1361 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1362 lt_cv_dlopen_self_static, [dnl
1363 _LT_AC_TRY_DLOPEN_SELF(
1364 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1365 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1369 CPPFLAGS="$save_CPPFLAGS"
1370 LDFLAGS="$save_LDFLAGS"
1375 case $lt_cv_dlopen_self in
1376 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1377 *) enable_dlopen_self=unknown ;;
1380 case $lt_cv_dlopen_self_static in
1381 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1382 *) enable_dlopen_self_static=unknown ;;
1385 ])# AC_LIBTOOL_DLOPEN_SELF
1387 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1388 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1389 # Sed substitution that helps us do robust quoting. It backslashifies
1390 # metacharacters that are still active within double-quoted strings.
1391 Xsed='sed -e s/^X//'
1392 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1394 # Same as above, but do not quote variable references.
1395 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1397 # Sed substitution to delay expansion of an escaped shell variable in a
1398 # double_quote_subst'ed string.
1399 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1405 default_ofile=libtool
1406 can_build_shared=yes
1408 # All known linkers require a `.a' archive for static linking (except M$VC,
1409 # which needs '.lib').
1411 ltmain="$ac_aux_dir/ltmain.sh"
1412 ofile="$default_ofile"
1413 with_gnu_ld="$lt_cv_prog_gnu_ld"
1414 need_locks="$enable_libtool_lock"
1417 old_CFLAGS="$CFLAGS"
1419 # Set sane defaults for various variables
1420 test -z "$AR" && AR=ar
1421 test -z "$AR_FLAGS" && AR_FLAGS=cru
1422 test -z "$AS" && AS=as
1423 test -z "$CC" && CC=cc
1424 test -z "$DLLTOOL" && DLLTOOL=dlltool
1425 test -z "$LD" && LD=ld
1426 test -z "$LN_S" && LN_S="ln -s"
1427 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1428 test -z "$NM" && NM=nm
1429 test -z "$OBJDUMP" && OBJDUMP=objdump
1430 test -z "$RANLIB" && RANLIB=:
1431 test -z "$STRIP" && STRIP=:
1432 test -z "$ac_objext" && ac_objext=o
1434 if test x"$host" != x"$build"; then
1435 ac_tool_prefix=${host_alias}-
1440 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1443 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1448 # AIX sometimes has problems with the GCC collect2 program. For some
1449 # reason, if we set the COLLECT_NAMES environment variable, the problems
1450 # vanish in a puff of smoke.
1451 if test "X${COLLECT_NAMES+set}" != Xset; then
1453 export COLLECT_NAMES
1458 # Determine commands to create old-style static archives.
1459 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1460 old_postinstall_cmds='chmod 644 $oldlib'
1461 old_postuninstall_cmds=
1463 if test -n "$RANLIB"; then
1466 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1469 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1472 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1475 # Allow CC to be a program name with arguments.
1479 AC_MSG_CHECKING([for objdir])
1480 rm -f .libs 2>/dev/null
1481 mkdir .libs 2>/dev/null
1482 if test -d .libs; then
1485 # MS-DOS does not allow filenames that begin with a dot.
1488 rmdir .libs 2>/dev/null
1489 AC_MSG_RESULT($objdir)
1493 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1494 pic_mode="$withval", pic_mode=default)
1495 test -z "$pic_mode" && pic_mode=default
1497 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1498 # in isolation, and that seeing it set (from the cache) indicates that
1499 # the associated values are set (in the cache) correctly too.
1500 AC_MSG_CHECKING([for $compiler option to produce PIC])
1501 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1502 [ lt_cv_prog_cc_pic=
1503 lt_cv_prog_cc_shlib=
1505 lt_cv_prog_cc_static=
1506 lt_cv_prog_cc_no_builtin=
1507 lt_cv_prog_cc_can_build_shared=$can_build_shared
1509 if test "$GCC" = yes; then
1510 lt_cv_prog_cc_wl='-Wl,'
1511 lt_cv_prog_cc_static='-static'
1515 # Below there is a dirty hack to force normal static linking with -ldl
1516 # The problem is because libdl dynamically linked with both libc and
1517 # libC (AIX C++ library), which obviously doesn't included in libraries
1518 # list by gcc. This cause undefined symbols with -static flags.
1519 # This hack allows C programs to be linked with "-static -ldl", but
1520 # not sure about C++ programs.
1521 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1524 # FIXME: we need at least 68020 code to build shared libraries, but
1525 # adding the `-m68020' flag to GCC prevents building anything better,
1527 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1529 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1530 # PIC is the default for these OSes.
1532 darwin* | rhapsody*)
1533 # PIC is the default on this platform
1534 # Common symbols not allowed in MH_DYLIB files
1535 lt_cv_prog_cc_pic='-fno-common'
1537 cygwin* | mingw* | pw32* | os2*)
1538 # This hack is so that the source file can tell whether it is being
1539 # built for inclusion in a dll (and should export symbols for example).
1540 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1543 if test -d /usr/nec; then
1544 lt_cv_prog_cc_pic=-Kconform_pic
1548 lt_cv_prog_cc_pic='-fPIC'
1552 # PORTME Check for PIC flags for the system compiler.
1554 aix3* | aix4* | aix5*)
1555 lt_cv_prog_cc_wl='-Wl,'
1556 # All AIX code is PIC.
1557 if test "$host_cpu" = ia64; then
1558 # AIX 5 now supports IA64 processor
1559 lt_cv_prog_cc_static='-Bstatic'
1561 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1565 hpux9* | hpux10* | hpux11*)
1566 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1567 lt_cv_prog_cc_wl='-Wl,'
1568 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1569 lt_cv_prog_cc_pic='+Z'
1573 lt_cv_prog_cc_wl='-Wl,'
1574 lt_cv_prog_cc_static='-non_shared'
1575 # PIC (with -KPIC) is the default.
1578 cygwin* | mingw* | pw32* | os2*)
1579 # This hack is so that the source file can tell whether it is being
1580 # built for inclusion in a dll (and should export symbols for example).
1581 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1585 lt_cv_prog_cc_pic='-KPIC'
1586 lt_cv_prog_cc_static='-Bstatic'
1589 osf3* | osf4* | osf5*)
1590 # All OSF/1 code is PIC.
1591 lt_cv_prog_cc_wl='-Wl,'
1592 lt_cv_prog_cc_static='-non_shared'
1596 lt_cv_prog_cc_pic='-Kpic'
1597 lt_cv_prog_cc_static='-dn'
1598 lt_cv_prog_cc_shlib='-belf'
1602 lt_cv_prog_cc_pic='-KPIC'
1603 lt_cv_prog_cc_static='-Bstatic'
1604 lt_cv_prog_cc_wl='-Wl,'
1608 lt_cv_prog_cc_pic='-PIC'
1609 lt_cv_prog_cc_static='-Bstatic'
1610 lt_cv_prog_cc_wl='-Qoption ld '
1613 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1614 lt_cv_prog_cc_pic='-KPIC'
1615 lt_cv_prog_cc_static='-Bstatic'
1616 if test "x$host_vendor" = xsni; then
1617 lt_cv_prog_cc_wl='-LD'
1619 lt_cv_prog_cc_wl='-Wl,'
1624 lt_cv_prog_cc_pic='-pic'
1625 lt_cv_prog_cc_static='-Bstatic'
1629 if test -d /usr/nec ;then
1630 lt_cv_prog_cc_pic='-Kconform_pic'
1631 lt_cv_prog_cc_static='-Bstatic'
1636 lt_cv_prog_cc_can_build_shared=no
1641 if test -z "$lt_cv_prog_cc_pic"; then
1642 AC_MSG_RESULT([none])
1644 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1646 # Check to make sure the pic_flag actually works.
1647 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1648 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1649 save_CFLAGS="$CFLAGS"
1650 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1651 AC_TRY_COMPILE([], [], [dnl
1653 hpux9* | hpux10* | hpux11*)
1654 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1655 # they create non-PIC objects. So, if there were any warnings, we
1656 # assume that PIC is not supported.
1657 if test -s conftest.err; then
1658 lt_cv_prog_cc_pic_works=no
1660 lt_cv_prog_cc_pic_works=yes
1664 lt_cv_prog_cc_pic_works=yes
1668 lt_cv_prog_cc_pic_works=no
1670 CFLAGS="$save_CFLAGS"
1673 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1675 lt_cv_prog_cc_can_build_shared=no
1677 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1680 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1683 # Check for any special shared library compilation flags.
1684 if test -n "$lt_cv_prog_cc_shlib"; then
1685 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1686 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1688 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1689 lt_cv_prog_cc_can_build_shared=no
1693 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1694 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1695 lt_cv_prog_cc_static_works=no
1696 save_LDFLAGS="$LDFLAGS"
1697 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1698 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1699 LDFLAGS="$save_LDFLAGS"
1702 # Belt *and* braces to stop my trousers falling down:
1703 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1704 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1706 pic_flag="$lt_cv_prog_cc_pic"
1707 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1708 wl="$lt_cv_prog_cc_wl"
1709 link_static_flag="$lt_cv_prog_cc_static"
1710 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1711 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1714 # Check to see if options -o and -c are simultaneously supported by compiler
1715 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1716 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1717 $rm -r conftest 2>/dev/null
1720 echo "int some_variable = 0;" > conftest.$ac_ext
1722 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1723 # that will create temporary files in the current directory regardless of
1724 # the output directory. Thus, making CWD read-only will cause this test
1725 # to fail, enabling locking or at least warning the user not to do parallel
1728 save_CFLAGS="$CFLAGS"
1729 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1731 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1732 # The compiler can only warn and ignore the option if not recognized
1733 # So say no if there are warnings
1734 if test -s out/conftest.err; then
1735 lt_cv_compiler_c_o=no
1737 lt_cv_compiler_c_o=yes
1740 # Append any errors to the config.log.
1741 cat out/conftest.err 1>&AC_FD_CC
1742 lt_cv_compiler_c_o=no
1744 CFLAGS="$save_CFLAGS"
1750 $rm -r conftest 2>/dev/null
1752 compiler_c_o=$lt_cv_compiler_c_o
1753 AC_MSG_RESULT([$compiler_c_o])
1755 if test x"$compiler_c_o" = x"yes"; then
1756 # Check to see if we can write to a .lo
1757 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1758 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1759 lt_cv_compiler_o_lo=no
1760 save_CFLAGS="$CFLAGS"
1761 CFLAGS="$CFLAGS -c -o conftest.lo"
1762 save_objext="$ac_objext"
1764 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1765 # The compiler can only warn and ignore the option if not recognized
1766 # So say no if there are warnings
1767 if test -s conftest.err; then
1768 lt_cv_compiler_o_lo=no
1770 lt_cv_compiler_o_lo=yes
1773 ac_objext="$save_objext"
1774 CFLAGS="$save_CFLAGS"
1776 compiler_o_lo=$lt_cv_compiler_o_lo
1777 AC_MSG_RESULT([$compiler_o_lo])
1782 # Check to see if we can do hard links to lock some files if needed
1783 hard_links="nottested"
1784 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1785 # do not overwrite the value of need_locks provided by the user
1786 AC_MSG_CHECKING([if we can lock with hard links])
1789 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1791 ln conftest.a conftest.b 2>&5 || hard_links=no
1792 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1793 AC_MSG_RESULT([$hard_links])
1794 if test "$hard_links" = no; then
1795 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1802 if test "$GCC" = yes; then
1803 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1804 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1805 echo "int some_variable = 0;" > conftest.$ac_ext
1806 save_CFLAGS="$CFLAGS"
1807 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1808 compiler_rtti_exceptions=no
1809 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1810 # The compiler can only warn and ignore the option if not recognized
1811 # So say no if there are warnings
1812 if test -s conftest.err; then
1813 compiler_rtti_exceptions=no
1815 compiler_rtti_exceptions=yes
1818 CFLAGS="$save_CFLAGS"
1819 AC_MSG_RESULT([$compiler_rtti_exceptions])
1821 if test "$compiler_rtti_exceptions" = "yes"; then
1822 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1824 no_builtin_flag=' -fno-builtin'
1828 # See if the linker supports building shared libraries.
1829 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1831 allow_undefined_flag=
1833 need_lib_prefix=unknown
1834 need_version=unknown
1835 # when you set need_version to no, make sure it does not cause -set_version
1836 # flags to be left without arguments
1838 archive_expsym_cmds=
1839 old_archive_from_new_cmds=
1840 old_archive_from_expsyms_cmds=
1841 export_dynamic_flag_spec=
1842 whole_archive_flag_spec=
1843 thread_safe_flag_spec=
1844 hardcode_into_libs=no
1845 hardcode_libdir_flag_spec=
1846 hardcode_libdir_separator=
1849 hardcode_shlibpath_var=unsupported
1851 link_all_deplibs=unknown
1852 always_export_symbols=no
1853 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1854 # include_expsyms should be a list of space-separated symbols to be *always*
1855 # included in the symbol list
1857 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1858 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1859 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1860 # as well as any symbol that contains `d'.
1861 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1862 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1863 # platforms (ab)use it in PIC code, but their linkers get confused if
1864 # the symbol is explicitly referenced. Since portable code cannot
1865 # rely on this symbol name, it's probably fine to never include it in
1866 # preloaded symbol tables.
1867 extract_expsyms_cmds=
1870 cygwin* | mingw* | pw32*)
1871 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1872 # When not using gcc, we currently assume that we are using
1873 # Microsoft Visual C++.
1874 if test "$GCC" != yes; then
1884 if test "$with_gnu_ld" = yes; then
1885 # If archive_cmds runs LD, not CC, wlarc should be empty
1888 # See if GNU ld supports shared libraries.
1890 aix3* | aix4* | aix5*)
1891 # On AIX, the GNU linker is very broken
1892 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1896 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1897 *** to be unable to reliably create shared libraries on AIX.
1898 *** Therefore, libtool is disabling shared libraries support. If you
1899 *** really care for shared libraries, you may want to modify your PATH
1900 *** so that a non-GNU linker is found, and then restart.
1906 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)'
1907 hardcode_libdir_flag_spec='-L$libdir'
1908 hardcode_minus_L=yes
1910 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1911 # that the semantics of dynamic libraries on AmigaOS, at least up
1912 # to version 4, is to share data among multiple programs linked
1913 # with the same dynamic library. Since this doesn't match the
1914 # behavior of shared libraries on other platforms, we can use
1920 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1921 allow_undefined_flag=unsupported
1922 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1923 # support --undefined. This deserves some investigation. FIXME
1924 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1930 cygwin* | mingw* | pw32*)
1931 # hardcode_libdir_flag_spec is actually meaningless, as there is
1932 # no search path for DLLs.
1933 hardcode_libdir_flag_spec='-L$libdir'
1934 allow_undefined_flag=unsupported
1935 always_export_symbols=yes
1937 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1938 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1939 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1940 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1941 else $CC -o impgen impgen.c ; fi)~
1942 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1944 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1946 # cygwin and mingw dlls have different entry points and sets of symbols
1948 # FIXME: what about values for MSVC?
1949 dll_entry=__cygwin_dll_entry@12
1950 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1954 dll_entry=_DllMainCRTStartup@12
1955 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1959 # mingw and cygwin differ, and it's simplest to just exclude the union
1960 # of the two symbol sets.
1961 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1963 # recent cygwin and mingw systems supply a stub DllMain which the user
1964 # can override, but on older systems we have to supply one (in ltdll.c)
1965 if test "x$lt_cv_need_dllmain" = "xyes"; then
1966 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1967 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~
1968 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1974 # Extract the symbol export list from an `--export-all' def file,
1975 # then regenerate the def file from the symbol export list, so that
1976 # the compiled dll only exports the symbol export list.
1977 # Be careful not to strip the DATA tag left be newer dlltools.
1978 export_symbols_cmds="$ltdll_cmds"'
1979 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1980 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1982 # If the export-symbols file already is a .def file (1st line
1983 # is EXPORTS), use it as is.
1984 # If DATA tags from a recent dlltool are present, honour them!
1985 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1986 cp $export_symbols $output_objdir/$soname-def;
1988 echo EXPORTS > $output_objdir/$soname-def;
1990 cat $export_symbols | while read symbol; do
1993 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1994 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1996 _lt_hint=`expr 1 + \$_lt_hint`;
2000 $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~
2001 $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~
2002 $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~
2003 $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~
2004 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2008 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2009 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2012 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2013 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2018 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2022 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
2023 *** create shared libraries on Solaris systems. Therefore, libtool
2024 *** is disabling shared libraries support. We urge you to upgrade GNU
2025 *** binutils to release 2.9.1 or newer. Another option is to modify
2026 *** your PATH or compiler configuration so that the native linker is
2027 *** used, and then restart.
2030 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2031 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2032 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2039 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2042 hardcode_shlibpath_var=no
2046 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2047 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2048 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2055 if test "$ld_shlibs" = yes; then
2056 runpath_var=LD_RUN_PATH
2057 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2058 export_dynamic_flag_spec='${wl}--export-dynamic'
2060 cygwin* | mingw* | pw32*)
2061 # dlltool doesn't understand --whole-archive et. al.
2062 whole_archive_flag_spec=
2065 # ancient GNU ld didn't support --whole-archive et. al.
2066 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2067 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2069 whole_archive_flag_spec=
2075 # PORTME fill in a description of your system's linker (not GNU ld)
2078 allow_undefined_flag=unsupported
2079 always_export_symbols=yes
2080 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'
2081 # Note: this linker hardcodes the directories in LIBPATH if there
2082 # are no directories specified by -L.
2083 hardcode_minus_L=yes
2084 if test "$GCC" = yes && test -z "$link_static_flag"; then
2085 # Neither direct hardcoding nor static linking is supported with a
2087 hardcode_direct=unsupported
2092 if test "$host_cpu" = ia64; then
2093 # On IA64, the linker does run time linking by default, so we don't
2094 # have to do anything special.
2095 aix_use_runtimelinking=no
2096 exp_sym_flag='-Bexport'
2099 aix_use_runtimelinking=no
2101 # Test if we are trying to use run time linking or normal
2102 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2103 # need to do runtime linking.
2104 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2105 for ld_flag in $LDFLAGS; do
2106 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2107 aix_use_runtimelinking=yes
2113 exp_sym_flag='-bexport'
2114 no_entry_flag='-bnoentry'
2117 # When large executables or shared objects are built, AIX ld can
2118 # have problems creating the table of contents. If linking a library
2119 # or program results in "error TOC overflow" add -mminimal-toc to
2120 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2121 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2125 hardcode_libdir_separator=':'
2126 if test "$GCC" = yes; then
2127 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2128 collect2name=`${CC} -print-prog-name=collect2`
2129 if test -f "$collect2name" && \
2130 strings "$collect2name" | grep resolve_lib_name >/dev/null
2132 # We have reworked collect2
2135 # We have old collect2
2136 hardcode_direct=unsupported
2137 # It fails to find uninstalled libraries when the uninstalled
2138 # path is not listed in the libpath. Setting hardcode_minus_L
2139 # to unsupported forces relinking
2140 hardcode_minus_L=yes
2141 hardcode_libdir_flag_spec='-L$libdir'
2142 hardcode_libdir_separator=
2146 shared_flag='-shared'
2149 if test "$host_cpu" = ia64; then
2150 shared_flag='${wl}-G'
2152 if test "$aix_use_runtimelinking" = yes; then
2153 shared_flag='${wl}-G'
2155 shared_flag='${wl}-bM:SRE'
2160 # It seems that -bexpall can do strange things, so it is better to
2161 # generate a list of symbols to export.
2162 always_export_symbols=yes
2163 if test "$aix_use_runtimelinking" = yes; then
2164 # Warning - without using the other runtime loading flags (-brtl),
2165 # -berok will link without error, but may produce a broken library.
2166 allow_undefined_flag='-berok'
2167 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2168 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"
2170 if test "$host_cpu" = ia64; then
2171 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2172 allow_undefined_flag="-z nodefs"
2173 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"
2175 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2176 # Warning - without using the other run time loading flags,
2177 # -berok will link without error, but may produce a broken library.
2178 allow_undefined_flag='${wl}-berok'
2179 # This is a bit strange, but is similar to how AIX traditionally builds
2180 # it's shared libraries.
2181 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'
2187 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)'
2188 hardcode_libdir_flag_spec='-L$libdir'
2189 hardcode_minus_L=yes
2190 # see comment about different semantics on the GNU ld section
2194 cygwin* | mingw* | pw32*)
2195 # When not using gcc, we currently assume that we are using
2196 # Microsoft Visual C++.
2197 # hardcode_libdir_flag_spec is actually meaningless, as there is
2198 # no search path for DLLs.
2199 hardcode_libdir_flag_spec=' '
2200 allow_undefined_flag=unsupported
2201 # Tell ltmain to make .lib files, not .a files.
2203 # FIXME: Setting linknames here is a bad hack.
2204 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2205 # The linker will automatically build a .lib file if we build a DLL.
2206 old_archive_from_new_cmds='true'
2207 # FIXME: Should let the user specify the lib program.
2208 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2209 fix_srcfile_path='`cygpath -w "$srcfile"`'
2212 darwin* | rhapsody*)
2214 rhapsody* | darwin1.[[012]])
2215 allow_undefined_flag='-undefined suppress'
2218 allow_undefined_flag='-flat_namespace -undefined suppress'
2221 # FIXME: Relying on posixy $() will cause problems for
2222 # cross-compilation, but unfortunately the echo tests do not
2223 # yet detect zsh echo's removal of \ escapes.
2224 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2225 # We need to add '_' to the symbols in $export_symbols first
2226 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2228 hardcode_shlibpath_var=no
2229 whole_archive_flag_spec='-all_load $convenience'
2236 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2237 # support. Future versions do this automatically, but an explicit c++rt0.o
2238 # does not break anything, and helps significantly (at the cost of a little
2241 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2242 hardcode_libdir_flag_spec='-R$libdir'
2244 hardcode_shlibpath_var=no
2247 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2249 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2251 hardcode_minus_L=yes
2252 hardcode_shlibpath_var=no
2255 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2257 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2258 hardcode_libdir_flag_spec='-R$libdir'
2260 hardcode_shlibpath_var=no
2263 hpux9* | hpux10* | hpux11*)
2265 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' ;;
2266 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2268 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2269 hardcode_libdir_separator=:
2271 hardcode_minus_L=yes # Not in the search PATH, but as the default
2272 # location of the library.
2273 export_dynamic_flag_spec='${wl}-E'
2277 if test "$GCC" = yes; then
2278 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'
2280 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'
2282 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2283 hardcode_libdir_separator=:
2284 link_all_deplibs=yes
2288 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2289 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2291 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2293 hardcode_libdir_flag_spec='-R$libdir'
2295 hardcode_shlibpath_var=no
2299 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2301 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2302 hardcode_libdir_separator=:
2303 hardcode_shlibpath_var=no
2308 hardcode_shlibpath_var=no
2309 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2310 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2311 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2312 export_dynamic_flag_spec='${wl}-E'
2315 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2316 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2317 hardcode_libdir_flag_spec='-R$libdir'
2320 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2321 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2328 hardcode_libdir_flag_spec='-L$libdir'
2329 hardcode_minus_L=yes
2330 allow_undefined_flag=unsupported
2331 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'
2332 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2336 if test "$GCC" = yes; then
2337 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2338 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'
2340 allow_undefined_flag=' -expect_unresolved \*'
2341 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'
2343 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2344 hardcode_libdir_separator=:
2347 osf4* | osf5*) # as osf3* with the addition of -msym flag
2348 if test "$GCC" = yes; then
2349 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2350 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'
2351 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2353 allow_undefined_flag=' -expect_unresolved \*'
2354 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'
2355 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2356 $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'
2358 #Both c and cxx compiler support -rpath directly
2359 hardcode_libdir_flag_spec='-rpath $libdir'
2361 hardcode_libdir_separator=:
2365 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2366 hardcode_shlibpath_var=no
2367 runpath_var=LD_RUN_PATH
2368 hardcode_runpath_var=yes
2369 export_dynamic_flag_spec='${wl}-Bexport'
2373 # gcc --version < 3.0 without binutils cannot create self contained
2374 # shared libraries reliably, requiring libgcc.a to resolve some of
2375 # the object symbols generated in some cases. Libraries that use
2376 # assert need libgcc.a to resolve __eprintf, for example. Linking
2377 # a copy of libgcc.a into every shared library to guarantee resolving
2378 # such symbols causes other problems: According to Tim Van Holder
2379 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2380 # (to the application) exception stack for one thing.
2381 no_undefined_flag=' -z defs'
2382 if test "$GCC" = yes; then
2383 case `$CC --version 2>/dev/null` in
2387 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2388 *** create self contained shared libraries on Solaris systems, without
2389 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2390 *** -no-undefined support, which will at least allow you to build shared
2391 *** libraries. However, you may find that when you link such libraries
2392 *** into an application without using GCC, you have to manually add
2393 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2394 *** upgrade to a newer version of GCC. Another option is to rebuild your
2395 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2402 # $CC -shared without GNU ld will not create a library from C++
2403 # object files and a static libstdc++, better avoid it by now
2404 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2405 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2406 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2407 hardcode_libdir_flag_spec='-R$libdir'
2408 hardcode_shlibpath_var=no
2410 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2411 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2412 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2414 link_all_deplibs=yes
2418 if test "x$host_vendor" = xsequent; then
2419 # Use $CC to link under sequent, because it throws in some extra .o
2420 # files that make .init and .fini sections work.
2421 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2423 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2425 hardcode_libdir_flag_spec='-L$libdir'
2427 hardcode_minus_L=yes
2428 hardcode_shlibpath_var=no
2432 if test "x$host_vendor" = xsno; then
2433 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2434 hardcode_direct=yes # is this really true???
2436 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2437 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2439 runpath_var='LD_RUN_PATH'
2440 hardcode_shlibpath_var=no
2444 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2445 hardcode_shlibpath_var=no
2446 export_dynamic_flag_spec='-Bexport'
2450 no_undefined_flag=' -z text'
2451 # $CC -shared without GNU ld will not create a library from C++
2452 # object files and a static libstdc++, better avoid it by now
2453 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2454 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2455 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2456 hardcode_libdir_flag_spec=
2457 hardcode_shlibpath_var=no
2458 runpath_var='LD_RUN_PATH'
2462 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2463 hardcode_libdir_flag_spec='-L$libdir'
2464 hardcode_shlibpath_var=no
2468 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2469 hardcode_libdir_flag_spec='-L$libdir'
2470 hardcode_shlibpath_var=no
2474 if test -d /usr/nec; then
2475 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2476 hardcode_shlibpath_var=no
2477 runpath_var=LD_RUN_PATH
2478 hardcode_runpath_var=yes
2484 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2487 hardcode_shlibpath_var=no
2488 hardcode_runpath_var=yes
2489 runpath_var=LD_RUN_PATH
2492 sysv5uw7* | unixware7*)
2493 no_undefined_flag='${wl}-z ${wl}text'
2494 if test "$GCC" = yes; then
2495 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2497 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2499 runpath_var='LD_RUN_PATH'
2500 hardcode_shlibpath_var=no
2508 AC_MSG_RESULT([$ld_shlibs])
2509 test "$ld_shlibs" = no && can_build_shared=no
2511 # Check hardcoding attributes.
2512 AC_MSG_CHECKING([how to hardcode library paths into programs])
2514 if test -n "$hardcode_libdir_flag_spec" || \
2515 test -n "$runpath_var"; then
2517 # We can hardcode non-existant directories.
2518 if test "$hardcode_direct" != no &&
2519 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2520 # have to relink, otherwise we might link with an installed library
2521 # when we should be linking with a yet-to-be-installed one
2522 ## test "$hardcode_shlibpath_var" != no &&
2523 test "$hardcode_minus_L" != no; then
2524 # Linking always hardcodes the temporary library directory.
2525 hardcode_action=relink
2527 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2528 hardcode_action=immediate
2531 # We cannot hardcode anything, or else we can only hardcode existing
2533 hardcode_action=unsupported
2535 AC_MSG_RESULT([$hardcode_action])
2539 AC_MSG_CHECKING([whether stripping libraries is possible])
2540 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2541 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2542 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2543 AC_MSG_RESULT([yes])
2548 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2549 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2551 # PORTME Fill in your ld.so characteristics
2552 AC_MSG_CHECKING([dynamic linker characteristics])
2554 libname_spec='lib$name'
2561 shlibpath_overrides_runpath=unknown
2563 dynamic_linker="$host_os ld.so"
2564 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2565 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2570 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2571 shlibpath_var=LIBPATH
2573 # AIX has no versioning support, so we append a major version to the name.
2574 soname_spec='${libname}${release}.so$major'
2579 if test "$host_cpu" = ia64; then
2580 # AIX 5 supports IA64
2581 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2582 shlibpath_var=LD_LIBRARY_PATH
2584 # With GCC up to 2.95.x, collect2 would create an import file
2585 # for dependence libraries. The import file would start with
2586 # the line `#! .'. This would cause the generated library to
2587 # depend on `.', always an invalid library. This was fixed in
2588 # development snapshots of GCC prior to 3.0.
2590 aix4 | aix4.[[01]] | aix4.[[01]].*)
2591 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2593 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2600 # AIX (on Power*) has no versioning support, so currently we can
2601 # not hardcode correct soname into executable. Probably we can
2602 # add versioning support to collect2, so additional links can
2603 # be useful in future.
2604 if test "$aix_use_runtimelinking" = yes; then
2605 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2606 # instead of lib<name>.a to let people know that these are not
2607 # typical AIX shared libraries.
2608 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2610 # We preserve .a as extension for shared libraries through AIX4.2
2611 # and later when we are not doing run time linking.
2612 library_names_spec='${libname}${release}.a $libname.a'
2613 soname_spec='${libname}${release}.so$major'
2615 shlibpath_var=LIBPATH
2620 library_names_spec='$libname.ixlibrary $libname.a'
2621 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2622 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'
2626 library_names_spec='${libname}.so'
2627 dynamic_linker="$host_os ld.so"
2628 shlibpath_var=LIBRARY_PATH
2634 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2635 soname_spec='${libname}${release}.so$major'
2636 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2637 shlibpath_var=LD_LIBRARY_PATH
2638 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2639 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2640 export_dynamic_flag_spec=-rdynamic
2641 # the default ld.so.conf also contains /usr/contrib/lib and
2642 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2643 # libtool to hard-code these into programs
2646 cygwin* | mingw* | pw32*)
2647 version_type=windows
2650 case $GCC,$host_os in
2652 library_names_spec='$libname.dll.a'
2653 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2654 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2655 dldir=$destdir/`dirname \$dlpath`~
2656 test -d \$dldir || mkdir -p \$dldir~
2657 $install_prog .libs/$dlname \$dldir/$dlname'
2658 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2659 dlpath=$dir/\$dldll~
2663 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2664 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2667 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2670 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2673 dynamic_linker='Win32 ld.exe'
2674 # FIXME: first we should search . and the directory the executable is in
2678 darwin* | rhapsody*)
2679 dynamic_linker="$host_os dyld"
2683 # FIXME: Relying on posixy $() will cause problems for
2684 # cross-compilation, but unfortunately the echo tests do not
2685 # yet detect zsh echo's removal of \ escapes.
2686 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)'
2687 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2688 shlibpath_overrides_runpath=yes
2689 shlibpath_var=DYLD_LIBRARY_PATH
2697 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2698 version_type=freebsd-$objformat
2699 case $version_type in
2701 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2706 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2710 shlibpath_var=LD_LIBRARY_PATH
2713 shlibpath_overrides_runpath=yes
2716 shlibpath_overrides_runpath=no
2717 hardcode_into_libs=yes
2726 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2727 soname_spec='${libname}${release}.so$major'
2728 shlibpath_var=LD_LIBRARY_PATH
2729 hardcode_into_libs=yes
2732 hpux9* | hpux10* | hpux11*)
2733 # Give a soname corresponding to the major version so that dld.sl refuses to
2734 # link against other versions.
2735 dynamic_linker="$host_os dld.sl"
2739 shlibpath_var=SHLIB_PATH
2740 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2741 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2742 soname_spec='${libname}${release}.sl$major'
2743 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2744 postinstall_cmds='chmod 555 $lib'
2751 soname_spec='${libname}${release}.so$major'
2752 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2758 case $LD in # libtool.m4 will add one of these switches to LD
2759 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2760 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2761 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2762 *) libsuff= shlibsuff= libmagic=never-match;;
2766 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2767 shlibpath_overrides_runpath=no
2768 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2769 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2772 # No shared lib support for Linux oldld, aout, or coff.
2773 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2777 # This must be Linux ELF.
2782 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2783 soname_spec='${libname}${release}.so$major'
2784 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2785 shlibpath_var=LD_LIBRARY_PATH
2786 shlibpath_overrides_runpath=no
2787 # This implies no fast_install, which is unacceptable.
2788 # Some rework will be needed to allow for fast_install
2789 # before this can be enabled.
2790 hardcode_into_libs=yes
2792 # We used to test for /lib/ld.so.1 and disable shared libraries on
2793 # powerpc, because MkLinux only supported shared libraries with the
2794 # GNU dynamic linker. Since this was broken with cross compilers,
2795 # most powerpc-linux boxes support dynamic linking these days and
2796 # people can always --disable-shared, the test was removed, and we
2797 # assume the GNU/Linux dynamic linker is in use.
2798 dynamic_linker='GNU/Linux ld.so'
2805 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2806 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2807 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2808 dynamic_linker='NetBSD (a.out) ld.so'
2810 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2811 soname_spec='${libname}${release}.so$major'
2812 dynamic_linker='NetBSD ld.elf_so'
2814 shlibpath_var=LD_LIBRARY_PATH
2815 shlibpath_overrides_runpath=yes
2816 hardcode_into_libs=yes
2821 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2822 shlibpath_var=LD_LIBRARY_PATH
2823 shlibpath_overrides_runpath=yes
2830 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2832 openbsd2.[[89]] | openbsd2.[[89]].*)
2833 shlibpath_overrides_runpath=no
2836 shlibpath_overrides_runpath=yes
2840 shlibpath_overrides_runpath=yes
2842 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2843 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2844 shlibpath_var=LD_LIBRARY_PATH
2848 libname_spec='$name'
2850 library_names_spec='$libname.dll $libname.a'
2851 dynamic_linker='OS/2 ld.exe'
2852 shlibpath_var=LIBPATH
2855 osf3* | osf4* | osf5*)
2858 soname_spec='${libname}${release}.so'
2859 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2860 shlibpath_var=LD_LIBRARY_PATH
2861 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2862 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2867 soname_spec='${libname}${release}.so$major'
2868 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2869 shlibpath_var=LD_LIBRARY_PATH
2876 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2877 soname_spec='${libname}${release}.so$major'
2878 shlibpath_var=LD_LIBRARY_PATH
2879 shlibpath_overrides_runpath=yes
2880 hardcode_into_libs=yes
2881 # ldd complains unless libraries are executable
2882 postinstall_cmds='chmod +x $lib'
2887 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2888 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2889 shlibpath_var=LD_LIBRARY_PATH
2890 shlibpath_overrides_runpath=yes
2891 if test "$with_gnu_ld" = yes; then
2897 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2899 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2900 soname_spec='${libname}${release}.so$major'
2901 shlibpath_var=LD_LIBRARY_PATH
2902 case $host_vendor in
2904 shlibpath_overrides_runpath=no
2909 shlibpath_overrides_runpath=no
2910 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2917 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2918 soname_spec='${libname}${release}.so$major'
2919 shlibpath_var=LD_LIBRARY_PATH
2926 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2927 soname_spec='${libname}${release}.so$major'
2928 shlibpath_var=LD_LIBRARY_PATH
2932 if test -d /usr/nec ;then
2934 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2935 soname_spec='$libname.so.$major'
2936 shlibpath_var=LD_LIBRARY_PATH
2944 AC_MSG_RESULT([$dynamic_linker])
2945 test "$dynamic_linker" = no && can_build_shared=no
2947 # Report the final consequences.
2948 AC_MSG_CHECKING([if libtool supports shared libraries])
2949 AC_MSG_RESULT([$can_build_shared])
2951 AC_MSG_CHECKING([whether to build shared libraries])
2952 test "$can_build_shared" = "no" && enable_shared=no
2954 # On AIX, shared libraries and static libraries use the same namespace, and
2955 # are all built from PIC.
2958 test "$enable_shared" = yes && enable_static=no
2959 if test -n "$RANLIB"; then
2960 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2961 postinstall_cmds='$RANLIB $lib'
2966 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2967 test "$enable_shared" = yes && enable_static=no
2971 AC_MSG_RESULT([$enable_shared])
2973 AC_MSG_CHECKING([whether to build static libraries])
2974 # Make sure either enable_shared or enable_static is yes.
2975 test "$enable_shared" = yes || enable_static=yes
2976 AC_MSG_RESULT([$enable_static])
2978 if test "$hardcode_action" = relink; then
2979 # Fast installation is not supported
2980 enable_fast_install=no
2981 elif test "$shlibpath_overrides_runpath" = yes ||
2982 test "$enable_shared" = no; then
2983 # Fast installation is not necessary
2984 enable_fast_install=needless
2987 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2988 if test "$GCC" = yes; then
2989 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2992 AC_LIBTOOL_DLOPEN_SELF
2994 if test "$enable_shared" = yes && test "$GCC" = yes; then
2995 case $archive_cmds in
2997 # FIXME: we may have to deal with multi-command sequences.
3000 # Test whether the compiler implicitly links with -lc since on some
3001 # systems, -lgcc has to come before -lc. If gcc already passes -lc
3002 # to ld, don't add -lc before -lgcc.
3003 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3004 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3006 echo 'static int dummy;' > conftest.$ac_ext
3008 if AC_TRY_EVAL(ac_compile); then
3011 libobjs=conftest.$ac_objext
3013 wl=$lt_cv_prog_cc_wl
3019 save_allow_undefined_flag=$allow_undefined_flag
3020 allow_undefined_flag=
3021 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3023 lt_cv_archive_cmds_need_lc=no
3025 lt_cv_archive_cmds_need_lc=yes
3027 allow_undefined_flag=$save_allow_undefined_flag
3029 cat conftest.err 1>&5
3031 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3035 need_lc=${lt_cv_archive_cmds_need_lc-yes}
3037 # The second clause should only fire when bootstrapping the
3038 # libtool distribution, otherwise you forgot to ship ltmain.sh
3039 # with your package, and you will get complaints that there are
3040 # no rules to generate ltmain.sh.
3041 if test -f "$ltmain"; then
3044 # If there is no Makefile yet, we rely on a make rule to execute
3045 # `config.status --recheck' to rerun these tests and create the
3046 # libtool script then.
3047 test -f Makefile && make "$ltmain"
3050 if test -f "$ltmain"; then
3051 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3054 echo creating $ofile
3056 # Now quote all the things that may contain metacharacters while being
3057 # careful not to overquote the AC_SUBSTed values. We take copies of the
3058 # variables and quote the copies for generation of the libtool script.
3059 for var in echo old_CC old_CFLAGS \
3060 AR AR_FLAGS CC LD LN_S NM SHELL \
3061 reload_flag reload_cmds wl \
3062 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3063 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3064 library_names_spec soname_spec \
3065 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3066 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3067 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3068 old_striplib striplib file_magic_cmd export_symbols_cmds \
3069 deplibs_check_method allow_undefined_flag no_undefined_flag \
3070 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3071 global_symbol_to_c_name_address \
3072 hardcode_libdir_flag_spec hardcode_libdir_separator \
3073 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3074 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3077 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3078 old_postinstall_cmds | old_postuninstall_cmds | \
3079 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3080 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3081 postinstall_cmds | postuninstall_cmds | \
3082 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3083 # Double-quote double-evaled strings.
3084 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3087 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3092 cat <<__EOF__ > "${ofile}T"
3095 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3096 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3097 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3099 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3100 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3102 # This program is free software; you can redistribute it and/or modify
3103 # it under the terms of the GNU General Public License as published by
3104 # the Free Software Foundation; either version 2 of the License, or
3105 # (at your option) any later version.
3107 # This program is distributed in the hope that it will be useful, but
3108 # WITHOUT ANY WARRANTY; without even the implied warranty of
3109 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3110 # General Public License for more details.
3112 # You should have received a copy of the GNU General Public License
3113 # along with this program; if not, write to the Free Software
3114 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3116 # As a special exception to the GNU General Public License, if you
3117 # distribute this file as part of a program that contains a
3118 # configuration script generated by Autoconf, you may include it under
3119 # the same distribution terms that you use for the rest of that program.
3121 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3122 Xsed="sed -e s/^X//"
3124 # The HP-UX ksh and POSIX shell print the target directory to stdout
3126 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3128 # ### BEGIN LIBTOOL CONFIG
3130 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3132 # Shell to use when invoking shell scripts.
3135 # Whether or not to build shared libraries.
3136 build_libtool_libs=$enable_shared
3138 # Whether or not to build static libraries.
3139 build_old_libs=$enable_static
3141 # Whether or not to add -lc for building shared libraries.
3142 build_libtool_need_lc=$need_lc
3144 # Whether or not to optimize for fast installation.
3145 fast_install=$enable_fast_install
3148 host_alias=$host_alias
3151 # An echo program that does not interpret backslashes.
3156 AR_FLAGS=$lt_AR_FLAGS
3158 # The default C compiler.
3161 # Is the compiler the GNU C compiler?
3164 # The linker used to build libraries.
3167 # Whether we need hard or soft links.
3170 # A BSD-compatible nm program.
3173 # A symbol stripping program
3176 # Used to examine libraries when file_magic_cmd begins "file"
3177 MAGIC_CMD=$MAGIC_CMD
3179 # Used on cygwin: DLL creation program.
3182 # Used on cygwin: object dumper.
3185 # Used on cygwin: assembler.
3188 # The name of the directory that contains temporary libtool files.
3191 # How to create reloadable object files.
3192 reload_flag=$lt_reload_flag
3193 reload_cmds=$lt_reload_cmds
3195 # How to pass a linker flag through the compiler.
3198 # Object file suffix (normally "o").
3201 # Old archive suffix (normally "a").
3204 # Executable file suffix (normally "").
3207 # Additional compiler flags for building library objects.
3208 pic_flag=$lt_pic_flag
3211 # Does compiler simultaneously support -c and -o options?
3212 compiler_c_o=$lt_compiler_c_o
3214 # Can we write directly to a .lo ?
3215 compiler_o_lo=$lt_compiler_o_lo
3217 # Must we lock files when doing compilation ?
3218 need_locks=$lt_need_locks
3220 # Do we need the lib prefix for modules?
3221 need_lib_prefix=$need_lib_prefix
3223 # Do we need a version for libraries?
3224 need_version=$need_version
3226 # Whether dlopen is supported.
3227 dlopen_support=$enable_dlopen
3229 # Whether dlopen of programs is supported.
3230 dlopen_self=$enable_dlopen_self
3232 # Whether dlopen of statically linked programs is supported.
3233 dlopen_self_static=$enable_dlopen_self_static
3235 # Compiler flag to prevent dynamic linking.
3236 link_static_flag=$lt_link_static_flag
3238 # Compiler flag to turn off builtin functions.
3239 no_builtin_flag=$lt_no_builtin_flag
3241 # Compiler flag to allow reflexive dlopens.
3242 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3244 # Compiler flag to generate shared objects directly from archives.
3245 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3247 # Compiler flag to generate thread-safe objects.
3248 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3250 # Library versioning type.
3251 version_type=$version_type
3253 # Format of library name prefix.
3254 libname_spec=$lt_libname_spec
3256 # List of archive names. First name is the real one, the rest are links.
3257 # The last name is the one that the linker finds with -lNAME.
3258 library_names_spec=$lt_library_names_spec
3260 # The coded name of the library, if different from the real name.
3261 soname_spec=$lt_soname_spec
3263 # Commands used to build and install an old-style archive.
3265 old_archive_cmds=$lt_old_archive_cmds
3266 old_postinstall_cmds=$lt_old_postinstall_cmds
3267 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3269 # Create an old-style archive from a shared archive.
3270 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3272 # Create a temporary old-style archive to link instead of a shared archive.
3273 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3275 # Commands used to build and install a shared archive.
3276 archive_cmds=$lt_archive_cmds
3277 archive_expsym_cmds=$lt_archive_expsym_cmds
3278 postinstall_cmds=$lt_postinstall_cmds
3279 postuninstall_cmds=$lt_postuninstall_cmds
3281 # Commands to strip libraries.
3282 old_striplib=$lt_old_striplib
3283 striplib=$lt_striplib
3285 # Method to check whether dependent libraries are shared objects.
3286 deplibs_check_method=$lt_deplibs_check_method
3288 # Command to use when deplibs_check_method == file_magic.
3289 file_magic_cmd=$lt_file_magic_cmd
3291 # Flag that allows shared libraries with undefined symbols to be built.
3292 allow_undefined_flag=$lt_allow_undefined_flag
3294 # Flag that forces no undefined symbols.
3295 no_undefined_flag=$lt_no_undefined_flag
3297 # Commands used to finish a libtool library installation in a directory.
3298 finish_cmds=$lt_finish_cmds
3300 # Same as above, but a single script fragment to be evaled but not shown.
3301 finish_eval=$lt_finish_eval
3303 # Take the output of nm and produce a listing of raw symbols and C names.
3304 global_symbol_pipe=$lt_global_symbol_pipe
3306 # Transform the output of nm in a proper C declaration
3307 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3309 # Transform the output of nm in a C name address pair
3310 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3312 # This is the shared library runtime path variable.
3313 runpath_var=$runpath_var
3315 # This is the shared library path variable.
3316 shlibpath_var=$shlibpath_var
3318 # Is shlibpath searched before the hard-coded library search path?
3319 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3321 # How to hardcode a shared library path into an executable.
3322 hardcode_action=$hardcode_action
3324 # Whether we should hardcode library paths into libraries.
3325 hardcode_into_libs=$hardcode_into_libs
3327 # Flag to hardcode \$libdir into a binary during linking.
3328 # This must work even if \$libdir does not exist.
3329 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3331 # Whether we need a single -rpath flag with a separated argument.
3332 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3334 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3336 hardcode_direct=$hardcode_direct
3338 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3340 hardcode_minus_L=$hardcode_minus_L
3342 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3343 # the resulting binary.
3344 hardcode_shlibpath_var=$hardcode_shlibpath_var
3346 # Variables whose values should be saved in libtool wrapper scripts and
3347 # restored at relink time.
3348 variables_saved_for_relink="$variables_saved_for_relink"
3350 # Whether libtool must link a program against all its dependency libraries.
3351 link_all_deplibs=$link_all_deplibs
3353 # Compile-time system search path for libraries
3354 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3356 # Run-time system search path for libraries
3357 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3359 # Fix the shell variable \$srcfile for the compiler.
3360 fix_srcfile_path="$fix_srcfile_path"
3362 # Set to yes if exported symbols are required.
3363 always_export_symbols=$always_export_symbols
3365 # The commands to list exported symbols.
3366 export_symbols_cmds=$lt_export_symbols_cmds
3368 # The commands to extract the exported symbol list from a shared archive.
3369 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3371 # Symbols that should not be listed in the preloaded symbols.
3372 exclude_expsyms=$lt_exclude_expsyms
3374 # Symbols that must always be exported.
3375 include_expsyms=$lt_include_expsyms
3377 # ### END LIBTOOL CONFIG
3383 cat <<\EOF >> "${ofile}T"
3385 # AIX sometimes has problems with the GCC collect2 program. For some
3386 # reason, if we set the COLLECT_NAMES environment variable, the problems
3387 # vanish in a puff of smoke.
3388 if test "X${COLLECT_NAMES+set}" != Xset; then
3390 export COLLECT_NAMES
3397 cygwin* | mingw* | pw32* | os2*)
3398 cat <<'EOF' >> "${ofile}T"
3399 # This is a source program that is used to create dlls on Windows
3400 # Don't remove nor modify the starting and closing comments
3401 # /* ltdll.c starts here */
3402 # #define WIN32_LEAN_AND_MEAN
3403 # #include <windows.h>
3404 # #undef WIN32_LEAN_AND_MEAN
3405 # #include <stdio.h>
3407 # #ifndef __CYGWIN__
3408 # # ifdef __CYGWIN32__
3409 # # define __CYGWIN__ __CYGWIN32__
3413 # #ifdef __cplusplus
3416 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3417 # #ifdef __cplusplus
3422 # #include <cygwin/cygwin_dll.h>
3423 # DECLARE_CYGWIN_DLL( DllMain );
3425 # HINSTANCE __hDllInstance_base;
3428 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3430 # __hDllInstance_base = hInst;
3433 # /* ltdll.c ends here */
3434 # This is a source program that is used to create import libraries
3435 # on Windows for dlls which lack them. Don't remove nor modify the
3436 # starting and closing comments
3437 # /* impgen.c starts here */
3438 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3440 # This file is part of GNU libtool.
3442 # This program is free software; you can redistribute it and/or modify
3443 # it under the terms of the GNU General Public License as published by
3444 # the Free Software Foundation; either version 2 of the License, or
3445 # (at your option) any later version.
3447 # This program is distributed in the hope that it will be useful,
3448 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3449 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3450 # GNU General Public License for more details.
3452 # You should have received a copy of the GNU General Public License
3453 # along with this program; if not, write to the Free Software
3454 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3457 # #include <stdio.h> /* for printf() */
3458 # #include <unistd.h> /* for open(), lseek(), read() */
3459 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3460 # #include <string.h> /* for strdup() */
3462 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3464 # #define O_BINARY 0
3467 # static unsigned int
3468 # pe_get16 (fd, offset)
3472 # unsigned char b[2];
3473 # lseek (fd, offset, SEEK_SET);
3475 # return b[0] + (b[1]<<8);
3478 # static unsigned int
3479 # pe_get32 (fd, offset)
3483 # unsigned char b[4];
3484 # lseek (fd, offset, SEEK_SET);
3486 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3489 # static unsigned int
3493 # unsigned char *b = ptr;
3494 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3503 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3504 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3505 # unsigned long name_rvas, nexp;
3506 # unsigned char *expdata, *erva;
3507 # char *filename, *dll_name;
3509 # filename = argv[1];
3511 # dll = open(filename, O_RDONLY|O_BINARY);
3515 # dll_name = filename;
3517 # for (i=0; filename[i]; i++)
3518 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3519 # dll_name = filename + i +1;
3521 # pe_header_offset = pe_get32 (dll, 0x3c);
3522 # opthdr_ofs = pe_header_offset + 4 + 20;
3523 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3525 # if (num_entries < 1) /* no exports */
3528 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3529 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3530 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3531 # secptr = (pe_header_offset + 4 + 20 +
3532 # pe_get16 (dll, pe_header_offset + 4 + 16));
3535 # for (i = 0; i < nsections; i++)
3538 # unsigned long secptr1 = secptr + 40 * i;
3539 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3540 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3541 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3542 # lseek(dll, secptr1, SEEK_SET);
3543 # read(dll, sname, 8);
3544 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3546 # expptr = fptr + (export_rva - vaddr);
3547 # if (export_rva + export_size > vaddr + vsize)
3548 # export_size = vsize - (export_rva - vaddr);
3553 # expdata = (unsigned char*)malloc(export_size);
3554 # lseek (dll, expptr, SEEK_SET);
3555 # read (dll, expdata, export_size);
3556 # erva = expdata - export_rva;
3558 # nexp = pe_as32 (expdata+24);
3559 # name_rvas = pe_as32 (expdata+32);
3561 # printf ("EXPORTS\n");
3562 # for (i = 0; i<nexp; i++)
3564 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3565 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3570 # /* impgen.c ends here */
3576 # We use sed instead of cat because bash on DJGPP gets confused if
3577 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3578 # text mode, it properly converts lines to CR/LF. This bash problem
3579 # is reportedly fixed, but why not run on old versions too?
3580 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3582 mv -f "${ofile}T" "$ofile" || \
3583 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3587 ])# _LT_AC_LTCONFIG_HACK
3589 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3590 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3592 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3593 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3595 # AC_ENABLE_SHARED - implement the --enable-shared flag
3596 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3597 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3599 AC_DEFUN([AC_ENABLE_SHARED],
3600 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3601 AC_ARG_ENABLE(shared,
3602 changequote(<<, >>)dnl
3603 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3604 changequote([, ])dnl
3605 [p=${PACKAGE-default}
3607 yes) enable_shared=yes ;;
3608 no) enable_shared=no ;;
3611 # Look at the argument we got. We use all the common list separators.
3612 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3613 for pkg in $enableval; do
3614 if test "X$pkg" = "X$p"; then
3621 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3624 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3625 AC_DEFUN([AC_DISABLE_SHARED],
3626 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3627 AC_ENABLE_SHARED(no)])
3629 # AC_ENABLE_STATIC - implement the --enable-static flag
3630 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3631 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3633 AC_DEFUN([AC_ENABLE_STATIC],
3634 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3635 AC_ARG_ENABLE(static,
3636 changequote(<<, >>)dnl
3637 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3638 changequote([, ])dnl
3639 [p=${PACKAGE-default}
3641 yes) enable_static=yes ;;
3642 no) enable_static=no ;;
3645 # Look at the argument we got. We use all the common list separators.
3646 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3647 for pkg in $enableval; do
3648 if test "X$pkg" = "X$p"; then
3655 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3658 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3659 AC_DEFUN([AC_DISABLE_STATIC],
3660 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3661 AC_ENABLE_STATIC(no)])
3664 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3665 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3666 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3668 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3669 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3670 AC_ARG_ENABLE(fast-install,
3671 changequote(<<, >>)dnl
3672 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3673 changequote([, ])dnl
3674 [p=${PACKAGE-default}
3676 yes) enable_fast_install=yes ;;
3677 no) enable_fast_install=no ;;
3679 enable_fast_install=no
3680 # Look at the argument we got. We use all the common list separators.
3681 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3682 for pkg in $enableval; do
3683 if test "X$pkg" = "X$p"; then
3684 enable_fast_install=yes
3690 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3693 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3694 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3695 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3696 AC_ENABLE_FAST_INSTALL(no)])
3698 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3699 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3700 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3702 AC_DEFUN([AC_LIBTOOL_PICMODE],
3703 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3704 pic_mode=ifelse($#,1,$1,default)])
3707 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3708 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3709 [AC_MSG_CHECKING([for $1])
3710 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3713 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3716 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3719 ac_save_MAGIC_CMD="$MAGIC_CMD"
3720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3721 dnl $ac_dummy forces splitting on constant user-supplied paths.
3722 dnl POSIX.2 word splitting is done only on the output of word expansions,
3723 dnl not every word. This closes a longstanding sh security hole.
3724 ac_dummy="ifelse([$2], , $PATH, [$2])"
3725 for ac_dir in $ac_dummy; do
3726 test -z "$ac_dir" && ac_dir=.
3727 if test -f $ac_dir/$1; then
3728 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3729 if test -n "$file_magic_test_file"; then
3730 case $deplibs_check_method in
3732 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3733 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3734 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3735 egrep "$file_magic_regex" > /dev/null; then
3740 *** Warning: the command libtool uses to detect shared libraries,
3741 *** $file_magic_cmd, produces output that libtool cannot recognize.
3742 *** The result is that libtool may fail to recognize shared libraries
3743 *** as such. This will affect the creation of libtool libraries that
3744 *** depend on shared libraries, but programs linked with such libtool
3745 *** libraries will work regardless of this problem. Nevertheless, you
3746 *** may want to report the problem to your system manager and/or to
3747 *** bug-libtool@gnu.org
3757 MAGIC_CMD="$ac_save_MAGIC_CMD"
3760 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3761 if test -n "$MAGIC_CMD"; then
3762 AC_MSG_RESULT($MAGIC_CMD)
3769 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3770 AC_DEFUN([AC_PATH_MAGIC],
3771 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3772 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3773 if test -z "$lt_cv_path_MAGIC_CMD"; then
3774 if test -n "$ac_tool_prefix"; then
3775 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3783 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3784 AC_DEFUN([AC_PROG_LD],
3785 [AC_ARG_WITH(gnu-ld,
3786 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3787 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3788 AC_REQUIRE([AC_PROG_CC])dnl
3789 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3790 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3791 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3793 if test "$GCC" = yes; then
3794 # Check if gcc -print-prog-name=ld gives a path.
3795 AC_MSG_CHECKING([for ld used by GCC])
3798 # gcc leaves a trailing carriage return which upsets mingw
3799 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3801 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3804 # Accept absolute paths.
3805 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3806 re_direlt='/[[^/]][[^/]]*/\.\./'
3807 # Canonicalize the path of ld
3808 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3809 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3810 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3812 test -z "$LD" && LD="$ac_prog"
3815 # If it fails, then pretend we aren't using GCC.
3819 # If it is relative, then search for the first ld in PATH.
3823 elif test "$with_gnu_ld" = yes; then
3824 AC_MSG_CHECKING([for GNU ld])
3826 AC_MSG_CHECKING([for non-GNU ld])
3828 AC_CACHE_VAL(lt_cv_path_LD,
3829 [if test -z "$LD"; then
3830 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3831 for ac_dir in $PATH; do
3832 test -z "$ac_dir" && ac_dir=.
3833 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3834 lt_cv_path_LD="$ac_dir/$ac_prog"
3835 # Check to see if the program is GNU ld. I'd rather use --version,
3836 # but apparently some GNU ld's only accept -v.
3837 # Break only if it was the GNU/non-GNU ld that we prefer.
3838 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3839 test "$with_gnu_ld" != no && break
3841 test "$with_gnu_ld" != yes && break
3847 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3850 if test -n "$LD"; then
3855 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3860 AC_DEFUN([AC_PROG_LD_GNU],
3861 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3862 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3863 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3864 lt_cv_prog_gnu_ld=yes
3866 lt_cv_prog_gnu_ld=no
3868 with_gnu_ld=$lt_cv_prog_gnu_ld
3871 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3872 # -- PORTME Some linkers may need a different reload flag.
3873 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3874 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3875 [lt_cv_ld_reload_flag='-r'])
3876 reload_flag=$lt_cv_ld_reload_flag
3877 test -n "$reload_flag" && reload_flag=" $reload_flag"
3880 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3881 # -- PORTME fill in with the dynamic library characteristics
3882 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3883 [AC_CACHE_CHECK([how to recognise dependant libraries],
3884 lt_cv_deplibs_check_method,
3885 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3886 lt_cv_file_magic_test_file=
3887 lt_cv_deplibs_check_method='unknown'
3888 # Need to set the preceding variable on all platforms that support
3889 # interlibrary dependencies.
3890 # 'none' -- dependencies not supported.
3891 # `unknown' -- same as none, but documents that we really don't know.
3892 # 'pass_all' -- all dependencies passed with no checks.
3893 # 'test_compile' -- check by making test program.
3894 # 'file_magic [[regex]]' -- check by looking for files in library path
3895 # which responds to the $file_magic_cmd with a given egrep regex.
3896 # If you have `file' or equivalent on your system and you're not sure
3897 # whether `pass_all' will *always* work, you probably want this one.
3901 lt_cv_deplibs_check_method=pass_all
3905 lt_cv_deplibs_check_method=pass_all
3909 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3910 lt_cv_file_magic_cmd='/usr/bin/file -L'
3911 lt_cv_file_magic_test_file=/shlib/libc.so
3914 cygwin* | mingw* | pw32*)
3915 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3916 lt_cv_file_magic_cmd='$OBJDUMP -f'
3919 darwin* | rhapsody*)
3920 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3921 lt_cv_file_magic_cmd='/usr/bin/file -L'
3923 rhapsody* | darwin1.[[012]])
3924 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3927 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3933 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3936 # Not sure whether the presence of OpenBSD here was a mistake.
3937 # Let's accept both of them until this is cleared up.
3938 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3939 lt_cv_file_magic_cmd=/usr/bin/file
3940 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3944 lt_cv_deplibs_check_method=pass_all
3949 lt_cv_deplibs_check_method=pass_all
3953 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3954 lt_cv_file_magic_cmd=/usr/bin/file
3955 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3961 # this will be overridden with pass_all, but let us keep it just in case
3962 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3966 *-32|*"-32 ") libmagic=32-bit;;
3967 *-n32|*"-n32 ") libmagic=N32;;
3968 *-64|*"-64 ") libmagic=64-bit;;
3969 *) libmagic=never-match;;
3971 # this will be overridden with pass_all, but let us keep it just in case
3972 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3975 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3976 lt_cv_deplibs_check_method=pass_all
3979 # This must be Linux ELF.
3982 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
3983 lt_cv_deplibs_check_method=pass_all ;;
3985 # glibc up to 2.1.1 does not perform some relocations on ARM
3986 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3988 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3992 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3993 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3995 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4000 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4001 lt_cv_file_magic_cmd=/usr/bin/file
4002 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4006 lt_cv_file_magic_cmd=/usr/bin/file
4007 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4008 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4009 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4011 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4015 osf3* | osf4* | osf5*)
4016 # this will be overridden with pass_all, but let us keep it just in case
4017 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4018 lt_cv_file_magic_test_file=/shlib/libc.so
4019 lt_cv_deplibs_check_method=pass_all
4023 lt_cv_deplibs_check_method=pass_all
4027 lt_cv_deplibs_check_method=pass_all
4028 lt_cv_file_magic_test_file=/lib/libc.so
4031 sysv5uw[[78]]* | sysv4*uw2*)
4032 lt_cv_deplibs_check_method=pass_all
4035 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4036 case $host_vendor in
4038 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]]'
4039 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4042 lt_cv_deplibs_check_method=pass_all
4045 lt_cv_file_magic_cmd='/bin/file'
4046 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4049 lt_cv_file_magic_cmd='/bin/file'
4050 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4051 lt_cv_file_magic_test_file=/lib/libc.so
4057 file_magic_cmd=$lt_cv_file_magic_cmd
4058 deplibs_check_method=$lt_cv_deplibs_check_method
4062 # AC_PROG_NM - find the path to a BSD-compatible name lister
4063 AC_DEFUN([AC_PROG_NM],
4064 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4065 AC_MSG_CHECKING([for BSD-compatible nm])
4066 AC_CACHE_VAL(lt_cv_path_NM,
4067 [if test -n "$NM"; then
4068 # Let the user override the test.
4071 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4072 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4073 test -z "$ac_dir" && ac_dir=.
4074 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4075 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4076 # Check to see if the nm accepts a BSD-compat flag.
4077 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4078 # nm: unknown option "B" ignored
4079 # Tru64's nm complains that /dev/null is an invalid object file
4080 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4081 lt_cv_path_NM="$tmp_nm -B"
4083 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4084 lt_cv_path_NM="$tmp_nm -p"
4087 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4088 continue # so that we can try to find one that supports BSD flags
4093 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4096 AC_MSG_RESULT([$NM])
4099 # AC_CHECK_LIBM - check for math library
4100 AC_DEFUN([AC_CHECK_LIBM],
4101 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4104 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4105 # These system don't have libm
4108 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4109 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4112 AC_CHECK_LIB(m, main, LIBM="-lm")
4117 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4118 # the libltdl convenience library and INCLTDL to the include flags for
4119 # the libltdl header and adds --enable-ltdl-convenience to the
4120 # configure arguments. Note that LIBLTDL and INCLTDL are not
4121 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4122 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4123 # with '${top_builddir}/' and INCLTDL will be prefixed with
4124 # '${top_srcdir}/' (note the single quotes!). If your package is not
4125 # flat and you're not using automake, define top_builddir and
4126 # top_srcdir appropriately in the Makefiles.
4127 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4128 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4129 case $enable_ltdl_convenience in
4130 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4131 "") enable_ltdl_convenience=yes
4132 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4134 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4135 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4138 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4139 # the libltdl installable library and INCLTDL to the include flags for
4140 # the libltdl header and adds --enable-ltdl-install to the configure
4141 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4142 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4143 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4144 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4145 # with '${top_srcdir}/' (note the single quotes!). If your package is
4146 # not flat and you're not using automake, define top_builddir and
4147 # top_srcdir appropriately in the Makefiles.
4148 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4149 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4150 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4151 AC_CHECK_LIB(ltdl, main,
4152 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4153 [if test x"$enable_ltdl_install" = xno; then
4154 AC_MSG_WARN([libltdl not installed, but installation disabled])
4156 enable_ltdl_install=yes
4159 if test x"$enable_ltdl_install" = x"yes"; then
4160 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4161 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4162 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4164 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4171 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4172 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4173 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4174 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4175 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4176 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4177 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4179 # This is just to silence aclocal about the macro not being used
4180 ifelse([AC_DISABLE_FAST_INSTALL])
4182 # From Jim Meyering. Use this if you use the GNU error.[ch].
4183 # FIXME: Migrate into libit
4185 AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
4186 [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
4187 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
4188 am_cv_lib_error_at_line=yes,
4189 am_cv_lib_error_at_line=no)])
4190 if test $am_cv_lib_error_at_line = no; then
4191 LIBOBJS="$LIBOBJS error.$ac_objext"
4193 AC_SUBST(LIBOBJS)dnl
4196 # Macro to add for using GNU gettext.
4197 # Ulrich Drepper <drepper@cygnus.com>, 1995.
4199 # This file can be copied and used freely without restrictions. It can
4200 # be used in projects which are not available under the GNU General Public
4201 # License or the GNU Library General Public License but which still want
4202 # to provide support for the GNU gettext functionality.
4203 # Please note that the actual code of the GNU gettext library is covered
4204 # by the GNU Library General Public License, and the rest of the GNU
4205 # gettext package package is covered by the GNU General Public License.
4206 # They are *not* in the public domain.
4210 dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
4211 dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
4212 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
4213 dnl depending on --{enable,disable}-{shared,static} and on the presence of
4214 dnl AM-DISABLE-SHARED). Otherwise, a static library
4215 dnl $(top_builddir)/intl/libintl.a will be created.
4216 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
4217 dnl implementations (in libc or libintl) without the ngettext() function
4218 dnl will be ignored.
4219 dnl LIBDIR is used to find the intl libraries. If empty,
4220 dnl the value `$(top_builddir)/intl/' is used.
4222 dnl The result of the configuration is one of three cases:
4223 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
4225 dnl Catalog format: GNU --> install in $(datadir)
4226 dnl Catalog extension: .mo after installation, .gmo in source tree
4227 dnl 2) GNU gettext has been found in the system's C library.
4228 dnl Catalog format: GNU --> install in $(datadir)
4229 dnl Catalog extension: .mo after installation, .gmo in source tree
4230 dnl 3) No internationalization, always use English msgid.
4231 dnl Catalog format: none
4232 dnl Catalog extension: none
4233 dnl The use of .gmo is historical (it was needed to avoid overwriting the
4234 dnl GNU format catalogs when building on a platform with an X/Open gettext),
4235 dnl but we keep it in order not to force irrelevant filename changes on the
4238 AC_DEFUN([AM_WITH_NLS],
4239 [AC_MSG_CHECKING([whether NLS is requested])
4240 dnl Default is enabled NLS
4242 [ --disable-nls do not use Native Language Support],
4243 USE_NLS=$enableval, USE_NLS=yes)
4244 AC_MSG_RESULT($USE_NLS)
4247 BUILD_INCLUDED_LIBINTL=no
4248 USE_INCLUDED_LIBINTL=no
4251 dnl If we use NLS figure out what method
4252 if test "$USE_NLS" = "yes"; then
4253 AC_DEFINE(ENABLE_NLS, 1,
4254 [Define to 1 if translation of program messages to the user's native language
4256 AC_MSG_CHECKING([whether included gettext is requested])
4257 AC_ARG_WITH(included-gettext,
4258 [ --with-included-gettext use the GNU gettext library included here],
4259 nls_cv_force_use_gnu_gettext=$withval,
4260 nls_cv_force_use_gnu_gettext=no)
4261 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
4263 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
4264 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
4265 dnl User does not insist on using GNU NLS library. Figure out what
4266 dnl to use. If GNU gettext is available we use this. Else we have
4267 dnl to fall back to GNU NLS library.
4270 dnl Add a version number to the cache macros.
4271 define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
4272 define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
4274 AC_CHECK_HEADER(libintl.h,
4275 [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
4276 [AC_TRY_LINK([#include <libintl.h>
4277 extern int _nl_msg_cat_cntr;],
4278 [bindtextdomain ("", "");
4279 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
4280 gt_cv_func_gnugettext_libc=yes,
4281 gt_cv_func_gnugettext_libc=no)])
4283 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
4284 AC_CACHE_CHECK([for GNU gettext in libintl],
4285 gt_cv_func_gnugettext_libintl,
4286 [gt_save_LIBS="$LIBS"
4287 LIBS="$LIBS -lintl $LIBICONV"
4288 AC_TRY_LINK([#include <libintl.h>
4289 extern int _nl_msg_cat_cntr;],
4290 [bindtextdomain ("", "");
4291 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
4292 gt_cv_func_gnugettext_libintl=yes,
4293 gt_cv_func_gnugettext_libintl=no)
4294 LIBS="$gt_save_LIBS"])
4297 dnl If an already present or preinstalled GNU gettext() is found,
4298 dnl use it. But if this macro is used in GNU gettext, and GNU
4299 dnl gettext is already preinstalled in libintl, we update this
4300 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
4301 if test "$gt_cv_func_gnugettext_libc" = "yes" \
4302 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
4303 && test "$PACKAGE" != gettext; }; then
4304 AC_DEFINE(HAVE_GETTEXT, 1,
4305 [Define if the GNU gettext() function is already present or preinstalled.])
4307 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
4308 dnl If iconv() is in a separate libiconv library, then anyone
4309 dnl linking with libintl{.a,.so} also needs to link with
4311 INTLLIBS="-lintl $LIBICONV"
4314 gt_save_LIBS="$LIBS"
4315 LIBS="$LIBS $INTLLIBS"
4316 AC_CHECK_FUNCS(dcgettext)
4317 LIBS="$gt_save_LIBS"
4319 dnl Search for GNU msgfmt in the PATH.
4320 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
4321 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
4322 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
4324 dnl Search for GNU xgettext in the PATH.
4325 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
4326 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
4332 if test "$CATOBJEXT" = "NONE"; then
4333 dnl GNU gettext is not found in the C library.
4334 dnl Fall back on GNU gettext library.
4335 nls_cv_use_gnu_gettext=yes
4339 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4340 dnl Mark actions used to generate GNU NLS library.
4341 INTLOBJS="\$(GETTOBJS)"
4342 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
4343 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
4344 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
4345 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
4346 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
4348 BUILD_INCLUDED_LIBINTL=yes
4349 USE_INCLUDED_LIBINTL=yes
4351 INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
4352 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
4355 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
4356 dnl Test whether we really found GNU msgfmt.
4357 if test "$GMSGFMT" != ":"; then
4358 dnl If it is no GNU msgfmt we define it as : so that the
4359 dnl Makefiles still can work.
4360 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
4364 [found msgfmt program is not GNU msgfmt; ignore it])
4369 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
4370 dnl Test whether we really found GNU xgettext.
4371 if test "$XGETTEXT" != ":"; then
4372 dnl If it is no GNU xgettext we define it as : so that the
4373 dnl Makefiles still can work.
4374 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
4378 [found xgettext program is not GNU xgettext; ignore it])
4383 dnl We need to process the po/ directory.
4387 [for ac_file in $CONFIG_FILES; do
4388 # Support "outfile[:infile[:infile...]]"
4390 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4392 # PO directories have a Makefile.in generated from Makefile.in.in.
4393 case "$ac_file" in */Makefile.in)
4394 # Adjust a relative srcdir.
4395 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
4396 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
4397 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
4398 # In autoconf-2.13 it is called $ac_given_srcdir.
4399 # In autoconf-2.50 it is called $srcdir.
4400 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
4401 case "$ac_given_srcdir" in
4402 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
4403 /*) top_srcdir="$ac_given_srcdir" ;;
4404 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
4406 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
4407 rm -f "$ac_dir/POTFILES"
4408 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
4409 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
4410 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
4411 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
4418 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
4419 dnl to 'yes' because some of the testsuite requires it.
4420 if test "$PACKAGE" = gettext; then
4421 BUILD_INCLUDED_LIBINTL=yes
4424 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
4425 dnl because plural.y uses bison specific features. It requires at least
4426 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
4428 dnl bison is only needed for the maintainer (who touches plural.y). But in
4429 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
4430 dnl the rule in general Makefile. Now, some people carelessly touch the
4431 dnl files or have a broken "make" program, hence the plural.c rule will
4432 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
4433 dnl present or too old.
4434 AC_CHECK_PROGS([INTLBISON], [bison])
4435 if test -z "$INTLBISON"; then
4438 dnl Found it, now check the version.
4439 AC_MSG_CHECKING([version of bison])
4440 changequote(<<,>>)dnl
4441 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
4442 case $ac_prog_version in
4443 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
4444 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
4446 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
4447 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
4449 AC_MSG_RESULT([$ac_prog_version])
4451 if test $ac_verc_fail = yes; then
4455 dnl These rules are solely for the distribution goal. While doing this
4456 dnl we only have to keep exactly one list of the available catalogs
4457 dnl in configure.in.
4458 for lang in $ALL_LINGUAS; do
4459 GMOFILES="$GMOFILES $lang.gmo"
4460 POFILES="$POFILES $lang.po"
4463 dnl Make all variables we use known to autoconf.
4464 AC_SUBST(BUILD_INCLUDED_LIBINTL)
4465 AC_SUBST(USE_INCLUDED_LIBINTL)
4474 dnl For backward compatibility. Some configure.ins may be using this.
4476 nls_cv_header_libgt=
4478 dnl For backward compatibility. Some Makefiles may be using this.
4480 AC_SUBST(DATADIRNAME)
4482 dnl For backward compatibility. Some Makefiles may be using this.
4484 AC_SUBST(INSTOBJEXT)
4486 dnl For backward compatibility. Some Makefiles may be using this.
4491 dnl Usage: Just like AM_WITH_NLS, which see.
4492 AC_DEFUN([AM_GNU_GETTEXT],
4493 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
4494 AC_REQUIRE([AC_PROG_CC])dnl
4495 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4496 AC_REQUIRE([AC_PROG_RANLIB])dnl
4497 AC_REQUIRE([AC_ISC_POSIX])dnl
4498 AC_REQUIRE([AC_HEADER_STDC])dnl
4499 AC_REQUIRE([AC_C_CONST])dnl
4500 AC_REQUIRE([AC_C_INLINE])dnl
4501 AC_REQUIRE([AC_TYPE_OFF_T])dnl
4502 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
4503 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
4504 AC_REQUIRE([AC_FUNC_MMAP])dnl
4505 AC_REQUIRE([jm_GLIBC21])dnl
4507 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
4508 stdlib.h string.h unistd.h sys/param.h])
4509 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
4510 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
4511 strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
4516 AM_WITH_NLS([$1],[$2],[$3])
4518 if test "x$CATOBJEXT" != "x"; then
4519 if test "x$ALL_LINGUAS" = "x"; then
4522 AC_MSG_CHECKING(for catalogs to be installed)
4524 for presentlang in $ALL_LINGUAS; do
4526 for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
4527 # Use the presentlang catalog if desiredlang is
4528 # a. equal to presentlang, or
4529 # b. a variant of presentlang (because in this case,
4530 # presentlang can be used as a fallback for messages
4531 # which are not translated in the desiredlang catalog).
4532 case "$desiredlang" in
4533 "$presentlang"*) useit=yes;;
4536 if test $useit = yes; then
4537 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
4540 LINGUAS=$NEW_LINGUAS
4541 AC_MSG_RESULT($LINGUAS)
4544 dnl Construct list of names of catalog files to be constructed.
4545 if test -n "$LINGUAS"; then
4546 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4550 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
4551 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
4552 dnl Try to locate is.
4554 if test -n "$ac_aux_dir"; then
4555 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
4557 if test -z "$MKINSTALLDIRS"; then
4558 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
4560 AC_SUBST(MKINSTALLDIRS)
4562 dnl Enable libtool support if the surrounding package wishes it.
4563 INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
4564 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
4567 # Search path for a program which passes the given test.
4568 # Ulrich Drepper <drepper@cygnus.com>, 1996.
4570 # This file can be copied and used freely without restrictions. It can
4571 # be used in projects which are not available under the GNU General Public
4572 # License or the GNU Library General Public License but which still want
4573 # to provide support for the GNU gettext functionality.
4574 # Please note that the actual code of the GNU gettext library is covered
4575 # by the GNU Library General Public License, and the rest of the GNU
4576 # gettext package package is covered by the GNU General Public License.
4577 # They are *not* in the public domain.
4581 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
4582 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
4583 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
4584 [# Extract the first word of "$2", so it can be a program name with args.
4585 set dummy $2; ac_word=[$]2
4586 AC_MSG_CHECKING([for $ac_word])
4587 AC_CACHE_VAL(ac_cv_path_$1,
4590 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
4593 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4594 for ac_dir in ifelse([$5], , $PATH, [$5]); do
4595 test -z "$ac_dir" && ac_dir=.
4596 if test -f $ac_dir/$ac_word; then
4598 ac_cv_path_$1="$ac_dir/$ac_word"
4604 dnl If no 4th arg is given, leave the cache variable unset,
4605 dnl so AC_PATH_PROGS will keep looking.
4606 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
4611 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
4612 AC_MSG_RESULT([$]$1)
4621 # Test for the GNU C Library, version 2.1 or newer.
4622 # From Bruno Haible.
4624 AC_DEFUN([jm_GLIBC21],
4626 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
4627 ac_cv_gnu_library_2_1,
4628 [AC_EGREP_CPP([Lucky GNU user],
4630 #include <features.h>
4631 #ifdef __GNU_LIBRARY__
4632 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
4637 ac_cv_gnu_library_2_1=yes,
4638 ac_cv_gnu_library_2_1=no)
4642 GLIBC21="$ac_cv_gnu_library_2_1"
4648 dnl From Bruno Haible.
4650 AC_DEFUN([AM_ICONV],
4652 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
4653 dnl those with the standalone portable GNU libiconv installed).
4655 AC_ARG_WITH([libiconv-prefix],
4656 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
4657 for dir in `echo "$withval" | tr : ' '`; do
4658 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4659 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
4663 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
4664 am_cv_func_iconv="no, consider installing GNU libiconv"
4666 AC_TRY_LINK([#include <stdlib.h>
4667 #include <iconv.h>],
4668 [iconv_t cd = iconv_open("","");
4669 iconv(cd,NULL,NULL,NULL,NULL);
4671 am_cv_func_iconv=yes)
4672 if test "$am_cv_func_iconv" != yes; then
4673 am_save_LIBS="$LIBS"
4674 LIBS="$LIBS -liconv"
4675 AC_TRY_LINK([#include <stdlib.h>
4676 #include <iconv.h>],
4677 [iconv_t cd = iconv_open("","");
4678 iconv(cd,NULL,NULL,NULL,NULL);
4681 am_cv_func_iconv=yes)
4682 LIBS="$am_save_LIBS"
4685 if test "$am_cv_func_iconv" = yes; then
4686 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
4687 AC_MSG_CHECKING([for iconv declaration])
4688 AC_CACHE_VAL(am_cv_proto_iconv, [
4696 #if defined(__STDC__) || defined(__cplusplus)
4697 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4701 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
4702 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);"])
4703 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4704 AC_MSG_RESULT([$]{ac_t:-
4705 }[$]am_cv_proto_iconv)
4706 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
4707 [Define as const if the declaration of iconv() needs const.])
4710 if test "$am_cv_lib_iconv" = yes; then
4718 dnl From Bruno Haible.
4720 AC_DEFUN([AM_LANGINFO_CODESET],
4722 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
4723 [AC_TRY_LINK([#include <langinfo.h>],
4724 [char* cs = nl_langinfo(CODESET);],
4725 am_cv_langinfo_codeset=yes,
4726 am_cv_langinfo_codeset=no)
4728 if test $am_cv_langinfo_codeset = yes; then
4729 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
4730 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
4734 # Check whether LC_MESSAGES is available in <locale.h>.
4735 # Ulrich Drepper <drepper@cygnus.com>, 1995.
4737 # This file can be copied and used freely without restrictions. It can
4738 # be used in projects which are not available under the GNU General Public
4739 # License or the GNU Library General Public License but which still want
4740 # to provide support for the GNU gettext functionality.
4741 # Please note that the actual code of the GNU gettext library is covered
4742 # by the GNU Library General Public License, and the rest of the GNU
4743 # gettext package package is covered by the GNU General Public License.
4744 # They are *not* in the public domain.
4748 AC_DEFUN([AM_LC_MESSAGES],
4749 [if test $ac_cv_header_locale_h = yes; then
4750 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
4751 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
4752 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
4753 if test $am_cv_val_LC_MESSAGES = yes; then
4754 AC_DEFINE(HAVE_LC_MESSAGES, 1,
4755 [Define if your <locale.h> file defines LC_MESSAGES.])