1 # generated automatically by aclocal 1.8.3 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
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
15 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
16 # Generated from amversion.in; do not edit by hand.
18 # This program is free software; you can redistribute it and/or modify
19 # it under the terms of the GNU General Public License as published by
20 # the Free Software Foundation; either version 2, or (at your option)
23 # This program is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 # GNU General Public License for more details.
28 # You should have received a copy of the GNU General Public License
29 # along with this program; if not, write to the Free Software
30 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
32 # AM_AUTOMAKE_VERSION(VERSION)
33 # ----------------------------
34 # Automake X.Y traces this macro to ensure aclocal.m4 has been
35 # generated from the m4 files accompanying Automake X.Y.
36 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
38 # AM_SET_CURRENT_AUTOMAKE_VERSION
39 # -------------------------------
40 # Call AM_AUTOMAKE_VERSION so it can be traced.
41 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
42 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
43 [AM_AUTOMAKE_VERSION([1.8.3])])
47 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
49 # This program is free software; you can redistribute it and/or modify
50 # it under the terms of the GNU General Public License as published by
51 # the Free Software Foundation; either version 2, or (at your option)
54 # This program is distributed in the hope that it will be useful,
55 # but WITHOUT ANY WARRANTY; without even the implied warranty of
56 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 # GNU General Public License for more details.
59 # You should have received a copy of the GNU General Public License
60 # along with this program; if not, write to the Free Software
61 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
64 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
65 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
66 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
68 # Of course, Automake must honor this variable whenever it calls a
69 # tool from the auxiliary directory. The problem is that $srcdir (and
70 # therefore $ac_aux_dir as well) can be either absolute or relative,
71 # depending on how configure is run. This is pretty annoying, since
72 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
73 # source directory, any form will work fine, but in subdirectories a
74 # relative path needs to be adjusted first.
77 # fails when called from a subdirectory if $ac_aux_dir is relative
78 # $top_srcdir/$ac_aux_dir/missing
79 # fails if $ac_aux_dir is absolute,
80 # fails when called from a subdirectory in a VPATH build with
81 # a relative $ac_aux_dir
83 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
84 # are both prefixed by $srcdir. In an in-source build this is usually
85 # harmless because $srcdir is `.', but things will broke when you
86 # start a VPATH build or use an absolute $srcdir.
88 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
89 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
90 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
91 # and then we would define $MISSING as
92 # MISSING="\${SHELL} $am_aux_dir/missing"
93 # This will work as long as MISSING is not called from configure, because
94 # unfortunately $(top_srcdir) has no meaning in configure.
95 # However there are other variables, like CC, which are often used in
96 # configure, and could therefore not use this "fixed" $ac_aux_dir.
98 # Another solution, used here, is to always expand $ac_aux_dir to an
99 # absolute PATH. The drawback is that using absolute paths prevent a
100 # configured tree to be moved without reconfiguration.
102 AC_DEFUN([AM_AUX_DIR_EXPAND],
103 [dnl Rely on autoconf to set up CDPATH properly.
105 # expand $ac_aux_dir to an absolute path
106 am_aux_dir=`cd $ac_aux_dir && pwd`
109 # AM_CONDITIONAL -*- Autoconf -*-
111 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
113 # This program is free software; you can redistribute it and/or modify
114 # it under the terms of the GNU General Public License as published by
115 # the Free Software Foundation; either version 2, or (at your option)
118 # This program is distributed in the hope that it will be useful,
119 # but WITHOUT ANY WARRANTY; without even the implied warranty of
120 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
121 # GNU General Public License for more details.
123 # You should have received a copy of the GNU General Public License
124 # along with this program; if not, write to the Free Software
125 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
130 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
131 # -------------------------------------
132 # Define a conditional.
133 AC_DEFUN([AM_CONDITIONAL],
135 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
136 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
146 AC_CONFIG_COMMANDS_PRE(
147 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
148 AC_MSG_ERROR([conditional "$1" was never defined.
149 Usually this means the macro was only invoked conditionally.])
152 # serial 7 -*- Autoconf -*-
154 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
155 # Free Software Foundation, Inc.
157 # This program is free software; you can redistribute it and/or modify
158 # it under the terms of the GNU General Public License as published by
159 # the Free Software Foundation; either version 2, or (at your option)
162 # This program is distributed in the hope that it will be useful,
163 # but WITHOUT ANY WARRANTY; without even the implied warranty of
164 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
165 # GNU General Public License for more details.
167 # You should have received a copy of the GNU General Public License
168 # along with this program; if not, write to the Free Software
169 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
173 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
174 # written in clear, in which case automake, when reading aclocal.m4,
175 # will think it sees a *use*, and therefore will trigger all it's
176 # C support machinery. Also note that it means that autoscan, seeing
177 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
181 # _AM_DEPENDENCIES(NAME)
182 # ----------------------
183 # See how the compiler implements dependency checking.
184 # NAME is "CC", "CXX", "GCJ", or "OBJC".
185 # We try a few techniques and use that to set a single cache variable.
187 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
188 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
189 # dependency, and given that the user is not expected to run this macro,
190 # just rely on AC_PROG_CC.
191 AC_DEFUN([_AM_DEPENDENCIES],
192 [AC_REQUIRE([AM_SET_DEPDIR])dnl
193 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
194 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
195 AC_REQUIRE([AM_DEP_TRACK])dnl
197 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
198 [$1], CXX, [depcc="$CXX" am_compiler_list=],
199 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
200 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
201 [depcc="$$1" am_compiler_list=])
203 AC_CACHE_CHECK([dependency style of $depcc],
204 [am_cv_$1_dependencies_compiler_type],
205 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
206 # We make a subdir and do the tests there. Otherwise we can end up
207 # making bogus files that we don't know about and never remove. For
208 # instance it was reported that on HP-UX the gcc test will end up
209 # making a dummy file named `D' -- because `-MD' means `put the output
212 # Copy depcomp to subdir because otherwise we won't find it if we're
213 # using a relative directory.
214 cp "$am_depcomp" conftest.dir
216 # We will build objects and dependencies in a subdirectory because
217 # it helps to detect inapplicable dependency modes. For instance
218 # both Tru64's cc and ICC support -MD to output dependencies as a
219 # side effect of compilation, but ICC will put the dependencies in
220 # the current directory while Tru64 will put them in the object
224 am_cv_$1_dependencies_compiler_type=none
225 if test "$am_compiler_list" = ""; then
226 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
228 for depmode in $am_compiler_list; do
229 # Setup a source with many dependencies, because some compilers
230 # like to wrap large dependency lists on column 80 (with \), and
231 # we should not choose a depcomp mode which is confused by this.
233 # We need to recreate these files for each test, as the compiler may
234 # overwrite some of them when testing with obscure command lines.
235 # This happens at least with the AIX C compiler.
237 for i in 1 2 3 4 5 6; do
238 echo '#include "conftst'$i'.h"' >> sub/conftest.c
239 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
240 # Solaris 8's {/usr,}/bin/sh.
241 touch sub/conftst$i.h
243 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
247 # after this tag, mechanisms are not by side-effect, so they'll
248 # only be used when explicitly requested
249 if test "x$enable_dependency_tracking" = xyes; then
257 # We check with `-c' and `-o' for the sake of the "dashmstdout"
258 # mode. It turns out that the SunPro C++ compiler does not properly
259 # handle `-M -o', and we need to detect this.
260 if depmode=$depmode \
261 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
262 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
263 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
264 >/dev/null 2>conftest.err &&
265 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
266 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
267 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
268 # icc doesn't choke on unknown options, it will just issue warnings
269 # (even with -Werror). So we grep stderr for any message
270 # that says an option was ignored.
271 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
272 am_cv_$1_dependencies_compiler_type=$depmode
281 am_cv_$1_dependencies_compiler_type=none
284 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
285 AM_CONDITIONAL([am__fastdep$1], [
286 test "x$enable_dependency_tracking" != xno \
287 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
293 # Choose a directory name for dependency files.
294 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
295 AC_DEFUN([AM_SET_DEPDIR],
296 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
297 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
303 AC_DEFUN([AM_DEP_TRACK],
304 [AC_ARG_ENABLE(dependency-tracking,
305 [ --disable-dependency-tracking speeds up one-time build
306 --enable-dependency-tracking do not reject slow dependency extractors])
307 if test "x$enable_dependency_tracking" != xno; then
308 am_depcomp="$ac_aux_dir/depcomp"
311 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
312 AC_SUBST([AMDEPBACKSLASH])
315 # Generate code to set up dependency tracking. -*- Autoconf -*-
317 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
319 # This program is free software; you can redistribute it and/or modify
320 # it under the terms of the GNU General Public License as published by
321 # the Free Software Foundation; either version 2, or (at your option)
324 # This program is distributed in the hope that it will be useful,
325 # but WITHOUT ANY WARRANTY; without even the implied warranty of
326 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
327 # GNU General Public License for more details.
329 # You should have received a copy of the GNU General Public License
330 # along with this program; if not, write to the Free Software
331 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
336 # _AM_OUTPUT_DEPENDENCY_COMMANDS
337 # ------------------------------
338 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
339 [for mf in $CONFIG_FILES; do
340 # Strip MF so we end up with the name of the file.
341 mf=`echo "$mf" | sed -e 's/:.*$//'`
342 # Check whether this is an Automake generated Makefile or not.
343 # We used to match only the files named `Makefile.in', but
344 # some people rename them; so instead we look at the file content.
345 # Grep'ing the first line is not enough: some people post-process
346 # each Makefile.in and add a new line on top of each file to say so.
347 # So let's grep whole file.
348 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
349 dirpart=`AS_DIRNAME("$mf")`
353 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
354 # Extract the definition of DEP_FILES from the Makefile without
356 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
357 test -z "$DEPDIR" && continue
358 # When using ansi2knr, U may be empty or an underscore; expand it
359 U=`sed -n 's/^U = //p' < "$mf"`
360 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
361 # We invoke sed twice because it is the simplest approach to
362 # changing $(DEPDIR) to its actual value in the expansion.
363 for file in `sed -n '
364 /^DEP_FILES = .*\\\\$/ {
373 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
374 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
375 # Make sure the directory exists.
376 test -f "$dirpart/$file" && continue
377 fdir=`AS_DIRNAME(["$file"])`
378 AS_MKDIR_P([$dirpart/$fdir])
379 # echo "creating $dirpart/$file"
380 echo '# dummy' > "$dirpart/$file"
383 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
386 # AM_OUTPUT_DEPENDENCY_COMMANDS
387 # -----------------------------
388 # This macro should only be invoked once -- use via AC_REQUIRE.
390 # This code is only required when automatic dependency tracking
391 # is enabled. FIXME. This creates each `.P' file that we will
392 # need in order to bootstrap the dependency handling code.
393 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
394 [AC_CONFIG_COMMANDS([depfiles],
395 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
396 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
399 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
401 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
403 # This program is free software; you can redistribute it and/or modify
404 # it under the terms of the GNU General Public License as published by
405 # the Free Software Foundation; either version 2, or (at your option)
408 # This program is distributed in the hope that it will be useful,
409 # but WITHOUT ANY WARRANTY; without even the implied warranty of
410 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
411 # GNU General Public License for more details.
413 # You should have received a copy of the GNU General Public License
414 # along with this program; if not, write to the Free Software
415 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
420 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
421 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
423 # Do all the work for Automake. -*- Autoconf -*-
425 # This macro actually does too much some checks are only needed if
426 # your package does certain things. But this isn't really a big deal.
428 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
429 # Free Software Foundation, Inc.
431 # This program is free software; you can redistribute it and/or modify
432 # it under the terms of the GNU General Public License as published by
433 # the Free Software Foundation; either version 2, or (at your option)
436 # This program is distributed in the hope that it will be useful,
437 # but WITHOUT ANY WARRANTY; without even the implied warranty of
438 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
439 # GNU General Public License for more details.
441 # You should have received a copy of the GNU General Public License
442 # along with this program; if not, write to the Free Software
443 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
448 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
449 # AM_INIT_AUTOMAKE([OPTIONS])
450 # -----------------------------------------------
451 # The call with PACKAGE and VERSION arguments is the old style
452 # call (pre autoconf-2.50), which is being phased out. PACKAGE
453 # and VERSION should now be passed to AC_INIT and removed from
454 # the call to AM_INIT_AUTOMAKE.
455 # We support both call styles for the transition. After
456 # the next Automake release, Autoconf can make the AC_INIT
457 # arguments mandatory, and then we can depend on a new Autoconf
458 # release and drop the old call support.
459 AC_DEFUN([AM_INIT_AUTOMAKE],
460 [AC_PREREQ([2.58])dnl
461 dnl Autoconf wants to disallow AM_ names. We explicitly allow
462 dnl the ones we care about.
463 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
464 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
465 AC_REQUIRE([AC_PROG_INSTALL])dnl
466 # test to see if srcdir already configured
467 if test "`cd $srcdir && pwd`" != "`pwd`" &&
468 test -f $srcdir/config.status; then
469 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
472 # test whether we have cygpath
473 if test -z "$CYGPATH_W"; then
474 if (cygpath --version) >/dev/null 2>/dev/null; then
475 CYGPATH_W='cygpath -w'
480 AC_SUBST([CYGPATH_W])
482 # Define the identity of the package.
483 dnl Distinguish between old-style and new-style calls.
485 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
486 AC_SUBST([PACKAGE], [$1])dnl
487 AC_SUBST([VERSION], [$2])],
488 [_AM_SET_OPTIONS([$1])dnl
489 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
490 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
492 _AM_IF_OPTION([no-define],,
493 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
494 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
496 # Some tools Automake needs.
497 AC_REQUIRE([AM_SANITY_CHECK])dnl
498 AC_REQUIRE([AC_ARG_PROGRAM])dnl
499 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
500 AM_MISSING_PROG(AUTOCONF, autoconf)
501 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
502 AM_MISSING_PROG(AUTOHEADER, autoheader)
503 AM_MISSING_PROG(MAKEINFO, makeinfo)
504 AM_MISSING_PROG(AMTAR, tar)
506 AM_PROG_INSTALL_STRIP
507 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
508 # We need awk for the "check" target. The system "awk" is bad on
510 AC_REQUIRE([AC_PROG_AWK])dnl
511 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
512 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
514 _AM_IF_OPTION([no-dependencies],,
515 [AC_PROVIDE_IFELSE([AC_PROG_CC],
516 [_AM_DEPENDENCIES(CC)],
517 [define([AC_PROG_CC],
518 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
519 AC_PROVIDE_IFELSE([AC_PROG_CXX],
520 [_AM_DEPENDENCIES(CXX)],
521 [define([AC_PROG_CXX],
522 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
527 # When config.status generates a header, we must update the stamp-h file.
528 # This file resides in the same directory as the config header
529 # that is generated. The stamp files are numbered to have different names.
531 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532 # loop where config.status creates the headers, so we can generate
533 # our stamp files there.
534 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535 [# Compute $1's index in $config_headers.
537 for _am_header in $config_headers :; do
542 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
545 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
549 # Define $install_sh.
551 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
553 # This program is free software; you can redistribute it and/or modify
554 # it under the terms of the GNU General Public License as published by
555 # the Free Software Foundation; either version 2, or (at your option)
558 # This program is distributed in the hope that it will be useful,
559 # but WITHOUT ANY WARRANTY; without even the implied warranty of
560 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
561 # GNU General Public License for more details.
563 # You should have received a copy of the GNU General Public License
564 # along with this program; if not, write to the Free Software
565 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
568 AC_DEFUN([AM_PROG_INSTALL_SH],
569 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
570 install_sh=${install_sh-"$am_aux_dir/install-sh"}
571 AC_SUBST(install_sh)])
574 # Copyright (C) 2003 Free Software Foundation, Inc.
576 # This program is free software; you can redistribute it and/or modify
577 # it under the terms of the GNU General Public License as published by
578 # the Free Software Foundation; either version 2, or (at your option)
581 # This program is distributed in the hope that it will be useful,
582 # but WITHOUT ANY WARRANTY; without even the implied warranty of
583 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
584 # GNU General Public License for more details.
586 # You should have received a copy of the GNU General Public License
587 # along with this program; if not, write to the Free Software
588 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
593 # Check whether the underlying file-system supports filenames
594 # with a leading dot. For instance MS-DOS doesn't.
595 AC_DEFUN([AM_SET_LEADING_DOT],
596 [rm -rf .tst 2>/dev/null
597 mkdir .tst 2>/dev/null
598 if test -d .tst; then
603 rmdir .tst 2>/dev/null
604 AC_SUBST([am__leading_dot])])
606 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
608 # serial 46 AC_PROG_LIBTOOL
610 AC_DEFUN([AC_PROG_LIBTOOL],
611 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
613 # This can be used to rebuild libtool when needed
614 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
616 # Always use our own libtool.
617 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
620 # Prevent multiple expansion
621 define([AC_PROG_LIBTOOL], [])
624 AC_DEFUN([AC_LIBTOOL_SETUP],
626 AC_REQUIRE([AC_ENABLE_SHARED])dnl
627 AC_REQUIRE([AC_ENABLE_STATIC])dnl
628 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
629 AC_REQUIRE([AC_CANONICAL_HOST])dnl
630 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
631 AC_REQUIRE([AC_PROG_CC])dnl
632 AC_REQUIRE([AC_PROG_LD])dnl
633 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
634 AC_REQUIRE([AC_PROG_NM])dnl
635 AC_REQUIRE([LT_AC_PROG_SED])dnl
637 AC_REQUIRE([AC_PROG_LN_S])dnl
638 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
639 AC_REQUIRE([AC_OBJEXT])dnl
640 AC_REQUIRE([AC_EXEEXT])dnl
643 _LT_AC_PROG_ECHO_BACKSLASH
644 # Only perform the check for file, if the check method requires it
645 case $deplibs_check_method in
647 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
653 AC_CHECK_TOOL(RANLIB, ranlib, :)
654 AC_CHECK_TOOL(STRIP, strip, :)
656 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
657 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
658 enable_win32_dll=yes, enable_win32_dll=no)
660 AC_ARG_ENABLE(libtool-lock,
661 [ --disable-libtool-lock avoid locking (might break parallel builds)])
662 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
664 # Some flags need to be propagated to the compiler or linker for good
668 # Find out which ABI we are using.
669 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
670 if AC_TRY_EVAL(ac_compile); then
671 case `/usr/bin/file conftest.$ac_objext` in
687 # Test if the compiler is 64bit
688 echo 'int i;' > conftest.$ac_ext
689 lt_cv_cc_64bit_output=no
690 if AC_TRY_EVAL(ac_compile); then
691 case `/usr/bin/file conftest.$ac_objext` in
693 lt_cv_cc_64bit_output=yes
701 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
702 SAVE_CFLAGS="$CFLAGS"
703 CFLAGS="$CFLAGS -belf"
704 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
707 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
709 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
710 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
711 CFLAGS="$SAVE_CFLAGS"
715 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
716 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
717 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
718 AC_CHECK_TOOL(AS, as, false)
719 AC_CHECK_TOOL(OBJDUMP, objdump, false)
721 # recent cygwin and mingw systems supply a stub DllMain which the user
722 # can override, but on older systems we have to supply one
723 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
725 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
727 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
730 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
731 # old mingw systems require "-dll" to link a DLL, while more recent ones
733 SAVE_CFLAGS="$CFLAGS"
734 CFLAGS="$CFLAGS -mdll"
735 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
736 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
737 CFLAGS="$SAVE_CFLAGS" ;;
738 *-*-cygwin* | *-*-pw32*)
739 # cygwin systems need to pass --dll to the linker, and not link
740 # crt.o which will require a WinMain@16 definition.
741 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
751 # AC_LIBTOOL_HEADER_ASSERT
752 # ------------------------
753 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
754 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
755 [lt_cv_func_assert_works],
758 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
759 case `$CC --version 2>/dev/null` in
760 [[12]].*) lt_cv_func_assert_works=no ;;
761 *) lt_cv_func_assert_works=yes ;;
767 if test "x$lt_cv_func_assert_works" = xyes; then
768 AC_CHECK_HEADERS(assert.h)
770 ])# AC_LIBTOOL_HEADER_ASSERT
773 # --------------------
774 AC_DEFUN([_LT_AC_CHECK_DLFCN],
775 [AC_CHECK_HEADERS(dlfcn.h)
776 ])# _LT_AC_CHECK_DLFCN
778 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
779 # ---------------------------------
780 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
781 [AC_REQUIRE([AC_CANONICAL_HOST])
782 AC_REQUIRE([AC_PROG_NM])
783 AC_REQUIRE([AC_OBJEXT])
784 # Check for command to grab the raw symbol name followed by C symbol from nm.
785 AC_MSG_CHECKING([command to parse $NM output])
786 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
788 # These are sane defaults that work on at least a few old systems.
789 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
791 # Character class describing NM global symbol codes.
792 symcode='[[BCDEGRST]]'
794 # Regexp to match symbols that can be accessed directly from C.
795 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
797 # Transform the above into a raw symbol and a C symbol.
800 # Transform an extracted symbol line into a proper C declaration
801 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
803 # Transform an extracted symbol line into symbol name and symbol address
804 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'"
806 # Define system-specific variables.
811 cygwin* | mingw* | pw32*)
812 symcode='[[ABCDGISTW]]'
814 hpux*) # Its linker distinguishes data from code symbols
815 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
816 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'"
819 symcode='[[BCDEGRST]]'
822 symcode='[[BCDEGQRST]]'
832 # Handle CRLF in mingw tool chain
836 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
840 # If we're using GNU nm, then use its standard symbol codes.
841 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
842 symcode='[[ABCDGISTW]]'
845 # Try without a prefix undercore, then with it.
846 for ac_symprfx in "" "_"; do
848 # Write the raw and C identifiers.
849 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
851 # Check to see that the pipe works correctly.
854 cat > conftest.$ac_ext <<EOF
859 void nm_test_func(){}
863 int main(){nm_test_var='a';nm_test_func();return(0);}
866 if AC_TRY_EVAL(ac_compile); then
867 # Now try to grab the symbols.
869 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
870 # Try sorting and uniquifying the output.
871 if sort "$nlist" | uniq > "$nlist"T; then
872 mv -f "$nlist"T "$nlist"
877 # Make sure that we snagged all the symbols we need.
878 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
879 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
880 cat <<EOF > conftest.$ac_ext
886 # Now generate the symbol file.
887 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
889 cat <<EOF >> conftest.$ac_ext
890 #if defined (__STDC__) && __STDC__
891 # define lt_ptr void *
893 # define lt_ptr char *
897 /* The mapping between symbol names and symbols. */
902 lt_preloaded_symbols[[]] =
905 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
906 cat <<\EOF >> conftest.$ac_ext
914 # Now try linking the two files.
915 mv conftest.$ac_objext conftstm.$ac_objext
917 save_CFLAGS="$CFLAGS"
918 LIBS="conftstm.$ac_objext"
919 CFLAGS="$CFLAGS$no_builtin_flag"
920 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
924 CFLAGS="$save_CFLAGS"
926 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
929 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
932 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
935 echo "$progname: failed program was:" >&AC_FD_CC
936 cat conftest.$ac_ext >&5
938 rm -f conftest* conftst*
940 # Do not use the global_symbol_pipe unless it works.
941 if test "$pipe_works" = yes; then
944 lt_cv_sys_global_symbol_pipe=
948 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
949 if test -z "$lt_cv_sys_global_symbol_pipe"; then
950 global_symbol_to_cdecl=
951 global_symbol_to_c_name_address=
953 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
954 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
956 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
958 AC_MSG_RESULT(failed)
962 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
964 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
965 # ---------------------------------
966 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
967 [# Find the correct PATH separator. Usually this is `:', but
968 # DJGPP uses `;' like DOS.
969 if test "X${PATH_SEPARATOR+set}" != Xset; then
970 UNAME=${UNAME-`uname 2>/dev/null`}
972 *-DOS) lt_cv_sys_path_separator=';' ;;
973 *) lt_cv_sys_path_separator=':' ;;
975 PATH_SEPARATOR=$lt_cv_sys_path_separator
977 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
979 # _LT_AC_PROG_ECHO_BACKSLASH
980 # --------------------------
981 # Add some code to the start of the generated configure script which
982 # will find an echo command which doesn't interpret backslashes.
983 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
984 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
985 [AC_DIVERT_PUSH(NOTICE)])
986 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
988 # Check that we are running under the correct shell.
989 SHELL=${CONFIG_SHELL-/bin/sh}
993 # Remove one level of quotation (which was required for Make).
994 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
999 if test "X[$]1" = X--no-reexec; then
1000 # Discard the --no-reexec flag, and continue.
1002 elif test "X[$]1" = X--fallback-echo; then
1003 # Avoid inline document here, it may be left over
1005 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1006 # Yippee, $echo works!
1009 # Restart under the correct shell.
1010 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1013 if test "X[$]1" = X--fallback-echo; then
1014 # used as fallback echo
1022 # The HP-UX ksh and POSIX shell print the target directory to stdout
1024 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1026 if test -z "$ECHO"; then
1027 if test "X${echo_test_string+set}" != Xset; then
1028 # find a string as large as possible, as long as the shell can cope with it
1029 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1030 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1031 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1032 echo_test_string="`eval $cmd`" &&
1033 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1040 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1041 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1042 test "X$echo_testing_string" = "X$echo_test_string"; then
1045 # The Solaris, AIX, and Digital Unix default echo programs unquote
1046 # backslashes. This makes it impossible to quote backslashes using
1047 # echo "$something" | sed 's/\\/\\\\/g'
1049 # So, first we look for a working echo in the user's PATH.
1051 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1052 for dir in $PATH /usr/ucb; do
1053 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1054 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1055 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1056 test "X$echo_testing_string" = "X$echo_test_string"; then
1063 if test "X$echo" = Xecho; then
1064 # We didn't find a better echo, so look for alternatives.
1065 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1066 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1067 test "X$echo_testing_string" = "X$echo_test_string"; then
1068 # This shell has a builtin print -r that does the trick.
1070 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1071 test "X$CONFIG_SHELL" != X/bin/ksh; then
1072 # If we have ksh, try running configure again with it.
1073 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1074 export ORIGINAL_CONFIG_SHELL
1075 CONFIG_SHELL=/bin/ksh
1077 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1081 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1082 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1083 test "X$echo_testing_string" = "X$echo_test_string"; then
1084 # Cool, printf works
1086 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1087 test "X$echo_testing_string" = 'X\t' &&
1088 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1089 test "X$echo_testing_string" = "X$echo_test_string"; then
1090 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1092 SHELL="$CONFIG_SHELL"
1094 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1095 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1096 test "X$echo_testing_string" = 'X\t' &&
1097 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1098 test "X$echo_testing_string" = "X$echo_test_string"; then
1099 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1101 # maybe with a smaller string...
1104 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1105 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1112 if test "$prev" != 'sed 50q "[$]0"'; then
1113 echo_test_string=`eval $prev`
1114 export echo_test_string
1115 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1117 # Oops. We lost completely, so just stick with echo.
1126 # Copy echo and quote the copy suitably for passing to libtool from
1127 # the Makefile, instead of quoting the original, which is used later.
1129 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1130 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1135 ])# _LT_AC_PROG_ECHO_BACKSLASH
1137 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1138 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1139 # ------------------------------------------------------------------
1140 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1141 [if test "$cross_compiling" = yes; then :
1144 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1145 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1146 lt_status=$lt_dlunknown
1147 cat > conftest.$ac_ext <<EOF
1148 [#line __oline__ "configure"
1149 #include "confdefs.h"
1158 # define LT_DLGLOBAL RTLD_GLOBAL
1161 # define LT_DLGLOBAL DL_GLOBAL
1163 # define LT_DLGLOBAL 0
1167 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1168 find out it does not work in some platform. */
1169 #ifndef LT_DLLAZY_OR_NOW
1171 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1174 # define LT_DLLAZY_OR_NOW DL_LAZY
1177 # define LT_DLLAZY_OR_NOW RTLD_NOW
1180 # define LT_DLLAZY_OR_NOW DL_NOW
1182 # define LT_DLLAZY_OR_NOW 0
1190 extern "C" void exit (int);
1193 void fnord() { int i=42;}
1196 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1197 int status = $lt_dlunknown;
1201 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1202 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1203 /* dlclose (self); */
1209 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1210 (./conftest; exit; ) 2>/dev/null
1213 x$lt_dlno_uscore) $1 ;;
1214 x$lt_dlneed_uscore) $2 ;;
1215 x$lt_unknown|x*) $3 ;;
1218 # compilation failed
1223 ])# _LT_AC_TRY_DLOPEN_SELF
1225 # AC_LIBTOOL_DLOPEN_SELF
1226 # -------------------
1227 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1228 [if test "x$enable_dlopen" != xyes; then
1229 enable_dlopen=unknown
1230 enable_dlopen_self=unknown
1231 enable_dlopen_self_static=unknown
1238 lt_cv_dlopen="load_add_on"
1240 lt_cv_dlopen_self=yes
1243 cygwin* | mingw* | pw32*)
1244 lt_cv_dlopen="LoadLibrary"
1249 AC_CHECK_FUNC([shl_load],
1250 [lt_cv_dlopen="shl_load"],
1251 [AC_CHECK_LIB([dld], [shl_load],
1252 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1253 [AC_CHECK_FUNC([dlopen],
1254 [lt_cv_dlopen="dlopen"],
1255 [AC_CHECK_LIB([dl], [dlopen],
1256 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1257 [AC_CHECK_LIB([svld], [dlopen],
1258 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1259 [AC_CHECK_LIB([dld], [dld_link],
1260 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1269 if test "x$lt_cv_dlopen" != xno; then
1275 case $lt_cv_dlopen in
1277 save_CPPFLAGS="$CPPFLAGS"
1278 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1279 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1281 save_LDFLAGS="$LDFLAGS"
1282 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1285 LIBS="$lt_cv_dlopen_libs $LIBS"
1287 AC_CACHE_CHECK([whether a program can dlopen itself],
1288 lt_cv_dlopen_self, [dnl
1289 _LT_AC_TRY_DLOPEN_SELF(
1290 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1291 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1294 if test "x$lt_cv_dlopen_self" = xyes; then
1295 LDFLAGS="$LDFLAGS $link_static_flag"
1296 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1297 lt_cv_dlopen_self_static, [dnl
1298 _LT_AC_TRY_DLOPEN_SELF(
1299 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1300 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1304 CPPFLAGS="$save_CPPFLAGS"
1305 LDFLAGS="$save_LDFLAGS"
1310 case $lt_cv_dlopen_self in
1311 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1312 *) enable_dlopen_self=unknown ;;
1315 case $lt_cv_dlopen_self_static in
1316 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1317 *) enable_dlopen_self_static=unknown ;;
1320 ])# AC_LIBTOOL_DLOPEN_SELF
1322 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1323 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1324 # Sed substitution that helps us do robust quoting. It backslashifies
1325 # metacharacters that are still active within double-quoted strings.
1326 Xsed='sed -e s/^X//'
1327 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1329 # Same as above, but do not quote variable references.
1330 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1332 # Sed substitution to delay expansion of an escaped shell variable in a
1333 # double_quote_subst'ed string.
1334 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1340 default_ofile=libtool
1341 can_build_shared=yes
1343 # All known linkers require a `.a' archive for static linking (except M$VC,
1344 # which needs '.lib').
1346 ltmain="$ac_aux_dir/ltmain.sh"
1347 ofile="$default_ofile"
1348 with_gnu_ld="$lt_cv_prog_gnu_ld"
1349 need_locks="$enable_libtool_lock"
1352 old_CFLAGS="$CFLAGS"
1354 # Set sane defaults for various variables
1355 test -z "$AR" && AR=ar
1356 test -z "$AR_FLAGS" && AR_FLAGS=cru
1357 test -z "$AS" && AS=as
1358 test -z "$CC" && CC=cc
1359 test -z "$DLLTOOL" && DLLTOOL=dlltool
1360 test -z "$LD" && LD=ld
1361 test -z "$LN_S" && LN_S="ln -s"
1362 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1363 test -z "$NM" && NM=nm
1364 test -z "$OBJDUMP" && OBJDUMP=objdump
1365 test -z "$RANLIB" && RANLIB=:
1366 test -z "$STRIP" && STRIP=:
1367 test -z "$ac_objext" && ac_objext=o
1369 if test x"$host" != x"$build"; then
1370 ac_tool_prefix=${host_alias}-
1375 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1378 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1383 # AIX sometimes has problems with the GCC collect2 program. For some
1384 # reason, if we set the COLLECT_NAMES environment variable, the problems
1385 # vanish in a puff of smoke.
1386 if test "X${COLLECT_NAMES+set}" != Xset; then
1388 export COLLECT_NAMES
1393 # Determine commands to create old-style static archives.
1394 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1395 old_postinstall_cmds='chmod 644 $oldlib'
1396 old_postuninstall_cmds=
1398 if test -n "$RANLIB"; then
1401 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1404 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1407 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1410 # Allow CC to be a program name with arguments.
1414 AC_MSG_CHECKING([for objdir])
1415 rm -f .libs 2>/dev/null
1416 mkdir .libs 2>/dev/null
1417 if test -d .libs; then
1420 # MS-DOS does not allow filenames that begin with a dot.
1423 rmdir .libs 2>/dev/null
1424 AC_MSG_RESULT($objdir)
1428 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1429 pic_mode="$withval", pic_mode=default)
1430 test -z "$pic_mode" && pic_mode=default
1432 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1433 # in isolation, and that seeing it set (from the cache) indicates that
1434 # the associated values are set (in the cache) correctly too.
1435 AC_MSG_CHECKING([for $compiler option to produce PIC])
1436 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1437 [ lt_cv_prog_cc_pic=
1438 lt_cv_prog_cc_shlib=
1440 lt_cv_prog_cc_static=
1441 lt_cv_prog_cc_no_builtin=
1442 lt_cv_prog_cc_can_build_shared=$can_build_shared
1444 if test "$GCC" = yes; then
1445 lt_cv_prog_cc_wl='-Wl,'
1446 lt_cv_prog_cc_static='-static'
1450 # Below there is a dirty hack to force normal static linking with -ldl
1451 # The problem is because libdl dynamically linked with both libc and
1452 # libC (AIX C++ library), which obviously doesn't included in libraries
1453 # list by gcc. This cause undefined symbols with -static flags.
1454 # This hack allows C programs to be linked with "-static -ldl", but
1455 # not sure about C++ programs.
1456 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1459 # FIXME: we need at least 68020 code to build shared libraries, but
1460 # adding the `-m68020' flag to GCC prevents building anything better,
1462 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1464 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1465 # PIC is the default for these OSes.
1467 darwin* | rhapsody*)
1468 # PIC is the default on this platform
1469 # Common symbols not allowed in MH_DYLIB files
1470 lt_cv_prog_cc_pic='-fno-common'
1472 cygwin* | mingw* | pw32* | os2*)
1473 # This hack is so that the source file can tell whether it is being
1474 # built for inclusion in a dll (and should export symbols for example).
1475 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1478 if test -d /usr/nec; then
1479 lt_cv_prog_cc_pic=-Kconform_pic
1483 lt_cv_prog_cc_pic='-fPIC'
1487 # PORTME Check for PIC flags for the system compiler.
1489 aix3* | aix4* | aix5*)
1490 lt_cv_prog_cc_wl='-Wl,'
1491 # All AIX code is PIC.
1492 if test "$host_cpu" = ia64; then
1493 # AIX 5 now supports IA64 processor
1494 lt_cv_prog_cc_static='-Bstatic'
1496 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1500 hpux9* | hpux10* | hpux11*)
1501 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1502 lt_cv_prog_cc_wl='-Wl,'
1503 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1504 lt_cv_prog_cc_pic='+Z'
1507 irix5* | irix6* | nonstopux*)
1508 lt_cv_prog_cc_wl='-Wl,'
1509 lt_cv_prog_cc_static='-non_shared'
1510 # PIC (with -KPIC) is the default.
1513 cygwin* | mingw* | pw32* | os2*)
1514 # This hack is so that the source file can tell whether it is being
1515 # built for inclusion in a dll (and should export symbols for example).
1516 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1520 lt_cv_prog_cc_pic='-KPIC'
1521 lt_cv_prog_cc_static='-Bstatic'
1524 osf3* | osf4* | osf5*)
1525 # All OSF/1 code is PIC.
1526 lt_cv_prog_cc_wl='-Wl,'
1527 lt_cv_prog_cc_static='-non_shared'
1531 lt_cv_prog_cc_pic='-Kpic'
1532 lt_cv_prog_cc_static='-dn'
1533 lt_cv_prog_cc_shlib='-belf'
1537 lt_cv_prog_cc_pic='-KPIC'
1538 lt_cv_prog_cc_static='-Bstatic'
1539 lt_cv_prog_cc_wl='-Wl,'
1543 lt_cv_prog_cc_pic='-PIC'
1544 lt_cv_prog_cc_static='-Bstatic'
1545 lt_cv_prog_cc_wl='-Qoption ld '
1548 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1549 lt_cv_prog_cc_pic='-KPIC'
1550 lt_cv_prog_cc_static='-Bstatic'
1551 lt_cv_prog_cc_wl='-Wl,'
1555 lt_cv_prog_cc_pic='-pic'
1556 lt_cv_prog_cc_static='-Bstatic'
1560 if test -d /usr/nec ;then
1561 lt_cv_prog_cc_pic='-Kconform_pic'
1562 lt_cv_prog_cc_static='-Bstatic'
1567 lt_cv_prog_cc_can_build_shared=no
1572 if test -z "$lt_cv_prog_cc_pic"; then
1573 AC_MSG_RESULT([none])
1575 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1577 # Check to make sure the pic_flag actually works.
1578 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1579 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1580 save_CFLAGS="$CFLAGS"
1581 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1582 AC_TRY_COMPILE([], [], [dnl
1584 hpux9* | hpux10* | hpux11*)
1585 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1586 # they create non-PIC objects. So, if there were any warnings, we
1587 # assume that PIC is not supported.
1588 if test -s conftest.err; then
1589 lt_cv_prog_cc_pic_works=no
1591 lt_cv_prog_cc_pic_works=yes
1595 lt_cv_prog_cc_pic_works=yes
1599 lt_cv_prog_cc_pic_works=no
1601 CFLAGS="$save_CFLAGS"
1604 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1606 lt_cv_prog_cc_can_build_shared=no
1608 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1611 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1614 # Check for any special shared library compilation flags.
1615 if test -n "$lt_cv_prog_cc_shlib"; then
1616 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1617 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1619 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1620 lt_cv_prog_cc_can_build_shared=no
1624 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1625 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1626 lt_cv_prog_cc_static_works=no
1627 save_LDFLAGS="$LDFLAGS"
1628 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1629 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1630 LDFLAGS="$save_LDFLAGS"
1633 # Belt *and* braces to stop my trousers falling down:
1634 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1635 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1637 pic_flag="$lt_cv_prog_cc_pic"
1638 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1639 wl="$lt_cv_prog_cc_wl"
1640 link_static_flag="$lt_cv_prog_cc_static"
1641 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1642 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1645 # Check to see if options -o and -c are simultaneously supported by compiler
1646 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1647 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1648 $rm -r conftest 2>/dev/null
1651 echo "int some_variable = 0;" > conftest.$ac_ext
1653 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1654 # that will create temporary files in the current directory regardless of
1655 # the output directory. Thus, making CWD read-only will cause this test
1656 # to fail, enabling locking or at least warning the user not to do parallel
1659 save_CFLAGS="$CFLAGS"
1660 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1662 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1663 # The compiler can only warn and ignore the option if not recognized
1664 # So say no if there are warnings
1665 if test -s out/conftest.err; then
1666 lt_cv_compiler_c_o=no
1668 lt_cv_compiler_c_o=yes
1671 # Append any errors to the config.log.
1672 cat out/conftest.err 1>&AC_FD_CC
1673 lt_cv_compiler_c_o=no
1675 CFLAGS="$save_CFLAGS"
1681 $rm -r conftest 2>/dev/null
1683 compiler_c_o=$lt_cv_compiler_c_o
1684 AC_MSG_RESULT([$compiler_c_o])
1686 if test x"$compiler_c_o" = x"yes"; then
1687 # Check to see if we can write to a .lo
1688 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1689 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1690 lt_cv_compiler_o_lo=no
1691 save_CFLAGS="$CFLAGS"
1692 CFLAGS="$CFLAGS -c -o conftest.lo"
1693 save_objext="$ac_objext"
1695 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1696 # The compiler can only warn and ignore the option if not recognized
1697 # So say no if there are warnings
1698 if test -s conftest.err; then
1699 lt_cv_compiler_o_lo=no
1701 lt_cv_compiler_o_lo=yes
1704 ac_objext="$save_objext"
1705 CFLAGS="$save_CFLAGS"
1707 compiler_o_lo=$lt_cv_compiler_o_lo
1708 AC_MSG_RESULT([$compiler_o_lo])
1713 # Check to see if we can do hard links to lock some files if needed
1714 hard_links="nottested"
1715 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1716 # do not overwrite the value of need_locks provided by the user
1717 AC_MSG_CHECKING([if we can lock with hard links])
1720 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1722 ln conftest.a conftest.b 2>&5 || hard_links=no
1723 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1724 AC_MSG_RESULT([$hard_links])
1725 if test "$hard_links" = no; then
1726 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1733 if test "$GCC" = yes; then
1734 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1735 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1736 echo "int some_variable = 0;" > conftest.$ac_ext
1737 save_CFLAGS="$CFLAGS"
1738 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1739 compiler_rtti_exceptions=no
1740 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1741 # The compiler can only warn and ignore the option if not recognized
1742 # So say no if there are warnings
1743 if test -s conftest.err; then
1744 compiler_rtti_exceptions=no
1746 compiler_rtti_exceptions=yes
1749 CFLAGS="$save_CFLAGS"
1750 AC_MSG_RESULT([$compiler_rtti_exceptions])
1752 if test "$compiler_rtti_exceptions" = "yes"; then
1753 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1755 no_builtin_flag=' -fno-builtin'
1759 # See if the linker supports building shared libraries.
1760 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1762 allow_undefined_flag=
1764 need_lib_prefix=unknown
1765 need_version=unknown
1766 # when you set need_version to no, make sure it does not cause -set_version
1767 # flags to be left without arguments
1769 archive_expsym_cmds=
1770 old_archive_from_new_cmds=
1771 old_archive_from_expsyms_cmds=
1772 export_dynamic_flag_spec=
1773 whole_archive_flag_spec=
1774 thread_safe_flag_spec=
1775 hardcode_into_libs=no
1776 hardcode_libdir_flag_spec=
1777 hardcode_libdir_separator=
1780 hardcode_shlibpath_var=unsupported
1782 link_all_deplibs=unknown
1783 always_export_symbols=no
1784 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1785 # include_expsyms should be a list of space-separated symbols to be *always*
1786 # included in the symbol list
1788 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1789 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1790 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1791 # as well as any symbol that contains `d'.
1792 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1793 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1794 # platforms (ab)use it in PIC code, but their linkers get confused if
1795 # the symbol is explicitly referenced. Since portable code cannot
1796 # rely on this symbol name, it's probably fine to never include it in
1797 # preloaded symbol tables.
1798 extract_expsyms_cmds=
1801 cygwin* | mingw* | pw32*)
1802 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1803 # When not using gcc, we currently assume that we are using
1804 # Microsoft Visual C++.
1805 if test "$GCC" != yes; then
1815 if test "$with_gnu_ld" = yes; then
1816 # If archive_cmds runs LD, not CC, wlarc should be empty
1819 # See if GNU ld supports shared libraries.
1821 aix3* | aix4* | aix5*)
1822 # On AIX, the GNU linker is very broken
1823 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1827 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1828 *** to be unable to reliably create shared libraries on AIX.
1829 *** Therefore, libtool is disabling shared libraries support. If you
1830 *** really care for shared libraries, you may want to modify your PATH
1831 *** so that a non-GNU linker is found, and then restart.
1837 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)'
1838 hardcode_libdir_flag_spec='-L$libdir'
1839 hardcode_minus_L=yes
1841 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1842 # that the semantics of dynamic libraries on AmigaOS, at least up
1843 # to version 4, is to share data among multiple programs linked
1844 # with the same dynamic library. Since this doesn't match the
1845 # behavior of shared libraries on other platforms, we can use
1851 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1852 allow_undefined_flag=unsupported
1853 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1854 # support --undefined. This deserves some investigation. FIXME
1855 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1861 cygwin* | mingw* | pw32*)
1862 # hardcode_libdir_flag_spec is actually meaningless, as there is
1863 # no search path for DLLs.
1864 hardcode_libdir_flag_spec='-L$libdir'
1865 allow_undefined_flag=unsupported
1866 always_export_symbols=yes
1868 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1869 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1870 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1871 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1872 else $CC -o impgen impgen.c ; fi)~
1873 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1875 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1877 # cygwin and mingw dlls have different entry points and sets of symbols
1879 # FIXME: what about values for MSVC?
1880 dll_entry=__cygwin_dll_entry@12
1881 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1885 dll_entry=_DllMainCRTStartup@12
1886 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1890 # mingw and cygwin differ, and it's simplest to just exclude the union
1891 # of the two symbol sets.
1892 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1894 # recent cygwin and mingw systems supply a stub DllMain which the user
1895 # can override, but on older systems we have to supply one (in ltdll.c)
1896 if test "x$lt_cv_need_dllmain" = "xyes"; then
1897 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1898 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~
1899 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1905 # Extract the symbol export list from an `--export-all' def file,
1906 # then regenerate the def file from the symbol export list, so that
1907 # the compiled dll only exports the symbol export list.
1908 # Be careful not to strip the DATA tag left be newer dlltools.
1909 export_symbols_cmds="$ltdll_cmds"'
1910 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1911 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1913 # If the export-symbols file already is a .def file (1st line
1914 # is EXPORTS), use it as is.
1915 # If DATA tags from a recent dlltool are present, honour them!
1916 archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1917 cp $export_symbols $output_objdir/$soname-def;
1919 echo EXPORTS > $output_objdir/$soname-def;
1921 cat $export_symbols | while read symbol; do
1924 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1925 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1926 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1928 _lt_hint=`expr 1 + \$_lt_hint`;
1932 $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~
1933 $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~
1934 $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~
1935 $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~
1936 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1940 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1941 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1944 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1945 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1950 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1954 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1955 *** create shared libraries on Solaris systems. Therefore, libtool
1956 *** is disabling shared libraries support. We urge you to upgrade GNU
1957 *** binutils to release 2.9.1 or newer. Another option is to modify
1958 *** your PATH or compiler configuration so that the native linker is
1959 *** used, and then restart.
1962 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1963 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1964 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1971 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1974 hardcode_shlibpath_var=no
1978 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1979 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1980 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1987 if test "$ld_shlibs" = yes; then
1988 runpath_var=LD_RUN_PATH
1989 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1990 export_dynamic_flag_spec='${wl}--export-dynamic'
1992 cygwin* | mingw* | pw32*)
1993 # dlltool doesn't understand --whole-archive et. al.
1994 whole_archive_flag_spec=
1997 # ancient GNU ld didn't support --whole-archive et. al.
1998 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1999 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2001 whole_archive_flag_spec=
2007 # PORTME fill in a description of your system's linker (not GNU ld)
2010 allow_undefined_flag=unsupported
2011 always_export_symbols=yes
2012 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'
2013 # Note: this linker hardcodes the directories in LIBPATH if there
2014 # are no directories specified by -L.
2015 hardcode_minus_L=yes
2016 if test "$GCC" = yes && test -z "$link_static_flag"; then
2017 # Neither direct hardcoding nor static linking is supported with a
2019 hardcode_direct=unsupported
2024 if test "$host_cpu" = ia64; then
2025 # On IA64, the linker does run time linking by default, so we don't
2026 # have to do anything special.
2027 aix_use_runtimelinking=no
2028 exp_sym_flag='-Bexport'
2031 aix_use_runtimelinking=no
2033 # Test if we are trying to use run time linking or normal
2034 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2035 # need to do runtime linking.
2036 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2037 for ld_flag in $LDFLAGS; do
2040 aix_use_runtimelinking=yes
2047 exp_sym_flag='-bexport'
2048 no_entry_flag='-bnoentry'
2051 # When large executables or shared objects are built, AIX ld can
2052 # have problems creating the table of contents. If linking a library
2053 # or program results in "error TOC overflow" add -mminimal-toc to
2054 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2055 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2059 hardcode_libdir_separator=':'
2060 if test "$GCC" = yes; then
2061 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2062 collect2name=`${CC} -print-prog-name=collect2`
2063 if test -f "$collect2name" && \
2064 strings "$collect2name" | grep resolve_lib_name >/dev/null
2066 # We have reworked collect2
2069 # We have old collect2
2070 hardcode_direct=unsupported
2071 # It fails to find uninstalled libraries when the uninstalled
2072 # path is not listed in the libpath. Setting hardcode_minus_L
2073 # to unsupported forces relinking
2074 hardcode_minus_L=yes
2075 hardcode_libdir_flag_spec='-L$libdir'
2076 hardcode_libdir_separator=
2080 shared_flag='-shared'
2083 if test "$host_cpu" = ia64; then
2084 shared_flag='${wl}-G'
2086 if test "$aix_use_runtimelinking" = yes; then
2087 shared_flag='${wl}-G'
2089 shared_flag='${wl}-bM:SRE'
2094 # It seems that -bexpall can do strange things, so it is better to
2095 # generate a list of symbols to export.
2096 always_export_symbols=yes
2097 if test "$aix_use_runtimelinking" = yes; then
2098 # Warning - without using the other runtime loading flags (-brtl),
2099 # -berok will link without error, but may produce a broken library.
2100 allow_undefined_flag='-berok'
2101 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2102 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"
2104 if test "$host_cpu" = ia64; then
2105 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2106 allow_undefined_flag="-z nodefs"
2107 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"
2109 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2110 # Warning - without using the other run time loading flags,
2111 # -berok will link without error, but may produce a broken library.
2112 allow_undefined_flag='${wl}-berok'
2113 # This is a bit strange, but is similar to how AIX traditionally builds
2114 # it's shared libraries.
2115 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'
2121 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)'
2122 hardcode_libdir_flag_spec='-L$libdir'
2123 hardcode_minus_L=yes
2124 # see comment about different semantics on the GNU ld section
2128 cygwin* | mingw* | pw32*)
2129 # When not using gcc, we currently assume that we are using
2130 # Microsoft Visual C++.
2131 # hardcode_libdir_flag_spec is actually meaningless, as there is
2132 # no search path for DLLs.
2133 hardcode_libdir_flag_spec=' '
2134 allow_undefined_flag=unsupported
2135 # Tell ltmain to make .lib files, not .a files.
2137 # FIXME: Setting linknames here is a bad hack.
2138 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2139 # The linker will automatically build a .lib file if we build a DLL.
2140 old_archive_from_new_cmds='true'
2141 # FIXME: Should let the user specify the lib program.
2142 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2143 fix_srcfile_path='`cygpath -w "$srcfile"`'
2146 darwin* | rhapsody*)
2148 rhapsody* | darwin1.[[012]])
2149 allow_undefined_flag='-undefined suppress'
2152 allow_undefined_flag='-flat_namespace -undefined suppress'
2155 # FIXME: Relying on posixy $() will cause problems for
2156 # cross-compilation, but unfortunately the echo tests do not
2157 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
2158 # `"' quotes if we put them in here... so don't!
2159 archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2160 # We need to add '_' to the symbols in $export_symbols first
2161 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2163 hardcode_shlibpath_var=no
2164 whole_archive_flag_spec='-all_load $convenience'
2171 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2172 # support. Future versions do this automatically, but an explicit c++rt0.o
2173 # does not break anything, and helps significantly (at the cost of a little
2176 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2177 hardcode_libdir_flag_spec='-R$libdir'
2179 hardcode_shlibpath_var=no
2182 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2184 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2186 hardcode_minus_L=yes
2187 hardcode_shlibpath_var=no
2190 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2192 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2193 hardcode_libdir_flag_spec='-R$libdir'
2195 hardcode_shlibpath_var=no
2198 hpux9* | hpux10* | hpux11*)
2200 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' ;;
2201 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2203 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2204 hardcode_libdir_separator=:
2206 hardcode_minus_L=yes # Not in the search PATH, but as the default
2207 # location of the library.
2208 export_dynamic_flag_spec='${wl}-E'
2211 irix5* | irix6* | nonstopux*)
2212 if test "$GCC" = yes; then
2213 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'
2214 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2216 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'
2217 hardcode_libdir_flag_spec='-rpath $libdir'
2219 hardcode_libdir_separator=:
2220 link_all_deplibs=yes
2224 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2225 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2227 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2229 hardcode_libdir_flag_spec='-R$libdir'
2231 hardcode_shlibpath_var=no
2235 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2237 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2238 hardcode_libdir_separator=:
2239 hardcode_shlibpath_var=no
2244 hardcode_shlibpath_var=no
2245 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2246 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2247 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2248 export_dynamic_flag_spec='${wl}-E'
2251 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2252 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2253 hardcode_libdir_flag_spec='-R$libdir'
2256 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2257 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2264 hardcode_libdir_flag_spec='-L$libdir'
2265 hardcode_minus_L=yes
2266 allow_undefined_flag=unsupported
2267 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'
2268 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2272 if test "$GCC" = yes; then
2273 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2274 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'
2276 allow_undefined_flag=' -expect_unresolved \*'
2277 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'
2279 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2280 hardcode_libdir_separator=:
2283 osf4* | osf5*) # as osf3* with the addition of -msym flag
2284 if test "$GCC" = yes; then
2285 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2286 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'
2287 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2289 allow_undefined_flag=' -expect_unresolved \*'
2290 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'
2291 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2292 $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'
2294 #Both c and cxx compiler support -rpath directly
2295 hardcode_libdir_flag_spec='-rpath $libdir'
2297 hardcode_libdir_separator=:
2301 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2302 hardcode_shlibpath_var=no
2303 runpath_var=LD_RUN_PATH
2304 hardcode_runpath_var=yes
2305 export_dynamic_flag_spec='${wl}-Bexport'
2309 # gcc --version < 3.0 without binutils cannot create self contained
2310 # shared libraries reliably, requiring libgcc.a to resolve some of
2311 # the object symbols generated in some cases. Libraries that use
2312 # assert need libgcc.a to resolve __eprintf, for example. Linking
2313 # a copy of libgcc.a into every shared library to guarantee resolving
2314 # such symbols causes other problems: According to Tim Van Holder
2315 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2316 # (to the application) exception stack for one thing.
2317 no_undefined_flag=' -z defs'
2318 if test "$GCC" = yes; then
2319 case `$CC --version 2>/dev/null` in
2323 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2324 *** create self contained shared libraries on Solaris systems, without
2325 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2326 *** -no-undefined support, which will at least allow you to build shared
2327 *** libraries. However, you may find that when you link such libraries
2328 *** into an application without using GCC, you have to manually add
2329 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2330 *** upgrade to a newer version of GCC. Another option is to rebuild your
2331 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2338 # $CC -shared without GNU ld will not create a library from C++
2339 # object files and a static libstdc++, better avoid it by now
2340 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2341 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2342 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2343 hardcode_libdir_flag_spec='-R$libdir'
2344 hardcode_shlibpath_var=no
2346 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2347 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2348 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2350 link_all_deplibs=yes
2354 if test "x$host_vendor" = xsequent; then
2355 # Use $CC to link under sequent, because it throws in some extra .o
2356 # files that make .init and .fini sections work.
2357 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2359 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2361 hardcode_libdir_flag_spec='-L$libdir'
2363 hardcode_minus_L=yes
2364 hardcode_shlibpath_var=no
2368 case $host_vendor in
2370 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2371 hardcode_direct=yes # is this really true???
2374 ## LD is ld it makes a PLAMLIB
2375 ## CC just makes a GrossModule.
2376 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2377 reload_cmds='$CC -r -o $output$reload_objs'
2381 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2382 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2385 runpath_var='LD_RUN_PATH'
2386 hardcode_shlibpath_var=no
2390 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2391 hardcode_shlibpath_var=no
2392 export_dynamic_flag_spec='-Bexport'
2396 no_undefined_flag=' -z text'
2397 # $CC -shared without GNU ld will not create a library from C++
2398 # object files and a static libstdc++, better avoid it by now
2399 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2400 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2401 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2402 hardcode_libdir_flag_spec=
2403 hardcode_shlibpath_var=no
2404 runpath_var='LD_RUN_PATH'
2408 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2409 hardcode_libdir_flag_spec='-L$libdir'
2410 hardcode_shlibpath_var=no
2414 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2415 hardcode_libdir_flag_spec='-L$libdir'
2416 hardcode_shlibpath_var=no
2420 if test -d /usr/nec; then
2421 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2422 hardcode_shlibpath_var=no
2423 runpath_var=LD_RUN_PATH
2424 hardcode_runpath_var=yes
2430 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2433 hardcode_shlibpath_var=no
2434 hardcode_runpath_var=yes
2435 runpath_var=LD_RUN_PATH
2438 sysv5uw7* | unixware7*)
2439 no_undefined_flag='${wl}-z ${wl}text'
2440 if test "$GCC" = yes; then
2441 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2443 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2445 runpath_var='LD_RUN_PATH'
2446 hardcode_shlibpath_var=no
2454 AC_MSG_RESULT([$ld_shlibs])
2455 test "$ld_shlibs" = no && can_build_shared=no
2457 # Check hardcoding attributes.
2458 AC_MSG_CHECKING([how to hardcode library paths into programs])
2460 if test -n "$hardcode_libdir_flag_spec" || \
2461 test -n "$runpath_var"; then
2463 # We can hardcode non-existant directories.
2464 if test "$hardcode_direct" != no &&
2465 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2466 # have to relink, otherwise we might link with an installed library
2467 # when we should be linking with a yet-to-be-installed one
2468 ## test "$hardcode_shlibpath_var" != no &&
2469 test "$hardcode_minus_L" != no; then
2470 # Linking always hardcodes the temporary library directory.
2471 hardcode_action=relink
2473 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2474 hardcode_action=immediate
2477 # We cannot hardcode anything, or else we can only hardcode existing
2479 hardcode_action=unsupported
2481 AC_MSG_RESULT([$hardcode_action])
2485 AC_MSG_CHECKING([whether stripping libraries is possible])
2486 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2487 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2488 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2489 AC_MSG_RESULT([yes])
2494 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2495 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2497 # PORTME Fill in your ld.so characteristics
2498 AC_MSG_CHECKING([dynamic linker characteristics])
2500 libname_spec='lib$name'
2507 shlibpath_overrides_runpath=unknown
2509 dynamic_linker="$host_os ld.so"
2510 sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib"
2511 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib /usr/X11R6/lib"
2516 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2517 shlibpath_var=LIBPATH
2519 # AIX has no versioning support, so we append a major version to the name.
2520 soname_spec='${libname}${release}.so$major'
2527 hardcode_into_libs=yes
2528 if test "$host_cpu" = ia64; then
2529 # AIX 5 supports IA64
2530 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2531 shlibpath_var=LD_LIBRARY_PATH
2533 # With GCC up to 2.95.x, collect2 would create an import file
2534 # for dependence libraries. The import file would start with
2535 # the line `#! .'. This would cause the generated library to
2536 # depend on `.', always an invalid library. This was fixed in
2537 # development snapshots of GCC prior to 3.0.
2539 aix4 | aix4.[[01]] | aix4.[[01]].*)
2540 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2542 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2549 # AIX (on Power*) has no versioning support, so currently we can
2550 # not hardcode correct soname into executable. Probably we can
2551 # add versioning support to collect2, so additional links can
2552 # be useful in future.
2553 if test "$aix_use_runtimelinking" = yes; then
2554 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2555 # instead of lib<name>.a to let people know that these are not
2556 # typical AIX shared libraries.
2557 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2559 # We preserve .a as extension for shared libraries through AIX4.2
2560 # and later when we are not doing run time linking.
2561 library_names_spec='${libname}${release}.a $libname.a'
2562 soname_spec='${libname}${release}.so$major'
2564 shlibpath_var=LIBPATH
2566 hardcode_into_libs=yes
2570 library_names_spec='$libname.ixlibrary $libname.a'
2571 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2572 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'
2576 library_names_spec='${libname}.so'
2577 dynamic_linker="$host_os ld.so"
2578 shlibpath_var=LIBRARY_PATH
2584 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2585 soname_spec='${libname}${release}.so$major'
2586 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2587 shlibpath_var=LD_LIBRARY_PATH
2588 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2589 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2590 export_dynamic_flag_spec=-rdynamic
2591 # the default ld.so.conf also contains /usr/contrib/lib and
2592 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2593 # libtool to hard-code these into programs
2596 cygwin* | mingw* | pw32*)
2597 version_type=windows
2600 case $GCC,$host_os in
2602 library_names_spec='$libname.dll.a'
2603 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2604 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2605 dldir=$destdir/`dirname \$dlpath`~
2606 test -d \$dldir || mkdir -p \$dldir~
2607 $install_prog .libs/$dlname \$dldir/$dlname'
2608 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2609 dlpath=$dir/\$dldll~
2613 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2614 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2617 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2620 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2623 dynamic_linker='Win32 ld.exe'
2624 # FIXME: first we should search . and the directory the executable is in
2628 darwin* | rhapsody*)
2629 dynamic_linker="$host_os dyld"
2633 # FIXME: Relying on posixy $() will cause problems for
2634 # cross-compilation, but unfortunately the echo tests do not
2635 # yet detect zsh echo's removal of \ escapes.
2636 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)'
2637 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2638 shlibpath_overrides_runpath=yes
2639 shlibpath_var=DYLD_LIBRARY_PATH
2647 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2648 version_type=freebsd-$objformat
2649 case $version_type in
2651 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2656 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2660 shlibpath_var=LD_LIBRARY_PATH
2663 shlibpath_overrides_runpath=yes
2666 shlibpath_overrides_runpath=no
2667 hardcode_into_libs=yes
2676 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2677 soname_spec='${libname}${release}.so$major'
2678 shlibpath_var=LD_LIBRARY_PATH
2679 hardcode_into_libs=yes
2682 hpux9* | hpux10* | hpux11*)
2683 # Give a soname corresponding to the major version so that dld.sl refuses to
2684 # link against other versions.
2685 dynamic_linker="$host_os dld.sl"
2689 shlibpath_var=SHLIB_PATH
2690 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2691 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2692 soname_spec='${libname}${release}.sl$major'
2693 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2694 postinstall_cmds='chmod 555 $lib'
2697 irix5* | irix6* | nonstopux*)
2699 nonstopux*) version_type=nonstopux ;;
2700 *) version_type=irix ;;
2704 soname_spec='${libname}${release}.so$major'
2705 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2707 irix5* | nonstopux*)
2711 case $LD in # libtool.m4 will add one of these switches to LD
2712 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2713 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2714 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2715 *) libsuff= shlibsuff= libmagic=never-match;;
2719 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2720 shlibpath_overrides_runpath=no
2721 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2722 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2725 # No shared lib support for Linux oldld, aout, or coff.
2726 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2730 # This must be Linux ELF.
2735 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2736 soname_spec='${libname}${release}.so$major'
2737 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2738 shlibpath_var=LD_LIBRARY_PATH
2739 shlibpath_overrides_runpath=no
2740 # This implies no fast_install, which is unacceptable.
2741 # Some rework will be needed to allow for fast_install
2742 # before this can be enabled.
2743 hardcode_into_libs=yes
2745 case $host_cpu:$lt_cv_cc_64bit_output in
2746 powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
2747 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
2748 sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
2752 # We used to test for /lib/ld.so.1 and disable shared libraries on
2753 # powerpc, because MkLinux only supported shared libraries with the
2754 # GNU dynamic linker. Since this was broken with cross compilers,
2755 # most powerpc-linux boxes support dynamic linking these days and
2756 # people can always --disable-shared, the test was removed, and we
2757 # assume the GNU/Linux dynamic linker is in use.
2758 dynamic_linker='GNU/Linux ld.so'
2765 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2766 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2767 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2768 dynamic_linker='NetBSD (a.out) ld.so'
2770 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2771 soname_spec='${libname}${release}.so$major'
2772 dynamic_linker='NetBSD ld.elf_so'
2774 shlibpath_var=LD_LIBRARY_PATH
2775 shlibpath_overrides_runpath=yes
2776 hardcode_into_libs=yes
2781 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2782 shlibpath_var=LD_LIBRARY_PATH
2783 shlibpath_overrides_runpath=yes
2790 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2792 openbsd2.[[89]] | openbsd2.[[89]].*)
2793 shlibpath_overrides_runpath=no
2796 shlibpath_overrides_runpath=yes
2800 shlibpath_overrides_runpath=yes
2802 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2803 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2804 shlibpath_var=LD_LIBRARY_PATH
2808 libname_spec='$name'
2810 library_names_spec='$libname.dll $libname.a'
2811 dynamic_linker='OS/2 ld.exe'
2812 shlibpath_var=LIBPATH
2815 osf3* | osf4* | osf5*)
2818 soname_spec='${libname}${release}.so$major'
2819 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2820 shlibpath_var=LD_LIBRARY_PATH
2821 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2822 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2823 hardcode_into_libs=yes
2828 soname_spec='${libname}${release}.so$major'
2829 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2830 shlibpath_var=LD_LIBRARY_PATH
2837 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2838 soname_spec='${libname}${release}.so$major'
2839 shlibpath_var=LD_LIBRARY_PATH
2840 shlibpath_overrides_runpath=yes
2841 hardcode_into_libs=yes
2842 # ldd complains unless libraries are executable
2843 postinstall_cmds='chmod +x $lib'
2848 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2849 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2850 shlibpath_var=LD_LIBRARY_PATH
2851 shlibpath_overrides_runpath=yes
2852 if test "$with_gnu_ld" = yes; then
2858 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2860 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2861 soname_spec='${libname}${release}.so$major'
2862 shlibpath_var=LD_LIBRARY_PATH
2863 case $host_vendor in
2865 shlibpath_overrides_runpath=no
2867 export_dynamic_flag_spec='${wl}-Blargedynsym'
2868 runpath_var=LD_RUN_PATH
2876 shlibpath_overrides_runpath=no
2877 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2884 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2885 soname_spec='${libname}${release}.so$major'
2886 shlibpath_var=LD_LIBRARY_PATH
2893 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2894 soname_spec='${libname}${release}.so$major'
2895 shlibpath_var=LD_LIBRARY_PATH
2899 if test -d /usr/nec ;then
2901 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2902 soname_spec='$libname.so.$major'
2903 shlibpath_var=LD_LIBRARY_PATH
2911 AC_MSG_RESULT([$dynamic_linker])
2912 test "$dynamic_linker" = no && can_build_shared=no
2914 # Report the final consequences.
2915 AC_MSG_CHECKING([if libtool supports shared libraries])
2916 AC_MSG_RESULT([$can_build_shared])
2918 AC_MSG_CHECKING([whether to build shared libraries])
2919 test "$can_build_shared" = "no" && enable_shared=no
2921 # On AIX, shared libraries and static libraries use the same namespace, and
2922 # are all built from PIC.
2925 test "$enable_shared" = yes && enable_static=no
2926 if test -n "$RANLIB"; then
2927 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2928 postinstall_cmds='$RANLIB $lib'
2933 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2934 test "$enable_shared" = yes && enable_static=no
2938 AC_MSG_RESULT([$enable_shared])
2940 AC_MSG_CHECKING([whether to build static libraries])
2941 # Make sure either enable_shared or enable_static is yes.
2942 test "$enable_shared" = yes || enable_static=yes
2943 AC_MSG_RESULT([$enable_static])
2945 if test "$hardcode_action" = relink; then
2946 # Fast installation is not supported
2947 enable_fast_install=no
2948 elif test "$shlibpath_overrides_runpath" = yes ||
2949 test "$enable_shared" = no; then
2950 # Fast installation is not necessary
2951 enable_fast_install=needless
2954 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2955 if test "$GCC" = yes; then
2956 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2959 AC_LIBTOOL_DLOPEN_SELF
2961 if test "$enable_shared" = yes && test "$GCC" = yes; then
2962 case $archive_cmds in
2964 # FIXME: we may have to deal with multi-command sequences.
2967 # Test whether the compiler implicitly links with -lc since on some
2968 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2969 # to ld, don't add -lc before -lgcc.
2970 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2971 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2973 echo 'static int dummy;' > conftest.$ac_ext
2975 if AC_TRY_EVAL(ac_compile); then
2978 libobjs=conftest.$ac_objext
2980 wl=$lt_cv_prog_cc_wl
2986 save_allow_undefined_flag=$allow_undefined_flag
2987 allow_undefined_flag=
2988 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2990 lt_cv_archive_cmds_need_lc=no
2992 lt_cv_archive_cmds_need_lc=yes
2994 allow_undefined_flag=$save_allow_undefined_flag
2996 cat conftest.err 1>&5
2998 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3002 need_lc=${lt_cv_archive_cmds_need_lc-yes}
3004 # The second clause should only fire when bootstrapping the
3005 # libtool distribution, otherwise you forgot to ship ltmain.sh
3006 # with your package, and you will get complaints that there are
3007 # no rules to generate ltmain.sh.
3008 if test -f "$ltmain"; then
3011 # If there is no Makefile yet, we rely on a make rule to execute
3012 # `config.status --recheck' to rerun these tests and create the
3013 # libtool script then.
3014 test -f Makefile && make "$ltmain"
3017 if test -f "$ltmain"; then
3018 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3021 echo creating $ofile
3023 # Now quote all the things that may contain metacharacters while being
3024 # careful not to overquote the AC_SUBSTed values. We take copies of the
3025 # variables and quote the copies for generation of the libtool script.
3026 for var in echo old_CC old_CFLAGS SED \
3027 AR AR_FLAGS CC LD LN_S NM SHELL \
3028 reload_flag reload_cmds wl \
3029 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3030 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3031 library_names_spec soname_spec \
3032 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3033 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3034 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3035 old_striplib striplib file_magic_cmd export_symbols_cmds \
3036 deplibs_check_method allow_undefined_flag no_undefined_flag \
3037 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3038 global_symbol_to_c_name_address \
3039 hardcode_libdir_flag_spec hardcode_libdir_separator \
3040 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3041 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3044 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3045 old_postinstall_cmds | old_postuninstall_cmds | \
3046 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3047 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3048 postinstall_cmds | postuninstall_cmds | \
3049 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3050 # Double-quote double-evaled strings.
3051 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3054 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3059 cat <<__EOF__ > "${ofile}T"
3062 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3063 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3064 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3066 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3067 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3069 # This program is free software; you can redistribute it and/or modify
3070 # it under the terms of the GNU General Public License as published by
3071 # the Free Software Foundation; either version 2 of the License, or
3072 # (at your option) any later version.
3074 # This program is distributed in the hope that it will be useful, but
3075 # WITHOUT ANY WARRANTY; without even the implied warranty of
3076 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3077 # General Public License for more details.
3079 # You should have received a copy of the GNU General Public License
3080 # along with this program; if not, write to the Free Software
3081 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3083 # As a special exception to the GNU General Public License, if you
3084 # distribute this file as part of a program that contains a
3085 # configuration script generated by Autoconf, you may include it under
3086 # the same distribution terms that you use for the rest of that program.
3088 # A sed that does not truncate output.
3091 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3092 Xsed="${SED} -e s/^X//"
3094 # The HP-UX ksh and POSIX shell print the target directory to stdout
3096 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3098 # ### BEGIN LIBTOOL CONFIG
3100 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3102 # Shell to use when invoking shell scripts.
3105 # Whether or not to build shared libraries.
3106 build_libtool_libs=$enable_shared
3108 # Whether or not to build static libraries.
3109 build_old_libs=$enable_static
3111 # Whether or not to add -lc for building shared libraries.
3112 build_libtool_need_lc=$need_lc
3114 # Whether or not to optimize for fast installation.
3115 fast_install=$enable_fast_install
3118 host_alias=$host_alias
3121 # An echo program that does not interpret backslashes.
3126 AR_FLAGS=$lt_AR_FLAGS
3128 # The default C compiler.
3131 # Is the compiler the GNU C compiler?
3134 # The linker used to build libraries.
3137 # Whether we need hard or soft links.
3140 # A BSD-compatible nm program.
3143 # A symbol stripping program
3146 # Used to examine libraries when file_magic_cmd begins "file"
3147 MAGIC_CMD=$MAGIC_CMD
3149 # Used on cygwin: DLL creation program.
3152 # Used on cygwin: object dumper.
3155 # Used on cygwin: assembler.
3158 # The name of the directory that contains temporary libtool files.
3161 # How to create reloadable object files.
3162 reload_flag=$lt_reload_flag
3163 reload_cmds=$lt_reload_cmds
3165 # How to pass a linker flag through the compiler.
3168 # Object file suffix (normally "o").
3171 # Old archive suffix (normally "a").
3174 # Executable file suffix (normally "").
3177 # Additional compiler flags for building library objects.
3178 pic_flag=$lt_pic_flag
3181 # Does compiler simultaneously support -c and -o options?
3182 compiler_c_o=$lt_compiler_c_o
3184 # Can we write directly to a .lo ?
3185 compiler_o_lo=$lt_compiler_o_lo
3187 # Must we lock files when doing compilation ?
3188 need_locks=$lt_need_locks
3190 # Do we need the lib prefix for modules?
3191 need_lib_prefix=$need_lib_prefix
3193 # Do we need a version for libraries?
3194 need_version=$need_version
3196 # Whether dlopen is supported.
3197 dlopen_support=$enable_dlopen
3199 # Whether dlopen of programs is supported.
3200 dlopen_self=$enable_dlopen_self
3202 # Whether dlopen of statically linked programs is supported.
3203 dlopen_self_static=$enable_dlopen_self_static
3205 # Compiler flag to prevent dynamic linking.
3206 link_static_flag=$lt_link_static_flag
3208 # Compiler flag to turn off builtin functions.
3209 no_builtin_flag=$lt_no_builtin_flag
3211 # Compiler flag to allow reflexive dlopens.
3212 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3214 # Compiler flag to generate shared objects directly from archives.
3215 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3217 # Compiler flag to generate thread-safe objects.
3218 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3220 # Library versioning type.
3221 version_type=$version_type
3223 # Format of library name prefix.
3224 libname_spec=$lt_libname_spec
3226 # List of archive names. First name is the real one, the rest are links.
3227 # The last name is the one that the linker finds with -lNAME.
3228 library_names_spec=$lt_library_names_spec
3230 # The coded name of the library, if different from the real name.
3231 soname_spec=$lt_soname_spec
3233 # Commands used to build and install an old-style archive.
3235 old_archive_cmds=$lt_old_archive_cmds
3236 old_postinstall_cmds=$lt_old_postinstall_cmds
3237 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3239 # Create an old-style archive from a shared archive.
3240 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3242 # Create a temporary old-style archive to link instead of a shared archive.
3243 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3245 # Commands used to build and install a shared archive.
3246 archive_cmds=$lt_archive_cmds
3247 archive_expsym_cmds=$lt_archive_expsym_cmds
3248 postinstall_cmds=$lt_postinstall_cmds
3249 postuninstall_cmds=$lt_postuninstall_cmds
3251 # Commands to strip libraries.
3252 old_striplib=$lt_old_striplib
3253 striplib=$lt_striplib
3255 # Method to check whether dependent libraries are shared objects.
3256 deplibs_check_method=$lt_deplibs_check_method
3258 # Command to use when deplibs_check_method == file_magic.
3259 file_magic_cmd=$lt_file_magic_cmd
3261 # Flag that allows shared libraries with undefined symbols to be built.
3262 allow_undefined_flag=$lt_allow_undefined_flag
3264 # Flag that forces no undefined symbols.
3265 no_undefined_flag=$lt_no_undefined_flag
3267 # Commands used to finish a libtool library installation in a directory.
3268 finish_cmds=$lt_finish_cmds
3270 # Same as above, but a single script fragment to be evaled but not shown.
3271 finish_eval=$lt_finish_eval
3273 # Take the output of nm and produce a listing of raw symbols and C names.
3274 global_symbol_pipe=$lt_global_symbol_pipe
3276 # Transform the output of nm in a proper C declaration
3277 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3279 # Transform the output of nm in a C name address pair
3280 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3282 # This is the shared library runtime path variable.
3283 runpath_var=$runpath_var
3285 # This is the shared library path variable.
3286 shlibpath_var=$shlibpath_var
3288 # Is shlibpath searched before the hard-coded library search path?
3289 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3291 # How to hardcode a shared library path into an executable.
3292 hardcode_action=$hardcode_action
3294 # Whether we should hardcode library paths into libraries.
3295 hardcode_into_libs=$hardcode_into_libs
3297 # Flag to hardcode \$libdir into a binary during linking.
3298 # This must work even if \$libdir does not exist.
3299 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3301 # Whether we need a single -rpath flag with a separated argument.
3302 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3304 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3306 hardcode_direct=$hardcode_direct
3308 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3310 hardcode_minus_L=$hardcode_minus_L
3312 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3313 # the resulting binary.
3314 hardcode_shlibpath_var=$hardcode_shlibpath_var
3316 # Variables whose values should be saved in libtool wrapper scripts and
3317 # restored at relink time.
3318 variables_saved_for_relink="$variables_saved_for_relink"
3320 # Whether libtool must link a program against all its dependency libraries.
3321 link_all_deplibs=$link_all_deplibs
3323 # Compile-time system search path for libraries
3324 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3326 # Run-time system search path for libraries
3327 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3329 # Fix the shell variable \$srcfile for the compiler.
3330 fix_srcfile_path="$fix_srcfile_path"
3332 # Set to yes if exported symbols are required.
3333 always_export_symbols=$always_export_symbols
3335 # The commands to list exported symbols.
3336 export_symbols_cmds=$lt_export_symbols_cmds
3338 # The commands to extract the exported symbol list from a shared archive.
3339 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3341 # Symbols that should not be listed in the preloaded symbols.
3342 exclude_expsyms=$lt_exclude_expsyms
3344 # Symbols that must always be exported.
3345 include_expsyms=$lt_include_expsyms
3347 # ### END LIBTOOL CONFIG
3353 cat <<\EOF >> "${ofile}T"
3355 # AIX sometimes has problems with the GCC collect2 program. For some
3356 # reason, if we set the COLLECT_NAMES environment variable, the problems
3357 # vanish in a puff of smoke.
3358 if test "X${COLLECT_NAMES+set}" != Xset; then
3360 export COLLECT_NAMES
3367 cygwin* | mingw* | pw32* | os2*)
3368 cat <<'EOF' >> "${ofile}T"
3369 # This is a source program that is used to create dlls on Windows
3370 # Don't remove nor modify the starting and closing comments
3371 # /* ltdll.c starts here */
3372 # #define WIN32_LEAN_AND_MEAN
3373 # #include <windows.h>
3374 # #undef WIN32_LEAN_AND_MEAN
3375 # #include <stdio.h>
3377 # #ifndef __CYGWIN__
3378 # # ifdef __CYGWIN32__
3379 # # define __CYGWIN__ __CYGWIN32__
3383 # #ifdef __cplusplus
3386 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3387 # #ifdef __cplusplus
3392 # #include <cygwin/cygwin_dll.h>
3393 # DECLARE_CYGWIN_DLL( DllMain );
3395 # HINSTANCE __hDllInstance_base;
3398 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3400 # __hDllInstance_base = hInst;
3403 # /* ltdll.c ends here */
3404 # This is a source program that is used to create import libraries
3405 # on Windows for dlls which lack them. Don't remove nor modify the
3406 # starting and closing comments
3407 # /* impgen.c starts here */
3408 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3410 # This file is part of GNU libtool.
3412 # This program is free software; you can redistribute it and/or modify
3413 # it under the terms of the GNU General Public License as published by
3414 # the Free Software Foundation; either version 2 of the License, or
3415 # (at your option) any later version.
3417 # This program is distributed in the hope that it will be useful,
3418 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3419 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3420 # GNU General Public License for more details.
3422 # You should have received a copy of the GNU General Public License
3423 # along with this program; if not, write to the Free Software
3424 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3427 # #include <stdio.h> /* for printf() */
3428 # #include <unistd.h> /* for open(), lseek(), read() */
3429 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3430 # #include <string.h> /* for strdup() */
3432 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3434 # #define O_BINARY 0
3437 # static unsigned int
3438 # pe_get16 (fd, offset)
3442 # unsigned char b[2];
3443 # lseek (fd, offset, SEEK_SET);
3445 # return b[0] + (b[1]<<8);
3448 # static unsigned int
3449 # pe_get32 (fd, offset)
3453 # unsigned char b[4];
3454 # lseek (fd, offset, SEEK_SET);
3456 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3459 # static unsigned int
3463 # unsigned char *b = ptr;
3464 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3473 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3474 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3475 # unsigned long name_rvas, nexp;
3476 # unsigned char *expdata, *erva;
3477 # char *filename, *dll_name;
3479 # filename = argv[1];
3481 # dll = open(filename, O_RDONLY|O_BINARY);
3485 # dll_name = filename;
3487 # for (i=0; filename[i]; i++)
3488 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3489 # dll_name = filename + i +1;
3491 # pe_header_offset = pe_get32 (dll, 0x3c);
3492 # opthdr_ofs = pe_header_offset + 4 + 20;
3493 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3495 # if (num_entries < 1) /* no exports */
3498 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3499 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3500 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3501 # secptr = (pe_header_offset + 4 + 20 +
3502 # pe_get16 (dll, pe_header_offset + 4 + 16));
3505 # for (i = 0; i < nsections; i++)
3508 # unsigned long secptr1 = secptr + 40 * i;
3509 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3510 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3511 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3512 # lseek(dll, secptr1, SEEK_SET);
3513 # read(dll, sname, 8);
3514 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3516 # expptr = fptr + (export_rva - vaddr);
3517 # if (export_rva + export_size > vaddr + vsize)
3518 # export_size = vsize - (export_rva - vaddr);
3523 # expdata = (unsigned char*)malloc(export_size);
3524 # lseek (dll, expptr, SEEK_SET);
3525 # read (dll, expdata, export_size);
3526 # erva = expdata - export_rva;
3528 # nexp = pe_as32 (expdata+24);
3529 # name_rvas = pe_as32 (expdata+32);
3531 # printf ("EXPORTS\n");
3532 # for (i = 0; i<nexp; i++)
3534 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3535 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3540 # /* impgen.c ends here */
3546 # We use sed instead of cat because bash on DJGPP gets confused if
3547 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3548 # text mode, it properly converts lines to CR/LF. This bash problem
3549 # is reportedly fixed, but why not run on old versions too?
3550 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3552 mv -f "${ofile}T" "$ofile" || \
3553 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3557 ])# _LT_AC_LTCONFIG_HACK
3559 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3560 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3562 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3563 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3565 # AC_ENABLE_SHARED - implement the --enable-shared flag
3566 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3567 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3569 AC_DEFUN([AC_ENABLE_SHARED],
3570 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3571 AC_ARG_ENABLE(shared,
3572 changequote(<<, >>)dnl
3573 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3574 changequote([, ])dnl
3575 [p=${PACKAGE-default}
3577 yes) enable_shared=yes ;;
3578 no) enable_shared=no ;;
3581 # Look at the argument we got. We use all the common list separators.
3582 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3583 for pkg in $enableval; do
3584 if test "X$pkg" = "X$p"; then
3591 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3594 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3595 AC_DEFUN([AC_DISABLE_SHARED],
3596 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3597 AC_ENABLE_SHARED(no)])
3599 # AC_ENABLE_STATIC - implement the --enable-static flag
3600 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3601 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3603 AC_DEFUN([AC_ENABLE_STATIC],
3604 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3605 AC_ARG_ENABLE(static,
3606 changequote(<<, >>)dnl
3607 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3608 changequote([, ])dnl
3609 [p=${PACKAGE-default}
3611 yes) enable_static=yes ;;
3612 no) enable_static=no ;;
3615 # Look at the argument we got. We use all the common list separators.
3616 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3617 for pkg in $enableval; do
3618 if test "X$pkg" = "X$p"; then
3625 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3628 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3629 AC_DEFUN([AC_DISABLE_STATIC],
3630 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3631 AC_ENABLE_STATIC(no)])
3634 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3635 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3636 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3638 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3639 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3640 AC_ARG_ENABLE(fast-install,
3641 changequote(<<, >>)dnl
3642 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3643 changequote([, ])dnl
3644 [p=${PACKAGE-default}
3646 yes) enable_fast_install=yes ;;
3647 no) enable_fast_install=no ;;
3649 enable_fast_install=no
3650 # Look at the argument we got. We use all the common list separators.
3651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3652 for pkg in $enableval; do
3653 if test "X$pkg" = "X$p"; then
3654 enable_fast_install=yes
3660 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3663 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3664 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3665 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3666 AC_ENABLE_FAST_INSTALL(no)])
3668 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3669 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3670 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3672 AC_DEFUN([AC_LIBTOOL_PICMODE],
3673 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3674 pic_mode=ifelse($#,1,$1,default)])
3677 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3678 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3679 [AC_MSG_CHECKING([for $1])
3680 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3683 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3686 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3689 ac_save_MAGIC_CMD="$MAGIC_CMD"
3690 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3691 dnl $ac_dummy forces splitting on constant user-supplied paths.
3692 dnl POSIX.2 word splitting is done only on the output of word expansions,
3693 dnl not every word. This closes a longstanding sh security hole.
3694 ac_dummy="ifelse([$2], , $PATH, [$2])"
3695 for ac_dir in $ac_dummy; do
3696 test -z "$ac_dir" && ac_dir=.
3697 if test -f $ac_dir/$1; then
3698 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3699 if test -n "$file_magic_test_file"; then
3700 case $deplibs_check_method in
3702 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3703 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3704 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3705 egrep "$file_magic_regex" > /dev/null; then
3710 *** Warning: the command libtool uses to detect shared libraries,
3711 *** $file_magic_cmd, produces output that libtool cannot recognize.
3712 *** The result is that libtool may fail to recognize shared libraries
3713 *** as such. This will affect the creation of libtool libraries that
3714 *** depend on shared libraries, but programs linked with such libtool
3715 *** libraries will work regardless of this problem. Nevertheless, you
3716 *** may want to report the problem to your system manager and/or to
3717 *** bug-libtool@gnu.org
3727 MAGIC_CMD="$ac_save_MAGIC_CMD"
3730 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3731 if test -n "$MAGIC_CMD"; then
3732 AC_MSG_RESULT($MAGIC_CMD)
3739 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3740 AC_DEFUN([AC_PATH_MAGIC],
3741 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3742 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3743 if test -z "$lt_cv_path_MAGIC_CMD"; then
3744 if test -n "$ac_tool_prefix"; then
3745 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3753 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3754 AC_DEFUN([AC_PROG_LD],
3755 [AC_ARG_WITH(gnu-ld,
3756 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3757 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3758 AC_REQUIRE([AC_PROG_CC])dnl
3759 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3760 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3761 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3763 if test "$GCC" = yes; then
3764 # Check if gcc -print-prog-name=ld gives a path.
3765 AC_MSG_CHECKING([for ld used by GCC])
3768 # gcc leaves a trailing carriage return which upsets mingw
3769 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3771 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3774 # Accept absolute paths.
3775 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3776 re_direlt='/[[^/]][[^/]]*/\.\./'
3777 # Canonicalize the path of ld
3778 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3779 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3780 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3782 test -z "$LD" && LD="$ac_prog"
3785 # If it fails, then pretend we aren't using GCC.
3789 # If it is relative, then search for the first ld in PATH.
3793 elif test "$with_gnu_ld" = yes; then
3794 AC_MSG_CHECKING([for GNU ld])
3796 AC_MSG_CHECKING([for non-GNU ld])
3798 AC_CACHE_VAL(lt_cv_path_LD,
3799 [if test -z "$LD"; then
3800 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3801 for ac_dir in $PATH; do
3802 test -z "$ac_dir" && ac_dir=.
3803 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3804 lt_cv_path_LD="$ac_dir/$ac_prog"
3805 # Check to see if the program is GNU ld. I'd rather use --version,
3806 # but apparently some GNU ld's only accept -v.
3807 # Break only if it was the GNU/non-GNU ld that we prefer.
3808 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3809 test "$with_gnu_ld" != no && break
3811 test "$with_gnu_ld" != yes && break
3817 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3820 if test -n "$LD"; then
3825 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3830 AC_DEFUN([AC_PROG_LD_GNU],
3831 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3832 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3833 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3834 lt_cv_prog_gnu_ld=yes
3836 lt_cv_prog_gnu_ld=no
3838 with_gnu_ld=$lt_cv_prog_gnu_ld
3841 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3842 # -- PORTME Some linkers may need a different reload flag.
3843 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3844 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3845 [lt_cv_ld_reload_flag='-r'])
3846 reload_flag=$lt_cv_ld_reload_flag
3847 test -n "$reload_flag" && reload_flag=" $reload_flag"
3850 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3851 # -- PORTME fill in with the dynamic library characteristics
3852 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3853 [AC_CACHE_CHECK([how to recognise dependent libraries],
3854 lt_cv_deplibs_check_method,
3855 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3856 lt_cv_file_magic_test_file=
3857 lt_cv_deplibs_check_method='unknown'
3858 # Need to set the preceding variable on all platforms that support
3859 # interlibrary dependencies.
3860 # 'none' -- dependencies not supported.
3861 # `unknown' -- same as none, but documents that we really don't know.
3862 # 'pass_all' -- all dependencies passed with no checks.
3863 # 'test_compile' -- check by making test program.
3864 # 'file_magic [[regex]]' -- check by looking for files in library path
3865 # which responds to the $file_magic_cmd with a given egrep regex.
3866 # If you have `file' or equivalent on your system and you're not sure
3867 # whether `pass_all' will *always* work, you probably want this one.
3871 lt_cv_deplibs_check_method=pass_all
3875 lt_cv_deplibs_check_method=pass_all
3879 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3880 lt_cv_file_magic_cmd='/usr/bin/file -L'
3881 lt_cv_file_magic_test_file=/shlib/libc.so
3884 cygwin* | mingw* | pw32*)
3885 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3886 lt_cv_file_magic_cmd='$OBJDUMP -f'
3889 darwin* | rhapsody*)
3890 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3891 lt_cv_file_magic_cmd='/usr/bin/file -L'
3893 rhapsody* | darwin1.[[012]])
3894 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3897 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3903 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3906 # Not sure whether the presence of OpenBSD here was a mistake.
3907 # Let's accept both of them until this is cleared up.
3908 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3909 lt_cv_file_magic_cmd=/usr/bin/file
3910 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3914 lt_cv_deplibs_check_method=pass_all
3919 lt_cv_deplibs_check_method=pass_all
3923 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3924 lt_cv_file_magic_cmd=/usr/bin/file
3925 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3928 irix5* | irix6* | nonstopux*)
3930 irix5* | nonstopux*)
3931 # this will be overridden with pass_all, but let us keep it just in case
3932 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3936 *-32|*"-32 ") libmagic=32-bit;;
3937 *-n32|*"-n32 ") libmagic=N32;;
3938 *-64|*"-64 ") libmagic=64-bit;;
3939 *) libmagic=never-match;;
3941 # this will be overridden with pass_all, but let us keep it just in case
3942 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3945 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3946 lt_cv_deplibs_check_method=pass_all
3949 # This must be Linux ELF.
3952 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | x86_64*)
3953 lt_cv_deplibs_check_method=pass_all ;;
3955 # glibc up to 2.1.1 does not perform some relocations on ARM
3956 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3958 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3962 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3963 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3965 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3970 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3971 lt_cv_file_magic_cmd=/usr/bin/file
3972 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3976 lt_cv_file_magic_cmd=/usr/bin/file
3977 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3978 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3979 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3981 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3985 osf3* | osf4* | osf5*)
3986 # this will be overridden with pass_all, but let us keep it just in case
3987 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3988 lt_cv_file_magic_test_file=/shlib/libc.so
3989 lt_cv_deplibs_check_method=pass_all
3993 lt_cv_deplibs_check_method=pass_all
3997 lt_cv_deplibs_check_method=pass_all
3998 lt_cv_file_magic_test_file=/lib/libc.so
4001 sysv5uw[[78]]* | sysv4*uw2*)
4002 lt_cv_deplibs_check_method=pass_all
4005 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4006 case $host_vendor in
4008 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]]'
4009 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4012 lt_cv_deplibs_check_method=pass_all
4015 lt_cv_file_magic_cmd='/bin/file'
4016 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4019 lt_cv_file_magic_cmd='/bin/file'
4020 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4021 lt_cv_file_magic_test_file=/lib/libc.so
4024 lt_cv_deplibs_check_method=pass_all
4030 file_magic_cmd=$lt_cv_file_magic_cmd
4031 deplibs_check_method=$lt_cv_deplibs_check_method
4035 # AC_PROG_NM - find the path to a BSD-compatible name lister
4036 AC_DEFUN([AC_PROG_NM],
4037 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4038 AC_MSG_CHECKING([for BSD-compatible nm])
4039 AC_CACHE_VAL(lt_cv_path_NM,
4040 [if test -n "$NM"; then
4041 # Let the user override the test.
4044 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4045 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4046 test -z "$ac_dir" && ac_dir=.
4047 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4048 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4049 # Check to see if the nm accepts a BSD-compat flag.
4050 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4051 # nm: unknown option "B" ignored
4052 # Tru64's nm complains that /dev/null is an invalid object file
4053 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4054 lt_cv_path_NM="$tmp_nm -B"
4056 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4057 lt_cv_path_NM="$tmp_nm -p"
4060 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4061 continue # so that we can try to find one that supports BSD flags
4066 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4069 AC_MSG_RESULT([$NM])
4072 # AC_CHECK_LIBM - check for math library
4073 AC_DEFUN([AC_CHECK_LIBM],
4074 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4077 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4078 # These system don't have libm
4081 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4082 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4085 AC_CHECK_LIB(m, main, LIBM="-lm")
4090 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4091 # the libltdl convenience library and LTDLINCL to the include flags for
4092 # the libltdl header and adds --enable-ltdl-convenience to the
4093 # configure arguments. Note that LIBLTDL and LTDLINCL are not
4094 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4095 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4096 # with '${top_builddir}/' and LTDLINCL will be prefixed with
4097 # '${top_srcdir}/' (note the single quotes!). If your package is not
4098 # flat and you're not using automake, define top_builddir and
4099 # top_srcdir appropriately in the Makefiles.
4100 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4101 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4102 case $enable_ltdl_convenience in
4103 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4104 "") enable_ltdl_convenience=yes
4105 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4107 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4108 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4109 # For backwards non-gettext consistent compatibility...
4113 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4114 # the libltdl installable library and LTDLINCL to the include flags for
4115 # the libltdl header and adds --enable-ltdl-install to the configure
4116 # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4117 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4118 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4119 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4120 # with '${top_srcdir}/' (note the single quotes!). If your package is
4121 # not flat and you're not using automake, define top_builddir and
4122 # top_srcdir appropriately in the Makefiles.
4123 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4124 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4125 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4126 AC_CHECK_LIB(ltdl, main,
4127 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4128 [if test x"$enable_ltdl_install" = xno; then
4129 AC_MSG_WARN([libltdl not installed, but installation disabled])
4131 enable_ltdl_install=yes
4134 if test x"$enable_ltdl_install" = x"yes"; then
4135 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4136 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4137 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4139 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4143 # For backwards non-gettext consistent compatibility...
4148 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4149 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4150 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4151 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4152 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4153 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4154 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4156 # This is just to silence aclocal about the macro not being used
4157 ifelse([AC_DISABLE_FAST_INSTALL])
4159 # NOTE: This macro has been submitted for inclusion into #
4160 # GNU Autoconf as AC_PROG_SED. When it is available in #
4161 # a released version of Autoconf we should remove this #
4162 # macro and use it instead. #
4165 # Check for a fully-functional sed program, that truncates
4166 # as few characters as possible. Prefer GNU sed if found.
4167 AC_DEFUN([LT_AC_PROG_SED],
4168 [AC_MSG_CHECKING([for a sed that does not truncate output])
4169 AC_CACHE_VAL(lt_cv_path_SED,
4170 [# Loop through the user's path and test for sed and gsed.
4171 # Then use that list of sed's as ones to test for truncation.
4172 as_executable_p="test -f"
4173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177 test -z "$as_dir" && as_dir=.
4178 for ac_prog in sed gsed; do
4179 for ac_exec_ext in '' $ac_executable_extensions; do
4180 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4181 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4187 # Create a temporary directory, and hook for its removal unless debugging.
4190 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4191 trap '{ (exit 1); exit 1; }' 1 2 13 15
4194 # Create a (secure) tmp directory for tmp files.
4197 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4198 test -n "$tmp" && test -d "$tmp"
4201 tmp=$TMPDIR/sed$$-$RANDOM
4202 (umask 077 && mkdir $tmp)
4205 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4206 { (exit 1); exit 1; }
4210 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4211 # along with /bin/sed that truncates output.
4212 for _sed in $_sed_list /usr/xpg4/bin/sed; do
4213 test ! -f ${_sed} && break
4214 cat /dev/null > "$tmp/sed.in"
4216 echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4217 # Check for GNU sed and select it if it is found.
4218 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4219 lt_cv_path_SED=${_sed}
4223 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4224 mv "$tmp/sed.tmp" "$tmp/sed.in"
4225 cp "$tmp/sed.in" "$tmp/sed.nl"
4226 echo >>"$tmp/sed.nl"
4227 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4228 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4229 # 40000 chars as input seems more than enough
4230 test $_count -gt 10 && break
4231 _count=`expr $_count + 1`
4232 if test $_count -gt $_max; then
4234 lt_cv_path_SED=$_sed
4240 if test "X$SED" != "X"; then
4245 AC_MSG_RESULT([$SED])
4248 # Add --enable-maintainer-mode option to configure.
4251 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
4252 # Free Software Foundation, Inc.
4254 # This program is free software; you can redistribute it and/or modify
4255 # it under the terms of the GNU General Public License as published by
4256 # the Free Software Foundation; either version 2, or (at your option)
4257 # any later version.
4259 # This program is distributed in the hope that it will be useful,
4260 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4261 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4262 # GNU General Public License for more details.
4264 # You should have received a copy of the GNU General Public License
4265 # along with this program; if not, write to the Free Software
4266 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4271 AC_DEFUN([AM_MAINTAINER_MODE],
4272 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
4273 dnl maintainer-mode is disabled by default
4274 AC_ARG_ENABLE(maintainer-mode,
4275 [ --enable-maintainer-mode enable make rules and dependencies not useful
4276 (and sometimes confusing) to the casual installer],
4277 USE_MAINTAINER_MODE=$enableval,
4278 USE_MAINTAINER_MODE=no)
4279 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
4280 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
4281 MAINT=$MAINTAINER_MODE_TRUE
4286 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
4288 # Check to see how 'make' treats includes. -*- Autoconf -*-
4290 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
4292 # This program is free software; you can redistribute it and/or modify
4293 # it under the terms of the GNU General Public License as published by
4294 # the Free Software Foundation; either version 2, or (at your option)
4295 # any later version.
4297 # This program is distributed in the hope that it will be useful,
4298 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4299 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4300 # GNU General Public License for more details.
4302 # You should have received a copy of the GNU General Public License
4303 # along with this program; if not, write to the Free Software
4304 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4311 # Check to see how make treats includes.
4312 AC_DEFUN([AM_MAKE_INCLUDE],
4313 [am_make=${MAKE-make}
4314 cat > confinc << 'END'
4319 # If we don't find an include directive, just comment out the code.
4320 AC_MSG_CHECKING([for style of include used by $am_make])
4324 # First try GNU make style include.
4325 echo "include confinc" > confmf
4326 # We grep out `Entering directory' and `Leaving directory'
4327 # messages which can occur if `w' ends up in MAKEFLAGS.
4328 # In particular we don't look at `^make:' because GNU make might
4329 # be invoked under some other name (usually "gmake"), in which
4330 # case it prints its new name instead of `make'.
4331 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4336 # Now try BSD make style include.
4337 if test "$am__include" = "#"; then
4338 echo '.include "confinc"' > confmf
4339 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4340 am__include=.include
4345 AC_SUBST([am__include])
4346 AC_SUBST([am__quote])
4347 AC_MSG_RESULT([$_am_result])
4348 rm -f confinc confmf
4354 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
4356 # This program is free software; you can redistribute it and/or modify
4357 # it under the terms of the GNU General Public License as published by
4358 # the Free Software Foundation; either version 2, or (at your option)
4359 # any later version.
4361 # This program is distributed in the hope that it will be useful,
4362 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4363 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4364 # GNU General Public License for more details.
4366 # You should have received a copy of the GNU General Public License
4367 # along with this program; if not, write to the Free Software
4368 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4373 # AM_MISSING_PROG(NAME, PROGRAM)
4374 # ------------------------------
4375 AC_DEFUN([AM_MISSING_PROG],
4376 [AC_REQUIRE([AM_MISSING_HAS_RUN])
4377 $1=${$1-"${am_missing_run}$2"}
4381 # AM_MISSING_HAS_RUN
4382 # ------------------
4383 # Define MISSING if not defined so far and test if it supports --run.
4384 # If it does, set am_missing_run to use it, otherwise, to nothing.
4385 AC_DEFUN([AM_MISSING_HAS_RUN],
4386 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4387 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
4388 # Use eval to expand $SHELL
4389 if eval "$MISSING --run true"; then
4390 am_missing_run="$MISSING --run "
4393 AC_MSG_WARN([`missing' script is too old or missing])
4399 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
4401 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4403 # This program is free software; you can redistribute it and/or modify
4404 # it under the terms of the GNU General Public License as published by
4405 # the Free Software Foundation; either version 2, or (at your option)
4406 # any later version.
4408 # This program is distributed in the hope that it will be useful,
4409 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4410 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4411 # GNU General Public License for more details.
4413 # You should have received a copy of the GNU General Public License
4414 # along with this program; if not, write to the Free Software
4415 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4418 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
4419 # created by `make install' are always world readable, even if the
4420 # installer happens to have an overly restrictive umask (e.g. 077).
4421 # This was a mistake. There are at least two reasons why we must not
4423 # - it causes special bits like SGID to be ignored,
4424 # - it may be too restrictive (some setups expect 775 directories).
4426 # Do not use -m 0755 and let people choose whatever they expect by
4429 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
4430 # Some implementations (such as Solaris 8's) are not thread-safe: if a
4431 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
4432 # concurrently, both version can detect that a/ is missing, but only
4433 # one can create it and the other will error out. Consequently we
4434 # restrict ourselves to GNU make (using the --version option ensures
4436 AC_DEFUN([AM_PROG_MKDIR_P],
4437 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
4438 # Keeping the `.' argument allows $(mkdir_p) to be used without
4439 # argument. Indeed, we sometimes output rules like
4440 # $(mkdir_p) $(somedir)
4441 # where $(somedir) is conditionally defined.
4442 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
4443 # expensive solution, as it forces Make to start a sub-shell.)
4444 mkdir_p='mkdir -p -- .'
4446 # On NextStep and OpenStep, the `mkdir' command does not
4447 # recognize any option. It will interpret all options as
4448 # directories to create, and then abort because `.' already
4450 for d in ./-p ./--version;
4452 test -d $d && rmdir $d
4454 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
4455 if test -f "$ac_aux_dir/mkinstalldirs"; then
4456 mkdir_p='$(mkinstalldirs)'
4458 mkdir_p='$(install_sh) -d'
4461 AC_SUBST([mkdir_p])])
4463 # Helper functions for option handling. -*- Autoconf -*-
4465 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
4467 # This program is free software; you can redistribute it and/or modify
4468 # it under the terms of the GNU General Public License as published by
4469 # the Free Software Foundation; either version 2, or (at your option)
4470 # any later version.
4472 # This program is distributed in the hope that it will be useful,
4473 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4474 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4475 # GNU General Public License for more details.
4477 # You should have received a copy of the GNU General Public License
4478 # along with this program; if not, write to the Free Software
4479 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4484 # _AM_MANGLE_OPTION(NAME)
4485 # -----------------------
4486 AC_DEFUN([_AM_MANGLE_OPTION],
4487 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
4489 # _AM_SET_OPTION(NAME)
4490 # ------------------------------
4491 # Set option NAME. Presently that only means defining a flag for this option.
4492 AC_DEFUN([_AM_SET_OPTION],
4493 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
4495 # _AM_SET_OPTIONS(OPTIONS)
4496 # ----------------------------------
4497 # OPTIONS is a space-separated list of Automake options.
4498 AC_DEFUN([_AM_SET_OPTIONS],
4499 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
4501 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
4502 # -------------------------------------------
4503 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
4504 AC_DEFUN([_AM_IF_OPTION],
4505 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
4508 # Check to make sure that the build environment is sane.
4511 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
4513 # This program is free software; you can redistribute it and/or modify
4514 # it under the terms of the GNU General Public License as published by
4515 # the Free Software Foundation; either version 2, or (at your option)
4516 # any later version.
4518 # This program is distributed in the hope that it will be useful,
4519 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4520 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4521 # GNU General Public License for more details.
4523 # You should have received a copy of the GNU General Public License
4524 # along with this program; if not, write to the Free Software
4525 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4532 AC_DEFUN([AM_SANITY_CHECK],
4533 [AC_MSG_CHECKING([whether build environment is sane])
4536 echo timestamp > conftest.file
4537 # Do `set' in a subshell so we don't clobber the current shell's
4538 # arguments. Must try -L first in case configure is actually a
4539 # symlink; some systems play weird games with the mod time of symlinks
4540 # (eg FreeBSD returns the mod time of the symlink's containing
4543 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
4544 if test "$[*]" = "X"; then
4546 set X `ls -t $srcdir/configure conftest.file`
4549 if test "$[*]" != "X $srcdir/configure conftest.file" \
4550 && test "$[*]" != "X conftest.file $srcdir/configure"; then
4552 # If neither matched, then we have a broken ls. This can happen
4553 # if, for instance, CONFIG_SHELL is bash and it inherits a
4554 # broken ls alias from the environment. This has actually
4555 # happened. Such a system could not be considered "sane".
4556 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
4557 alias in your environment])
4560 test "$[2]" = conftest.file
4566 AC_MSG_ERROR([newly created file is older than distributed files!
4567 Check your system clock])
4569 AC_MSG_RESULT(yes)])
4571 # AM_PROG_INSTALL_STRIP
4573 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
4575 # This program is free software; you can redistribute it and/or modify
4576 # it under the terms of the GNU General Public License as published by
4577 # the Free Software Foundation; either version 2, or (at your option)
4578 # any later version.
4580 # This program is distributed in the hope that it will be useful,
4581 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4582 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4583 # GNU General Public License for more details.
4585 # You should have received a copy of the GNU General Public License
4586 # along with this program; if not, write to the Free Software
4587 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4590 # One issue with vendor `install' (even GNU) is that you can't
4591 # specify the program used to strip binaries. This is especially
4592 # annoying in cross-compiling environments, where the build's strip
4593 # is unlikely to handle the host's binaries.
4594 # Fortunately install-sh will honor a STRIPPROG variable, so we
4595 # always use install-sh in `make install-strip', and initialize
4596 # STRIPPROG with the value of the STRIP variable (set by the user).
4597 AC_DEFUN([AM_PROG_INSTALL_STRIP],
4598 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4599 # Installed binaries are usually stripped using `strip' when the user
4600 # run `make install-strip'. However `strip' might not be the right
4601 # tool to use in cross-compilation environments, therefore Automake
4602 # will honor the `STRIP' environment variable to overrule this program.
4603 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
4604 if test "$cross_compiling" != no; then
4605 AC_CHECK_TOOL([STRIP], [strip], :)
4607 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
4608 AC_SUBST([INSTALL_STRIP_PROGRAM])])
4610 m4_include([admin/idl.m4])
4611 m4_include([admin/jorte.m4])
4612 m4_include([admin/linux.m4])
4613 m4_include([admin/pkg.m4])