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
561 # isc-posix.m4 serial 1 (gettext-0.10.40)
562 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
563 dnl This file is free software, distributed under the terms of the GNU
564 dnl General Public License. As a special exception to the GNU General
565 dnl Public License, this file may be distributed as part of a program
566 dnl that contains a configuration script generated by Autoconf, under
567 dnl the same distribution terms as the rest of that program.
569 # This test replaces the one in autoconf.
570 # Currently this macro should have the same name as the autoconf macro
571 # because gettext's gettext.m4 (distributed in the automake package)
572 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
573 # give these diagnostics:
574 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
575 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
577 undefine([AC_ISC_POSIX])
579 AC_DEFUN([AC_ISC_POSIX],
581 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
582 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
589 AC_DEFUN([AM_C_PROTOTYPES],
590 [AC_REQUIRE([AM_PROG_CC_STDC])
591 AC_REQUIRE([AC_PROG_CPP])
592 AC_MSG_CHECKING([for function prototypes])
593 if test "$am_cv_prog_cc_stdc" != no; then
595 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
599 U=_ ANSI2KNR=./ansi2knr
601 # Ensure some checks needed by ansi2knr itself.
603 AC_CHECK_HEADERS(string.h)
605 AC_SUBST(ANSI2KNR)dnl
611 # @defmac AC_PROG_CC_STDC
612 # @maindex PROG_CC_STDC
614 # If the C compiler in not in ANSI C mode by default, try to add an option
615 # to output variable @code{CC} to make it so. This macro tries various
616 # options that select ANSI C on some system or another. It considers the
617 # compiler to be in ANSI C mode if it handles function prototypes correctly.
619 # If you use this macro, you should check after calling it whether the C
620 # compiler has been set to accept ANSI C; if not, the shell variable
621 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
622 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
623 # program @code{ansi2knr}, which comes with Ghostscript.
626 AC_DEFUN([AM_PROG_CC_STDC],
627 [AC_REQUIRE([AC_PROG_CC])
628 AC_BEFORE([$0], [AC_C_INLINE])
629 AC_BEFORE([$0], [AC_C_CONST])
630 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
631 dnl a magic option to avoid problems with ANSI preprocessor commands
633 dnl FIXME: can't do this because then AC_AIX won't work due to a
634 dnl circular dependency.
635 dnl AC_BEFORE([$0], [AC_PROG_CPP])
636 AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
637 AC_CACHE_VAL(am_cv_prog_cc_stdc,
638 [am_cv_prog_cc_stdc=no
640 # Don't try gcc -ansi; that turns off useful extensions and
641 # breaks some systems' header files.
643 # Ultrix and OSF/1 -std1
644 # HP-UX 10.20 and later -Ae
645 # HP-UX older versions -Aa -D_HPUX_SOURCE
646 # SVR4 -Xc -D__EXTENSIONS__
647 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
649 CC="$ac_save_CC $ac_arg"
653 #include <sys/types.h>
654 #include <sys/stat.h>
655 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
656 struct buf { int x; };
657 FILE * (*rcsopen) (struct buf *, struct stat *, int);
658 static char *e (p, i)
664 static char *f (char * (*g) (char **, int), char **p, ...)
669 s = g (p, va_arg (v,int));
673 int test (int i, double x);
674 struct s1 {int (*f) (int a);};
675 struct s2 {int (*f) (double a);};
676 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
680 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
682 [am_cv_prog_cc_stdc="$ac_arg"; break])
686 if test -z "$am_cv_prog_cc_stdc"; then
687 AC_MSG_RESULT([none needed])
689 AC_MSG_RESULT([$am_cv_prog_cc_stdc])
691 case "x$am_cv_prog_cc_stdc" in
693 *) CC="$CC $am_cv_prog_cc_stdc" ;;
697 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
699 # serial 46 AC_PROG_LIBTOOL
701 AC_DEFUN([AC_PROG_LIBTOOL],
702 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
704 # This can be used to rebuild libtool when needed
705 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
707 # Always use our own libtool.
708 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
711 # Prevent multiple expansion
712 define([AC_PROG_LIBTOOL], [])
715 AC_DEFUN([AC_LIBTOOL_SETUP],
717 AC_REQUIRE([AC_ENABLE_SHARED])dnl
718 AC_REQUIRE([AC_ENABLE_STATIC])dnl
719 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
720 AC_REQUIRE([AC_CANONICAL_HOST])dnl
721 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
722 AC_REQUIRE([AC_PROG_CC])dnl
723 AC_REQUIRE([AC_PROG_LD])dnl
724 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
725 AC_REQUIRE([AC_PROG_NM])dnl
726 AC_REQUIRE([AC_PROG_LN_S])dnl
727 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
728 AC_REQUIRE([AC_OBJEXT])dnl
729 AC_REQUIRE([AC_EXEEXT])dnl
732 _LT_AC_PROG_ECHO_BACKSLASH
733 # Only perform the check for file, if the check method requires it
734 case $deplibs_check_method in
736 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
742 AC_CHECK_TOOL(RANLIB, ranlib, :)
743 AC_CHECK_TOOL(STRIP, strip, :)
745 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
746 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
747 enable_win32_dll=yes, enable_win32_dll=no)
749 AC_ARG_ENABLE(libtool-lock,
750 [ --disable-libtool-lock avoid locking (might break parallel builds)])
751 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
753 # Some flags need to be propagated to the compiler or linker for good
757 # Find out which ABI we are using.
758 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
759 if AC_TRY_EVAL(ac_compile); then
760 case `/usr/bin/file conftest.$ac_objext` in
776 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
777 SAVE_CFLAGS="$CFLAGS"
778 CFLAGS="$CFLAGS -belf"
779 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
782 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
784 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
785 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
786 CFLAGS="$SAVE_CFLAGS"
790 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
791 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
792 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
793 AC_CHECK_TOOL(AS, as, false)
794 AC_CHECK_TOOL(OBJDUMP, objdump, false)
796 # recent cygwin and mingw systems supply a stub DllMain which the user
797 # can override, but on older systems we have to supply one
798 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
800 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
802 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
805 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
806 # old mingw systems require "-dll" to link a DLL, while more recent ones
808 SAVE_CFLAGS="$CFLAGS"
809 CFLAGS="$CFLAGS -mdll"
810 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
811 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
812 CFLAGS="$SAVE_CFLAGS" ;;
813 *-*-cygwin* | *-*-pw32*)
814 # cygwin systems need to pass --dll to the linker, and not link
815 # crt.o which will require a WinMain@16 definition.
816 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
826 # AC_LIBTOOL_HEADER_ASSERT
827 # ------------------------
828 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
829 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
830 [lt_cv_func_assert_works],
833 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
834 case `$CC --version 2>/dev/null` in
835 [[12]].*) lt_cv_func_assert_works=no ;;
836 *) lt_cv_func_assert_works=yes ;;
842 if test "x$lt_cv_func_assert_works" = xyes; then
843 AC_CHECK_HEADERS(assert.h)
845 ])# AC_LIBTOOL_HEADER_ASSERT
848 # --------------------
849 AC_DEFUN([_LT_AC_CHECK_DLFCN],
850 [AC_CHECK_HEADERS(dlfcn.h)
851 ])# _LT_AC_CHECK_DLFCN
853 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
854 # ---------------------------------
855 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
856 [AC_REQUIRE([AC_CANONICAL_HOST])
857 AC_REQUIRE([AC_PROG_NM])
858 AC_REQUIRE([AC_OBJEXT])
859 # Check for command to grab the raw symbol name followed by C symbol from nm.
860 AC_MSG_CHECKING([command to parse $NM output])
861 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
863 # These are sane defaults that work on at least a few old systems.
864 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
866 # Character class describing NM global symbol codes.
867 symcode='[[BCDEGRST]]'
869 # Regexp to match symbols that can be accessed directly from C.
870 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
872 # Transform the above into a raw symbol and a C symbol.
875 # Transform an extracted symbol line into a proper C declaration
876 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
878 # Transform an extracted symbol line into symbol name and symbol address
879 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'"
881 # Define system-specific variables.
886 cygwin* | mingw* | pw32*)
887 symcode='[[ABCDGISTW]]'
889 hpux*) # Its linker distinguishes data from code symbols
890 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
891 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'"
894 symcode='[[BCDEGRST]]'
904 # Handle CRLF in mingw tool chain
908 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
912 # If we're using GNU nm, then use its standard symbol codes.
913 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
914 symcode='[[ABCDGISTW]]'
917 # Try without a prefix undercore, then with it.
918 for ac_symprfx in "" "_"; do
920 # Write the raw and C identifiers.
921 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
923 # Check to see that the pipe works correctly.
926 cat > conftest.$ac_ext <<EOF
931 void nm_test_func(){}
935 int main(){nm_test_var='a';nm_test_func();return(0);}
938 if AC_TRY_EVAL(ac_compile); then
939 # Now try to grab the symbols.
941 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
942 # Try sorting and uniquifying the output.
943 if sort "$nlist" | uniq > "$nlist"T; then
944 mv -f "$nlist"T "$nlist"
949 # Make sure that we snagged all the symbols we need.
950 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
951 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
952 cat <<EOF > conftest.$ac_ext
958 # Now generate the symbol file.
959 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
961 cat <<EOF >> conftest.$ac_ext
962 #if defined (__STDC__) && __STDC__
963 # define lt_ptr void *
965 # define lt_ptr char *
969 /* The mapping between symbol names and symbols. */
974 lt_preloaded_symbols[[]] =
977 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
978 cat <<\EOF >> conftest.$ac_ext
986 # Now try linking the two files.
987 mv conftest.$ac_objext conftstm.$ac_objext
989 save_CFLAGS="$CFLAGS"
990 LIBS="conftstm.$ac_objext"
991 CFLAGS="$CFLAGS$no_builtin_flag"
992 if AC_TRY_EVAL(ac_link) && test -s conftest; then
996 CFLAGS="$save_CFLAGS"
998 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1001 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1004 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1007 echo "$progname: failed program was:" >&AC_FD_CC
1008 cat conftest.$ac_ext >&5
1010 rm -f conftest* conftst*
1012 # Do not use the global_symbol_pipe unless it works.
1013 if test "$pipe_works" = yes; then
1016 lt_cv_sys_global_symbol_pipe=
1020 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1021 if test -z "$lt_cv_sys_global_symbol_pipe"; then
1022 global_symbol_to_cdecl=
1023 global_symbol_to_c_name_address=
1025 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1026 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1028 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1030 AC_MSG_RESULT(failed)
1034 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1036 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1037 # ---------------------------------
1038 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1039 [# Find the correct PATH separator. Usually this is `:', but
1040 # DJGPP uses `;' like DOS.
1041 if test "X${PATH_SEPARATOR+set}" != Xset; then
1042 UNAME=${UNAME-`uname 2>/dev/null`}
1044 *-DOS) lt_cv_sys_path_separator=';' ;;
1045 *) lt_cv_sys_path_separator=':' ;;
1047 PATH_SEPARATOR=$lt_cv_sys_path_separator
1049 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1051 # _LT_AC_PROG_ECHO_BACKSLASH
1052 # --------------------------
1053 # Add some code to the start of the generated configure script which
1054 # will find an echo command which doesn't interpret backslashes.
1055 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1056 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1057 [AC_DIVERT_PUSH(NOTICE)])
1058 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1060 # Check that we are running under the correct shell.
1061 SHELL=${CONFIG_SHELL-/bin/sh}
1065 # Remove one level of quotation (which was required for Make).
1066 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1071 if test "X[$]1" = X--no-reexec; then
1072 # Discard the --no-reexec flag, and continue.
1074 elif test "X[$]1" = X--fallback-echo; then
1075 # Avoid inline document here, it may be left over
1077 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1078 # Yippee, $echo works!
1081 # Restart under the correct shell.
1082 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1085 if test "X[$]1" = X--fallback-echo; then
1086 # used as fallback echo
1094 # The HP-UX ksh and POSIX shell print the target directory to stdout
1096 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1098 if test -z "$ECHO"; then
1099 if test "X${echo_test_string+set}" != Xset; then
1100 # find a string as large as possible, as long as the shell can cope with it
1101 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1102 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1103 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1104 echo_test_string="`eval $cmd`" &&
1105 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1112 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1113 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1114 test "X$echo_testing_string" = "X$echo_test_string"; then
1117 # The Solaris, AIX, and Digital Unix default echo programs unquote
1118 # backslashes. This makes it impossible to quote backslashes using
1119 # echo "$something" | sed 's/\\/\\\\/g'
1121 # So, first we look for a working echo in the user's PATH.
1123 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1124 for dir in $PATH /usr/ucb; do
1125 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1126 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1127 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1128 test "X$echo_testing_string" = "X$echo_test_string"; then
1135 if test "X$echo" = Xecho; then
1136 # We didn't find a better echo, so look for alternatives.
1137 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1138 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1139 test "X$echo_testing_string" = "X$echo_test_string"; then
1140 # This shell has a builtin print -r that does the trick.
1142 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1143 test "X$CONFIG_SHELL" != X/bin/ksh; then
1144 # If we have ksh, try running configure again with it.
1145 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1146 export ORIGINAL_CONFIG_SHELL
1147 CONFIG_SHELL=/bin/ksh
1149 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1153 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1154 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1155 test "X$echo_testing_string" = "X$echo_test_string"; then
1156 # Cool, printf works
1158 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1159 test "X$echo_testing_string" = 'X\t' &&
1160 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1161 test "X$echo_testing_string" = "X$echo_test_string"; then
1162 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1164 SHELL="$CONFIG_SHELL"
1166 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1167 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1168 test "X$echo_testing_string" = 'X\t' &&
1169 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1170 test "X$echo_testing_string" = "X$echo_test_string"; then
1171 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1173 # maybe with a smaller string...
1176 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1177 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1184 if test "$prev" != 'sed 50q "[$]0"'; then
1185 echo_test_string=`eval $prev`
1186 export echo_test_string
1187 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1189 # Oops. We lost completely, so just stick with echo.
1198 # Copy echo and quote the copy suitably for passing to libtool from
1199 # the Makefile, instead of quoting the original, which is used later.
1201 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1202 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1207 ])# _LT_AC_PROG_ECHO_BACKSLASH
1209 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1210 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1211 # ------------------------------------------------------------------
1212 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1213 [if test "$cross_compiling" = yes; then :
1216 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1217 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1218 lt_status=$lt_dlunknown
1219 cat > conftest.$ac_ext <<EOF
1220 [#line __oline__ "configure"
1221 #include "confdefs.h"
1230 # define LT_DLGLOBAL RTLD_GLOBAL
1233 # define LT_DLGLOBAL DL_GLOBAL
1235 # define LT_DLGLOBAL 0
1239 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1240 find out it does not work in some platform. */
1241 #ifndef LT_DLLAZY_OR_NOW
1243 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1246 # define LT_DLLAZY_OR_NOW DL_LAZY
1249 # define LT_DLLAZY_OR_NOW RTLD_NOW
1252 # define LT_DLLAZY_OR_NOW DL_NOW
1254 # define LT_DLLAZY_OR_NOW 0
1262 extern "C" void exit (int);
1265 void fnord() { int i=42;}
1268 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1269 int status = $lt_dlunknown;
1273 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1274 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1275 /* dlclose (self); */
1281 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1282 (./conftest; exit; ) 2>/dev/null
1285 x$lt_dlno_uscore) $1 ;;
1286 x$lt_dlneed_uscore) $2 ;;
1287 x$lt_unknown|x*) $3 ;;
1290 # compilation failed
1295 ])# _LT_AC_TRY_DLOPEN_SELF
1297 # AC_LIBTOOL_DLOPEN_SELF
1298 # -------------------
1299 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1300 [if test "x$enable_dlopen" != xyes; then
1301 enable_dlopen=unknown
1302 enable_dlopen_self=unknown
1303 enable_dlopen_self_static=unknown
1310 lt_cv_dlopen="load_add_on"
1312 lt_cv_dlopen_self=yes
1315 cygwin* | mingw* | pw32*)
1316 lt_cv_dlopen="LoadLibrary"
1321 AC_CHECK_FUNC([shl_load],
1322 [lt_cv_dlopen="shl_load"],
1323 [AC_CHECK_LIB([dld], [shl_load],
1324 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1325 [AC_CHECK_FUNC([dlopen],
1326 [lt_cv_dlopen="dlopen"],
1327 [AC_CHECK_LIB([dl], [dlopen],
1328 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1329 [AC_CHECK_LIB([svld], [dlopen],
1330 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1331 [AC_CHECK_LIB([dld], [dld_link],
1332 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1341 if test "x$lt_cv_dlopen" != xno; then
1347 case $lt_cv_dlopen in
1349 save_CPPFLAGS="$CPPFLAGS"
1350 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1351 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1353 save_LDFLAGS="$LDFLAGS"
1354 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1357 LIBS="$lt_cv_dlopen_libs $LIBS"
1359 AC_CACHE_CHECK([whether a program can dlopen itself],
1360 lt_cv_dlopen_self, [dnl
1361 _LT_AC_TRY_DLOPEN_SELF(
1362 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1363 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1366 if test "x$lt_cv_dlopen_self" = xyes; then
1367 LDFLAGS="$LDFLAGS $link_static_flag"
1368 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1369 lt_cv_dlopen_self_static, [dnl
1370 _LT_AC_TRY_DLOPEN_SELF(
1371 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1372 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1376 CPPFLAGS="$save_CPPFLAGS"
1377 LDFLAGS="$save_LDFLAGS"
1382 case $lt_cv_dlopen_self in
1383 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1384 *) enable_dlopen_self=unknown ;;
1387 case $lt_cv_dlopen_self_static in
1388 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1389 *) enable_dlopen_self_static=unknown ;;
1392 ])# AC_LIBTOOL_DLOPEN_SELF
1394 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1395 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1396 # Sed substitution that helps us do robust quoting. It backslashifies
1397 # metacharacters that are still active within double-quoted strings.
1398 Xsed='sed -e s/^X//'
1399 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1401 # Same as above, but do not quote variable references.
1402 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1404 # Sed substitution to delay expansion of an escaped shell variable in a
1405 # double_quote_subst'ed string.
1406 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1412 default_ofile=libtool
1413 can_build_shared=yes
1415 # All known linkers require a `.a' archive for static linking (except M$VC,
1416 # which needs '.lib').
1418 ltmain="$ac_aux_dir/ltmain.sh"
1419 ofile="$default_ofile"
1420 with_gnu_ld="$lt_cv_prog_gnu_ld"
1421 need_locks="$enable_libtool_lock"
1424 old_CFLAGS="$CFLAGS"
1426 # Set sane defaults for various variables
1427 test -z "$AR" && AR=ar
1428 test -z "$AR_FLAGS" && AR_FLAGS=cru
1429 test -z "$AS" && AS=as
1430 test -z "$CC" && CC=cc
1431 test -z "$DLLTOOL" && DLLTOOL=dlltool
1432 test -z "$LD" && LD=ld
1433 test -z "$LN_S" && LN_S="ln -s"
1434 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1435 test -z "$NM" && NM=nm
1436 test -z "$OBJDUMP" && OBJDUMP=objdump
1437 test -z "$RANLIB" && RANLIB=:
1438 test -z "$STRIP" && STRIP=:
1439 test -z "$ac_objext" && ac_objext=o
1441 if test x"$host" != x"$build"; then
1442 ac_tool_prefix=${host_alias}-
1447 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1450 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1455 # AIX sometimes has problems with the GCC collect2 program. For some
1456 # reason, if we set the COLLECT_NAMES environment variable, the problems
1457 # vanish in a puff of smoke.
1458 if test "X${COLLECT_NAMES+set}" != Xset; then
1460 export COLLECT_NAMES
1465 # Determine commands to create old-style static archives.
1466 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1467 old_postinstall_cmds='chmod 644 $oldlib'
1468 old_postuninstall_cmds=
1470 if test -n "$RANLIB"; then
1473 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1476 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1479 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1482 # Allow CC to be a program name with arguments.
1486 AC_MSG_CHECKING([for objdir])
1487 rm -f .libs 2>/dev/null
1488 mkdir .libs 2>/dev/null
1489 if test -d .libs; then
1492 # MS-DOS does not allow filenames that begin with a dot.
1495 rmdir .libs 2>/dev/null
1496 AC_MSG_RESULT($objdir)
1500 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1501 pic_mode="$withval", pic_mode=default)
1502 test -z "$pic_mode" && pic_mode=default
1504 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1505 # in isolation, and that seeing it set (from the cache) indicates that
1506 # the associated values are set (in the cache) correctly too.
1507 AC_MSG_CHECKING([for $compiler option to produce PIC])
1508 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1509 [ lt_cv_prog_cc_pic=
1510 lt_cv_prog_cc_shlib=
1512 lt_cv_prog_cc_static=
1513 lt_cv_prog_cc_no_builtin=
1514 lt_cv_prog_cc_can_build_shared=$can_build_shared
1516 if test "$GCC" = yes; then
1517 lt_cv_prog_cc_wl='-Wl,'
1518 lt_cv_prog_cc_static='-static'
1522 # Below there is a dirty hack to force normal static linking with -ldl
1523 # The problem is because libdl dynamically linked with both libc and
1524 # libC (AIX C++ library), which obviously doesn't included in libraries
1525 # list by gcc. This cause undefined symbols with -static flags.
1526 # This hack allows C programs to be linked with "-static -ldl", but
1527 # not sure about C++ programs.
1528 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1531 # FIXME: we need at least 68020 code to build shared libraries, but
1532 # adding the `-m68020' flag to GCC prevents building anything better,
1534 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1536 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1537 # PIC is the default for these OSes.
1539 darwin* | rhapsody*)
1540 # PIC is the default on this platform
1541 # Common symbols not allowed in MH_DYLIB files
1542 lt_cv_prog_cc_pic='-fno-common'
1544 cygwin* | mingw* | pw32* | os2*)
1545 # This hack is so that the source file can tell whether it is being
1546 # built for inclusion in a dll (and should export symbols for example).
1547 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1550 if test -d /usr/nec; then
1551 lt_cv_prog_cc_pic=-Kconform_pic
1555 lt_cv_prog_cc_pic='-fPIC'
1559 # PORTME Check for PIC flags for the system compiler.
1561 aix3* | aix4* | aix5*)
1562 lt_cv_prog_cc_wl='-Wl,'
1563 # All AIX code is PIC.
1564 if test "$host_cpu" = ia64; then
1565 # AIX 5 now supports IA64 processor
1566 lt_cv_prog_cc_static='-Bstatic'
1568 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1572 hpux9* | hpux10* | hpux11*)
1573 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1574 lt_cv_prog_cc_wl='-Wl,'
1575 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1576 lt_cv_prog_cc_pic='+Z'
1580 lt_cv_prog_cc_wl='-Wl,'
1581 lt_cv_prog_cc_static='-non_shared'
1582 # PIC (with -KPIC) is the default.
1585 cygwin* | mingw* | pw32* | os2*)
1586 # This hack is so that the source file can tell whether it is being
1587 # built for inclusion in a dll (and should export symbols for example).
1588 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1592 lt_cv_prog_cc_pic='-KPIC'
1593 lt_cv_prog_cc_static='-Bstatic'
1596 osf3* | osf4* | osf5*)
1597 # All OSF/1 code is PIC.
1598 lt_cv_prog_cc_wl='-Wl,'
1599 lt_cv_prog_cc_static='-non_shared'
1603 lt_cv_prog_cc_pic='-Kpic'
1604 lt_cv_prog_cc_static='-dn'
1605 lt_cv_prog_cc_shlib='-belf'
1609 lt_cv_prog_cc_pic='-KPIC'
1610 lt_cv_prog_cc_static='-Bstatic'
1611 lt_cv_prog_cc_wl='-Wl,'
1615 lt_cv_prog_cc_pic='-PIC'
1616 lt_cv_prog_cc_static='-Bstatic'
1617 lt_cv_prog_cc_wl='-Qoption ld '
1620 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1621 lt_cv_prog_cc_pic='-KPIC'
1622 lt_cv_prog_cc_static='-Bstatic'
1623 if test "x$host_vendor" = xsni; then
1624 lt_cv_prog_cc_wl='-LD'
1626 lt_cv_prog_cc_wl='-Wl,'
1631 lt_cv_prog_cc_pic='-pic'
1632 lt_cv_prog_cc_static='-Bstatic'
1636 if test -d /usr/nec ;then
1637 lt_cv_prog_cc_pic='-Kconform_pic'
1638 lt_cv_prog_cc_static='-Bstatic'
1643 lt_cv_prog_cc_can_build_shared=no
1648 if test -z "$lt_cv_prog_cc_pic"; then
1649 AC_MSG_RESULT([none])
1651 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1653 # Check to make sure the pic_flag actually works.
1654 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1655 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1656 save_CFLAGS="$CFLAGS"
1657 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1658 AC_TRY_COMPILE([], [], [dnl
1660 hpux9* | hpux10* | hpux11*)
1661 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1662 # they create non-PIC objects. So, if there were any warnings, we
1663 # assume that PIC is not supported.
1664 if test -s conftest.err; then
1665 lt_cv_prog_cc_pic_works=no
1667 lt_cv_prog_cc_pic_works=yes
1671 lt_cv_prog_cc_pic_works=yes
1675 lt_cv_prog_cc_pic_works=no
1677 CFLAGS="$save_CFLAGS"
1680 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1682 lt_cv_prog_cc_can_build_shared=no
1684 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1687 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1690 # Check for any special shared library compilation flags.
1691 if test -n "$lt_cv_prog_cc_shlib"; then
1692 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1693 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1695 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1696 lt_cv_prog_cc_can_build_shared=no
1700 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1701 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1702 lt_cv_prog_cc_static_works=no
1703 save_LDFLAGS="$LDFLAGS"
1704 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1705 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1706 LDFLAGS="$save_LDFLAGS"
1709 # Belt *and* braces to stop my trousers falling down:
1710 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1711 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1713 pic_flag="$lt_cv_prog_cc_pic"
1714 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1715 wl="$lt_cv_prog_cc_wl"
1716 link_static_flag="$lt_cv_prog_cc_static"
1717 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1718 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1721 # Check to see if options -o and -c are simultaneously supported by compiler
1722 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1723 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1724 $rm -r conftest 2>/dev/null
1727 echo "int some_variable = 0;" > conftest.$ac_ext
1729 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1730 # that will create temporary files in the current directory regardless of
1731 # the output directory. Thus, making CWD read-only will cause this test
1732 # to fail, enabling locking or at least warning the user not to do parallel
1735 save_CFLAGS="$CFLAGS"
1736 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1738 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1739 # The compiler can only warn and ignore the option if not recognized
1740 # So say no if there are warnings
1741 if test -s out/conftest.err; then
1742 lt_cv_compiler_c_o=no
1744 lt_cv_compiler_c_o=yes
1747 # Append any errors to the config.log.
1748 cat out/conftest.err 1>&AC_FD_CC
1749 lt_cv_compiler_c_o=no
1751 CFLAGS="$save_CFLAGS"
1757 $rm -r conftest 2>/dev/null
1759 compiler_c_o=$lt_cv_compiler_c_o
1760 AC_MSG_RESULT([$compiler_c_o])
1762 if test x"$compiler_c_o" = x"yes"; then
1763 # Check to see if we can write to a .lo
1764 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1765 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1766 lt_cv_compiler_o_lo=no
1767 save_CFLAGS="$CFLAGS"
1768 CFLAGS="$CFLAGS -c -o conftest.lo"
1769 save_objext="$ac_objext"
1771 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1772 # The compiler can only warn and ignore the option if not recognized
1773 # So say no if there are warnings
1774 if test -s conftest.err; then
1775 lt_cv_compiler_o_lo=no
1777 lt_cv_compiler_o_lo=yes
1780 ac_objext="$save_objext"
1781 CFLAGS="$save_CFLAGS"
1783 compiler_o_lo=$lt_cv_compiler_o_lo
1784 AC_MSG_RESULT([$compiler_o_lo])
1789 # Check to see if we can do hard links to lock some files if needed
1790 hard_links="nottested"
1791 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1792 # do not overwrite the value of need_locks provided by the user
1793 AC_MSG_CHECKING([if we can lock with hard links])
1796 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1798 ln conftest.a conftest.b 2>&5 || hard_links=no
1799 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1800 AC_MSG_RESULT([$hard_links])
1801 if test "$hard_links" = no; then
1802 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1809 if test "$GCC" = yes; then
1810 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1811 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1812 echo "int some_variable = 0;" > conftest.$ac_ext
1813 save_CFLAGS="$CFLAGS"
1814 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1815 compiler_rtti_exceptions=no
1816 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1817 # The compiler can only warn and ignore the option if not recognized
1818 # So say no if there are warnings
1819 if test -s conftest.err; then
1820 compiler_rtti_exceptions=no
1822 compiler_rtti_exceptions=yes
1825 CFLAGS="$save_CFLAGS"
1826 AC_MSG_RESULT([$compiler_rtti_exceptions])
1828 if test "$compiler_rtti_exceptions" = "yes"; then
1829 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1831 no_builtin_flag=' -fno-builtin'
1835 # See if the linker supports building shared libraries.
1836 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1838 allow_undefined_flag=
1840 need_lib_prefix=unknown
1841 need_version=unknown
1842 # when you set need_version to no, make sure it does not cause -set_version
1843 # flags to be left without arguments
1845 archive_expsym_cmds=
1846 old_archive_from_new_cmds=
1847 old_archive_from_expsyms_cmds=
1848 export_dynamic_flag_spec=
1849 whole_archive_flag_spec=
1850 thread_safe_flag_spec=
1851 hardcode_into_libs=no
1852 hardcode_libdir_flag_spec=
1853 hardcode_libdir_separator=
1856 hardcode_shlibpath_var=unsupported
1858 link_all_deplibs=unknown
1859 always_export_symbols=no
1860 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1861 # include_expsyms should be a list of space-separated symbols to be *always*
1862 # included in the symbol list
1864 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1865 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1866 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1867 # as well as any symbol that contains `d'.
1868 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1869 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1870 # platforms (ab)use it in PIC code, but their linkers get confused if
1871 # the symbol is explicitly referenced. Since portable code cannot
1872 # rely on this symbol name, it's probably fine to never include it in
1873 # preloaded symbol tables.
1874 extract_expsyms_cmds=
1877 cygwin* | mingw* | pw32*)
1878 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1879 # When not using gcc, we currently assume that we are using
1880 # Microsoft Visual C++.
1881 if test "$GCC" != yes; then
1891 if test "$with_gnu_ld" = yes; then
1892 # If archive_cmds runs LD, not CC, wlarc should be empty
1895 # See if GNU ld supports shared libraries.
1897 aix3* | aix4* | aix5*)
1898 # On AIX, the GNU linker is very broken
1899 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1903 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1904 *** to be unable to reliably create shared libraries on AIX.
1905 *** Therefore, libtool is disabling shared libraries support. If you
1906 *** really care for shared libraries, you may want to modify your PATH
1907 *** so that a non-GNU linker is found, and then restart.
1913 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)'
1914 hardcode_libdir_flag_spec='-L$libdir'
1915 hardcode_minus_L=yes
1917 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1918 # that the semantics of dynamic libraries on AmigaOS, at least up
1919 # to version 4, is to share data among multiple programs linked
1920 # with the same dynamic library. Since this doesn't match the
1921 # behavior of shared libraries on other platforms, we can use
1927 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1928 allow_undefined_flag=unsupported
1929 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1930 # support --undefined. This deserves some investigation. FIXME
1931 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1937 cygwin* | mingw* | pw32*)
1938 # hardcode_libdir_flag_spec is actually meaningless, as there is
1939 # no search path for DLLs.
1940 hardcode_libdir_flag_spec='-L$libdir'
1941 allow_undefined_flag=unsupported
1942 always_export_symbols=yes
1944 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1945 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1946 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1947 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1948 else $CC -o impgen impgen.c ; fi)~
1949 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1951 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1953 # cygwin and mingw dlls have different entry points and sets of symbols
1955 # FIXME: what about values for MSVC?
1956 dll_entry=__cygwin_dll_entry@12
1957 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1961 dll_entry=_DllMainCRTStartup@12
1962 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1966 # mingw and cygwin differ, and it's simplest to just exclude the union
1967 # of the two symbol sets.
1968 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1970 # recent cygwin and mingw systems supply a stub DllMain which the user
1971 # can override, but on older systems we have to supply one (in ltdll.c)
1972 if test "x$lt_cv_need_dllmain" = "xyes"; then
1973 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1974 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~
1975 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1981 # Extract the symbol export list from an `--export-all' def file,
1982 # then regenerate the def file from the symbol export list, so that
1983 # the compiled dll only exports the symbol export list.
1984 # Be careful not to strip the DATA tag left be newer dlltools.
1985 export_symbols_cmds="$ltdll_cmds"'
1986 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1987 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1989 # If the export-symbols file already is a .def file (1st line
1990 # is EXPORTS), use it as is.
1991 # If DATA tags from a recent dlltool are present, honour them!
1992 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1993 cp $export_symbols $output_objdir/$soname-def;
1995 echo EXPORTS > $output_objdir/$soname-def;
1997 cat $export_symbols | while read symbol; do
2000 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2001 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2003 _lt_hint=`expr 1 + \$_lt_hint`;
2007 $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~
2008 $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~
2009 $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~
2010 $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~
2011 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2015 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2016 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2019 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2020 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2025 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2029 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
2030 *** create shared libraries on Solaris systems. Therefore, libtool
2031 *** is disabling shared libraries support. We urge you to upgrade GNU
2032 *** binutils to release 2.9.1 or newer. Another option is to modify
2033 *** your PATH or compiler configuration so that the native linker is
2034 *** used, and then restart.
2037 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2038 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2039 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2046 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2049 hardcode_shlibpath_var=no
2053 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2054 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2055 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2062 if test "$ld_shlibs" = yes; then
2063 runpath_var=LD_RUN_PATH
2064 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2065 export_dynamic_flag_spec='${wl}--export-dynamic'
2067 cygwin* | mingw* | pw32*)
2068 # dlltool doesn't understand --whole-archive et. al.
2069 whole_archive_flag_spec=
2072 # ancient GNU ld didn't support --whole-archive et. al.
2073 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2074 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2076 whole_archive_flag_spec=
2082 # PORTME fill in a description of your system's linker (not GNU ld)
2085 allow_undefined_flag=unsupported
2086 always_export_symbols=yes
2087 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'
2088 # Note: this linker hardcodes the directories in LIBPATH if there
2089 # are no directories specified by -L.
2090 hardcode_minus_L=yes
2091 if test "$GCC" = yes && test -z "$link_static_flag"; then
2092 # Neither direct hardcoding nor static linking is supported with a
2094 hardcode_direct=unsupported
2099 if test "$host_cpu" = ia64; then
2100 # On IA64, the linker does run time linking by default, so we don't
2101 # have to do anything special.
2102 aix_use_runtimelinking=no
2103 exp_sym_flag='-Bexport'
2106 aix_use_runtimelinking=no
2108 # Test if we are trying to use run time linking or normal
2109 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2110 # need to do runtime linking.
2111 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2112 for ld_flag in $LDFLAGS; do
2113 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2114 aix_use_runtimelinking=yes
2120 exp_sym_flag='-bexport'
2121 no_entry_flag='-bnoentry'
2124 # When large executables or shared objects are built, AIX ld can
2125 # have problems creating the table of contents. If linking a library
2126 # or program results in "error TOC overflow" add -mminimal-toc to
2127 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2128 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2132 hardcode_libdir_separator=':'
2133 if test "$GCC" = yes; then
2134 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2135 collect2name=`${CC} -print-prog-name=collect2`
2136 if test -f "$collect2name" && \
2137 strings "$collect2name" | grep resolve_lib_name >/dev/null
2139 # We have reworked collect2
2142 # We have old collect2
2143 hardcode_direct=unsupported
2144 # It fails to find uninstalled libraries when the uninstalled
2145 # path is not listed in the libpath. Setting hardcode_minus_L
2146 # to unsupported forces relinking
2147 hardcode_minus_L=yes
2148 hardcode_libdir_flag_spec='-L$libdir'
2149 hardcode_libdir_separator=
2153 shared_flag='-shared'
2156 if test "$host_cpu" = ia64; then
2157 shared_flag='${wl}-G'
2159 if test "$aix_use_runtimelinking" = yes; then
2160 shared_flag='${wl}-G'
2162 shared_flag='${wl}-bM:SRE'
2167 # It seems that -bexpall can do strange things, so it is better to
2168 # generate a list of symbols to export.
2169 always_export_symbols=yes
2170 if test "$aix_use_runtimelinking" = yes; then
2171 # Warning - without using the other runtime loading flags (-brtl),
2172 # -berok will link without error, but may produce a broken library.
2173 allow_undefined_flag='-berok'
2174 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2175 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"
2177 if test "$host_cpu" = ia64; then
2178 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2179 allow_undefined_flag="-z nodefs"
2180 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"
2182 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2183 # Warning - without using the other run time loading flags,
2184 # -berok will link without error, but may produce a broken library.
2185 allow_undefined_flag='${wl}-berok'
2186 # This is a bit strange, but is similar to how AIX traditionally builds
2187 # it's shared libraries.
2188 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'
2194 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)'
2195 hardcode_libdir_flag_spec='-L$libdir'
2196 hardcode_minus_L=yes
2197 # see comment about different semantics on the GNU ld section
2201 cygwin* | mingw* | pw32*)
2202 # When not using gcc, we currently assume that we are using
2203 # Microsoft Visual C++.
2204 # hardcode_libdir_flag_spec is actually meaningless, as there is
2205 # no search path for DLLs.
2206 hardcode_libdir_flag_spec=' '
2207 allow_undefined_flag=unsupported
2208 # Tell ltmain to make .lib files, not .a files.
2210 # FIXME: Setting linknames here is a bad hack.
2211 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2212 # The linker will automatically build a .lib file if we build a DLL.
2213 old_archive_from_new_cmds='true'
2214 # FIXME: Should let the user specify the lib program.
2215 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2216 fix_srcfile_path='`cygpath -w "$srcfile"`'
2219 darwin* | rhapsody*)
2221 rhapsody* | darwin1.[[012]])
2222 allow_undefined_flag='-undefined suppress'
2225 allow_undefined_flag='-flat_namespace -undefined suppress'
2228 # FIXME: Relying on posixy $() will cause problems for
2229 # cross-compilation, but unfortunately the echo tests do not
2230 # yet detect zsh echo's removal of \ escapes.
2231 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'
2232 # We need to add '_' to the symbols in $export_symbols first
2233 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2235 hardcode_shlibpath_var=no
2236 whole_archive_flag_spec='-all_load $convenience'
2243 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2244 # support. Future versions do this automatically, but an explicit c++rt0.o
2245 # does not break anything, and helps significantly (at the cost of a little
2248 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2249 hardcode_libdir_flag_spec='-R$libdir'
2251 hardcode_shlibpath_var=no
2254 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2256 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2258 hardcode_minus_L=yes
2259 hardcode_shlibpath_var=no
2262 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2264 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2265 hardcode_libdir_flag_spec='-R$libdir'
2267 hardcode_shlibpath_var=no
2270 hpux9* | hpux10* | hpux11*)
2272 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' ;;
2273 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2275 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2276 hardcode_libdir_separator=:
2278 hardcode_minus_L=yes # Not in the search PATH, but as the default
2279 # location of the library.
2280 export_dynamic_flag_spec='${wl}-E'
2284 if test "$GCC" = yes; then
2285 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'
2287 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'
2289 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2290 hardcode_libdir_separator=:
2291 link_all_deplibs=yes
2295 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2296 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2298 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2300 hardcode_libdir_flag_spec='-R$libdir'
2302 hardcode_shlibpath_var=no
2306 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2308 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2309 hardcode_libdir_separator=:
2310 hardcode_shlibpath_var=no
2315 hardcode_shlibpath_var=no
2316 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2317 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2318 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2319 export_dynamic_flag_spec='${wl}-E'
2322 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2323 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2324 hardcode_libdir_flag_spec='-R$libdir'
2327 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2328 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2335 hardcode_libdir_flag_spec='-L$libdir'
2336 hardcode_minus_L=yes
2337 allow_undefined_flag=unsupported
2338 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'
2339 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2343 if test "$GCC" = yes; then
2344 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2345 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'
2347 allow_undefined_flag=' -expect_unresolved \*'
2348 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'
2350 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2351 hardcode_libdir_separator=:
2354 osf4* | osf5*) # as osf3* with the addition of -msym flag
2355 if test "$GCC" = yes; then
2356 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2357 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'
2358 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2360 allow_undefined_flag=' -expect_unresolved \*'
2361 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'
2362 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2363 $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'
2365 #Both c and cxx compiler support -rpath directly
2366 hardcode_libdir_flag_spec='-rpath $libdir'
2368 hardcode_libdir_separator=:
2372 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2373 hardcode_shlibpath_var=no
2374 runpath_var=LD_RUN_PATH
2375 hardcode_runpath_var=yes
2376 export_dynamic_flag_spec='${wl}-Bexport'
2380 # gcc --version < 3.0 without binutils cannot create self contained
2381 # shared libraries reliably, requiring libgcc.a to resolve some of
2382 # the object symbols generated in some cases. Libraries that use
2383 # assert need libgcc.a to resolve __eprintf, for example. Linking
2384 # a copy of libgcc.a into every shared library to guarantee resolving
2385 # such symbols causes other problems: According to Tim Van Holder
2386 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2387 # (to the application) exception stack for one thing.
2388 no_undefined_flag=' -z defs'
2389 if test "$GCC" = yes; then
2390 case `$CC --version 2>/dev/null` in
2394 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2395 *** create self contained shared libraries on Solaris systems, without
2396 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2397 *** -no-undefined support, which will at least allow you to build shared
2398 *** libraries. However, you may find that when you link such libraries
2399 *** into an application without using GCC, you have to manually add
2400 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2401 *** upgrade to a newer version of GCC. Another option is to rebuild your
2402 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2409 # $CC -shared without GNU ld will not create a library from C++
2410 # object files and a static libstdc++, better avoid it by now
2411 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2412 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2413 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2414 hardcode_libdir_flag_spec='-R$libdir'
2415 hardcode_shlibpath_var=no
2417 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2418 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2419 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2421 link_all_deplibs=yes
2425 if test "x$host_vendor" = xsequent; then
2426 # Use $CC to link under sequent, because it throws in some extra .o
2427 # files that make .init and .fini sections work.
2428 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2430 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2432 hardcode_libdir_flag_spec='-L$libdir'
2434 hardcode_minus_L=yes
2435 hardcode_shlibpath_var=no
2439 if test "x$host_vendor" = xsno; then
2440 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2441 hardcode_direct=yes # is this really true???
2443 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2444 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2446 runpath_var='LD_RUN_PATH'
2447 hardcode_shlibpath_var=no
2451 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2452 hardcode_shlibpath_var=no
2453 export_dynamic_flag_spec='-Bexport'
2457 no_undefined_flag=' -z text'
2458 # $CC -shared without GNU ld will not create a library from C++
2459 # object files and a static libstdc++, better avoid it by now
2460 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2461 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2462 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2463 hardcode_libdir_flag_spec=
2464 hardcode_shlibpath_var=no
2465 runpath_var='LD_RUN_PATH'
2469 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2470 hardcode_libdir_flag_spec='-L$libdir'
2471 hardcode_shlibpath_var=no
2475 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2476 hardcode_libdir_flag_spec='-L$libdir'
2477 hardcode_shlibpath_var=no
2481 if test -d /usr/nec; then
2482 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2483 hardcode_shlibpath_var=no
2484 runpath_var=LD_RUN_PATH
2485 hardcode_runpath_var=yes
2491 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2494 hardcode_shlibpath_var=no
2495 hardcode_runpath_var=yes
2496 runpath_var=LD_RUN_PATH
2499 sysv5uw7* | unixware7*)
2500 no_undefined_flag='${wl}-z ${wl}text'
2501 if test "$GCC" = yes; then
2502 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2504 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2506 runpath_var='LD_RUN_PATH'
2507 hardcode_shlibpath_var=no
2515 AC_MSG_RESULT([$ld_shlibs])
2516 test "$ld_shlibs" = no && can_build_shared=no
2518 # Check hardcoding attributes.
2519 AC_MSG_CHECKING([how to hardcode library paths into programs])
2521 if test -n "$hardcode_libdir_flag_spec" || \
2522 test -n "$runpath_var"; then
2524 # We can hardcode non-existant directories.
2525 if test "$hardcode_direct" != no &&
2526 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2527 # have to relink, otherwise we might link with an installed library
2528 # when we should be linking with a yet-to-be-installed one
2529 ## test "$hardcode_shlibpath_var" != no &&
2530 test "$hardcode_minus_L" != no; then
2531 # Linking always hardcodes the temporary library directory.
2532 hardcode_action=relink
2534 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2535 hardcode_action=immediate
2538 # We cannot hardcode anything, or else we can only hardcode existing
2540 hardcode_action=unsupported
2542 AC_MSG_RESULT([$hardcode_action])
2546 AC_MSG_CHECKING([whether stripping libraries is possible])
2547 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2548 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2549 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2550 AC_MSG_RESULT([yes])
2555 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2556 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2558 # PORTME Fill in your ld.so characteristics
2559 AC_MSG_CHECKING([dynamic linker characteristics])
2561 libname_spec='lib$name'
2568 shlibpath_overrides_runpath=unknown
2570 dynamic_linker="$host_os ld.so"
2571 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2572 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2577 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2578 shlibpath_var=LIBPATH
2580 # AIX has no versioning support, so we append a major version to the name.
2581 soname_spec='${libname}${release}.so$major'
2586 if test "$host_cpu" = ia64; then
2587 # AIX 5 supports IA64
2588 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2589 shlibpath_var=LD_LIBRARY_PATH
2591 # With GCC up to 2.95.x, collect2 would create an import file
2592 # for dependence libraries. The import file would start with
2593 # the line `#! .'. This would cause the generated library to
2594 # depend on `.', always an invalid library. This was fixed in
2595 # development snapshots of GCC prior to 3.0.
2597 aix4 | aix4.[[01]] | aix4.[[01]].*)
2598 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2600 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2607 # AIX (on Power*) has no versioning support, so currently we can
2608 # not hardcode correct soname into executable. Probably we can
2609 # add versioning support to collect2, so additional links can
2610 # be useful in future.
2611 if test "$aix_use_runtimelinking" = yes; then
2612 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2613 # instead of lib<name>.a to let people know that these are not
2614 # typical AIX shared libraries.
2615 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2617 # We preserve .a as extension for shared libraries through AIX4.2
2618 # and later when we are not doing run time linking.
2619 library_names_spec='${libname}${release}.a $libname.a'
2620 soname_spec='${libname}${release}.so$major'
2622 shlibpath_var=LIBPATH
2627 library_names_spec='$libname.ixlibrary $libname.a'
2628 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2629 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'
2633 library_names_spec='${libname}.so'
2634 dynamic_linker="$host_os ld.so"
2635 shlibpath_var=LIBRARY_PATH
2641 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2642 soname_spec='${libname}${release}.so$major'
2643 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2644 shlibpath_var=LD_LIBRARY_PATH
2645 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2646 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2647 export_dynamic_flag_spec=-rdynamic
2648 # the default ld.so.conf also contains /usr/contrib/lib and
2649 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2650 # libtool to hard-code these into programs
2653 cygwin* | mingw* | pw32*)
2654 version_type=windows
2657 case $GCC,$host_os in
2659 library_names_spec='$libname.dll.a'
2660 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2661 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2662 dldir=$destdir/`dirname \$dlpath`~
2663 test -d \$dldir || mkdir -p \$dldir~
2664 $install_prog .libs/$dlname \$dldir/$dlname'
2665 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2666 dlpath=$dir/\$dldll~
2670 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2671 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2674 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2677 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2680 dynamic_linker='Win32 ld.exe'
2681 # FIXME: first we should search . and the directory the executable is in
2685 darwin* | rhapsody*)
2686 dynamic_linker="$host_os dyld"
2690 # FIXME: Relying on posixy $() will cause problems for
2691 # cross-compilation, but unfortunately the echo tests do not
2692 # yet detect zsh echo's removal of \ escapes.
2693 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)'
2694 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2695 shlibpath_overrides_runpath=yes
2696 shlibpath_var=DYLD_LIBRARY_PATH
2704 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2705 version_type=freebsd-$objformat
2706 case $version_type in
2708 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2713 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2717 shlibpath_var=LD_LIBRARY_PATH
2720 shlibpath_overrides_runpath=yes
2723 shlibpath_overrides_runpath=no
2724 hardcode_into_libs=yes
2733 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2734 soname_spec='${libname}${release}.so$major'
2735 shlibpath_var=LD_LIBRARY_PATH
2736 hardcode_into_libs=yes
2739 hpux9* | hpux10* | hpux11*)
2740 # Give a soname corresponding to the major version so that dld.sl refuses to
2741 # link against other versions.
2742 dynamic_linker="$host_os dld.sl"
2746 shlibpath_var=SHLIB_PATH
2747 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2748 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2749 soname_spec='${libname}${release}.sl$major'
2750 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2751 postinstall_cmds='chmod 555 $lib'
2758 soname_spec='${libname}${release}.so$major'
2759 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2765 case $LD in # libtool.m4 will add one of these switches to LD
2766 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2767 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2768 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2769 *) libsuff= shlibsuff= libmagic=never-match;;
2773 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2774 shlibpath_overrides_runpath=no
2775 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2776 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2779 # No shared lib support for Linux oldld, aout, or coff.
2780 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2784 # This must be Linux ELF.
2789 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2790 soname_spec='${libname}${release}.so$major'
2791 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2792 shlibpath_var=LD_LIBRARY_PATH
2793 shlibpath_overrides_runpath=no
2794 # This implies no fast_install, which is unacceptable.
2795 # Some rework will be needed to allow for fast_install
2796 # before this can be enabled.
2797 hardcode_into_libs=yes
2799 # We used to test for /lib/ld.so.1 and disable shared libraries on
2800 # powerpc, because MkLinux only supported shared libraries with the
2801 # GNU dynamic linker. Since this was broken with cross compilers,
2802 # most powerpc-linux boxes support dynamic linking these days and
2803 # people can always --disable-shared, the test was removed, and we
2804 # assume the GNU/Linux dynamic linker is in use.
2805 dynamic_linker='GNU/Linux ld.so'
2812 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2813 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2814 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2815 dynamic_linker='NetBSD (a.out) ld.so'
2817 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2818 soname_spec='${libname}${release}.so$major'
2819 dynamic_linker='NetBSD ld.elf_so'
2821 shlibpath_var=LD_LIBRARY_PATH
2822 shlibpath_overrides_runpath=yes
2823 hardcode_into_libs=yes
2828 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2829 shlibpath_var=LD_LIBRARY_PATH
2830 shlibpath_overrides_runpath=yes
2837 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2839 openbsd2.[[89]] | openbsd2.[[89]].*)
2840 shlibpath_overrides_runpath=no
2843 shlibpath_overrides_runpath=yes
2847 shlibpath_overrides_runpath=yes
2849 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2850 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2851 shlibpath_var=LD_LIBRARY_PATH
2855 libname_spec='$name'
2857 library_names_spec='$libname.dll $libname.a'
2858 dynamic_linker='OS/2 ld.exe'
2859 shlibpath_var=LIBPATH
2862 osf3* | osf4* | osf5*)
2865 soname_spec='${libname}${release}.so'
2866 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2867 shlibpath_var=LD_LIBRARY_PATH
2868 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2869 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2874 soname_spec='${libname}${release}.so$major'
2875 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2876 shlibpath_var=LD_LIBRARY_PATH
2883 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2884 soname_spec='${libname}${release}.so$major'
2885 shlibpath_var=LD_LIBRARY_PATH
2886 shlibpath_overrides_runpath=yes
2887 hardcode_into_libs=yes
2888 # ldd complains unless libraries are executable
2889 postinstall_cmds='chmod +x $lib'
2894 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2895 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2896 shlibpath_var=LD_LIBRARY_PATH
2897 shlibpath_overrides_runpath=yes
2898 if test "$with_gnu_ld" = yes; then
2904 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2906 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2907 soname_spec='${libname}${release}.so$major'
2908 shlibpath_var=LD_LIBRARY_PATH
2909 case $host_vendor in
2911 shlibpath_overrides_runpath=no
2916 shlibpath_overrides_runpath=no
2917 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2924 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2925 soname_spec='${libname}${release}.so$major'
2926 shlibpath_var=LD_LIBRARY_PATH
2933 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2934 soname_spec='${libname}${release}.so$major'
2935 shlibpath_var=LD_LIBRARY_PATH
2939 if test -d /usr/nec ;then
2941 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2942 soname_spec='$libname.so.$major'
2943 shlibpath_var=LD_LIBRARY_PATH
2951 AC_MSG_RESULT([$dynamic_linker])
2952 test "$dynamic_linker" = no && can_build_shared=no
2954 # Report the final consequences.
2955 AC_MSG_CHECKING([if libtool supports shared libraries])
2956 AC_MSG_RESULT([$can_build_shared])
2958 AC_MSG_CHECKING([whether to build shared libraries])
2959 test "$can_build_shared" = "no" && enable_shared=no
2961 # On AIX, shared libraries and static libraries use the same namespace, and
2962 # are all built from PIC.
2965 test "$enable_shared" = yes && enable_static=no
2966 if test -n "$RANLIB"; then
2967 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2968 postinstall_cmds='$RANLIB $lib'
2973 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2974 test "$enable_shared" = yes && enable_static=no
2978 AC_MSG_RESULT([$enable_shared])
2980 AC_MSG_CHECKING([whether to build static libraries])
2981 # Make sure either enable_shared or enable_static is yes.
2982 test "$enable_shared" = yes || enable_static=yes
2983 AC_MSG_RESULT([$enable_static])
2985 if test "$hardcode_action" = relink; then
2986 # Fast installation is not supported
2987 enable_fast_install=no
2988 elif test "$shlibpath_overrides_runpath" = yes ||
2989 test "$enable_shared" = no; then
2990 # Fast installation is not necessary
2991 enable_fast_install=needless
2994 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2995 if test "$GCC" = yes; then
2996 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2999 AC_LIBTOOL_DLOPEN_SELF
3001 if test "$enable_shared" = yes && test "$GCC" = yes; then
3002 case $archive_cmds in
3004 # FIXME: we may have to deal with multi-command sequences.
3007 # Test whether the compiler implicitly links with -lc since on some
3008 # systems, -lgcc has to come before -lc. If gcc already passes -lc
3009 # to ld, don't add -lc before -lgcc.
3010 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3011 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3013 echo 'static int dummy;' > conftest.$ac_ext
3015 if AC_TRY_EVAL(ac_compile); then
3018 libobjs=conftest.$ac_objext
3020 wl=$lt_cv_prog_cc_wl
3026 save_allow_undefined_flag=$allow_undefined_flag
3027 allow_undefined_flag=
3028 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3030 lt_cv_archive_cmds_need_lc=no
3032 lt_cv_archive_cmds_need_lc=yes
3034 allow_undefined_flag=$save_allow_undefined_flag
3036 cat conftest.err 1>&5
3038 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3042 need_lc=${lt_cv_archive_cmds_need_lc-yes}
3044 # The second clause should only fire when bootstrapping the
3045 # libtool distribution, otherwise you forgot to ship ltmain.sh
3046 # with your package, and you will get complaints that there are
3047 # no rules to generate ltmain.sh.
3048 if test -f "$ltmain"; then
3051 # If there is no Makefile yet, we rely on a make rule to execute
3052 # `config.status --recheck' to rerun these tests and create the
3053 # libtool script then.
3054 test -f Makefile && make "$ltmain"
3057 if test -f "$ltmain"; then
3058 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3061 echo creating $ofile
3063 # Now quote all the things that may contain metacharacters while being
3064 # careful not to overquote the AC_SUBSTed values. We take copies of the
3065 # variables and quote the copies for generation of the libtool script.
3066 for var in echo old_CC old_CFLAGS \
3067 AR AR_FLAGS CC LD LN_S NM SHELL \
3068 reload_flag reload_cmds wl \
3069 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3070 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3071 library_names_spec soname_spec \
3072 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3073 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3074 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3075 old_striplib striplib file_magic_cmd export_symbols_cmds \
3076 deplibs_check_method allow_undefined_flag no_undefined_flag \
3077 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3078 global_symbol_to_c_name_address \
3079 hardcode_libdir_flag_spec hardcode_libdir_separator \
3080 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3081 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3084 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3085 old_postinstall_cmds | old_postuninstall_cmds | \
3086 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3087 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3088 postinstall_cmds | postuninstall_cmds | \
3089 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3090 # Double-quote double-evaled strings.
3091 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3094 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3099 cat <<__EOF__ > "${ofile}T"
3102 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3103 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3104 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3106 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3107 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3109 # This program is free software; you can redistribute it and/or modify
3110 # it under the terms of the GNU General Public License as published by
3111 # the Free Software Foundation; either version 2 of the License, or
3112 # (at your option) any later version.
3114 # This program is distributed in the hope that it will be useful, but
3115 # WITHOUT ANY WARRANTY; without even the implied warranty of
3116 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3117 # General Public License for more details.
3119 # You should have received a copy of the GNU General Public License
3120 # along with this program; if not, write to the Free Software
3121 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3123 # As a special exception to the GNU General Public License, if you
3124 # distribute this file as part of a program that contains a
3125 # configuration script generated by Autoconf, you may include it under
3126 # the same distribution terms that you use for the rest of that program.
3128 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3129 Xsed="sed -e s/^X//"
3131 # The HP-UX ksh and POSIX shell print the target directory to stdout
3133 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3135 # ### BEGIN LIBTOOL CONFIG
3137 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3139 # Shell to use when invoking shell scripts.
3142 # Whether or not to build shared libraries.
3143 build_libtool_libs=$enable_shared
3145 # Whether or not to build static libraries.
3146 build_old_libs=$enable_static
3148 # Whether or not to add -lc for building shared libraries.
3149 build_libtool_need_lc=$need_lc
3151 # Whether or not to optimize for fast installation.
3152 fast_install=$enable_fast_install
3155 host_alias=$host_alias
3158 # An echo program that does not interpret backslashes.
3163 AR_FLAGS=$lt_AR_FLAGS
3165 # The default C compiler.
3168 # Is the compiler the GNU C compiler?
3171 # The linker used to build libraries.
3174 # Whether we need hard or soft links.
3177 # A BSD-compatible nm program.
3180 # A symbol stripping program
3183 # Used to examine libraries when file_magic_cmd begins "file"
3184 MAGIC_CMD=$MAGIC_CMD
3186 # Used on cygwin: DLL creation program.
3189 # Used on cygwin: object dumper.
3192 # Used on cygwin: assembler.
3195 # The name of the directory that contains temporary libtool files.
3198 # How to create reloadable object files.
3199 reload_flag=$lt_reload_flag
3200 reload_cmds=$lt_reload_cmds
3202 # How to pass a linker flag through the compiler.
3205 # Object file suffix (normally "o").
3208 # Old archive suffix (normally "a").
3211 # Executable file suffix (normally "").
3214 # Additional compiler flags for building library objects.
3215 pic_flag=$lt_pic_flag
3218 # Does compiler simultaneously support -c and -o options?
3219 compiler_c_o=$lt_compiler_c_o
3221 # Can we write directly to a .lo ?
3222 compiler_o_lo=$lt_compiler_o_lo
3224 # Must we lock files when doing compilation ?
3225 need_locks=$lt_need_locks
3227 # Do we need the lib prefix for modules?
3228 need_lib_prefix=$need_lib_prefix
3230 # Do we need a version for libraries?
3231 need_version=$need_version
3233 # Whether dlopen is supported.
3234 dlopen_support=$enable_dlopen
3236 # Whether dlopen of programs is supported.
3237 dlopen_self=$enable_dlopen_self
3239 # Whether dlopen of statically linked programs is supported.
3240 dlopen_self_static=$enable_dlopen_self_static
3242 # Compiler flag to prevent dynamic linking.
3243 link_static_flag=$lt_link_static_flag
3245 # Compiler flag to turn off builtin functions.
3246 no_builtin_flag=$lt_no_builtin_flag
3248 # Compiler flag to allow reflexive dlopens.
3249 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3251 # Compiler flag to generate shared objects directly from archives.
3252 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3254 # Compiler flag to generate thread-safe objects.
3255 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3257 # Library versioning type.
3258 version_type=$version_type
3260 # Format of library name prefix.
3261 libname_spec=$lt_libname_spec
3263 # List of archive names. First name is the real one, the rest are links.
3264 # The last name is the one that the linker finds with -lNAME.
3265 library_names_spec=$lt_library_names_spec
3267 # The coded name of the library, if different from the real name.
3268 soname_spec=$lt_soname_spec
3270 # Commands used to build and install an old-style archive.
3272 old_archive_cmds=$lt_old_archive_cmds
3273 old_postinstall_cmds=$lt_old_postinstall_cmds
3274 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3276 # Create an old-style archive from a shared archive.
3277 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3279 # Create a temporary old-style archive to link instead of a shared archive.
3280 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3282 # Commands used to build and install a shared archive.
3283 archive_cmds=$lt_archive_cmds
3284 archive_expsym_cmds=$lt_archive_expsym_cmds
3285 postinstall_cmds=$lt_postinstall_cmds
3286 postuninstall_cmds=$lt_postuninstall_cmds
3288 # Commands to strip libraries.
3289 old_striplib=$lt_old_striplib
3290 striplib=$lt_striplib
3292 # Method to check whether dependent libraries are shared objects.
3293 deplibs_check_method=$lt_deplibs_check_method
3295 # Command to use when deplibs_check_method == file_magic.
3296 file_magic_cmd=$lt_file_magic_cmd
3298 # Flag that allows shared libraries with undefined symbols to be built.
3299 allow_undefined_flag=$lt_allow_undefined_flag
3301 # Flag that forces no undefined symbols.
3302 no_undefined_flag=$lt_no_undefined_flag
3304 # Commands used to finish a libtool library installation in a directory.
3305 finish_cmds=$lt_finish_cmds
3307 # Same as above, but a single script fragment to be evaled but not shown.
3308 finish_eval=$lt_finish_eval
3310 # Take the output of nm and produce a listing of raw symbols and C names.
3311 global_symbol_pipe=$lt_global_symbol_pipe
3313 # Transform the output of nm in a proper C declaration
3314 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3316 # Transform the output of nm in a C name address pair
3317 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3319 # This is the shared library runtime path variable.
3320 runpath_var=$runpath_var
3322 # This is the shared library path variable.
3323 shlibpath_var=$shlibpath_var
3325 # Is shlibpath searched before the hard-coded library search path?
3326 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3328 # How to hardcode a shared library path into an executable.
3329 hardcode_action=$hardcode_action
3331 # Whether we should hardcode library paths into libraries.
3332 hardcode_into_libs=$hardcode_into_libs
3334 # Flag to hardcode \$libdir into a binary during linking.
3335 # This must work even if \$libdir does not exist.
3336 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3338 # Whether we need a single -rpath flag with a separated argument.
3339 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3341 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3343 hardcode_direct=$hardcode_direct
3345 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3347 hardcode_minus_L=$hardcode_minus_L
3349 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3350 # the resulting binary.
3351 hardcode_shlibpath_var=$hardcode_shlibpath_var
3353 # Variables whose values should be saved in libtool wrapper scripts and
3354 # restored at relink time.
3355 variables_saved_for_relink="$variables_saved_for_relink"
3357 # Whether libtool must link a program against all its dependency libraries.
3358 link_all_deplibs=$link_all_deplibs
3360 # Compile-time system search path for libraries
3361 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3363 # Run-time system search path for libraries
3364 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3366 # Fix the shell variable \$srcfile for the compiler.
3367 fix_srcfile_path="$fix_srcfile_path"
3369 # Set to yes if exported symbols are required.
3370 always_export_symbols=$always_export_symbols
3372 # The commands to list exported symbols.
3373 export_symbols_cmds=$lt_export_symbols_cmds
3375 # The commands to extract the exported symbol list from a shared archive.
3376 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3378 # Symbols that should not be listed in the preloaded symbols.
3379 exclude_expsyms=$lt_exclude_expsyms
3381 # Symbols that must always be exported.
3382 include_expsyms=$lt_include_expsyms
3384 # ### END LIBTOOL CONFIG
3390 cat <<\EOF >> "${ofile}T"
3392 # AIX sometimes has problems with the GCC collect2 program. For some
3393 # reason, if we set the COLLECT_NAMES environment variable, the problems
3394 # vanish in a puff of smoke.
3395 if test "X${COLLECT_NAMES+set}" != Xset; then
3397 export COLLECT_NAMES
3404 cygwin* | mingw* | pw32* | os2*)
3405 cat <<'EOF' >> "${ofile}T"
3406 # This is a source program that is used to create dlls on Windows
3407 # Don't remove nor modify the starting and closing comments
3408 # /* ltdll.c starts here */
3409 # #define WIN32_LEAN_AND_MEAN
3410 # #include <windows.h>
3411 # #undef WIN32_LEAN_AND_MEAN
3412 # #include <stdio.h>
3414 # #ifndef __CYGWIN__
3415 # # ifdef __CYGWIN32__
3416 # # define __CYGWIN__ __CYGWIN32__
3420 # #ifdef __cplusplus
3423 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3424 # #ifdef __cplusplus
3429 # #include <cygwin/cygwin_dll.h>
3430 # DECLARE_CYGWIN_DLL( DllMain );
3432 # HINSTANCE __hDllInstance_base;
3435 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3437 # __hDllInstance_base = hInst;
3440 # /* ltdll.c ends here */
3441 # This is a source program that is used to create import libraries
3442 # on Windows for dlls which lack them. Don't remove nor modify the
3443 # starting and closing comments
3444 # /* impgen.c starts here */
3445 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3447 # This file is part of GNU libtool.
3449 # This program is free software; you can redistribute it and/or modify
3450 # it under the terms of the GNU General Public License as published by
3451 # the Free Software Foundation; either version 2 of the License, or
3452 # (at your option) any later version.
3454 # This program is distributed in the hope that it will be useful,
3455 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3456 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3457 # GNU General Public License for more details.
3459 # You should have received a copy of the GNU General Public License
3460 # along with this program; if not, write to the Free Software
3461 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3464 # #include <stdio.h> /* for printf() */
3465 # #include <unistd.h> /* for open(), lseek(), read() */
3466 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3467 # #include <string.h> /* for strdup() */
3469 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3471 # #define O_BINARY 0
3474 # static unsigned int
3475 # pe_get16 (fd, offset)
3479 # unsigned char b[2];
3480 # lseek (fd, offset, SEEK_SET);
3482 # return b[0] + (b[1]<<8);
3485 # static unsigned int
3486 # pe_get32 (fd, offset)
3490 # unsigned char b[4];
3491 # lseek (fd, offset, SEEK_SET);
3493 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3496 # static unsigned int
3500 # unsigned char *b = ptr;
3501 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3510 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3511 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3512 # unsigned long name_rvas, nexp;
3513 # unsigned char *expdata, *erva;
3514 # char *filename, *dll_name;
3516 # filename = argv[1];
3518 # dll = open(filename, O_RDONLY|O_BINARY);
3522 # dll_name = filename;
3524 # for (i=0; filename[i]; i++)
3525 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3526 # dll_name = filename + i +1;
3528 # pe_header_offset = pe_get32 (dll, 0x3c);
3529 # opthdr_ofs = pe_header_offset + 4 + 20;
3530 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3532 # if (num_entries < 1) /* no exports */
3535 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3536 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3537 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3538 # secptr = (pe_header_offset + 4 + 20 +
3539 # pe_get16 (dll, pe_header_offset + 4 + 16));
3542 # for (i = 0; i < nsections; i++)
3545 # unsigned long secptr1 = secptr + 40 * i;
3546 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3547 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3548 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3549 # lseek(dll, secptr1, SEEK_SET);
3550 # read(dll, sname, 8);
3551 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3553 # expptr = fptr + (export_rva - vaddr);
3554 # if (export_rva + export_size > vaddr + vsize)
3555 # export_size = vsize - (export_rva - vaddr);
3560 # expdata = (unsigned char*)malloc(export_size);
3561 # lseek (dll, expptr, SEEK_SET);
3562 # read (dll, expdata, export_size);
3563 # erva = expdata - export_rva;
3565 # nexp = pe_as32 (expdata+24);
3566 # name_rvas = pe_as32 (expdata+32);
3568 # printf ("EXPORTS\n");
3569 # for (i = 0; i<nexp; i++)
3571 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3572 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3577 # /* impgen.c ends here */
3583 # We use sed instead of cat because bash on DJGPP gets confused if
3584 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3585 # text mode, it properly converts lines to CR/LF. This bash problem
3586 # is reportedly fixed, but why not run on old versions too?
3587 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3589 mv -f "${ofile}T" "$ofile" || \
3590 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3594 ])# _LT_AC_LTCONFIG_HACK
3596 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3597 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3599 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3600 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3602 # AC_ENABLE_SHARED - implement the --enable-shared flag
3603 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3604 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3606 AC_DEFUN([AC_ENABLE_SHARED],
3607 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3608 AC_ARG_ENABLE(shared,
3609 changequote(<<, >>)dnl
3610 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3611 changequote([, ])dnl
3612 [p=${PACKAGE-default}
3614 yes) enable_shared=yes ;;
3615 no) enable_shared=no ;;
3618 # Look at the argument we got. We use all the common list separators.
3619 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3620 for pkg in $enableval; do
3621 if test "X$pkg" = "X$p"; then
3628 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3631 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3632 AC_DEFUN([AC_DISABLE_SHARED],
3633 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3634 AC_ENABLE_SHARED(no)])
3636 # AC_ENABLE_STATIC - implement the --enable-static flag
3637 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3638 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3640 AC_DEFUN([AC_ENABLE_STATIC],
3641 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3642 AC_ARG_ENABLE(static,
3643 changequote(<<, >>)dnl
3644 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3645 changequote([, ])dnl
3646 [p=${PACKAGE-default}
3648 yes) enable_static=yes ;;
3649 no) enable_static=no ;;
3652 # Look at the argument we got. We use all the common list separators.
3653 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3654 for pkg in $enableval; do
3655 if test "X$pkg" = "X$p"; then
3662 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3665 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3666 AC_DEFUN([AC_DISABLE_STATIC],
3667 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3668 AC_ENABLE_STATIC(no)])
3671 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3672 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3673 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3675 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3676 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3677 AC_ARG_ENABLE(fast-install,
3678 changequote(<<, >>)dnl
3679 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3680 changequote([, ])dnl
3681 [p=${PACKAGE-default}
3683 yes) enable_fast_install=yes ;;
3684 no) enable_fast_install=no ;;
3686 enable_fast_install=no
3687 # Look at the argument we got. We use all the common list separators.
3688 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3689 for pkg in $enableval; do
3690 if test "X$pkg" = "X$p"; then
3691 enable_fast_install=yes
3697 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3700 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3701 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3702 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3703 AC_ENABLE_FAST_INSTALL(no)])
3705 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3706 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3707 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3709 AC_DEFUN([AC_LIBTOOL_PICMODE],
3710 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3711 pic_mode=ifelse($#,1,$1,default)])
3714 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3715 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3716 [AC_MSG_CHECKING([for $1])
3717 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3720 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3723 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3726 ac_save_MAGIC_CMD="$MAGIC_CMD"
3727 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3728 dnl $ac_dummy forces splitting on constant user-supplied paths.
3729 dnl POSIX.2 word splitting is done only on the output of word expansions,
3730 dnl not every word. This closes a longstanding sh security hole.
3731 ac_dummy="ifelse([$2], , $PATH, [$2])"
3732 for ac_dir in $ac_dummy; do
3733 test -z "$ac_dir" && ac_dir=.
3734 if test -f $ac_dir/$1; then
3735 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3736 if test -n "$file_magic_test_file"; then
3737 case $deplibs_check_method in
3739 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3740 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3741 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3742 egrep "$file_magic_regex" > /dev/null; then
3747 *** Warning: the command libtool uses to detect shared libraries,
3748 *** $file_magic_cmd, produces output that libtool cannot recognize.
3749 *** The result is that libtool may fail to recognize shared libraries
3750 *** as such. This will affect the creation of libtool libraries that
3751 *** depend on shared libraries, but programs linked with such libtool
3752 *** libraries will work regardless of this problem. Nevertheless, you
3753 *** may want to report the problem to your system manager and/or to
3754 *** bug-libtool@gnu.org
3764 MAGIC_CMD="$ac_save_MAGIC_CMD"
3767 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3768 if test -n "$MAGIC_CMD"; then
3769 AC_MSG_RESULT($MAGIC_CMD)
3776 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3777 AC_DEFUN([AC_PATH_MAGIC],
3778 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3779 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3780 if test -z "$lt_cv_path_MAGIC_CMD"; then
3781 if test -n "$ac_tool_prefix"; then
3782 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3790 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3791 AC_DEFUN([AC_PROG_LD],
3792 [AC_ARG_WITH(gnu-ld,
3793 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3794 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3795 AC_REQUIRE([AC_PROG_CC])dnl
3796 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3797 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3798 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3800 if test "$GCC" = yes; then
3801 # Check if gcc -print-prog-name=ld gives a path.
3802 AC_MSG_CHECKING([for ld used by GCC])
3805 # gcc leaves a trailing carriage return which upsets mingw
3806 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3808 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3811 # Accept absolute paths.
3812 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3813 re_direlt='/[[^/]][[^/]]*/\.\./'
3814 # Canonicalize the path of ld
3815 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3816 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3817 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3819 test -z "$LD" && LD="$ac_prog"
3822 # If it fails, then pretend we aren't using GCC.
3826 # If it is relative, then search for the first ld in PATH.
3830 elif test "$with_gnu_ld" = yes; then
3831 AC_MSG_CHECKING([for GNU ld])
3833 AC_MSG_CHECKING([for non-GNU ld])
3835 AC_CACHE_VAL(lt_cv_path_LD,
3836 [if test -z "$LD"; then
3837 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3838 for ac_dir in $PATH; do
3839 test -z "$ac_dir" && ac_dir=.
3840 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3841 lt_cv_path_LD="$ac_dir/$ac_prog"
3842 # Check to see if the program is GNU ld. I'd rather use --version,
3843 # but apparently some GNU ld's only accept -v.
3844 # Break only if it was the GNU/non-GNU ld that we prefer.
3845 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3846 test "$with_gnu_ld" != no && break
3848 test "$with_gnu_ld" != yes && break
3854 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3857 if test -n "$LD"; then
3862 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3867 AC_DEFUN([AC_PROG_LD_GNU],
3868 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3869 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3870 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3871 lt_cv_prog_gnu_ld=yes
3873 lt_cv_prog_gnu_ld=no
3875 with_gnu_ld=$lt_cv_prog_gnu_ld
3878 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3879 # -- PORTME Some linkers may need a different reload flag.
3880 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3881 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3882 [lt_cv_ld_reload_flag='-r'])
3883 reload_flag=$lt_cv_ld_reload_flag
3884 test -n "$reload_flag" && reload_flag=" $reload_flag"
3887 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3888 # -- PORTME fill in with the dynamic library characteristics
3889 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3890 [AC_CACHE_CHECK([how to recognise dependant libraries],
3891 lt_cv_deplibs_check_method,
3892 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3893 lt_cv_file_magic_test_file=
3894 lt_cv_deplibs_check_method='unknown'
3895 # Need to set the preceding variable on all platforms that support
3896 # interlibrary dependencies.
3897 # 'none' -- dependencies not supported.
3898 # `unknown' -- same as none, but documents that we really don't know.
3899 # 'pass_all' -- all dependencies passed with no checks.
3900 # 'test_compile' -- check by making test program.
3901 # 'file_magic [[regex]]' -- check by looking for files in library path
3902 # which responds to the $file_magic_cmd with a given egrep regex.
3903 # If you have `file' or equivalent on your system and you're not sure
3904 # whether `pass_all' will *always* work, you probably want this one.
3908 lt_cv_deplibs_check_method=pass_all
3912 lt_cv_deplibs_check_method=pass_all
3916 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3917 lt_cv_file_magic_cmd='/usr/bin/file -L'
3918 lt_cv_file_magic_test_file=/shlib/libc.so
3921 cygwin* | mingw* | pw32*)
3922 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3923 lt_cv_file_magic_cmd='$OBJDUMP -f'
3926 darwin* | rhapsody*)
3927 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3928 lt_cv_file_magic_cmd='/usr/bin/file -L'
3930 rhapsody* | darwin1.[[012]])
3931 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3934 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3940 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3943 # Not sure whether the presence of OpenBSD here was a mistake.
3944 # Let's accept both of them until this is cleared up.
3945 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3946 lt_cv_file_magic_cmd=/usr/bin/file
3947 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3951 lt_cv_deplibs_check_method=pass_all
3956 lt_cv_deplibs_check_method=pass_all
3960 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3961 lt_cv_file_magic_cmd=/usr/bin/file
3962 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3968 # this will be overridden with pass_all, but let us keep it just in case
3969 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3973 *-32|*"-32 ") libmagic=32-bit;;
3974 *-n32|*"-n32 ") libmagic=N32;;
3975 *-64|*"-64 ") libmagic=64-bit;;
3976 *) libmagic=never-match;;
3978 # this will be overridden with pass_all, but let us keep it just in case
3979 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3982 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3983 lt_cv_deplibs_check_method=pass_all
3986 # This must be Linux ELF.
3989 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
3990 lt_cv_deplibs_check_method=pass_all ;;
3992 # glibc up to 2.1.1 does not perform some relocations on ARM
3993 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3995 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3999 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4000 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4002 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4007 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4008 lt_cv_file_magic_cmd=/usr/bin/file
4009 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4013 lt_cv_file_magic_cmd=/usr/bin/file
4014 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4015 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4016 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4018 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4022 osf3* | osf4* | osf5*)
4023 # this will be overridden with pass_all, but let us keep it just in case
4024 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4025 lt_cv_file_magic_test_file=/shlib/libc.so
4026 lt_cv_deplibs_check_method=pass_all
4030 lt_cv_deplibs_check_method=pass_all
4034 lt_cv_deplibs_check_method=pass_all
4035 lt_cv_file_magic_test_file=/lib/libc.so
4038 sysv5uw[[78]]* | sysv4*uw2*)
4039 lt_cv_deplibs_check_method=pass_all
4042 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4043 case $host_vendor in
4045 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]]'
4046 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4049 lt_cv_deplibs_check_method=pass_all
4052 lt_cv_file_magic_cmd='/bin/file'
4053 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4056 lt_cv_file_magic_cmd='/bin/file'
4057 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4058 lt_cv_file_magic_test_file=/lib/libc.so
4064 file_magic_cmd=$lt_cv_file_magic_cmd
4065 deplibs_check_method=$lt_cv_deplibs_check_method
4069 # AC_PROG_NM - find the path to a BSD-compatible name lister
4070 AC_DEFUN([AC_PROG_NM],
4071 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4072 AC_MSG_CHECKING([for BSD-compatible nm])
4073 AC_CACHE_VAL(lt_cv_path_NM,
4074 [if test -n "$NM"; then
4075 # Let the user override the test.
4078 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4079 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4080 test -z "$ac_dir" && ac_dir=.
4081 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4082 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4083 # Check to see if the nm accepts a BSD-compat flag.
4084 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4085 # nm: unknown option "B" ignored
4086 # Tru64's nm complains that /dev/null is an invalid object file
4087 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4088 lt_cv_path_NM="$tmp_nm -B"
4090 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4091 lt_cv_path_NM="$tmp_nm -p"
4094 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4095 continue # so that we can try to find one that supports BSD flags
4100 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4103 AC_MSG_RESULT([$NM])
4106 # AC_CHECK_LIBM - check for math library
4107 AC_DEFUN([AC_CHECK_LIBM],
4108 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4111 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4112 # These system don't have libm
4115 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4116 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4119 AC_CHECK_LIB(m, main, LIBM="-lm")
4124 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4125 # the libltdl convenience library and INCLTDL to the include flags for
4126 # the libltdl header and adds --enable-ltdl-convenience to the
4127 # configure arguments. Note that LIBLTDL and INCLTDL are not
4128 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4129 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4130 # with '${top_builddir}/' and INCLTDL will be prefixed with
4131 # '${top_srcdir}/' (note the single quotes!). If your package is not
4132 # flat and you're not using automake, define top_builddir and
4133 # top_srcdir appropriately in the Makefiles.
4134 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4135 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4136 case $enable_ltdl_convenience in
4137 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4138 "") enable_ltdl_convenience=yes
4139 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4141 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4142 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4145 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4146 # the libltdl installable library and INCLTDL to the include flags for
4147 # the libltdl header and adds --enable-ltdl-install to the configure
4148 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4149 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4150 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4151 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4152 # with '${top_srcdir}/' (note the single quotes!). If your package is
4153 # not flat and you're not using automake, define top_builddir and
4154 # top_srcdir appropriately in the Makefiles.
4155 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4156 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4157 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4158 AC_CHECK_LIB(ltdl, main,
4159 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4160 [if test x"$enable_ltdl_install" = xno; then
4161 AC_MSG_WARN([libltdl not installed, but installation disabled])
4163 enable_ltdl_install=yes
4166 if test x"$enable_ltdl_install" = x"yes"; then
4167 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4168 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4169 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4171 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4178 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4179 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4180 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4181 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4182 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4183 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4184 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4186 # This is just to silence aclocal about the macro not being used
4187 ifelse([AC_DISABLE_FAST_INSTALL])
4189 # From Jim Meyering. Use this if you use the GNU error.[ch].
4190 # FIXME: Migrate into libit
4192 AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
4193 [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
4194 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
4195 am_cv_lib_error_at_line=yes,
4196 am_cv_lib_error_at_line=no)])
4197 if test $am_cv_lib_error_at_line = no; then
4198 LIBOBJS="$LIBOBJS error.$ac_objext"
4200 AC_SUBST(LIBOBJS)dnl
4203 # gettext.m4 serial 13 (gettext-0.11.1)
4204 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
4205 dnl This file is free software, distributed under the terms of the GNU
4206 dnl General Public License. As a special exception to the GNU General
4207 dnl Public License, this file may be distributed as part of a program
4208 dnl that contains a configuration script generated by Autoconf, under
4209 dnl the same distribution terms as the rest of that program.
4211 dnl This file can can be used in projects which are not available under
4212 dnl the GNU General Public License or the GNU Library General Public
4213 dnl License but which still want to provide support for the GNU gettext
4215 dnl Please note that the actual code of the GNU gettext library is covered
4216 dnl by the GNU Library General Public License, and the rest of the GNU
4217 dnl gettext package package is covered by the GNU General Public License.
4218 dnl They are *not* in the public domain.
4221 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
4222 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
4224 dnl Macro to add for using GNU gettext.
4226 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
4227 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
4228 dnl default (if it is not specified or empty) is 'no-libtool'.
4229 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
4230 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
4231 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
4232 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
4233 dnl depending on --{enable,disable}-{shared,static} and on the presence of
4234 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
4235 dnl $(top_builddir)/intl/libintl.a will be created.
4236 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
4237 dnl implementations (in libc or libintl) without the ngettext() function
4238 dnl will be ignored.
4239 dnl INTLDIR is used to find the intl libraries. If empty,
4240 dnl the value `$(top_builddir)/intl/' is used.
4242 dnl The result of the configuration is one of three cases:
4243 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
4245 dnl Catalog format: GNU --> install in $(datadir)
4246 dnl Catalog extension: .mo after installation, .gmo in source tree
4247 dnl 2) GNU gettext has been found in the system's C library.
4248 dnl Catalog format: GNU --> install in $(datadir)
4249 dnl Catalog extension: .mo after installation, .gmo in source tree
4250 dnl 3) No internationalization, always use English msgid.
4251 dnl Catalog format: none
4252 dnl Catalog extension: none
4253 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
4254 dnl The use of .gmo is historical (it was needed to avoid overwriting the
4255 dnl GNU format catalogs when building on a platform with an X/Open gettext),
4256 dnl but we keep it in order not to force irrelevant filename changes on the
4259 AC_DEFUN([AM_GNU_GETTEXT],
4261 dnl Argument checking.
4262 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
4263 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
4265 ifelse([$2], [], , [ifelse([$2], [need-ngettext], ,
4266 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
4268 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
4269 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
4271 AC_REQUIRE([AM_PO_SUBDIRS])dnl
4272 ifelse(gt_included_intl, yes, [
4273 AC_REQUIRE([AM_INTL_SUBDIR])dnl
4276 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
4277 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4278 AC_REQUIRE([AC_LIB_RPATH])
4280 AC_MSG_CHECKING([whether NLS is requested])
4281 dnl Default is enabled NLS
4283 [ --disable-nls do not use Native Language Support],
4284 USE_NLS=$enableval, USE_NLS=yes)
4285 AC_MSG_RESULT($USE_NLS)
4288 ifelse(gt_included_intl, yes, [
4289 BUILD_INCLUDED_LIBINTL=no
4290 USE_INCLUDED_LIBINTL=no
4296 dnl If we use NLS figure out what method
4297 if test "$USE_NLS" = "yes"; then
4298 gt_use_preinstalled_gnugettext=no
4299 ifelse(gt_included_intl, yes, [
4300 AC_MSG_CHECKING([whether included gettext is requested])
4301 AC_ARG_WITH(included-gettext,
4302 [ --with-included-gettext use the GNU gettext library included here],
4303 nls_cv_force_use_gnu_gettext=$withval,
4304 nls_cv_force_use_gnu_gettext=no)
4305 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
4307 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
4308 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
4310 dnl User does not insist on using GNU NLS library. Figure out what
4311 dnl to use. If GNU gettext is available we use this. Else we have
4312 dnl to fall back to GNU NLS library.
4314 dnl Add a version number to the cache macros.
4315 define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1))
4316 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
4317 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
4319 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
4320 [AC_TRY_LINK([#include <libintl.h>
4321 extern int _nl_msg_cat_cntr;
4322 extern int *_nl_domain_bindings;],
4323 [bindtextdomain ("", "");
4324 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
4325 gt_cv_func_gnugettext_libc=yes,
4326 gt_cv_func_gnugettext_libc=no)])
4328 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
4329 dnl Sometimes libintl requires libiconv, so first search for libiconv.
4330 ifelse(gt_included_intl, yes, , [
4333 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
4334 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
4335 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
4336 dnl even if libiconv doesn't exist.
4337 AC_LIB_LINKFLAGS_BODY([intl])
4338 AC_CACHE_CHECK([for GNU gettext in libintl],
4339 gt_cv_func_gnugettext_libintl,
4340 [gt_save_CPPFLAGS="$CPPFLAGS"
4341 CPPFLAGS="$CPPFLAGS $INCINTL"
4342 gt_save_LIBS="$LIBS"
4343 LIBS="$LIBS $LIBINTL"
4344 dnl Now see whether libintl exists and does not depend on libiconv.
4345 AC_TRY_LINK([#include <libintl.h>
4346 extern int _nl_msg_cat_cntr;
4347 extern int *_nl_domain_bindings;
4352 const char *_nl_expand_alias ();],
4353 [bindtextdomain ("", "");
4354 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
4355 gt_cv_func_gnugettext_libintl=yes,
4356 gt_cv_func_gnugettext_libintl=no)
4357 dnl Now see whether libintl exists and depends on libiconv.
4358 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
4359 LIBS="$LIBS $LIBICONV"
4360 AC_TRY_LINK([#include <libintl.h>
4361 extern int _nl_msg_cat_cntr;
4362 extern int *_nl_domain_bindings;
4367 const char *_nl_expand_alias ();],
4368 [bindtextdomain ("", "");
4369 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
4370 [LIBINTL="$LIBINTL $LIBICONV"
4371 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
4372 gt_cv_func_gnugettext_libintl=yes
4375 CPPFLAGS="$gt_save_CPPFLAGS"
4376 LIBS="$gt_save_LIBS"])
4379 dnl If an already present or preinstalled GNU gettext() is found,
4380 dnl use it. But if this macro is used in GNU gettext, and GNU
4381 dnl gettext is already preinstalled in libintl, we update this
4382 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
4383 if test "$gt_cv_func_gnugettext_libc" = "yes" \
4384 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
4385 && test "$PACKAGE" != gettext; }; then
4386 gt_use_preinstalled_gnugettext=yes
4388 dnl Reset the values set by searching for libintl.
4394 ifelse(gt_included_intl, yes, [
4395 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
4396 dnl GNU gettext is not found in the C library.
4397 dnl Fall back on included GNU gettext library.
4398 nls_cv_use_gnu_gettext=yes
4402 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4403 dnl Mark actions used to generate GNU NLS library.
4404 INTLOBJS="\$(GETTOBJS)"
4405 BUILD_INCLUDED_LIBINTL=yes
4406 USE_INCLUDED_LIBINTL=yes
4407 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
4408 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
4409 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
4412 if test "$gt_use_preinstalled_gnugettext" = "yes" \
4413 || test "$nls_cv_use_gnu_gettext" = "yes"; then
4414 dnl Mark actions to use GNU gettext tools.
4419 if test "$gt_use_preinstalled_gnugettext" = "yes" \
4420 || test "$nls_cv_use_gnu_gettext" = "yes"; then
4421 AC_DEFINE(ENABLE_NLS, 1,
4422 [Define to 1 if translation of program messages to the user's native language
4429 if test "$USE_NLS" = "yes"; then
4431 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
4432 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
4433 AC_MSG_CHECKING([how to link with libintl])
4434 AC_MSG_RESULT([$LIBINTL])
4435 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
4438 dnl For backward compatibility. Some packages may be using this.
4439 AC_DEFINE(HAVE_GETTEXT, 1,
4440 [Define if the GNU gettext() function is already present or preinstalled.])
4441 AC_DEFINE(HAVE_DCGETTEXT, 1,
4442 [Define if the GNU dcgettext() function is already present or preinstalled.])
4445 dnl We need to process the po/ directory.
4449 ifelse(gt_included_intl, yes, [
4450 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
4451 dnl to 'yes' because some of the testsuite requires it.
4452 if test "$PACKAGE" = gettext; then
4453 BUILD_INCLUDED_LIBINTL=yes
4456 dnl Make all variables we use known to autoconf.
4457 AC_SUBST(BUILD_INCLUDED_LIBINTL)
4458 AC_SUBST(USE_INCLUDED_LIBINTL)
4462 dnl For backward compatibility. Some configure.ins may be using this.
4464 nls_cv_header_libgt=
4466 dnl For backward compatibility. Some Makefiles may be using this.
4468 AC_SUBST(DATADIRNAME)
4470 dnl For backward compatibility. Some Makefiles may be using this.
4472 AC_SUBST(INSTOBJEXT)
4474 dnl For backward compatibility. Some Makefiles may be using this.
4478 dnl Enable libtool support if the surrounding package wishes it.
4479 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
4480 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
4483 dnl For backward compatibility. Some Makefiles may be using this.
4487 dnl Make all documented variables known to autoconf.
4494 dnl Checks for all prerequisites of the po subdirectory,
4495 dnl except for USE_NLS.
4496 AC_DEFUN([AM_PO_SUBDIRS],
4498 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
4499 AC_REQUIRE([AC_PROG_INSTALL])dnl
4500 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
4502 dnl Perform the following tests also if --disable-nls has been given,
4503 dnl because they are needed for "make dist" to work.
4505 dnl Search for GNU msgfmt in the PATH.
4506 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
4507 dnl The second test excludes FreeBSD msgfmt.
4508 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
4509 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
4510 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
4512 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
4514 dnl Search for GNU xgettext 0.11 or newer in the PATH.
4515 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
4516 dnl The second test excludes FreeBSD xgettext.
4517 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
4518 [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
4519 (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
4521 dnl Remove leftover from FreeBSD xgettext call.
4524 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
4525 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
4526 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
4528 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
4529 dnl Test whether we really found GNU msgfmt.
4530 if test "$GMSGFMT" != ":"; then
4531 dnl If it is no GNU msgfmt we define it as : so that the
4532 dnl Makefiles still can work.
4533 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
4534 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
4537 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
4539 [found $GMSGFMT program is not GNU msgfmt; ignore it])
4544 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
4545 dnl Test whether we really found GNU xgettext.
4546 if test "$XGETTEXT" != ":"; then
4547 dnl If it is no GNU xgettext we define it as : so that the
4548 dnl Makefiles still can work.
4549 if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
4550 (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
4554 [found xgettext program is not GNU xgettext; ignore it])
4557 dnl Remove leftover from FreeBSD xgettext call.
4561 AC_OUTPUT_COMMANDS([
4562 for ac_file in $CONFIG_FILES; do
4563 # Support "outfile[:infile[:infile...]]"
4565 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4567 # PO directories have a Makefile.in generated from Makefile.in.in.
4568 case "$ac_file" in */Makefile.in)
4569 # Adjust a relative srcdir.
4570 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
4571 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
4572 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
4573 # In autoconf-2.13 it is called $ac_given_srcdir.
4574 # In autoconf-2.50 it is called $srcdir.
4575 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
4576 case "$ac_given_srcdir" in
4577 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
4578 /*) top_srcdir="$ac_given_srcdir" ;;
4579 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
4581 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
4582 rm -f "$ac_dir/POTFILES"
4583 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
4584 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
4585 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
4586 # on $ac_dir but don't depend on user-specified configuration
4588 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
4589 # The LINGUAS file contains the set of available languages.
4590 if test -n "$ALL_LINGUAS"; then
4591 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
4593 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
4594 # Hide the ALL_LINGUAS assigment from automake.
4595 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
4597 case "$ac_given_srcdir" in
4599 *) srcdirpre='$(srcdir)/' ;;
4605 for lang in $ALL_LINGUAS; do
4606 POFILES="$POFILES $srcdirpre$lang.po"
4607 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
4608 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
4609 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
4611 # CATALOGS depends on both $ac_dir and the user's LINGUAS
4612 # environment variable.
4614 if test -n "$ALL_LINGUAS"; then
4615 for presentlang in $ALL_LINGUAS; do
4617 if test "%UNSET%" != "$LINGUAS"; then
4618 desiredlanguages="$LINGUAS"
4620 desiredlanguages="$ALL_LINGUAS"
4622 for desiredlang in $desiredlanguages; do
4623 # Use the presentlang catalog if desiredlang is
4624 # a. equal to presentlang, or
4625 # b. a variant of presentlang (because in this case,
4626 # presentlang can be used as a fallback for messages
4627 # which are not translated in the desiredlang catalog).
4628 case "$desiredlang" in
4629 "$presentlang"*) useit=yes;;
4632 if test $useit = yes; then
4633 INST_LINGUAS="$INST_LINGUAS $presentlang"
4638 if test -n "$INST_LINGUAS"; then
4639 for lang in $INST_LINGUAS; do
4640 CATALOGS="$CATALOGS $lang.gmo"
4643 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
4644 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
4645 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
4646 if test -f "$f"; then
4648 *.orig | *.bak | *~) ;;
4649 *) cat "$f" >> "$ac_dir/Makefile" ;;
4657 [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
4658 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
4660 eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
4661 # Capture the value of LINGUAS because we need it to compute CATALOGS.
4662 LINGUAS="${LINGUAS-%UNSET%}"
4667 dnl Checks for all prerequisites of the intl subdirectory,
4668 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
4669 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
4670 AC_DEFUN([AM_INTL_SUBDIR],
4672 AC_REQUIRE([AC_PROG_INSTALL])dnl
4673 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
4674 AC_REQUIRE([AC_PROG_CC])dnl
4675 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4676 AC_REQUIRE([AC_PROG_RANLIB])dnl
4677 AC_REQUIRE([AC_ISC_POSIX])dnl
4678 AC_REQUIRE([AC_HEADER_STDC])dnl
4679 AC_REQUIRE([AC_C_CONST])dnl
4680 AC_REQUIRE([AC_C_INLINE])dnl
4681 AC_REQUIRE([AC_TYPE_OFF_T])dnl
4682 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
4683 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
4684 AC_REQUIRE([AC_FUNC_MMAP])dnl
4685 AC_REQUIRE([jm_GLIBC21])dnl
4687 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
4688 stdlib.h string.h unistd.h sys/param.h])
4689 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
4690 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
4691 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
4697 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
4698 dnl because plural.y uses bison specific features. It requires at least
4699 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
4701 dnl bison is only needed for the maintainer (who touches plural.y). But in
4702 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
4703 dnl the rule in general Makefile. Now, some people carelessly touch the
4704 dnl files or have a broken "make" program, hence the plural.c rule will
4705 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
4706 dnl present or too old.
4707 AC_CHECK_PROGS([INTLBISON], [bison])
4708 if test -z "$INTLBISON"; then
4711 dnl Found it, now check the version.
4712 AC_MSG_CHECKING([version of bison])
4713 changequote(<<,>>)dnl
4714 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
4715 case $ac_prog_version in
4716 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
4717 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
4719 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
4720 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
4722 AC_MSG_RESULT([$ac_prog_version])
4724 if test $ac_verc_fail = yes; then
4730 AC_DEFUN([AM_MKINSTALLDIRS],
4732 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
4733 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
4734 dnl Try to locate is.
4736 if test -n "$ac_aux_dir"; then
4737 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
4739 if test -z "$MKINSTALLDIRS"; then
4740 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
4742 AC_SUBST(MKINSTALLDIRS)
4745 # lib-prefix.m4 serial 1 (gettext-0.11)
4746 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
4747 dnl This file is free software, distributed under the terms of the GNU
4748 dnl General Public License. As a special exception to the GNU General
4749 dnl Public License, this file may be distributed as part of a program
4750 dnl that contains a configuration script generated by Autoconf, under
4751 dnl the same distribution terms as the rest of that program.
4753 dnl From Bruno Haible.
4755 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
4756 dnl to access previously installed libraries. The basic assumption is that
4757 dnl a user will want packages to use other packages he previously installed
4758 dnl with the same --prefix option.
4759 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
4760 dnl libraries, but is otherwise very convenient.
4761 AC_DEFUN([AC_LIB_PREFIX],
4763 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
4764 AC_REQUIRE([AC_PROG_CC])
4765 AC_REQUIRE([AC_CANONICAL_HOST])
4766 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4767 dnl By default, look in $includedir and $libdir.
4769 AC_LIB_WITH_FINAL_PREFIX([
4770 eval additional_includedir=\"$includedir\"
4771 eval additional_libdir=\"$libdir\"
4773 AC_ARG_WITH([lib-prefix],
4774 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
4775 --without-lib-prefix don't search for libraries in includedir and libdir],
4777 if test "X$withval" = "Xno"; then
4780 if test "X$withval" = "X"; then
4781 AC_LIB_WITH_FINAL_PREFIX([
4782 eval additional_includedir=\"$includedir\"
4783 eval additional_libdir=\"$libdir\"
4786 additional_includedir="$withval/include"
4787 additional_libdir="$withval/lib"
4791 if test $use_additional = yes; then
4792 dnl Potentially add $additional_includedir to $CPPFLAGS.
4793 dnl But don't add it
4794 dnl 1. if it's the standard /usr/include,
4795 dnl 2. if it's already present in $CPPFLAGS,
4796 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
4797 dnl 4. if it doesn't exist as a directory.
4798 if test "X$additional_includedir" != "X/usr/include"; then
4800 for x in $CPPFLAGS; do
4801 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4802 if test "X$x" = "X-I$additional_includedir"; then
4807 if test -z "$haveit"; then
4808 if test "X$additional_includedir" = "X/usr/local/include"; then
4809 if test -n "$GCC"; then
4811 linux*) haveit=yes;;
4815 if test -z "$haveit"; then
4816 if test -d "$additional_includedir"; then
4817 dnl Really add $additional_includedir to $CPPFLAGS.
4818 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
4823 dnl Potentially add $additional_libdir to $LDFLAGS.
4824 dnl But don't add it
4825 dnl 1. if it's the standard /usr/lib,
4826 dnl 2. if it's already present in $LDFLAGS,
4827 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
4828 dnl 4. if it doesn't exist as a directory.
4829 if test "X$additional_libdir" != "X/usr/lib"; then
4831 for x in $LDFLAGS; do
4832 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4833 if test "X$x" = "X-L$additional_libdir"; then
4838 if test -z "$haveit"; then
4839 if test "X$additional_libdir" = "X/usr/local/lib"; then
4840 if test -n "$GCC"; then
4842 linux*) haveit=yes;;
4846 if test -z "$haveit"; then
4847 if test -d "$additional_libdir"; then
4848 dnl Really add $additional_libdir to $LDFLAGS.
4849 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
4857 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
4858 dnl acl_final_exec_prefix, containing the values to which $prefix and
4859 dnl $exec_prefix will expand at the end of the configure script.
4860 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
4862 dnl Unfortunately, prefix and exec_prefix get only finally determined
4863 dnl at the end of configure.
4864 if test "X$prefix" = "XNONE"; then
4865 acl_final_prefix="$ac_default_prefix"
4867 acl_final_prefix="$prefix"
4869 if test "X$exec_prefix" = "XNONE"; then
4870 acl_final_exec_prefix='${prefix}'
4872 acl_final_exec_prefix="$exec_prefix"
4874 acl_save_prefix="$prefix"
4875 prefix="$acl_final_prefix"
4876 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
4877 prefix="$acl_save_prefix"
4880 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
4881 dnl variables prefix and exec_prefix bound to the values they will have
4882 dnl at the end of the configure script.
4883 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
4885 acl_save_prefix="$prefix"
4886 prefix="$acl_final_prefix"
4887 acl_save_exec_prefix="$exec_prefix"
4888 exec_prefix="$acl_final_exec_prefix"
4890 exec_prefix="$acl_save_exec_prefix"
4891 prefix="$acl_save_prefix"
4894 # lib-link.m4 serial 1 (gettext-0.11)
4895 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
4896 dnl This file is free software, distributed under the terms of the GNU
4897 dnl General Public License. As a special exception to the GNU General
4898 dnl Public License, this file may be distributed as part of a program
4899 dnl that contains a configuration script generated by Autoconf, under
4900 dnl the same distribution terms as the rest of that program.
4902 dnl From Bruno Haible.
4904 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
4905 dnl the libraries corresponding to explicit and implicit dependencies.
4906 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
4907 dnl augments the CPPFLAGS variable.
4908 AC_DEFUN([AC_LIB_LINKFLAGS],
4910 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4911 AC_REQUIRE([AC_LIB_RPATH])
4912 define([Name],[translit([$1],[./-], [___])])
4913 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
4914 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
4915 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
4916 AC_LIB_LINKFLAGS_BODY([$1], [$2])
4917 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
4918 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
4919 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
4921 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
4922 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
4923 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
4924 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
4926 AC_SUBST([LTLIB]NAME)
4927 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
4928 dnl results of this search when this library appears as a dependency.
4934 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
4935 dnl searches for libname and the libraries corresponding to explicit and
4936 dnl implicit dependencies, together with the specified include files and
4937 dnl the ability to compile and link the specified testcode. If found, it
4938 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
4939 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
4940 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
4941 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
4942 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
4944 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4945 AC_REQUIRE([AC_LIB_RPATH])
4946 define([Name],[translit([$1],[./-], [___])])
4947 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
4948 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
4950 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
4952 AC_LIB_LINKFLAGS_BODY([$1], [$2])
4954 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
4955 dnl because if the user has installed lib[]Name and not disabled its use
4956 dnl via --without-lib[]Name-prefix, he wants to use it.
4957 ac_save_CPPFLAGS="$CPPFLAGS"
4958 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
4960 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
4961 ac_save_LIBS="$LIBS"
4962 LIBS="$LIBS $LIB[]NAME"
4963 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
4964 LIBS="$ac_save_LIBS"
4966 if test "$ac_cv_lib[]Name" = yes; then
4968 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
4969 AC_MSG_CHECKING([how to link with lib[]$1])
4970 AC_MSG_RESULT([$LIB[]NAME])
4973 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
4974 dnl $INC[]NAME either.
4975 CPPFLAGS="$ac_save_CPPFLAGS"
4979 AC_SUBST([HAVE_LIB]NAME)
4981 AC_SUBST([LTLIB]NAME)
4986 dnl Determine the platform dependent parameters needed to use rpath:
4987 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
4988 dnl hardcode_direct, hardcode_minus_L,
4989 dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
4990 AC_DEFUN([AC_LIB_RPATH],
4992 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
4993 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
4994 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
4995 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
4996 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
4997 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
4998 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
5004 libext="$acl_cv_libext"
5005 shlibext="$acl_cv_shlibext"
5006 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
5007 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
5008 hardcode_direct="$acl_cv_hardcode_direct"
5009 hardcode_minus_L="$acl_cv_hardcode_minus_L"
5010 sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
5011 sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
5014 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
5015 dnl the libraries corresponding to explicit and implicit dependencies.
5016 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
5017 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
5019 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
5020 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
5021 dnl By default, look in $includedir and $libdir.
5023 AC_LIB_WITH_FINAL_PREFIX([
5024 eval additional_includedir=\"$includedir\"
5025 eval additional_libdir=\"$libdir\"
5027 AC_ARG_WITH([lib$1-prefix],
5028 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
5029 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
5031 if test "X$withval" = "Xno"; then
5034 if test "X$withval" = "X"; then
5035 AC_LIB_WITH_FINAL_PREFIX([
5036 eval additional_includedir=\"$includedir\"
5037 eval additional_libdir=\"$libdir\"
5040 additional_includedir="$withval/include"
5041 additional_libdir="$withval/lib"
5045 dnl Search the library and its dependencies in $additional_libdir and
5046 dnl $LDFLAGS. Using breadth-first-seach.
5052 names_already_handled=
5053 names_next_round='$1 $2'
5054 while test -n "$names_next_round"; do
5055 names_this_round="$names_next_round"
5057 for name in $names_this_round; do
5059 for n in $names_already_handled; do
5060 if test "$n" = "$name"; then
5065 if test -z "$already_handled"; then
5066 names_already_handled="$names_already_handled $name"
5067 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
5068 dnl or AC_LIB_HAVE_LINKFLAGS call.
5069 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
5070 eval value=\"\$HAVE_LIB$uppername\"
5071 if test -n "$value"; then
5072 if test "$value" = yes; then
5073 eval value=\"\$LIB$uppername\"
5074 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
5075 eval value=\"\$LTLIB$uppername\"
5076 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
5078 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
5079 dnl that this library doesn't exist. So just drop it.
5083 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
5084 dnl and the already constructed $LIBNAME/$LTLIBNAME.
5089 if test $use_additional = yes; then
5090 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
5091 found_dir="$additional_libdir"
5092 found_so="$additional_libdir/lib$name.$shlibext"
5093 if test -f "$additional_libdir/lib$name.la"; then
5094 found_la="$additional_libdir/lib$name.la"
5097 if test -f "$additional_libdir/lib$name.$libext"; then
5098 found_dir="$additional_libdir"
5099 found_a="$additional_libdir/lib$name.$libext"
5100 if test -f "$additional_libdir/lib$name.la"; then
5101 found_la="$additional_libdir/lib$name.la"
5106 if test "X$found_dir" = "X"; then
5107 for x in $LDFLAGS $LTLIB[]NAME; do
5108 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5111 dir=`echo "X$x" | sed -e 's/^X-L//'`
5112 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
5114 found_so="$dir/lib$name.$shlibext"
5115 if test -f "$dir/lib$name.la"; then
5116 found_la="$dir/lib$name.la"
5119 if test -f "$dir/lib$name.$libext"; then
5121 found_a="$dir/lib$name.$libext"
5122 if test -f "$dir/lib$name.la"; then
5123 found_la="$dir/lib$name.la"
5129 if test "X$found_dir" != "X"; then
5134 if test "X$found_dir" != "X"; then
5135 dnl Found the library.
5136 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
5137 if test "X$found_so" != "X"; then
5138 dnl Linking with a shared library. We attempt to hardcode its
5139 dnl directory into the executable's runpath, unless it's the
5140 dnl standard /usr/lib.
5141 if test "X$found_dir" = "X/usr/lib"; then
5142 dnl No hardcoding is needed.
5143 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5145 dnl Use an explicit option to hardcode DIR into the resulting
5147 dnl Potentially add DIR to ltrpathdirs.
5148 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
5150 for x in $ltrpathdirs; do
5151 if test "X$x" = "X$found_dir"; then
5156 if test -z "$haveit"; then
5157 ltrpathdirs="$ltrpathdirs $found_dir"
5159 dnl The hardcoding into $LIBNAME is system dependent.
5160 if test "$hardcode_direct" = yes; then
5161 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
5162 dnl resulting binary.
5163 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5165 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
5166 dnl Use an explicit option to hardcode DIR into the resulting
5168 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5169 dnl Potentially add DIR to rpathdirs.
5170 dnl The rpathdirs will be appended to $LIBNAME at the end.
5172 for x in $rpathdirs; do
5173 if test "X$x" = "X$found_dir"; then
5178 if test -z "$haveit"; then
5179 rpathdirs="$rpathdirs $found_dir"
5182 dnl Rely on "-L$found_dir".
5183 dnl But don't add it if it's already contained in the LDFLAGS
5184 dnl or the already constructed $LIBNAME
5186 for x in $LDFLAGS $LIB[]NAME; do
5187 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5188 if test "X$x" = "X-L$found_dir"; then
5193 if test -z "$haveit"; then
5194 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
5196 if test "$hardcode_minus_L" != no; then
5197 dnl FIXME: Not sure whether we should use
5198 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
5200 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5202 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
5203 dnl here, because this doesn't fit in flags passed to the
5204 dnl compiler. So give up. No hardcoding. This affects only
5205 dnl very old systems.
5206 dnl FIXME: Not sure whether we should use
5207 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
5209 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
5215 if test "X$found_a" != "X"; then
5216 dnl Linking with a static library.
5217 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
5219 dnl We shouldn't come here, but anyway it's good to have a
5221 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
5224 dnl Assume the include files are nearby.
5225 additional_includedir=
5226 case "$found_dir" in
5228 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
5229 additional_includedir="$basedir/include"
5232 if test "X$additional_includedir" != "X"; then
5233 dnl Potentially add $additional_includedir to $INCNAME.
5234 dnl But don't add it
5235 dnl 1. if it's the standard /usr/include,
5236 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
5237 dnl 3. if it's already present in $CPPFLAGS or the already
5238 dnl constructed $INCNAME,
5239 dnl 4. if it doesn't exist as a directory.
5240 if test "X$additional_includedir" != "X/usr/include"; then
5242 if test "X$additional_includedir" = "X/usr/local/include"; then
5243 if test -n "$GCC"; then
5245 linux*) haveit=yes;;
5249 if test -z "$haveit"; then
5250 for x in $CPPFLAGS $INC[]NAME; do
5251 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5252 if test "X$x" = "X-I$additional_includedir"; then
5257 if test -z "$haveit"; then
5258 if test -d "$additional_includedir"; then
5259 dnl Really add $additional_includedir to $INCNAME.
5260 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
5266 dnl Look for dependencies.
5267 if test -n "$found_la"; then
5268 dnl Read the .la file. It defines the variables
5269 dnl dlname, library_names, old_library, dependency_libs, current,
5270 dnl age, revision, installed, dlopen, dlpreopen, libdir.
5271 save_libdir="$libdir"
5273 */* | *\\*) . "$found_la" ;;
5274 *) . "./$found_la" ;;
5276 libdir="$save_libdir"
5277 dnl We use only dependency_libs.
5278 for dep in $dependency_libs; do
5281 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
5282 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
5283 dnl But don't add it
5284 dnl 1. if it's the standard /usr/lib,
5285 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
5286 dnl 3. if it's already present in $LDFLAGS or the already
5287 dnl constructed $LIBNAME,
5288 dnl 4. if it doesn't exist as a directory.
5289 if test "X$additional_libdir" != "X/usr/lib"; then
5291 if test "X$additional_libdir" = "X/usr/local/lib"; then
5292 if test -n "$GCC"; then
5294 linux*) haveit=yes;;
5298 if test -z "$haveit"; then
5300 for x in $LDFLAGS $LIB[]NAME; do
5301 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5302 if test "X$x" = "X-L$additional_libdir"; then
5307 if test -z "$haveit"; then
5308 if test -d "$additional_libdir"; then
5309 dnl Really add $additional_libdir to $LIBNAME.
5310 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
5314 for x in $LDFLAGS $LTLIB[]NAME; do
5315 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5316 if test "X$x" = "X-L$additional_libdir"; then
5321 if test -z "$haveit"; then
5322 if test -d "$additional_libdir"; then
5323 dnl Really add $additional_libdir to $LTLIBNAME.
5324 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
5331 dnl Handle this in the next round.
5332 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
5335 dnl Handle this in the next round. Throw away the .la's
5336 dnl directory; it is already contained in a preceding -L
5338 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
5341 dnl Most likely an immediate library name.
5342 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
5343 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
5349 dnl Didn't find the library; assume it is in the system directories
5350 dnl known to the linker and runtime loader. (All the system
5351 dnl directories known to the linker should also be known to the
5352 dnl runtime loader, otherwise the system is severely misconfigured.)
5353 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
5354 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
5360 if test "X$rpathdirs" != "X"; then
5361 if test -n "$hardcode_libdir_separator"; then
5362 dnl Weird platform: only the last -rpath option counts, the user must
5363 dnl pass all path elements in one option. We can arrange that for a
5364 dnl single library, but not when more than one $LIBNAMEs are used.
5366 for found_dir in $rpathdirs; do
5367 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
5369 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
5370 acl_save_libdir="$libdir"
5372 eval flag=\"$hardcode_libdir_flag_spec\"
5373 libdir="$acl_save_libdir"
5374 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
5376 dnl The -rpath options are cumulative.
5377 for found_dir in $rpathdirs; do
5378 acl_save_libdir="$libdir"
5380 eval flag=\"$hardcode_libdir_flag_spec\"
5381 libdir="$acl_save_libdir"
5382 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
5386 if test "X$ltrpathdirs" != "X"; then
5387 dnl When using libtool, the option that works for both libraries and
5388 dnl executables is -R. The -R options are cumulative.
5389 for found_dir in $ltrpathdirs; do
5390 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
5395 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
5396 dnl unless already present in VAR.
5397 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
5398 dnl contains two or three consecutive elements that belong together.
5399 AC_DEFUN([AC_LIB_APPENDTOVAR],
5401 for element in [$2]; do
5404 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5405 if test "X$x" = "X$element"; then
5410 if test -z "$haveit"; then
5411 [$1]="${[$1]}${[$1]:+ }$element"
5416 # lib-ld.m4 serial 1 (gettext-0.11)
5417 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
5418 dnl This file is free software, distributed under the terms of the GNU
5419 dnl General Public License. As a special exception to the GNU General
5420 dnl Public License, this file may be distributed as part of a program
5421 dnl that contains a configuration script generated by Autoconf, under
5422 dnl the same distribution terms as the rest of that program.
5424 dnl Subroutines of libtool.m4,
5425 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
5426 dnl with libtool.m4.
5428 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
5429 AC_DEFUN([AC_LIB_PROG_LD_GNU],
5430 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
5431 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
5432 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5433 acl_cv_prog_gnu_ld=yes
5435 acl_cv_prog_gnu_ld=no
5437 with_gnu_ld=$acl_cv_prog_gnu_ld
5440 dnl From libtool-1.4. Sets the variable LD.
5441 AC_DEFUN([AC_LIB_PROG_LD],
5442 [AC_ARG_WITH(gnu-ld,
5443 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
5444 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
5445 AC_REQUIRE([AC_PROG_CC])dnl
5446 AC_REQUIRE([AC_CANONICAL_HOST])dnl
5448 if test "$GCC" = yes; then
5449 # Check if gcc -print-prog-name=ld gives a path.
5450 AC_MSG_CHECKING([for ld used by GCC])
5453 # gcc leaves a trailing carriage return which upsets mingw
5454 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5456 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5459 # Accept absolute paths.
5460 [[\\/]* | [A-Za-z]:[\\/]*)]
5461 [re_direlt='/[^/][^/]*/\.\./']
5462 # Canonicalize the path of ld
5463 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5464 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5465 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5467 test -z "$LD" && LD="$ac_prog"
5470 # If it fails, then pretend we aren't using GCC.
5474 # If it is relative, then search for the first ld in PATH.
5478 elif test "$with_gnu_ld" = yes; then
5479 AC_MSG_CHECKING([for GNU ld])
5481 AC_MSG_CHECKING([for non-GNU ld])
5483 AC_CACHE_VAL(acl_cv_path_LD,
5484 [if test -z "$LD"; then
5485 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5486 for ac_dir in $PATH; do
5487 test -z "$ac_dir" && ac_dir=.
5488 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5489 acl_cv_path_LD="$ac_dir/$ac_prog"
5490 # Check to see if the program is GNU ld. I'd rather use --version,
5491 # but apparently some GNU ld's only accept -v.
5492 # Break only if it was the GNU/non-GNU ld that we prefer.
5493 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5494 test "$with_gnu_ld" != no && break
5496 test "$with_gnu_ld" != yes && break
5502 acl_cv_path_LD="$LD" # Let the user override the test with a path.
5504 LD="$acl_cv_path_LD"
5505 if test -n "$LD"; then
5510 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5514 # iconv.m4 serial AM3 (gettext-0.11)
5515 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5516 dnl This file is free software, distributed under the terms of the GNU
5517 dnl General Public License. As a special exception to the GNU General
5518 dnl Public License, this file may be distributed as part of a program
5519 dnl that contains a configuration script generated by Autoconf, under
5520 dnl the same distribution terms as the rest of that program.
5522 dnl From Bruno Haible.
5524 AC_DEFUN([AM_ICONV_LINK],
5526 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
5527 dnl those with the standalone portable GNU libiconv installed).
5529 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
5530 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
5531 AC_REQUIRE([AC_LIB_RPATH])
5533 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
5535 AC_LIB_LINKFLAGS_BODY([iconv])
5537 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
5538 dnl because if the user has installed libiconv and not disabled its use
5539 dnl via --without-libiconv-prefix, he wants to use it. The first
5540 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
5541 am_save_CPPFLAGS="$CPPFLAGS"
5542 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
5544 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
5545 am_cv_func_iconv="no, consider installing GNU libiconv"
5547 AC_TRY_LINK([#include <stdlib.h>
5548 #include <iconv.h>],
5549 [iconv_t cd = iconv_open("","");
5550 iconv(cd,NULL,NULL,NULL,NULL);
5552 am_cv_func_iconv=yes)
5553 if test "$am_cv_func_iconv" != yes; then
5554 am_save_LIBS="$LIBS"
5555 LIBS="$LIBS $LIBICONV"
5556 AC_TRY_LINK([#include <stdlib.h>
5557 #include <iconv.h>],
5558 [iconv_t cd = iconv_open("","");
5559 iconv(cd,NULL,NULL,NULL,NULL);
5562 am_cv_func_iconv=yes)
5563 LIBS="$am_save_LIBS"
5566 if test "$am_cv_func_iconv" = yes; then
5567 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
5569 if test "$am_cv_lib_iconv" = yes; then
5570 AC_MSG_CHECKING([how to link with libiconv])
5571 AC_MSG_RESULT([$LIBICONV])
5573 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
5575 CPPFLAGS="$am_save_CPPFLAGS"
5580 AC_SUBST(LTLIBICONV)
5583 AC_DEFUN([AM_ICONV],
5585 AC_REQUIRE([AM_ICONV_LINK])
5586 if test "$am_cv_func_iconv" = yes; then
5587 AC_MSG_CHECKING([for iconv declaration])
5588 AC_CACHE_VAL(am_cv_proto_iconv, [
5596 #if defined(__STDC__) || defined(__cplusplus)
5597 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5601 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
5602 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);"])
5603 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5604 AC_MSG_RESULT([$]{ac_t:-
5605 }[$]am_cv_proto_iconv)
5606 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
5607 [Define as const if the declaration of iconv() needs const.])
5611 # progtest.m4 serial 2 (gettext-0.10.40)
5612 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
5613 dnl This file is free software, distributed under the terms of the GNU
5614 dnl General Public License. As a special exception to the GNU General
5615 dnl Public License, this file may be distributed as part of a program
5616 dnl that contains a configuration script generated by Autoconf, under
5617 dnl the same distribution terms as the rest of that program.
5619 dnl This file can can be used in projects which are not available under
5620 dnl the GNU General Public License or the GNU Library General Public
5621 dnl License but which still want to provide support for the GNU gettext
5623 dnl Please note that the actual code of the GNU gettext library is covered
5624 dnl by the GNU Library General Public License, and the rest of the GNU
5625 dnl gettext package package is covered by the GNU General Public License.
5626 dnl They are *not* in the public domain.
5629 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
5631 # Search path for a program which passes the given test.
5633 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
5634 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
5635 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
5636 [# Extract the first word of "$2", so it can be a program name with args.
5637 set dummy $2; ac_word=[$]2
5638 AC_MSG_CHECKING([for $ac_word])
5639 AC_CACHE_VAL(ac_cv_path_$1,
5642 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
5645 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5646 for ac_dir in ifelse([$5], , $PATH, [$5]); do
5647 test -z "$ac_dir" && ac_dir=.
5648 if test -f $ac_dir/$ac_word; then
5650 ac_cv_path_$1="$ac_dir/$ac_word"
5656 dnl If no 4th arg is given, leave the cache variable unset,
5657 dnl so AC_PATH_PROGS will keep looking.
5658 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
5663 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
5664 AC_MSG_RESULT([$]$1)
5671 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
5672 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5673 dnl This file is free software, distributed under the terms of the GNU
5674 dnl General Public License. As a special exception to the GNU General
5675 dnl Public License, this file may be distributed as part of a program
5676 dnl that contains a configuration script generated by Autoconf, under
5677 dnl the same distribution terms as the rest of that program.
5679 # Test for the GNU C Library, version 2.1 or newer.
5680 # From Bruno Haible.
5682 AC_DEFUN([jm_GLIBC21],
5684 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
5685 ac_cv_gnu_library_2_1,
5686 [AC_EGREP_CPP([Lucky GNU user],
5688 #include <features.h>
5689 #ifdef __GNU_LIBRARY__
5690 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5695 ac_cv_gnu_library_2_1=yes,
5696 ac_cv_gnu_library_2_1=no)
5700 GLIBC21="$ac_cv_gnu_library_2_1"
5704 # codeset.m4 serial AM1 (gettext-0.10.40)
5705 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5706 dnl This file is free software, distributed under the terms of the GNU
5707 dnl General Public License. As a special exception to the GNU General
5708 dnl Public License, this file may be distributed as part of a program
5709 dnl that contains a configuration script generated by Autoconf, under
5710 dnl the same distribution terms as the rest of that program.
5712 dnl From Bruno Haible.
5714 AC_DEFUN([AM_LANGINFO_CODESET],
5716 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
5717 [AC_TRY_LINK([#include <langinfo.h>],
5718 [char* cs = nl_langinfo(CODESET);],
5719 am_cv_langinfo_codeset=yes,
5720 am_cv_langinfo_codeset=no)
5722 if test $am_cv_langinfo_codeset = yes; then
5723 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
5724 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
5728 # lcmessage.m4 serial 2 (gettext-0.10.40)
5729 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
5730 dnl This file is free software, distributed under the terms of the GNU
5731 dnl General Public License. As a special exception to the GNU General
5732 dnl Public License, this file may be distributed as part of a program
5733 dnl that contains a configuration script generated by Autoconf, under
5734 dnl the same distribution terms as the rest of that program.
5736 dnl This file can can be used in projects which are not available under
5737 dnl the GNU General Public License or the GNU Library General Public
5738 dnl License but which still want to provide support for the GNU gettext
5740 dnl Please note that the actual code of the GNU gettext library is covered
5741 dnl by the GNU Library General Public License, and the rest of the GNU
5742 dnl gettext package package is covered by the GNU General Public License.
5743 dnl They are *not* in the public domain.
5746 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
5748 # Check whether LC_MESSAGES is available in <locale.h>.
5750 AC_DEFUN([AM_LC_MESSAGES],
5751 [if test $ac_cv_header_locale_h = yes; then
5752 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
5753 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
5754 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
5755 if test $am_cv_val_LC_MESSAGES = yes; then
5756 AC_DEFINE(HAVE_LC_MESSAGES, 1,
5757 [Define if your <locale.h> file defines LC_MESSAGES.])