1 # aclocal.m4t generated automatically by aclocal 1.6.1 -*- Autoconf -*-
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 dnl $Id: acinclude.m4,v 1.15 1998/05/23 14:54:53 joda Exp $
16 dnl Only put things that for some reason can't live in the `cf'
17 dnl directory in this file.
20 dnl $xId: misc.m4,v 1.1 1997/12/14 15:59:04 joda Exp $
22 define(upcase,`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`)dnl
25 dnl $Id: misc.m4,v 1.5 2002/05/24 15:35:32 joda Exp $
27 AC_DEFUN([upcase],[`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`])dnl
28 AC_DEFUN([rk_LIBOBJ],[AC_LIBOBJ([$1])])dnl
29 AC_DEFUN([rk_CONFIG_HEADER],[AH_TOP([#ifndef RCSID
31 static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
34 /* Maximum values on all known systems */
35 #define MaxHostNameLen (64+4)
36 #define MaxPathLen (1024+4)
39 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
41 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
43 # This program is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
45 # the Free Software Foundation; either version 2, or (at your option)
48 # This program is distributed in the hope that it will be useful,
49 # but WITHOUT ANY WARRANTY; without even the implied warranty of
50 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 # GNU General Public License for more details.
53 # You should have received a copy of the GNU General Public License
54 # along with this program; if not, write to the Free Software
55 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
62 # When config.status generates a header, we must update the stamp-h file.
63 # This file resides in the same directory as the config header
64 # that is generated. We must strip everything past the first ":",
65 # and everything past the last "/".
69 # Like AS_DIRNAME, only do it during macro expansion
70 AC_DEFUN([_AM_DIRNAME],
71 [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
72 m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
73 m4_if(regexp([$1], [^/.*]), -1,
75 patsubst([$1], [^\(/\).*], [\1])),
76 patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
77 patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
81 # The stamp files are numbered to have different names.
82 # We could number them on a directory basis, but that's additional
83 # complications, let's have a unique counter.
84 m4_define([_AM_STAMP_Count], [0])
89 # The name of the stamp file for HEADER.
91 [m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
92 AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
93 [:.*])))/stamp-h[]_AM_STAMP_Count])
96 # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
97 # ------------------------------------------------------------
98 # We used to try to get a real timestamp in stamp-h. But the fear is that
99 # that will cause unnecessary cvs conflicts.
100 AC_DEFUN([_AM_CONFIG_HEADER],
101 [# Add the stamp file to the list of files AC keeps track of,
102 # along with our hook.
103 AC_CONFIG_HEADERS([$1],
104 [# update the timestamp
105 echo 'timestamp for $1' >"_AM_STAMP([$1])"
108 ])# _AM_CONFIG_HEADER
111 # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
112 # --------------------------------------------------------------
113 AC_DEFUN([AM_CONFIG_HEADER],
114 [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
117 # Do all the work for Automake. -*- Autoconf -*-
119 # This macro actually does too much some checks are only needed if
120 # your package does certain things. But this isn't really a big deal.
122 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
123 # Free Software Foundation, Inc.
125 # This program is free software; you can redistribute it and/or modify
126 # it under the terms of the GNU General Public License as published by
127 # the Free Software Foundation; either version 2, or (at your option)
130 # This program is distributed in the hope that it will be useful,
131 # but WITHOUT ANY WARRANTY; without even the implied warranty of
132 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
133 # GNU General Public License for more details.
135 # You should have received a copy of the GNU General Public License
136 # along with this program; if not, write to the Free Software
137 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
142 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
143 # written in clear, in which case automake, when reading aclocal.m4,
144 # will think it sees a *use*, and therefore will trigger all it's
145 # C support machinery. Also note that it means that autoscan, seeing
146 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
151 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
152 # the ones we care about.
153 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
155 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
156 # AM_INIT_AUTOMAKE([OPTIONS])
157 # -----------------------------------------------
158 # The call with PACKAGE and VERSION arguments is the old style
159 # call (pre autoconf-2.50), which is being phased out. PACKAGE
160 # and VERSION should now be passed to AC_INIT and removed from
161 # the call to AM_INIT_AUTOMAKE.
162 # We support both call styles for the transition. After
163 # the next Automake release, Autoconf can make the AC_INIT
164 # arguments mandatory, and then we can depend on a new Autoconf
165 # release and drop the old call support.
166 AC_DEFUN([AM_INIT_AUTOMAKE],
167 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
168 AC_REQUIRE([AC_PROG_INSTALL])dnl
169 # test to see if srcdir already configured
170 if test "`cd $srcdir && pwd`" != "`pwd`" &&
171 test -f $srcdir/config.status; then
172 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
175 # Define the identity of the package.
176 dnl Distinguish between old-style and new-style calls.
178 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
179 AC_SUBST([PACKAGE], [$1])dnl
180 AC_SUBST([VERSION], [$2])],
181 [_AM_SET_OPTIONS([$1])dnl
182 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
183 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
185 _AM_IF_OPTION([no-define],,
186 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
187 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
189 # Some tools Automake needs.
190 AC_REQUIRE([AM_SANITY_CHECK])dnl
191 AC_REQUIRE([AC_ARG_PROGRAM])dnl
192 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
193 AM_MISSING_PROG(AUTOCONF, autoconf)
194 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
195 AM_MISSING_PROG(AUTOHEADER, autoheader)
196 AM_MISSING_PROG(MAKEINFO, makeinfo)
197 AM_MISSING_PROG(AMTAR, tar)
199 AM_PROG_INSTALL_STRIP
200 # We need awk for the "check" target. The system "awk" is bad on
202 AC_REQUIRE([AC_PROG_AWK])dnl
203 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
205 _AM_IF_OPTION([no-dependencies],,
206 [AC_PROVIDE_IFELSE([AC_PROG_][CC],
207 [_AM_DEPENDENCIES(CC)],
208 [define([AC_PROG_][CC],
209 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
210 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
211 [_AM_DEPENDENCIES(CXX)],
212 [define([AC_PROG_][CXX],
213 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
217 # Copyright 2002 Free Software Foundation, Inc.
219 # This program is free software; you can redistribute it and/or modify
220 # it under the terms of the GNU General Public License as published by
221 # the Free Software Foundation; either version 2, or (at your option)
224 # This program is distributed in the hope that it will be useful,
225 # but WITHOUT ANY WARRANTY; without even the implied warranty of
226 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
227 # GNU General Public License for more details.
229 # You should have received a copy of the GNU General Public License
230 # along with this program; if not, write to the Free Software
231 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
233 # AM_AUTOMAKE_VERSION(VERSION)
234 # ----------------------------
235 # Automake X.Y traces this macro to ensure aclocal.m4 has been
236 # generated from the m4 files accompanying Automake X.Y.
237 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
239 # AM_SET_CURRENT_AUTOMAKE_VERSION
240 # -------------------------------
241 # Call AM_AUTOMAKE_VERSION so it can be traced.
242 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
243 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
244 [AM_AUTOMAKE_VERSION([1.6.1])])
246 # Helper functions for option handling. -*- Autoconf -*-
248 # Copyright 2001, 2002 Free Software Foundation, Inc.
250 # This program is free software; you can redistribute it and/or modify
251 # it under the terms of the GNU General Public License as published by
252 # the Free Software Foundation; either version 2, or (at your option)
255 # This program is distributed in the hope that it will be useful,
256 # but WITHOUT ANY WARRANTY; without even the implied warranty of
257 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
258 # GNU General Public License for more details.
260 # You should have received a copy of the GNU General Public License
261 # along with this program; if not, write to the Free Software
262 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
267 # _AM_MANGLE_OPTION(NAME)
268 # -----------------------
269 AC_DEFUN([_AM_MANGLE_OPTION],
270 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
272 # _AM_SET_OPTION(NAME)
273 # ------------------------------
274 # Set option NAME. Presently that only means defining a flag for this option.
275 AC_DEFUN([_AM_SET_OPTION],
276 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
278 # _AM_SET_OPTIONS(OPTIONS)
279 # ----------------------------------
280 # OPTIONS is a space-separated list of Automake options.
281 AC_DEFUN([_AM_SET_OPTIONS],
282 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
284 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
285 # -------------------------------------------
286 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
287 AC_DEFUN([_AM_IF_OPTION],
288 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
291 # Check to make sure that the build environment is sane.
294 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
296 # This program is free software; you can redistribute it and/or modify
297 # it under the terms of the GNU General Public License as published by
298 # the Free Software Foundation; either version 2, or (at your option)
301 # This program is distributed in the hope that it will be useful,
302 # but WITHOUT ANY WARRANTY; without even the implied warranty of
303 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 # GNU General Public License for more details.
306 # You should have received a copy of the GNU General Public License
307 # along with this program; if not, write to the Free Software
308 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
315 AC_DEFUN([AM_SANITY_CHECK],
316 [AC_MSG_CHECKING([whether build environment is sane])
319 echo timestamp > conftest.file
320 # Do `set' in a subshell so we don't clobber the current shell's
321 # arguments. Must try -L first in case configure is actually a
322 # symlink; some systems play weird games with the mod time of symlinks
323 # (eg FreeBSD returns the mod time of the symlink's containing
326 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
327 if test "$[*]" = "X"; then
329 set X `ls -t $srcdir/configure conftest.file`
332 if test "$[*]" != "X $srcdir/configure conftest.file" \
333 && test "$[*]" != "X conftest.file $srcdir/configure"; then
335 # If neither matched, then we have a broken ls. This can happen
336 # if, for instance, CONFIG_SHELL is bash and it inherits a
337 # broken ls alias from the environment. This has actually
338 # happened. Such a system could not be considered "sane".
339 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
340 alias in your environment])
343 test "$[2]" = conftest.file
349 AC_MSG_ERROR([newly created file is older than distributed files!
350 Check your system clock])
357 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
359 # This program is free software; you can redistribute it and/or modify
360 # it under the terms of the GNU General Public License as published by
361 # the Free Software Foundation; either version 2, or (at your option)
364 # This program is distributed in the hope that it will be useful,
365 # but WITHOUT ANY WARRANTY; without even the implied warranty of
366 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
367 # GNU General Public License for more details.
369 # You should have received a copy of the GNU General Public License
370 # along with this program; if not, write to the Free Software
371 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
376 # AM_MISSING_PROG(NAME, PROGRAM)
377 # ------------------------------
378 AC_DEFUN([AM_MISSING_PROG],
379 [AC_REQUIRE([AM_MISSING_HAS_RUN])
380 $1=${$1-"${am_missing_run}$2"}
386 # Define MISSING if not defined so far and test if it supports --run.
387 # If it does, set am_missing_run to use it, otherwise, to nothing.
388 AC_DEFUN([AM_MISSING_HAS_RUN],
389 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
390 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
391 # Use eval to expand $SHELL
392 if eval "$MISSING --run true"; then
393 am_missing_run="$MISSING --run "
396 AC_MSG_WARN([`missing' script is too old or missing])
402 # Copyright 2001 Free Software Foundation, Inc.
404 # This program is free software; you can redistribute it and/or modify
405 # it under the terms of the GNU General Public License as published by
406 # the Free Software Foundation; either version 2, or (at your option)
409 # This program is distributed in the hope that it will be useful,
410 # but WITHOUT ANY WARRANTY; without even the implied warranty of
411 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
412 # GNU General Public License for more details.
414 # You should have received a copy of the GNU General Public License
415 # along with this program; if not, write to the Free Software
416 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
419 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
420 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
421 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
423 # Of course, Automake must honor this variable whenever it calls a
424 # tool from the auxiliary directory. The problem is that $srcdir (and
425 # therefore $ac_aux_dir as well) can be either absolute or relative,
426 # depending on how configure is run. This is pretty annoying, since
427 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
428 # source directory, any form will work fine, but in subdirectories a
429 # relative path needs to be adjusted first.
431 # $ac_aux_dir/missing
432 # fails when called from a subdirectory if $ac_aux_dir is relative
433 # $top_srcdir/$ac_aux_dir/missing
434 # fails if $ac_aux_dir is absolute,
435 # fails when called from a subdirectory in a VPATH build with
436 # a relative $ac_aux_dir
438 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
439 # are both prefixed by $srcdir. In an in-source build this is usually
440 # harmless because $srcdir is `.', but things will broke when you
441 # start a VPATH build or use an absolute $srcdir.
443 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
444 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
445 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
446 # and then we would define $MISSING as
447 # MISSING="\${SHELL} $am_aux_dir/missing"
448 # This will work as long as MISSING is not called from configure, because
449 # unfortunately $(top_srcdir) has no meaning in configure.
450 # However there are other variables, like CC, which are often used in
451 # configure, and could therefore not use this "fixed" $ac_aux_dir.
453 # Another solution, used here, is to always expand $ac_aux_dir to an
454 # absolute PATH. The drawback is that using absolute paths prevent a
455 # configured tree to be moved without reconfiguration.
457 # Rely on autoconf to set up CDPATH properly.
460 AC_DEFUN([AM_AUX_DIR_EXPAND], [
461 # expand $ac_aux_dir to an absolute path
462 am_aux_dir=`cd $ac_aux_dir && pwd`
467 # Define $install_sh.
469 # Copyright 2001 Free Software Foundation, Inc.
471 # This program is free software; you can redistribute it and/or modify
472 # it under the terms of the GNU General Public License as published by
473 # the Free Software Foundation; either version 2, or (at your option)
476 # This program is distributed in the hope that it will be useful,
477 # but WITHOUT ANY WARRANTY; without even the implied warranty of
478 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
479 # GNU General Public License for more details.
481 # You should have received a copy of the GNU General Public License
482 # along with this program; if not, write to the Free Software
483 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
486 AC_DEFUN([AM_PROG_INSTALL_SH],
487 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
488 install_sh=${install_sh-"$am_aux_dir/install-sh"}
489 AC_SUBST(install_sh)])
491 # AM_PROG_INSTALL_STRIP
493 # Copyright 2001 Free Software Foundation, Inc.
495 # This program is free software; you can redistribute it and/or modify
496 # it under the terms of the GNU General Public License as published by
497 # the Free Software Foundation; either version 2, or (at your option)
500 # This program is distributed in the hope that it will be useful,
501 # but WITHOUT ANY WARRANTY; without even the implied warranty of
502 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
503 # GNU General Public License for more details.
505 # You should have received a copy of the GNU General Public License
506 # along with this program; if not, write to the Free Software
507 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
510 # One issue with vendor `install' (even GNU) is that you can't
511 # specify the program used to strip binaries. This is especially
512 # annoying in cross-compiling environments, where the build's strip
513 # is unlikely to handle the host's binaries.
514 # Fortunately install-sh will honor a STRIPPROG variable, so we
515 # always use install-sh in `make install-strip', and initialize
516 # STRIPPROG with the value of the STRIP variable (set by the user).
517 AC_DEFUN([AM_PROG_INSTALL_STRIP],
518 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
519 # Installed binaries are usually stripped using `strip' when the user
520 # run `make install-strip'. However `strip' might not be the right
521 # tool to use in cross-compilation environments, therefore Automake
522 # will honor the `STRIP' environment variable to overrule this program.
523 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
524 if test "$cross_compiling" != no; then
525 AC_CHECK_TOOL([STRIP], [strip], :)
527 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
528 AC_SUBST([INSTALL_STRIP_PROGRAM])])
530 # serial 4 -*- Autoconf -*-
532 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
534 # This program is free software; you can redistribute it and/or modify
535 # it under the terms of the GNU General Public License as published by
536 # the Free Software Foundation; either version 2, or (at your option)
539 # This program is distributed in the hope that it will be useful,
540 # but WITHOUT ANY WARRANTY; without even the implied warranty of
541 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
542 # GNU General Public License for more details.
544 # You should have received a copy of the GNU General Public License
545 # along with this program; if not, write to the Free Software
546 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
550 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
551 # written in clear, in which case automake, when reading aclocal.m4,
552 # will think it sees a *use*, and therefore will trigger all it's
553 # C support machinery. Also note that it means that autoscan, seeing
554 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
558 # _AM_DEPENDENCIES(NAME)
559 # ----------------------
560 # See how the compiler implements dependency checking.
561 # NAME is "CC", "CXX", "GCJ", or "OBJC".
562 # We try a few techniques and use that to set a single cache variable.
564 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
565 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
566 # dependency, and given that the user is not expected to run this macro,
567 # just rely on AC_PROG_CC.
568 AC_DEFUN([_AM_DEPENDENCIES],
569 [AC_REQUIRE([AM_SET_DEPDIR])dnl
570 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
571 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
572 AC_REQUIRE([AM_DEP_TRACK])dnl
574 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
575 [$1], CXX, [depcc="$CXX" am_compiler_list=],
576 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
577 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
578 [depcc="$$1" am_compiler_list=])
580 AC_CACHE_CHECK([dependency style of $depcc],
581 [am_cv_$1_dependencies_compiler_type],
582 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
583 # We make a subdir and do the tests there. Otherwise we can end up
584 # making bogus files that we don't know about and never remove. For
585 # instance it was reported that on HP-UX the gcc test will end up
586 # making a dummy file named `D' -- because `-MD' means `put the output
589 # Copy depcomp to subdir because otherwise we won't find it if we're
590 # using a relative directory.
591 cp "$am_depcomp" conftest.dir
594 am_cv_$1_dependencies_compiler_type=none
595 if test "$am_compiler_list" = ""; then
596 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
598 for depmode in $am_compiler_list; do
599 # We need to recreate these files for each test, as the compiler may
600 # overwrite some of them when testing with obscure command lines.
601 # This happens at least with the AIX C compiler.
602 echo '#include "conftest.h"' > conftest.c
603 echo 'int i;' > conftest.h
604 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
608 # after this tag, mechanisms are not by side-effect, so they'll
609 # only be used when explicitly requested
610 if test "x$enable_dependency_tracking" = xyes; then
618 # We check with `-c' and `-o' for the sake of the "dashmstdout"
619 # mode. It turns out that the SunPro C++ compiler does not properly
620 # handle `-M -o', and we need to detect this.
621 if depmode=$depmode \
622 source=conftest.c object=conftest.o \
623 depfile=conftest.Po tmpdepfile=conftest.TPo \
624 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
625 grep conftest.h conftest.Po > /dev/null 2>&1 &&
626 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
627 am_cv_$1_dependencies_compiler_type=$depmode
635 am_cv_$1_dependencies_compiler_type=none
638 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
644 # Choose a directory name for dependency files.
645 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
646 AC_DEFUN([AM_SET_DEPDIR],
647 [rm -f .deps 2>/dev/null
648 mkdir .deps 2>/dev/null
649 if test -d .deps; then
652 # MS-DOS does not allow filenames that begin with a dot.
655 rmdir .deps 2>/dev/null
662 AC_DEFUN([AM_DEP_TRACK],
663 [AC_ARG_ENABLE(dependency-tracking,
664 [ --disable-dependency-tracking Speeds up one-time builds
665 --enable-dependency-tracking Do not reject slow dependency extractors])
666 if test "x$enable_dependency_tracking" != xno; then
667 am_depcomp="$ac_aux_dir/depcomp"
670 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
671 AC_SUBST([AMDEPBACKSLASH])
674 # Generate code to set up dependency tracking. -*- Autoconf -*-
676 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
678 # This program is free software; you can redistribute it and/or modify
679 # it under the terms of the GNU General Public License as published by
680 # the Free Software Foundation; either version 2, or (at your option)
683 # This program is distributed in the hope that it will be useful,
684 # but WITHOUT ANY WARRANTY; without even the implied warranty of
685 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
686 # GNU General Public License for more details.
688 # You should have received a copy of the GNU General Public License
689 # along with this program; if not, write to the Free Software
690 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
695 # _AM_OUTPUT_DEPENDENCY_COMMANDS
696 # ------------------------------
697 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
698 [for mf in $CONFIG_FILES; do
699 # Strip MF so we end up with the name of the file.
700 mf=`echo "$mf" | sed -e 's/:.*$//'`
701 if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
702 dirpart=`AS_DIRNAME("$mf")`
706 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
707 # Extract the definition of DEP_FILES from the Makefile without
709 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
710 test -z "$DEPDIR" && continue
711 # When using ansi2knr, U may be empty or an underscore; expand it
712 U=`sed -n -e '/^U = / s///p' < "$mf"`
713 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
714 # We invoke sed twice because it is the simplest approach to
715 # changing $(DEPDIR) to its actual value in the expansion.
716 for file in `sed -n -e '
717 /^DEP_FILES = .*\\\\$/ {
726 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
727 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
728 # Make sure the directory exists.
729 test -f "$dirpart/$file" && continue
730 fdir=`AS_DIRNAME(["$file"])`
731 AS_MKDIR_P([$dirpart/$fdir])
732 # echo "creating $dirpart/$file"
733 echo '# dummy' > "$dirpart/$file"
736 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
739 # AM_OUTPUT_DEPENDENCY_COMMANDS
740 # -----------------------------
741 # This macro should only be invoked once -- use via AC_REQUIRE.
743 # This code is only required when automatic dependency tracking
744 # is enabled. FIXME. This creates each `.P' file that we will
745 # need in order to bootstrap the dependency handling code.
746 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
747 [AC_CONFIG_COMMANDS([depfiles],
748 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
749 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
752 # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
754 # This program is free software; you can redistribute it and/or modify
755 # it under the terms of the GNU General Public License as published by
756 # the Free Software Foundation; either version 2, or (at your option)
759 # This program is distributed in the hope that it will be useful,
760 # but WITHOUT ANY WARRANTY; without even the implied warranty of
761 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
762 # GNU General Public License for more details.
764 # You should have received a copy of the GNU General Public License
765 # along with this program; if not, write to the Free Software
766 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
773 # Check to see how make treats includes.
774 AC_DEFUN([AM_MAKE_INCLUDE],
775 [am_make=${MAKE-make}
776 cat > confinc << 'END'
780 # If we don't find an include directive, just comment out the code.
781 AC_MSG_CHECKING([for style of include used by $am_make])
785 # First try GNU make style include.
786 echo "include confinc" > confmf
787 # We grep out `Entering directory' and `Leaving directory'
788 # messages which can occur if `w' ends up in MAKEFLAGS.
789 # In particular we don't look at `^make:' because GNU make might
790 # be invoked under some other name (usually "gmake"), in which
791 # case it prints its new name instead of `make'.
792 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
797 # Now try BSD make style include.
798 if test "$am__include" = "#"; then
799 echo '.include "confinc"' > confmf
800 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
806 AC_SUBST(am__include)
808 AC_MSG_RESULT($_am_result)
812 # AM_CONDITIONAL -*- Autoconf -*-
814 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
816 # This program is free software; you can redistribute it and/or modify
817 # it under the terms of the GNU General Public License as published by
818 # the Free Software Foundation; either version 2, or (at your option)
821 # This program is distributed in the hope that it will be useful,
822 # but WITHOUT ANY WARRANTY; without even the implied warranty of
823 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
824 # GNU General Public License for more details.
826 # You should have received a copy of the GNU General Public License
827 # along with this program; if not, write to the Free Software
828 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
835 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
836 # -------------------------------------
837 # Define a conditional.
838 AC_DEFUN([AM_CONDITIONAL],
839 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
840 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
850 AC_CONFIG_COMMANDS_PRE(
851 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
852 AC_MSG_ERROR([conditional \"$1\" was never defined.
853 Usually this means the macro was only invoked conditionally.])
857 # Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
859 # This program is free software; you can redistribute it and/or modify
860 # it under the terms of the GNU General Public License as published by
861 # the Free Software Foundation; either version 2, or (at your option)
864 # This program is distributed in the hope that it will be useful,
865 # but WITHOUT ANY WARRANTY; without even the implied warranty of
866 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
867 # GNU General Public License for more details.
869 # You should have received a copy of the GNU General Public License
870 # along with this program; if not, write to the Free Software
871 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
880 # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
881 # "missing" invocation, for better error output.
882 AC_DEFUN([AM_PROG_LEX],
883 [AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
884 AC_REQUIRE([AC_PROG_LEX])dnl
885 if test "$LEX" = :; then
886 LEX=${am_missing_run}flex
889 dnl $Id: krb-prog-ln-s.m4,v 1.1 1997/12/14 15:59:01 joda Exp $
892 dnl Better test for ln -s, ln or cp
895 AC_DEFUN(AC_KRB_PROG_LN_S,
896 [AC_MSG_CHECKING(for ln -s or something else)
897 AC_CACHE_VAL(ac_cv_prog_LN_S,
899 if ln -s X conftestdata 2>/dev/null
902 ac_cv_prog_LN_S="ln -s"
905 if ln conftestdata1 conftestdata2; then
912 LN_S="$ac_cv_prog_LN_S"
913 AC_MSG_RESULT($ac_cv_prog_LN_S)
918 dnl $Id: mips-abi.m4,v 1.6 2002/04/30 16:46:05 joda Exp $
921 dnl Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext to some
924 AC_DEFUN(AC_MIPS_ABI, [
925 AC_ARG_WITH(mips_abi,
926 AC_HELP_STRING([--with-mips-abi=abi],[ABI to use for IRIX (32, n32, or 64)]))
930 with_mips_abi="${with_mips_abi:-yes}"
931 if test -n "$GCC"; then
933 # GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select
934 # which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs.
936 # Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old
937 # GCC and revert back to O32. The same goes if O32 is asked for - old
938 # GCCs doesn't like the -mabi option, and new GCCs can't output O32.
940 # Don't you just love *all* the different SGI ABIs?
942 case "${with_mips_abi}" in
943 32|o32) abi='-mabi=32'; abilibdirext='' ;;
944 n32|yes) abi='-mabi=n32'; abilibdirext='32' ;;
945 64) abi='-mabi=64'; abilibdirext='64' ;;
946 no) abi=''; abilibdirext='';;
947 *) AC_MSG_ERROR("Invalid ABI specified") ;;
949 if test -n "$abi" ; then
950 ac_foo=krb_cv_gcc_`echo $abi | tr =- __`
952 dnl can't use AC_CACHE_CHECK here, since it doesn't quote CACHE-ID to
955 AC_MSG_CHECKING([if $CC supports the $abi option])
956 AC_CACHE_VAL($ac_foo, [
957 save_CFLAGS="$CFLAGS"
958 CFLAGS="$CFLAGS $abi"
959 AC_TRY_COMPILE(,int x;, eval $ac_foo=yes, eval $ac_foo=no)
960 CFLAGS="$save_CFLAGS"
962 ac_res=`eval echo \\\$$ac_foo`
963 AC_MSG_RESULT($ac_res)
964 if test $ac_res = no; then
965 # Try to figure out why that failed...
968 save_CFLAGS="$CFLAGS"
969 CFLAGS="$CFLAGS -mabi=n32"
970 AC_TRY_COMPILE(,int x;, ac_res=yes, ac_res=no)
972 if test $ac_res = yes; then
974 AC_MSG_ERROR([$CC does not support the $with_mips_abi ABI])
981 if test $with_mips_abi = yes; then
982 # Old GCC, default to O32
987 AC_MSG_ERROR([$CC does not support the $with_mips_abi ABI])
991 fi #if test $ac_res = no; then
992 fi #if test -n "$abi" ; then
994 case "${with_mips_abi}" in
995 32|o32) abi='-32'; abilibdirext='' ;;
996 n32|yes) abi='-n32'; abilibdirext='32' ;;
997 64) abi='-64'; abilibdirext='64' ;;
998 no) abi=''; abilibdirext='';;
999 *) AC_MSG_ERROR("Invalid ABI specified") ;;
1001 fi #if test -n "$GCC"; then
1007 dnl $Id: c-attribute.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
1011 dnl Test for __attribute__
1014 AC_DEFUN(AC_C___ATTRIBUTE__, [
1015 AC_MSG_CHECKING(for __attribute__)
1016 AC_CACHE_VAL(ac_cv___attribute__, [
1021 static void foo(void) __attribute__ ((noreturn));
1029 ac_cv___attribute__=yes,
1030 ac_cv___attribute__=no)])
1031 if test "$ac_cv___attribute__" = "yes"; then
1032 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
1034 AC_MSG_RESULT($ac_cv___attribute__)
1038 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
1040 # serial 46 AC_PROG_LIBTOOL
1042 AC_DEFUN([AC_PROG_LIBTOOL],
1043 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1045 # This can be used to rebuild libtool when needed
1046 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1048 # Always use our own libtool.
1049 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1050 AC_SUBST(LIBTOOL)dnl
1052 # Prevent multiple expansion
1053 define([AC_PROG_LIBTOOL], [])
1056 AC_DEFUN([AC_LIBTOOL_SETUP],
1058 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1059 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1060 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1061 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1062 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1063 AC_REQUIRE([AC_PROG_CC])dnl
1064 AC_REQUIRE([AC_PROG_LD])dnl
1065 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1066 AC_REQUIRE([AC_PROG_NM])dnl
1067 AC_REQUIRE([AC_PROG_LN_S])dnl
1068 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1069 AC_REQUIRE([AC_OBJEXT])dnl
1070 AC_REQUIRE([AC_EXEEXT])dnl
1073 _LT_AC_PROG_ECHO_BACKSLASH
1074 # Only perform the check for file, if the check method requires it
1075 case $deplibs_check_method in
1077 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1083 AC_CHECK_TOOL(RANLIB, ranlib, :)
1084 AC_CHECK_TOOL(STRIP, strip, :)
1086 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1087 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1088 enable_win32_dll=yes, enable_win32_dll=no)
1090 AC_ARG_ENABLE(libtool-lock,
1091 [ --disable-libtool-lock avoid locking (might break parallel builds)])
1092 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1094 # Some flags need to be propagated to the compiler or linker for good
1098 # Find out which ABI we are using.
1099 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1100 if AC_TRY_EVAL(ac_compile); then
1101 case `/usr/bin/file conftest.$ac_objext` in
1117 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1118 SAVE_CFLAGS="$CFLAGS"
1119 CFLAGS="$CFLAGS -belf"
1120 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1123 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1125 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1126 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1127 CFLAGS="$SAVE_CFLAGS"
1131 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1132 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1133 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1134 AC_CHECK_TOOL(AS, as, false)
1135 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1137 # recent cygwin and mingw systems supply a stub DllMain which the user
1138 # can override, but on older systems we have to supply one
1139 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1141 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1142 DllMain (0, 0, 0);],
1143 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1146 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1147 # old mingw systems require "-dll" to link a DLL, while more recent ones
1149 SAVE_CFLAGS="$CFLAGS"
1150 CFLAGS="$CFLAGS -mdll"
1151 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1152 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1153 CFLAGS="$SAVE_CFLAGS" ;;
1154 *-*-cygwin* | *-*-pw32*)
1155 # cygwin systems need to pass --dll to the linker, and not link
1156 # crt.o which will require a WinMain@16 definition.
1157 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1163 _LT_AC_LTCONFIG_HACK
1167 # AC_LIBTOOL_HEADER_ASSERT
1168 # ------------------------
1169 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1170 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1171 [lt_cv_func_assert_works],
1174 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1175 case `$CC --version 2>/dev/null` in
1176 [[12]].*) lt_cv_func_assert_works=no ;;
1177 *) lt_cv_func_assert_works=yes ;;
1183 if test "x$lt_cv_func_assert_works" = xyes; then
1184 AC_CHECK_HEADERS(assert.h)
1186 ])# AC_LIBTOOL_HEADER_ASSERT
1188 # _LT_AC_CHECK_DLFCN
1189 # --------------------
1190 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1191 [AC_CHECK_HEADERS(dlfcn.h)
1192 ])# _LT_AC_CHECK_DLFCN
1194 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1195 # ---------------------------------
1196 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1197 [AC_REQUIRE([AC_CANONICAL_HOST])
1198 AC_REQUIRE([AC_PROG_NM])
1199 AC_REQUIRE([AC_OBJEXT])
1200 # Check for command to grab the raw symbol name followed by C symbol from nm.
1201 AC_MSG_CHECKING([command to parse $NM output])
1202 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1204 # These are sane defaults that work on at least a few old systems.
1205 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1207 # Character class describing NM global symbol codes.
1208 symcode='[[BCDEGRST]]'
1210 # Regexp to match symbols that can be accessed directly from C.
1211 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1213 # Transform the above into a raw symbol and a C symbol.
1214 symxfrm='\1 \2\3 \3'
1216 # Transform an extracted symbol line into a proper C declaration
1217 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1219 # Transform an extracted symbol line into symbol name and symbol address
1220 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'"
1222 # Define system-specific variables.
1227 cygwin* | mingw* | pw32*)
1228 symcode='[[ABCDGISTW]]'
1230 hpux*) # Its linker distinguishes data from code symbols
1231 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1232 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'"
1235 symcode='[[BCDEGRST]]'
1241 symcode='[[DFNSTU]]'
1245 # Handle CRLF in mingw tool chain
1249 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1253 # If we're using GNU nm, then use its standard symbol codes.
1254 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1255 symcode='[[ABCDGISTW]]'
1258 # Try without a prefix undercore, then with it.
1259 for ac_symprfx in "" "_"; do
1261 # Write the raw and C identifiers.
1262 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1264 # Check to see that the pipe works correctly.
1267 cat > conftest.$ac_ext <<EOF
1272 void nm_test_func(){}
1276 int main(){nm_test_var='a';nm_test_func();return(0);}
1279 if AC_TRY_EVAL(ac_compile); then
1280 # Now try to grab the symbols.
1282 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1283 # Try sorting and uniquifying the output.
1284 if sort "$nlist" | uniq > "$nlist"T; then
1285 mv -f "$nlist"T "$nlist"
1290 # Make sure that we snagged all the symbols we need.
1291 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1292 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1293 cat <<EOF > conftest.$ac_ext
1299 # Now generate the symbol file.
1300 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1302 cat <<EOF >> conftest.$ac_ext
1303 #if defined (__STDC__) && __STDC__
1304 # define lt_ptr void *
1306 # define lt_ptr char *
1310 /* The mapping between symbol names and symbols. */
1315 lt_preloaded_symbols[[]] =
1318 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1319 cat <<\EOF >> conftest.$ac_ext
1327 # Now try linking the two files.
1328 mv conftest.$ac_objext conftstm.$ac_objext
1330 save_CFLAGS="$CFLAGS"
1331 LIBS="conftstm.$ac_objext"
1332 CFLAGS="$CFLAGS$no_builtin_flag"
1333 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1337 CFLAGS="$save_CFLAGS"
1339 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1342 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1345 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1348 echo "$progname: failed program was:" >&AC_FD_CC
1349 cat conftest.$ac_ext >&5
1351 rm -f conftest* conftst*
1353 # Do not use the global_symbol_pipe unless it works.
1354 if test "$pipe_works" = yes; then
1357 lt_cv_sys_global_symbol_pipe=
1361 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1362 if test -z "$lt_cv_sys_global_symbol_pipe"; then
1363 global_symbol_to_cdecl=
1364 global_symbol_to_c_name_address=
1366 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1367 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1369 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1371 AC_MSG_RESULT(failed)
1375 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1377 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1378 # ---------------------------------
1379 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1380 [# Find the correct PATH separator. Usually this is `:', but
1381 # DJGPP uses `;' like DOS.
1382 if test "X${PATH_SEPARATOR+set}" != Xset; then
1383 UNAME=${UNAME-`uname 2>/dev/null`}
1385 *-DOS) lt_cv_sys_path_separator=';' ;;
1386 *) lt_cv_sys_path_separator=':' ;;
1388 PATH_SEPARATOR=$lt_cv_sys_path_separator
1390 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1392 # _LT_AC_PROG_ECHO_BACKSLASH
1393 # --------------------------
1394 # Add some code to the start of the generated configure script which
1395 # will find an echo command which doesn't interpret backslashes.
1396 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1397 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1398 [AC_DIVERT_PUSH(NOTICE)])
1399 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1401 # Check that we are running under the correct shell.
1402 SHELL=${CONFIG_SHELL-/bin/sh}
1406 # Remove one level of quotation (which was required for Make).
1407 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1412 if test "X[$]1" = X--no-reexec; then
1413 # Discard the --no-reexec flag, and continue.
1415 elif test "X[$]1" = X--fallback-echo; then
1416 # Avoid inline document here, it may be left over
1418 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1419 # Yippee, $echo works!
1422 # Restart under the correct shell.
1423 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1426 if test "X[$]1" = X--fallback-echo; then
1427 # used as fallback echo
1435 # The HP-UX ksh and POSIX shell print the target directory to stdout
1437 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1439 if test -z "$ECHO"; then
1440 if test "X${echo_test_string+set}" != Xset; then
1441 # find a string as large as possible, as long as the shell can cope with it
1442 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1443 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1444 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1445 echo_test_string="`eval $cmd`" &&
1446 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1453 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1454 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1455 test "X$echo_testing_string" = "X$echo_test_string"; then
1458 # The Solaris, AIX, and Digital Unix default echo programs unquote
1459 # backslashes. This makes it impossible to quote backslashes using
1460 # echo "$something" | sed 's/\\/\\\\/g'
1462 # So, first we look for a working echo in the user's PATH.
1464 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1465 for dir in $PATH /usr/ucb; do
1466 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1467 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1468 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1469 test "X$echo_testing_string" = "X$echo_test_string"; then
1476 if test "X$echo" = Xecho; then
1477 # We didn't find a better echo, so look for alternatives.
1478 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1479 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1480 test "X$echo_testing_string" = "X$echo_test_string"; then
1481 # This shell has a builtin print -r that does the trick.
1483 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1484 test "X$CONFIG_SHELL" != X/bin/ksh; then
1485 # If we have ksh, try running configure again with it.
1486 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1487 export ORIGINAL_CONFIG_SHELL
1488 CONFIG_SHELL=/bin/ksh
1490 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1494 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1495 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1496 test "X$echo_testing_string" = "X$echo_test_string"; then
1497 # Cool, printf works
1499 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1500 test "X$echo_testing_string" = 'X\t' &&
1501 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1502 test "X$echo_testing_string" = "X$echo_test_string"; then
1503 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1505 SHELL="$CONFIG_SHELL"
1507 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1508 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1509 test "X$echo_testing_string" = 'X\t' &&
1510 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1511 test "X$echo_testing_string" = "X$echo_test_string"; then
1512 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1514 # maybe with a smaller string...
1517 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1518 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1525 if test "$prev" != 'sed 50q "[$]0"'; then
1526 echo_test_string=`eval $prev`
1527 export echo_test_string
1528 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1530 # Oops. We lost completely, so just stick with echo.
1539 # Copy echo and quote the copy suitably for passing to libtool from
1540 # the Makefile, instead of quoting the original, which is used later.
1542 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1543 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1548 ])# _LT_AC_PROG_ECHO_BACKSLASH
1550 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1551 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1552 # ------------------------------------------------------------------
1553 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1554 [if test "$cross_compiling" = yes; then :
1557 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1558 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1559 lt_status=$lt_dlunknown
1560 cat > conftest.$ac_ext <<EOF
1561 [#line __oline__ "configure"
1562 #include "confdefs.h"
1571 # define LT_DLGLOBAL RTLD_GLOBAL
1574 # define LT_DLGLOBAL DL_GLOBAL
1576 # define LT_DLGLOBAL 0
1580 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1581 find out it does not work in some platform. */
1582 #ifndef LT_DLLAZY_OR_NOW
1584 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1587 # define LT_DLLAZY_OR_NOW DL_LAZY
1590 # define LT_DLLAZY_OR_NOW RTLD_NOW
1593 # define LT_DLLAZY_OR_NOW DL_NOW
1595 # define LT_DLLAZY_OR_NOW 0
1603 extern "C" void exit (int);
1606 void fnord() { int i=42;}
1609 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1610 int status = $lt_dlunknown;
1614 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1615 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1616 /* dlclose (self); */
1622 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1623 (./conftest; exit; ) 2>/dev/null
1626 x$lt_dlno_uscore) $1 ;;
1627 x$lt_dlneed_uscore) $2 ;;
1628 x$lt_unknown|x*) $3 ;;
1631 # compilation failed
1636 ])# _LT_AC_TRY_DLOPEN_SELF
1638 # AC_LIBTOOL_DLOPEN_SELF
1639 # -------------------
1640 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1641 [if test "x$enable_dlopen" != xyes; then
1642 enable_dlopen=unknown
1643 enable_dlopen_self=unknown
1644 enable_dlopen_self_static=unknown
1651 lt_cv_dlopen="load_add_on"
1653 lt_cv_dlopen_self=yes
1656 cygwin* | mingw* | pw32*)
1657 lt_cv_dlopen="LoadLibrary"
1662 AC_CHECK_FUNC([shl_load],
1663 [lt_cv_dlopen="shl_load"],
1664 [AC_CHECK_LIB([dld], [shl_load],
1665 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1666 [AC_CHECK_FUNC([dlopen],
1667 [lt_cv_dlopen="dlopen"],
1668 [AC_CHECK_LIB([dl], [dlopen],
1669 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1670 [AC_CHECK_LIB([svld], [dlopen],
1671 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1672 [AC_CHECK_LIB([dld], [dld_link],
1673 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1682 if test "x$lt_cv_dlopen" != xno; then
1688 case $lt_cv_dlopen in
1690 save_CPPFLAGS="$CPPFLAGS"
1691 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1692 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1694 save_LDFLAGS="$LDFLAGS"
1695 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1698 LIBS="$lt_cv_dlopen_libs $LIBS"
1700 AC_CACHE_CHECK([whether a program can dlopen itself],
1701 lt_cv_dlopen_self, [dnl
1702 _LT_AC_TRY_DLOPEN_SELF(
1703 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1704 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1707 if test "x$lt_cv_dlopen_self" = xyes; then
1708 LDFLAGS="$LDFLAGS $link_static_flag"
1709 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1710 lt_cv_dlopen_self_static, [dnl
1711 _LT_AC_TRY_DLOPEN_SELF(
1712 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1713 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1717 CPPFLAGS="$save_CPPFLAGS"
1718 LDFLAGS="$save_LDFLAGS"
1723 case $lt_cv_dlopen_self in
1724 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1725 *) enable_dlopen_self=unknown ;;
1728 case $lt_cv_dlopen_self_static in
1729 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1730 *) enable_dlopen_self_static=unknown ;;
1733 ])# AC_LIBTOOL_DLOPEN_SELF
1735 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1736 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1737 # Sed substitution that helps us do robust quoting. It backslashifies
1738 # metacharacters that are still active within double-quoted strings.
1739 Xsed='sed -e s/^X//'
1740 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1742 # Same as above, but do not quote variable references.
1743 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1745 # Sed substitution to delay expansion of an escaped shell variable in a
1746 # double_quote_subst'ed string.
1747 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1753 default_ofile=libtool
1754 can_build_shared=yes
1756 # All known linkers require a `.a' archive for static linking (except M$VC,
1757 # which needs '.lib').
1759 ltmain="$ac_aux_dir/ltmain.sh"
1760 ofile="$default_ofile"
1761 with_gnu_ld="$lt_cv_prog_gnu_ld"
1762 need_locks="$enable_libtool_lock"
1765 old_CFLAGS="$CFLAGS"
1767 # Set sane defaults for various variables
1768 test -z "$AR" && AR=ar
1769 test -z "$AR_FLAGS" && AR_FLAGS=cru
1770 test -z "$AS" && AS=as
1771 test -z "$CC" && CC=cc
1772 test -z "$DLLTOOL" && DLLTOOL=dlltool
1773 test -z "$LD" && LD=ld
1774 test -z "$LN_S" && LN_S="ln -s"
1775 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1776 test -z "$NM" && NM=nm
1777 test -z "$OBJDUMP" && OBJDUMP=objdump
1778 test -z "$RANLIB" && RANLIB=:
1779 test -z "$STRIP" && STRIP=:
1780 test -z "$ac_objext" && ac_objext=o
1782 if test x"$host" != x"$build"; then
1783 ac_tool_prefix=${host_alias}-
1788 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1791 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1796 # AIX sometimes has problems with the GCC collect2 program. For some
1797 # reason, if we set the COLLECT_NAMES environment variable, the problems
1798 # vanish in a puff of smoke.
1799 if test "X${COLLECT_NAMES+set}" != Xset; then
1801 export COLLECT_NAMES
1806 # Determine commands to create old-style static archives.
1807 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1808 old_postinstall_cmds='chmod 644 $oldlib'
1809 old_postuninstall_cmds=
1811 if test -n "$RANLIB"; then
1814 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1817 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1820 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1823 # Allow CC to be a program name with arguments.
1827 AC_MSG_CHECKING([for objdir])
1828 rm -f .libs 2>/dev/null
1829 mkdir .libs 2>/dev/null
1830 if test -d .libs; then
1833 # MS-DOS does not allow filenames that begin with a dot.
1836 rmdir .libs 2>/dev/null
1837 AC_MSG_RESULT($objdir)
1841 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1842 pic_mode="$withval", pic_mode=default)
1843 test -z "$pic_mode" && pic_mode=default
1845 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1846 # in isolation, and that seeing it set (from the cache) indicates that
1847 # the associated values are set (in the cache) correctly too.
1848 AC_MSG_CHECKING([for $compiler option to produce PIC])
1849 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1850 [ lt_cv_prog_cc_pic=
1851 lt_cv_prog_cc_shlib=
1853 lt_cv_prog_cc_static=
1854 lt_cv_prog_cc_no_builtin=
1855 lt_cv_prog_cc_can_build_shared=$can_build_shared
1857 if test "$GCC" = yes; then
1858 lt_cv_prog_cc_wl='-Wl,'
1859 lt_cv_prog_cc_static='-static'
1863 # Below there is a dirty hack to force normal static linking with -ldl
1864 # The problem is because libdl dynamically linked with both libc and
1865 # libC (AIX C++ library), which obviously doesn't included in libraries
1866 # list by gcc. This cause undefined symbols with -static flags.
1867 # This hack allows C programs to be linked with "-static -ldl", but
1868 # not sure about C++ programs.
1869 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1872 # FIXME: we need at least 68020 code to build shared libraries, but
1873 # adding the `-m68020' flag to GCC prevents building anything better,
1875 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1877 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1878 # PIC is the default for these OSes.
1880 darwin* | rhapsody*)
1881 # PIC is the default on this platform
1882 # Common symbols not allowed in MH_DYLIB files
1883 lt_cv_prog_cc_pic='-fno-common'
1885 cygwin* | mingw* | pw32* | os2*)
1886 # This hack is so that the source file can tell whether it is being
1887 # built for inclusion in a dll (and should export symbols for example).
1888 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1891 if test -d /usr/nec; then
1892 lt_cv_prog_cc_pic=-Kconform_pic
1896 lt_cv_prog_cc_pic='-fPIC'
1900 # PORTME Check for PIC flags for the system compiler.
1902 aix3* | aix4* | aix5*)
1903 lt_cv_prog_cc_wl='-Wl,'
1904 # All AIX code is PIC.
1905 if test "$host_cpu" = ia64; then
1906 # AIX 5 now supports IA64 processor
1907 lt_cv_prog_cc_static='-Bstatic'
1909 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1913 hpux9* | hpux10* | hpux11*)
1914 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1915 lt_cv_prog_cc_wl='-Wl,'
1916 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1917 lt_cv_prog_cc_pic='+Z'
1921 lt_cv_prog_cc_wl='-Wl,'
1922 lt_cv_prog_cc_static='-non_shared'
1923 # PIC (with -KPIC) is the default.
1926 cygwin* | mingw* | pw32* | os2*)
1927 # This hack is so that the source file can tell whether it is being
1928 # built for inclusion in a dll (and should export symbols for example).
1929 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1933 lt_cv_prog_cc_pic='-KPIC'
1934 lt_cv_prog_cc_static='-Bstatic'
1937 osf3* | osf4* | osf5*)
1938 # All OSF/1 code is PIC.
1939 lt_cv_prog_cc_wl='-Wl,'
1940 lt_cv_prog_cc_static='-non_shared'
1944 lt_cv_prog_cc_pic='-Kpic'
1945 lt_cv_prog_cc_static='-dn'
1946 lt_cv_prog_cc_shlib='-belf'
1950 lt_cv_prog_cc_pic='-KPIC'
1951 lt_cv_prog_cc_static='-Bstatic'
1952 lt_cv_prog_cc_wl='-Wl,'
1956 lt_cv_prog_cc_pic='-PIC'
1957 lt_cv_prog_cc_static='-Bstatic'
1958 lt_cv_prog_cc_wl='-Qoption ld '
1961 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1962 lt_cv_prog_cc_pic='-KPIC'
1963 lt_cv_prog_cc_static='-Bstatic'
1964 if test "x$host_vendor" = xsni; then
1965 lt_cv_prog_cc_wl='-LD'
1967 lt_cv_prog_cc_wl='-Wl,'
1972 lt_cv_prog_cc_pic='-pic'
1973 lt_cv_prog_cc_static='-Bstatic'
1977 if test -d /usr/nec ;then
1978 lt_cv_prog_cc_pic='-Kconform_pic'
1979 lt_cv_prog_cc_static='-Bstatic'
1984 lt_cv_prog_cc_can_build_shared=no
1989 if test -z "$lt_cv_prog_cc_pic"; then
1990 AC_MSG_RESULT([none])
1992 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1994 # Check to make sure the pic_flag actually works.
1995 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1996 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1997 save_CFLAGS="$CFLAGS"
1998 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1999 AC_TRY_COMPILE([], [], [dnl
2001 hpux9* | hpux10* | hpux11*)
2002 # On HP-UX, both CC and GCC only warn that PIC is supported... then
2003 # they create non-PIC objects. So, if there were any warnings, we
2004 # assume that PIC is not supported.
2005 if test -s conftest.err; then
2006 lt_cv_prog_cc_pic_works=no
2008 lt_cv_prog_cc_pic_works=yes
2012 lt_cv_prog_cc_pic_works=yes
2016 lt_cv_prog_cc_pic_works=no
2018 CFLAGS="$save_CFLAGS"
2021 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2023 lt_cv_prog_cc_can_build_shared=no
2025 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2028 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
2031 # Check for any special shared library compilation flags.
2032 if test -n "$lt_cv_prog_cc_shlib"; then
2033 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
2034 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
2036 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
2037 lt_cv_prog_cc_can_build_shared=no
2041 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
2042 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
2043 lt_cv_prog_cc_static_works=no
2044 save_LDFLAGS="$LDFLAGS"
2045 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2046 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
2047 LDFLAGS="$save_LDFLAGS"
2050 # Belt *and* braces to stop my trousers falling down:
2051 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2052 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
2054 pic_flag="$lt_cv_prog_cc_pic"
2055 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2056 wl="$lt_cv_prog_cc_wl"
2057 link_static_flag="$lt_cv_prog_cc_static"
2058 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2059 can_build_shared="$lt_cv_prog_cc_can_build_shared"
2062 # Check to see if options -o and -c are simultaneously supported by compiler
2063 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
2064 AC_CACHE_VAL([lt_cv_compiler_c_o], [
2065 $rm -r conftest 2>/dev/null
2068 echo "int some_variable = 0;" > conftest.$ac_ext
2070 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2071 # that will create temporary files in the current directory regardless of
2072 # the output directory. Thus, making CWD read-only will cause this test
2073 # to fail, enabling locking or at least warning the user not to do parallel
2076 save_CFLAGS="$CFLAGS"
2077 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2079 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2080 # The compiler can only warn and ignore the option if not recognized
2081 # So say no if there are warnings
2082 if test -s out/conftest.err; then
2083 lt_cv_compiler_c_o=no
2085 lt_cv_compiler_c_o=yes
2088 # Append any errors to the config.log.
2089 cat out/conftest.err 1>&AC_FD_CC
2090 lt_cv_compiler_c_o=no
2092 CFLAGS="$save_CFLAGS"
2098 $rm -r conftest 2>/dev/null
2100 compiler_c_o=$lt_cv_compiler_c_o
2101 AC_MSG_RESULT([$compiler_c_o])
2103 if test x"$compiler_c_o" = x"yes"; then
2104 # Check to see if we can write to a .lo
2105 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
2106 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
2107 lt_cv_compiler_o_lo=no
2108 save_CFLAGS="$CFLAGS"
2109 CFLAGS="$CFLAGS -c -o conftest.lo"
2110 save_objext="$ac_objext"
2112 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2113 # The compiler can only warn and ignore the option if not recognized
2114 # So say no if there are warnings
2115 if test -s conftest.err; then
2116 lt_cv_compiler_o_lo=no
2118 lt_cv_compiler_o_lo=yes
2121 ac_objext="$save_objext"
2122 CFLAGS="$save_CFLAGS"
2124 compiler_o_lo=$lt_cv_compiler_o_lo
2125 AC_MSG_RESULT([$compiler_o_lo])
2130 # Check to see if we can do hard links to lock some files if needed
2131 hard_links="nottested"
2132 if test "$compiler_c_o" = no && test "$need_locks" != no; then
2133 # do not overwrite the value of need_locks provided by the user
2134 AC_MSG_CHECKING([if we can lock with hard links])
2137 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2139 ln conftest.a conftest.b 2>&5 || hard_links=no
2140 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2141 AC_MSG_RESULT([$hard_links])
2142 if test "$hard_links" = no; then
2143 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2150 if test "$GCC" = yes; then
2151 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2152 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2153 echo "int some_variable = 0;" > conftest.$ac_ext
2154 save_CFLAGS="$CFLAGS"
2155 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2156 compiler_rtti_exceptions=no
2157 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2158 # The compiler can only warn and ignore the option if not recognized
2159 # So say no if there are warnings
2160 if test -s conftest.err; then
2161 compiler_rtti_exceptions=no
2163 compiler_rtti_exceptions=yes
2166 CFLAGS="$save_CFLAGS"
2167 AC_MSG_RESULT([$compiler_rtti_exceptions])
2169 if test "$compiler_rtti_exceptions" = "yes"; then
2170 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2172 no_builtin_flag=' -fno-builtin'
2176 # See if the linker supports building shared libraries.
2177 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2179 allow_undefined_flag=
2181 need_lib_prefix=unknown
2182 need_version=unknown
2183 # when you set need_version to no, make sure it does not cause -set_version
2184 # flags to be left without arguments
2186 archive_expsym_cmds=
2187 old_archive_from_new_cmds=
2188 old_archive_from_expsyms_cmds=
2189 export_dynamic_flag_spec=
2190 whole_archive_flag_spec=
2191 thread_safe_flag_spec=
2192 hardcode_into_libs=no
2193 hardcode_libdir_flag_spec=
2194 hardcode_libdir_separator=
2197 hardcode_shlibpath_var=unsupported
2199 link_all_deplibs=unknown
2200 always_export_symbols=no
2201 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2202 # include_expsyms should be a list of space-separated symbols to be *always*
2203 # included in the symbol list
2205 # exclude_expsyms can be an egrep regular expression of symbols to exclude
2206 # it will be wrapped by ` (' and `)$', so one must not match beginning or
2207 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2208 # as well as any symbol that contains `d'.
2209 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2210 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2211 # platforms (ab)use it in PIC code, but their linkers get confused if
2212 # the symbol is explicitly referenced. Since portable code cannot
2213 # rely on this symbol name, it's probably fine to never include it in
2214 # preloaded symbol tables.
2215 extract_expsyms_cmds=
2218 cygwin* | mingw* | pw32*)
2219 # FIXME: the MSVC++ port hasn't been tested in a loooong time
2220 # When not using gcc, we currently assume that we are using
2221 # Microsoft Visual C++.
2222 if test "$GCC" != yes; then
2232 if test "$with_gnu_ld" = yes; then
2233 # If archive_cmds runs LD, not CC, wlarc should be empty
2236 # See if GNU ld supports shared libraries.
2238 aix3* | aix4* | aix5*)
2239 # On AIX, the GNU linker is very broken
2240 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2244 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
2245 *** to be unable to reliably create shared libraries on AIX.
2246 *** Therefore, libtool is disabling shared libraries support. If you
2247 *** really care for shared libraries, you may want to modify your PATH
2248 *** so that a non-GNU linker is found, and then restart.
2254 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)'
2255 hardcode_libdir_flag_spec='-L$libdir'
2256 hardcode_minus_L=yes
2258 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2259 # that the semantics of dynamic libraries on AmigaOS, at least up
2260 # to version 4, is to share data among multiple programs linked
2261 # with the same dynamic library. Since this doesn't match the
2262 # behavior of shared libraries on other platforms, we can use
2268 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2269 allow_undefined_flag=unsupported
2270 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2271 # support --undefined. This deserves some investigation. FIXME
2272 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2278 cygwin* | mingw* | pw32*)
2279 # hardcode_libdir_flag_spec is actually meaningless, as there is
2280 # no search path for DLLs.
2281 hardcode_libdir_flag_spec='-L$libdir'
2282 allow_undefined_flag=unsupported
2283 always_export_symbols=yes
2285 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2286 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2287 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2288 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2289 else $CC -o impgen impgen.c ; fi)~
2290 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2292 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2294 # cygwin and mingw dlls have different entry points and sets of symbols
2296 # FIXME: what about values for MSVC?
2297 dll_entry=__cygwin_dll_entry@12
2298 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2302 dll_entry=_DllMainCRTStartup@12
2303 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2307 # mingw and cygwin differ, and it's simplest to just exclude the union
2308 # of the two symbol sets.
2309 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2311 # recent cygwin and mingw systems supply a stub DllMain which the user
2312 # can override, but on older systems we have to supply one (in ltdll.c)
2313 if test "x$lt_cv_need_dllmain" = "xyes"; then
2314 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2315 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~
2316 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2322 # Extract the symbol export list from an `--export-all' def file,
2323 # then regenerate the def file from the symbol export list, so that
2324 # the compiled dll only exports the symbol export list.
2325 # Be careful not to strip the DATA tag left be newer dlltools.
2326 export_symbols_cmds="$ltdll_cmds"'
2327 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2328 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2330 # If the export-symbols file already is a .def file (1st line
2331 # is EXPORTS), use it as is.
2332 # If DATA tags from a recent dlltool are present, honour them!
2333 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2334 cp $export_symbols $output_objdir/$soname-def;
2336 echo EXPORTS > $output_objdir/$soname-def;
2338 cat $export_symbols | while read symbol; do
2341 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2342 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2344 _lt_hint=`expr 1 + \$_lt_hint`;
2348 $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~
2349 $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~
2350 $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~
2351 $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~
2352 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2356 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2357 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2360 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2361 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2366 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2370 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
2371 *** create shared libraries on Solaris systems. Therefore, libtool
2372 *** is disabling shared libraries support. We urge you to upgrade GNU
2373 *** binutils to release 2.9.1 or newer. Another option is to modify
2374 *** your PATH or compiler configuration so that the native linker is
2375 *** used, and then restart.
2378 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2379 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2380 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2387 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2390 hardcode_shlibpath_var=no
2394 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2395 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2396 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2403 if test "$ld_shlibs" = yes; then
2404 runpath_var=LD_RUN_PATH
2405 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2406 export_dynamic_flag_spec='${wl}--export-dynamic'
2408 cygwin* | mingw* | pw32*)
2409 # dlltool doesn't understand --whole-archive et. al.
2410 whole_archive_flag_spec=
2413 # ancient GNU ld didn't support --whole-archive et. al.
2414 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2415 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2417 whole_archive_flag_spec=
2423 # PORTME fill in a description of your system's linker (not GNU ld)
2426 allow_undefined_flag=unsupported
2427 always_export_symbols=yes
2428 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'
2429 # Note: this linker hardcodes the directories in LIBPATH if there
2430 # are no directories specified by -L.
2431 hardcode_minus_L=yes
2432 if test "$GCC" = yes && test -z "$link_static_flag"; then
2433 # Neither direct hardcoding nor static linking is supported with a
2435 hardcode_direct=unsupported
2440 if test "$host_cpu" = ia64; then
2441 # On IA64, the linker does run time linking by default, so we don't
2442 # have to do anything special.
2443 aix_use_runtimelinking=no
2444 exp_sym_flag='-Bexport'
2447 aix_use_runtimelinking=no
2449 # Test if we are trying to use run time linking or normal
2450 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2451 # need to do runtime linking.
2452 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2453 for ld_flag in $LDFLAGS; do
2454 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2455 aix_use_runtimelinking=yes
2461 exp_sym_flag='-bexport'
2462 no_entry_flag='-bnoentry'
2465 # When large executables or shared objects are built, AIX ld can
2466 # have problems creating the table of contents. If linking a library
2467 # or program results in "error TOC overflow" add -mminimal-toc to
2468 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2469 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2473 hardcode_libdir_separator=':'
2474 if test "$GCC" = yes; then
2475 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2476 collect2name=`${CC} -print-prog-name=collect2`
2477 if test -f "$collect2name" && \
2478 strings "$collect2name" | grep resolve_lib_name >/dev/null
2480 # We have reworked collect2
2483 # We have old collect2
2484 hardcode_direct=unsupported
2485 # It fails to find uninstalled libraries when the uninstalled
2486 # path is not listed in the libpath. Setting hardcode_minus_L
2487 # to unsupported forces relinking
2488 hardcode_minus_L=yes
2489 hardcode_libdir_flag_spec='-L$libdir'
2490 hardcode_libdir_separator=
2494 shared_flag='-shared'
2497 if test "$host_cpu" = ia64; then
2498 shared_flag='${wl}-G'
2500 if test "$aix_use_runtimelinking" = yes; then
2501 shared_flag='${wl}-G'
2503 shared_flag='${wl}-bM:SRE'
2508 # It seems that -bexpall can do strange things, so it is better to
2509 # generate a list of symbols to export.
2510 always_export_symbols=yes
2511 if test "$aix_use_runtimelinking" = yes; then
2512 # Warning - without using the other runtime loading flags (-brtl),
2513 # -berok will link without error, but may produce a broken library.
2514 allow_undefined_flag='-berok'
2515 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2516 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"
2518 if test "$host_cpu" = ia64; then
2519 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2520 allow_undefined_flag="-z nodefs"
2521 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"
2523 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2524 # Warning - without using the other run time loading flags,
2525 # -berok will link without error, but may produce a broken library.
2526 allow_undefined_flag='${wl}-berok'
2527 # This is a bit strange, but is similar to how AIX traditionally builds
2528 # it's shared libraries.
2529 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'
2535 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)'
2536 hardcode_libdir_flag_spec='-L$libdir'
2537 hardcode_minus_L=yes
2538 # see comment about different semantics on the GNU ld section
2542 cygwin* | mingw* | pw32*)
2543 # When not using gcc, we currently assume that we are using
2544 # Microsoft Visual C++.
2545 # hardcode_libdir_flag_spec is actually meaningless, as there is
2546 # no search path for DLLs.
2547 hardcode_libdir_flag_spec=' '
2548 allow_undefined_flag=unsupported
2549 # Tell ltmain to make .lib files, not .a files.
2551 # FIXME: Setting linknames here is a bad hack.
2552 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2553 # The linker will automatically build a .lib file if we build a DLL.
2554 old_archive_from_new_cmds='true'
2555 # FIXME: Should let the user specify the lib program.
2556 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2557 fix_srcfile_path='`cygpath -w "$srcfile"`'
2560 darwin* | rhapsody*)
2562 rhapsody* | darwin1.[[012]])
2563 allow_undefined_flag='-undefined suppress'
2566 allow_undefined_flag='-flat_namespace -undefined suppress'
2569 # FIXME: Relying on posixy $() will cause problems for
2570 # cross-compilation, but unfortunately the echo tests do not
2571 # yet detect zsh echo's removal of \ escapes.
2572 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2573 # We need to add '_' to the symbols in $export_symbols first
2574 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2576 hardcode_shlibpath_var=no
2577 whole_archive_flag_spec='-all_load $convenience'
2584 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2585 # support. Future versions do this automatically, but an explicit c++rt0.o
2586 # does not break anything, and helps significantly (at the cost of a little
2589 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2590 hardcode_libdir_flag_spec='-R$libdir'
2592 hardcode_shlibpath_var=no
2595 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2597 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2599 hardcode_minus_L=yes
2600 hardcode_shlibpath_var=no
2603 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2605 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2606 hardcode_libdir_flag_spec='-R$libdir'
2608 hardcode_shlibpath_var=no
2611 hpux9* | hpux10* | hpux11*)
2613 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' ;;
2614 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2616 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2617 hardcode_libdir_separator=:
2619 hardcode_minus_L=yes # Not in the search PATH, but as the default
2620 # location of the library.
2621 export_dynamic_flag_spec='${wl}-E'
2625 if test "$GCC" = yes; then
2626 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'
2628 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'
2630 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2631 hardcode_libdir_separator=:
2632 link_all_deplibs=yes
2636 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2637 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2639 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2641 hardcode_libdir_flag_spec='-R$libdir'
2643 hardcode_shlibpath_var=no
2647 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2649 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2650 hardcode_libdir_separator=:
2651 hardcode_shlibpath_var=no
2656 hardcode_shlibpath_var=no
2657 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2658 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2659 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2660 export_dynamic_flag_spec='${wl}-E'
2663 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2664 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2665 hardcode_libdir_flag_spec='-R$libdir'
2668 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2669 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2676 hardcode_libdir_flag_spec='-L$libdir'
2677 hardcode_minus_L=yes
2678 allow_undefined_flag=unsupported
2679 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'
2680 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2684 if test "$GCC" = yes; then
2685 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2686 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'
2688 allow_undefined_flag=' -expect_unresolved \*'
2689 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'
2691 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2692 hardcode_libdir_separator=:
2695 osf4* | osf5*) # as osf3* with the addition of -msym flag
2696 if test "$GCC" = yes; then
2697 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2698 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'
2699 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2701 allow_undefined_flag=' -expect_unresolved \*'
2702 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'
2703 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2704 $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'
2706 #Both c and cxx compiler support -rpath directly
2707 hardcode_libdir_flag_spec='-rpath $libdir'
2709 hardcode_libdir_separator=:
2713 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2714 hardcode_shlibpath_var=no
2715 runpath_var=LD_RUN_PATH
2716 hardcode_runpath_var=yes
2717 export_dynamic_flag_spec='${wl}-Bexport'
2721 # gcc --version < 3.0 without binutils cannot create self contained
2722 # shared libraries reliably, requiring libgcc.a to resolve some of
2723 # the object symbols generated in some cases. Libraries that use
2724 # assert need libgcc.a to resolve __eprintf, for example. Linking
2725 # a copy of libgcc.a into every shared library to guarantee resolving
2726 # such symbols causes other problems: According to Tim Van Holder
2727 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2728 # (to the application) exception stack for one thing.
2729 no_undefined_flag=' -z defs'
2730 if test "$GCC" = yes; then
2731 case `$CC --version 2>/dev/null` in
2735 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2736 *** create self contained shared libraries on Solaris systems, without
2737 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2738 *** -no-undefined support, which will at least allow you to build shared
2739 *** libraries. However, you may find that when you link such libraries
2740 *** into an application without using GCC, you have to manually add
2741 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2742 *** upgrade to a newer version of GCC. Another option is to rebuild your
2743 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2750 # $CC -shared without GNU ld will not create a library from C++
2751 # object files and a static libstdc++, better avoid it by now
2752 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2753 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2754 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2755 hardcode_libdir_flag_spec='-R$libdir'
2756 hardcode_shlibpath_var=no
2758 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2759 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2760 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2762 link_all_deplibs=yes
2766 if test "x$host_vendor" = xsequent; then
2767 # Use $CC to link under sequent, because it throws in some extra .o
2768 # files that make .init and .fini sections work.
2769 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2771 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2773 hardcode_libdir_flag_spec='-L$libdir'
2775 hardcode_minus_L=yes
2776 hardcode_shlibpath_var=no
2780 if test "x$host_vendor" = xsno; then
2781 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2782 hardcode_direct=yes # is this really true???
2784 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2785 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2787 runpath_var='LD_RUN_PATH'
2788 hardcode_shlibpath_var=no
2792 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2793 hardcode_shlibpath_var=no
2794 export_dynamic_flag_spec='-Bexport'
2798 no_undefined_flag=' -z text'
2799 # $CC -shared without GNU ld will not create a library from C++
2800 # object files and a static libstdc++, better avoid it by now
2801 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2802 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2803 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2804 hardcode_libdir_flag_spec=
2805 hardcode_shlibpath_var=no
2806 runpath_var='LD_RUN_PATH'
2810 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2811 hardcode_libdir_flag_spec='-L$libdir'
2812 hardcode_shlibpath_var=no
2816 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2817 hardcode_libdir_flag_spec='-L$libdir'
2818 hardcode_shlibpath_var=no
2822 if test -d /usr/nec; then
2823 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2824 hardcode_shlibpath_var=no
2825 runpath_var=LD_RUN_PATH
2826 hardcode_runpath_var=yes
2832 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2835 hardcode_shlibpath_var=no
2836 hardcode_runpath_var=yes
2837 runpath_var=LD_RUN_PATH
2840 sysv5uw7* | unixware7*)
2841 no_undefined_flag='${wl}-z ${wl}text'
2842 if test "$GCC" = yes; then
2843 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2845 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2847 runpath_var='LD_RUN_PATH'
2848 hardcode_shlibpath_var=no
2856 AC_MSG_RESULT([$ld_shlibs])
2857 test "$ld_shlibs" = no && can_build_shared=no
2859 # Check hardcoding attributes.
2860 AC_MSG_CHECKING([how to hardcode library paths into programs])
2862 if test -n "$hardcode_libdir_flag_spec" || \
2863 test -n "$runpath_var"; then
2865 # We can hardcode non-existant directories.
2866 if test "$hardcode_direct" != no &&
2867 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2868 # have to relink, otherwise we might link with an installed library
2869 # when we should be linking with a yet-to-be-installed one
2870 ## test "$hardcode_shlibpath_var" != no &&
2871 test "$hardcode_minus_L" != no; then
2872 # Linking always hardcodes the temporary library directory.
2873 hardcode_action=relink
2875 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2876 hardcode_action=immediate
2879 # We cannot hardcode anything, or else we can only hardcode existing
2881 hardcode_action=unsupported
2883 AC_MSG_RESULT([$hardcode_action])
2887 AC_MSG_CHECKING([whether stripping libraries is possible])
2888 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2889 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2890 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2891 AC_MSG_RESULT([yes])
2896 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2897 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2899 # PORTME Fill in your ld.so characteristics
2900 AC_MSG_CHECKING([dynamic linker characteristics])
2902 libname_spec='lib$name'
2909 shlibpath_overrides_runpath=unknown
2911 dynamic_linker="$host_os ld.so"
2912 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2913 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2918 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2919 shlibpath_var=LIBPATH
2921 # AIX has no versioning support, so we append a major version to the name.
2922 soname_spec='${libname}${release}.so$major'
2927 if test "$host_cpu" = ia64; then
2928 # AIX 5 supports IA64
2929 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2930 shlibpath_var=LD_LIBRARY_PATH
2932 # With GCC up to 2.95.x, collect2 would create an import file
2933 # for dependence libraries. The import file would start with
2934 # the line `#! .'. This would cause the generated library to
2935 # depend on `.', always an invalid library. This was fixed in
2936 # development snapshots of GCC prior to 3.0.
2938 aix4 | aix4.[[01]] | aix4.[[01]].*)
2939 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2941 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2948 # AIX (on Power*) has no versioning support, so currently we can
2949 # not hardcode correct soname into executable. Probably we can
2950 # add versioning support to collect2, so additional links can
2951 # be useful in future.
2952 if test "$aix_use_runtimelinking" = yes; then
2953 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2954 # instead of lib<name>.a to let people know that these are not
2955 # typical AIX shared libraries.
2956 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2958 # We preserve .a as extension for shared libraries through AIX4.2
2959 # and later when we are not doing run time linking.
2960 library_names_spec='${libname}${release}.a $libname.a'
2961 soname_spec='${libname}${release}.so$major'
2963 shlibpath_var=LIBPATH
2968 library_names_spec='$libname.ixlibrary $libname.a'
2969 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2970 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'
2974 library_names_spec='${libname}.so'
2975 dynamic_linker="$host_os ld.so"
2976 shlibpath_var=LIBRARY_PATH
2982 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2983 soname_spec='${libname}${release}.so$major'
2984 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2985 shlibpath_var=LD_LIBRARY_PATH
2986 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2987 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2988 export_dynamic_flag_spec=-rdynamic
2989 # the default ld.so.conf also contains /usr/contrib/lib and
2990 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2991 # libtool to hard-code these into programs
2994 cygwin* | mingw* | pw32*)
2995 version_type=windows
2998 case $GCC,$host_os in
3000 library_names_spec='$libname.dll.a'
3001 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3002 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
3003 dldir=$destdir/`dirname \$dlpath`~
3004 test -d \$dldir || mkdir -p \$dldir~
3005 $install_prog .libs/$dlname \$dldir/$dlname'
3006 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3007 dlpath=$dir/\$dldll~
3011 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3012 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
3015 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3018 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
3021 dynamic_linker='Win32 ld.exe'
3022 # FIXME: first we should search . and the directory the executable is in
3026 darwin* | rhapsody*)
3027 dynamic_linker="$host_os dyld"
3031 # FIXME: Relying on posixy $() will cause problems for
3032 # cross-compilation, but unfortunately the echo tests do not
3033 # yet detect zsh echo's removal of \ escapes.
3034 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)'
3035 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3036 shlibpath_overrides_runpath=yes
3037 shlibpath_var=DYLD_LIBRARY_PATH
3045 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3046 version_type=freebsd-$objformat
3047 case $version_type in
3049 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3054 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3058 shlibpath_var=LD_LIBRARY_PATH
3061 shlibpath_overrides_runpath=yes
3064 shlibpath_overrides_runpath=no
3065 hardcode_into_libs=yes
3074 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3075 soname_spec='${libname}${release}.so$major'
3076 shlibpath_var=LD_LIBRARY_PATH
3077 hardcode_into_libs=yes
3080 hpux9* | hpux10* | hpux11*)
3081 # Give a soname corresponding to the major version so that dld.sl refuses to
3082 # link against other versions.
3083 dynamic_linker="$host_os dld.sl"
3087 shlibpath_var=SHLIB_PATH
3088 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3089 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
3090 soname_spec='${libname}${release}.sl$major'
3091 # HP-UX runs *really* slowly unless shared libraries are mode 555.
3092 postinstall_cmds='chmod 555 $lib'
3099 soname_spec='${libname}${release}.so$major'
3100 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3106 case $LD in # libtool.m4 will add one of these switches to LD
3107 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3108 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3109 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3110 *) libsuff= shlibsuff= libmagic=never-match;;
3114 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3115 shlibpath_overrides_runpath=no
3116 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3117 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3120 # No shared lib support for Linux oldld, aout, or coff.
3121 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3125 # This must be Linux ELF.
3130 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3131 soname_spec='${libname}${release}.so$major'
3132 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3133 shlibpath_var=LD_LIBRARY_PATH
3134 shlibpath_overrides_runpath=no
3135 # This implies no fast_install, which is unacceptable.
3136 # Some rework will be needed to allow for fast_install
3137 # before this can be enabled.
3138 hardcode_into_libs=yes
3140 # We used to test for /lib/ld.so.1 and disable shared libraries on
3141 # powerpc, because MkLinux only supported shared libraries with the
3142 # GNU dynamic linker. Since this was broken with cross compilers,
3143 # most powerpc-linux boxes support dynamic linking these days and
3144 # people can always --disable-shared, the test was removed, and we
3145 # assume the GNU/Linux dynamic linker is in use.
3146 dynamic_linker='GNU/Linux ld.so'
3153 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3154 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3155 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3156 dynamic_linker='NetBSD (a.out) ld.so'
3158 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3159 soname_spec='${libname}${release}.so$major'
3160 dynamic_linker='NetBSD ld.elf_so'
3162 shlibpath_var=LD_LIBRARY_PATH
3163 shlibpath_overrides_runpath=yes
3164 hardcode_into_libs=yes
3169 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3170 shlibpath_var=LD_LIBRARY_PATH
3171 shlibpath_overrides_runpath=yes
3178 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3180 openbsd2.[[89]] | openbsd2.[[89]].*)
3181 shlibpath_overrides_runpath=no
3184 shlibpath_overrides_runpath=yes
3188 shlibpath_overrides_runpath=yes
3190 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3191 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3192 shlibpath_var=LD_LIBRARY_PATH
3196 libname_spec='$name'
3198 library_names_spec='$libname.dll $libname.a'
3199 dynamic_linker='OS/2 ld.exe'
3200 shlibpath_var=LIBPATH
3203 osf3* | osf4* | osf5*)
3206 soname_spec='${libname}${release}.so'
3207 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3208 shlibpath_var=LD_LIBRARY_PATH
3209 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3210 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3215 soname_spec='${libname}${release}.so$major'
3216 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3217 shlibpath_var=LD_LIBRARY_PATH
3224 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3225 soname_spec='${libname}${release}.so$major'
3226 shlibpath_var=LD_LIBRARY_PATH
3227 shlibpath_overrides_runpath=yes
3228 hardcode_into_libs=yes
3229 # ldd complains unless libraries are executable
3230 postinstall_cmds='chmod +x $lib'
3235 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3236 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3237 shlibpath_var=LD_LIBRARY_PATH
3238 shlibpath_overrides_runpath=yes
3239 if test "$with_gnu_ld" = yes; then
3245 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3247 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3248 soname_spec='${libname}${release}.so$major'
3249 shlibpath_var=LD_LIBRARY_PATH
3250 case $host_vendor in
3252 shlibpath_overrides_runpath=no
3257 shlibpath_overrides_runpath=no
3258 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3265 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3266 soname_spec='${libname}${release}.so$major'
3267 shlibpath_var=LD_LIBRARY_PATH
3274 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3275 soname_spec='${libname}${release}.so$major'
3276 shlibpath_var=LD_LIBRARY_PATH
3280 if test -d /usr/nec ;then
3282 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3283 soname_spec='$libname.so.$major'
3284 shlibpath_var=LD_LIBRARY_PATH
3292 AC_MSG_RESULT([$dynamic_linker])
3293 test "$dynamic_linker" = no && can_build_shared=no
3295 # Report the final consequences.
3296 AC_MSG_CHECKING([if libtool supports shared libraries])
3297 AC_MSG_RESULT([$can_build_shared])
3299 AC_MSG_CHECKING([whether to build shared libraries])
3300 test "$can_build_shared" = "no" && enable_shared=no
3302 # On AIX, shared libraries and static libraries use the same namespace, and
3303 # are all built from PIC.
3306 test "$enable_shared" = yes && enable_static=no
3307 if test -n "$RANLIB"; then
3308 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3309 postinstall_cmds='$RANLIB $lib'
3314 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3315 test "$enable_shared" = yes && enable_static=no
3319 AC_MSG_RESULT([$enable_shared])
3321 AC_MSG_CHECKING([whether to build static libraries])
3322 # Make sure either enable_shared or enable_static is yes.
3323 test "$enable_shared" = yes || enable_static=yes
3324 AC_MSG_RESULT([$enable_static])
3326 if test "$hardcode_action" = relink; then
3327 # Fast installation is not supported
3328 enable_fast_install=no
3329 elif test "$shlibpath_overrides_runpath" = yes ||
3330 test "$enable_shared" = no; then
3331 # Fast installation is not necessary
3332 enable_fast_install=needless
3335 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3336 if test "$GCC" = yes; then
3337 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3340 AC_LIBTOOL_DLOPEN_SELF
3342 if test "$enable_shared" = yes && test "$GCC" = yes; then
3343 case $archive_cmds in
3345 # FIXME: we may have to deal with multi-command sequences.
3348 # Test whether the compiler implicitly links with -lc since on some
3349 # systems, -lgcc has to come before -lc. If gcc already passes -lc
3350 # to ld, don't add -lc before -lgcc.
3351 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3352 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3354 echo 'static int dummy;' > conftest.$ac_ext
3356 if AC_TRY_EVAL(ac_compile); then
3359 libobjs=conftest.$ac_objext
3361 wl=$lt_cv_prog_cc_wl
3367 save_allow_undefined_flag=$allow_undefined_flag
3368 allow_undefined_flag=
3369 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3371 lt_cv_archive_cmds_need_lc=no
3373 lt_cv_archive_cmds_need_lc=yes
3375 allow_undefined_flag=$save_allow_undefined_flag
3377 cat conftest.err 1>&5
3379 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3383 need_lc=${lt_cv_archive_cmds_need_lc-yes}
3385 # The second clause should only fire when bootstrapping the
3386 # libtool distribution, otherwise you forgot to ship ltmain.sh
3387 # with your package, and you will get complaints that there are
3388 # no rules to generate ltmain.sh.
3389 if test -f "$ltmain"; then
3392 # If there is no Makefile yet, we rely on a make rule to execute
3393 # `config.status --recheck' to rerun these tests and create the
3394 # libtool script then.
3395 test -f Makefile && make "$ltmain"
3398 if test -f "$ltmain"; then
3399 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3402 echo creating $ofile
3404 # Now quote all the things that may contain metacharacters while being
3405 # careful not to overquote the AC_SUBSTed values. We take copies of the
3406 # variables and quote the copies for generation of the libtool script.
3407 for var in echo old_CC old_CFLAGS \
3408 AR AR_FLAGS CC LD LN_S NM SHELL \
3409 reload_flag reload_cmds wl \
3410 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3411 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3412 library_names_spec soname_spec \
3413 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3414 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3415 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3416 old_striplib striplib file_magic_cmd export_symbols_cmds \
3417 deplibs_check_method allow_undefined_flag no_undefined_flag \
3418 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3419 global_symbol_to_c_name_address \
3420 hardcode_libdir_flag_spec hardcode_libdir_separator \
3421 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3422 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3425 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3426 old_postinstall_cmds | old_postuninstall_cmds | \
3427 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3428 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3429 postinstall_cmds | postuninstall_cmds | \
3430 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3431 # Double-quote double-evaled strings.
3432 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3435 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3440 cat <<__EOF__ > "${ofile}T"
3443 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3444 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3445 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3447 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3448 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3450 # This program is free software; you can redistribute it and/or modify
3451 # it under the terms of the GNU General Public License as published by
3452 # the Free Software Foundation; either version 2 of the License, or
3453 # (at your option) any later version.
3455 # This program is distributed in the hope that it will be useful, but
3456 # WITHOUT ANY WARRANTY; without even the implied warranty of
3457 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3458 # General Public License for more details.
3460 # You should have received a copy of the GNU General Public License
3461 # along with this program; if not, write to the Free Software
3462 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3464 # As a special exception to the GNU General Public License, if you
3465 # distribute this file as part of a program that contains a
3466 # configuration script generated by Autoconf, you may include it under
3467 # the same distribution terms that you use for the rest of that program.
3469 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3470 Xsed="sed -e s/^X//"
3472 # The HP-UX ksh and POSIX shell print the target directory to stdout
3474 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3476 # ### BEGIN LIBTOOL CONFIG
3478 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3480 # Shell to use when invoking shell scripts.
3483 # Whether or not to build shared libraries.
3484 build_libtool_libs=$enable_shared
3486 # Whether or not to build static libraries.
3487 build_old_libs=$enable_static
3489 # Whether or not to add -lc for building shared libraries.
3490 build_libtool_need_lc=$need_lc
3492 # Whether or not to optimize for fast installation.
3493 fast_install=$enable_fast_install
3496 host_alias=$host_alias
3499 # An echo program that does not interpret backslashes.
3504 AR_FLAGS=$lt_AR_FLAGS
3506 # The default C compiler.
3509 # Is the compiler the GNU C compiler?
3512 # The linker used to build libraries.
3515 # Whether we need hard or soft links.
3518 # A BSD-compatible nm program.
3521 # A symbol stripping program
3524 # Used to examine libraries when file_magic_cmd begins "file"
3525 MAGIC_CMD=$MAGIC_CMD
3527 # Used on cygwin: DLL creation program.
3530 # Used on cygwin: object dumper.
3533 # Used on cygwin: assembler.
3536 # The name of the directory that contains temporary libtool files.
3539 # How to create reloadable object files.
3540 reload_flag=$lt_reload_flag
3541 reload_cmds=$lt_reload_cmds
3543 # How to pass a linker flag through the compiler.
3546 # Object file suffix (normally "o").
3549 # Old archive suffix (normally "a").
3552 # Executable file suffix (normally "").
3555 # Additional compiler flags for building library objects.
3556 pic_flag=$lt_pic_flag
3559 # Does compiler simultaneously support -c and -o options?
3560 compiler_c_o=$lt_compiler_c_o
3562 # Can we write directly to a .lo ?
3563 compiler_o_lo=$lt_compiler_o_lo
3565 # Must we lock files when doing compilation ?
3566 need_locks=$lt_need_locks
3568 # Do we need the lib prefix for modules?
3569 need_lib_prefix=$need_lib_prefix
3571 # Do we need a version for libraries?
3572 need_version=$need_version
3574 # Whether dlopen is supported.
3575 dlopen_support=$enable_dlopen
3577 # Whether dlopen of programs is supported.
3578 dlopen_self=$enable_dlopen_self
3580 # Whether dlopen of statically linked programs is supported.
3581 dlopen_self_static=$enable_dlopen_self_static
3583 # Compiler flag to prevent dynamic linking.
3584 link_static_flag=$lt_link_static_flag
3586 # Compiler flag to turn off builtin functions.
3587 no_builtin_flag=$lt_no_builtin_flag
3589 # Compiler flag to allow reflexive dlopens.
3590 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3592 # Compiler flag to generate shared objects directly from archives.
3593 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3595 # Compiler flag to generate thread-safe objects.
3596 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3598 # Library versioning type.
3599 version_type=$version_type
3601 # Format of library name prefix.
3602 libname_spec=$lt_libname_spec
3604 # List of archive names. First name is the real one, the rest are links.
3605 # The last name is the one that the linker finds with -lNAME.
3606 library_names_spec=$lt_library_names_spec
3608 # The coded name of the library, if different from the real name.
3609 soname_spec=$lt_soname_spec
3611 # Commands used to build and install an old-style archive.
3613 old_archive_cmds=$lt_old_archive_cmds
3614 old_postinstall_cmds=$lt_old_postinstall_cmds
3615 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3617 # Create an old-style archive from a shared archive.
3618 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3620 # Create a temporary old-style archive to link instead of a shared archive.
3621 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3623 # Commands used to build and install a shared archive.
3624 archive_cmds=$lt_archive_cmds
3625 archive_expsym_cmds=$lt_archive_expsym_cmds
3626 postinstall_cmds=$lt_postinstall_cmds
3627 postuninstall_cmds=$lt_postuninstall_cmds
3629 # Commands to strip libraries.
3630 old_striplib=$lt_old_striplib
3631 striplib=$lt_striplib
3633 # Method to check whether dependent libraries are shared objects.
3634 deplibs_check_method=$lt_deplibs_check_method
3636 # Command to use when deplibs_check_method == file_magic.
3637 file_magic_cmd=$lt_file_magic_cmd
3639 # Flag that allows shared libraries with undefined symbols to be built.
3640 allow_undefined_flag=$lt_allow_undefined_flag
3642 # Flag that forces no undefined symbols.
3643 no_undefined_flag=$lt_no_undefined_flag
3645 # Commands used to finish a libtool library installation in a directory.
3646 finish_cmds=$lt_finish_cmds
3648 # Same as above, but a single script fragment to be evaled but not shown.
3649 finish_eval=$lt_finish_eval
3651 # Take the output of nm and produce a listing of raw symbols and C names.
3652 global_symbol_pipe=$lt_global_symbol_pipe
3654 # Transform the output of nm in a proper C declaration
3655 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3657 # Transform the output of nm in a C name address pair
3658 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3660 # This is the shared library runtime path variable.
3661 runpath_var=$runpath_var
3663 # This is the shared library path variable.
3664 shlibpath_var=$shlibpath_var
3666 # Is shlibpath searched before the hard-coded library search path?
3667 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3669 # How to hardcode a shared library path into an executable.
3670 hardcode_action=$hardcode_action
3672 # Whether we should hardcode library paths into libraries.
3673 hardcode_into_libs=$hardcode_into_libs
3675 # Flag to hardcode \$libdir into a binary during linking.
3676 # This must work even if \$libdir does not exist.
3677 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3679 # Whether we need a single -rpath flag with a separated argument.
3680 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3682 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3684 hardcode_direct=$hardcode_direct
3686 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3688 hardcode_minus_L=$hardcode_minus_L
3690 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3691 # the resulting binary.
3692 hardcode_shlibpath_var=$hardcode_shlibpath_var
3694 # Variables whose values should be saved in libtool wrapper scripts and
3695 # restored at relink time.
3696 variables_saved_for_relink="$variables_saved_for_relink"
3698 # Whether libtool must link a program against all its dependency libraries.
3699 link_all_deplibs=$link_all_deplibs
3701 # Compile-time system search path for libraries
3702 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3704 # Run-time system search path for libraries
3705 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3707 # Fix the shell variable \$srcfile for the compiler.
3708 fix_srcfile_path="$fix_srcfile_path"
3710 # Set to yes if exported symbols are required.
3711 always_export_symbols=$always_export_symbols
3713 # The commands to list exported symbols.
3714 export_symbols_cmds=$lt_export_symbols_cmds
3716 # The commands to extract the exported symbol list from a shared archive.
3717 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3719 # Symbols that should not be listed in the preloaded symbols.
3720 exclude_expsyms=$lt_exclude_expsyms
3722 # Symbols that must always be exported.
3723 include_expsyms=$lt_include_expsyms
3725 # ### END LIBTOOL CONFIG
3731 cat <<\EOF >> "${ofile}T"
3733 # AIX sometimes has problems with the GCC collect2 program. For some
3734 # reason, if we set the COLLECT_NAMES environment variable, the problems
3735 # vanish in a puff of smoke.
3736 if test "X${COLLECT_NAMES+set}" != Xset; then
3738 export COLLECT_NAMES
3745 cygwin* | mingw* | pw32* | os2*)
3746 cat <<'EOF' >> "${ofile}T"
3747 # This is a source program that is used to create dlls on Windows
3748 # Don't remove nor modify the starting and closing comments
3749 # /* ltdll.c starts here */
3750 # #define WIN32_LEAN_AND_MEAN
3751 # #include <windows.h>
3752 # #undef WIN32_LEAN_AND_MEAN
3753 # #include <stdio.h>
3755 # #ifndef __CYGWIN__
3756 # # ifdef __CYGWIN32__
3757 # # define __CYGWIN__ __CYGWIN32__
3761 # #ifdef __cplusplus
3764 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3765 # #ifdef __cplusplus
3770 # #include <cygwin/cygwin_dll.h>
3771 # DECLARE_CYGWIN_DLL( DllMain );
3773 # HINSTANCE __hDllInstance_base;
3776 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3778 # __hDllInstance_base = hInst;
3781 # /* ltdll.c ends here */
3782 # This is a source program that is used to create import libraries
3783 # on Windows for dlls which lack them. Don't remove nor modify the
3784 # starting and closing comments
3785 # /* impgen.c starts here */
3786 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3788 # This file is part of GNU libtool.
3790 # This program is free software; you can redistribute it and/or modify
3791 # it under the terms of the GNU General Public License as published by
3792 # the Free Software Foundation; either version 2 of the License, or
3793 # (at your option) any later version.
3795 # This program is distributed in the hope that it will be useful,
3796 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3797 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3798 # GNU General Public License for more details.
3800 # You should have received a copy of the GNU General Public License
3801 # along with this program; if not, write to the Free Software
3802 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3805 # #include <stdio.h> /* for printf() */
3806 # #include <unistd.h> /* for open(), lseek(), read() */
3807 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3808 # #include <string.h> /* for strdup() */
3810 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3812 # #define O_BINARY 0
3815 # static unsigned int
3816 # pe_get16 (fd, offset)
3820 # unsigned char b[2];
3821 # lseek (fd, offset, SEEK_SET);
3823 # return b[0] + (b[1]<<8);
3826 # static unsigned int
3827 # pe_get32 (fd, offset)
3831 # unsigned char b[4];
3832 # lseek (fd, offset, SEEK_SET);
3834 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3837 # static unsigned int
3841 # unsigned char *b = ptr;
3842 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3851 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3852 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3853 # unsigned long name_rvas, nexp;
3854 # unsigned char *expdata, *erva;
3855 # char *filename, *dll_name;
3857 # filename = argv[1];
3859 # dll = open(filename, O_RDONLY|O_BINARY);
3863 # dll_name = filename;
3865 # for (i=0; filename[i]; i++)
3866 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3867 # dll_name = filename + i +1;
3869 # pe_header_offset = pe_get32 (dll, 0x3c);
3870 # opthdr_ofs = pe_header_offset + 4 + 20;
3871 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3873 # if (num_entries < 1) /* no exports */
3876 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3877 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3878 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3879 # secptr = (pe_header_offset + 4 + 20 +
3880 # pe_get16 (dll, pe_header_offset + 4 + 16));
3883 # for (i = 0; i < nsections; i++)
3886 # unsigned long secptr1 = secptr + 40 * i;
3887 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3888 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3889 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3890 # lseek(dll, secptr1, SEEK_SET);
3891 # read(dll, sname, 8);
3892 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3894 # expptr = fptr + (export_rva - vaddr);
3895 # if (export_rva + export_size > vaddr + vsize)
3896 # export_size = vsize - (export_rva - vaddr);
3901 # expdata = (unsigned char*)malloc(export_size);
3902 # lseek (dll, expptr, SEEK_SET);
3903 # read (dll, expdata, export_size);
3904 # erva = expdata - export_rva;
3906 # nexp = pe_as32 (expdata+24);
3907 # name_rvas = pe_as32 (expdata+32);
3909 # printf ("EXPORTS\n");
3910 # for (i = 0; i<nexp; i++)
3912 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3913 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3918 # /* impgen.c ends here */
3924 # We use sed instead of cat because bash on DJGPP gets confused if
3925 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3926 # text mode, it properly converts lines to CR/LF. This bash problem
3927 # is reportedly fixed, but why not run on old versions too?
3928 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3930 mv -f "${ofile}T" "$ofile" || \
3931 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3935 ])# _LT_AC_LTCONFIG_HACK
3937 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3938 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3940 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3941 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3943 # AC_ENABLE_SHARED - implement the --enable-shared flag
3944 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3945 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3947 AC_DEFUN([AC_ENABLE_SHARED],
3948 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3949 AC_ARG_ENABLE(shared,
3950 changequote(<<, >>)dnl
3951 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3952 changequote([, ])dnl
3953 [p=${PACKAGE-default}
3955 yes) enable_shared=yes ;;
3956 no) enable_shared=no ;;
3959 # Look at the argument we got. We use all the common list separators.
3960 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3961 for pkg in $enableval; do
3962 if test "X$pkg" = "X$p"; then
3969 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3972 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3973 AC_DEFUN([AC_DISABLE_SHARED],
3974 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3975 AC_ENABLE_SHARED(no)])
3977 # AC_ENABLE_STATIC - implement the --enable-static flag
3978 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3979 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3981 AC_DEFUN([AC_ENABLE_STATIC],
3982 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3983 AC_ARG_ENABLE(static,
3984 changequote(<<, >>)dnl
3985 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3986 changequote([, ])dnl
3987 [p=${PACKAGE-default}
3989 yes) enable_static=yes ;;
3990 no) enable_static=no ;;
3993 # Look at the argument we got. We use all the common list separators.
3994 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3995 for pkg in $enableval; do
3996 if test "X$pkg" = "X$p"; then
4003 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
4006 # AC_DISABLE_STATIC - set the default static flag to --disable-static
4007 AC_DEFUN([AC_DISABLE_STATIC],
4008 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4009 AC_ENABLE_STATIC(no)])
4012 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
4013 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4014 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4016 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4017 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4018 AC_ARG_ENABLE(fast-install,
4019 changequote(<<, >>)dnl
4020 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4021 changequote([, ])dnl
4022 [p=${PACKAGE-default}
4024 yes) enable_fast_install=yes ;;
4025 no) enable_fast_install=no ;;
4027 enable_fast_install=no
4028 # Look at the argument we got. We use all the common list separators.
4029 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4030 for pkg in $enableval; do
4031 if test "X$pkg" = "X$p"; then
4032 enable_fast_install=yes
4038 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4041 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4042 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4043 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4044 AC_ENABLE_FAST_INSTALL(no)])
4046 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
4047 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
4048 # Where MODE is either `yes' or `no'. If omitted, it defaults to
4050 AC_DEFUN([AC_LIBTOOL_PICMODE],
4051 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4052 pic_mode=ifelse($#,1,$1,default)])
4055 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4056 AC_DEFUN([AC_PATH_TOOL_PREFIX],
4057 [AC_MSG_CHECKING([for $1])
4058 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4061 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4064 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4067 ac_save_MAGIC_CMD="$MAGIC_CMD"
4068 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4069 dnl $ac_dummy forces splitting on constant user-supplied paths.
4070 dnl POSIX.2 word splitting is done only on the output of word expansions,
4071 dnl not every word. This closes a longstanding sh security hole.
4072 ac_dummy="ifelse([$2], , $PATH, [$2])"
4073 for ac_dir in $ac_dummy; do
4074 test -z "$ac_dir" && ac_dir=.
4075 if test -f $ac_dir/$1; then
4076 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4077 if test -n "$file_magic_test_file"; then
4078 case $deplibs_check_method in
4080 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4081 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4082 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4083 egrep "$file_magic_regex" > /dev/null; then
4088 *** Warning: the command libtool uses to detect shared libraries,
4089 *** $file_magic_cmd, produces output that libtool cannot recognize.
4090 *** The result is that libtool may fail to recognize shared libraries
4091 *** as such. This will affect the creation of libtool libraries that
4092 *** depend on shared libraries, but programs linked with such libtool
4093 *** libraries will work regardless of this problem. Nevertheless, you
4094 *** may want to report the problem to your system manager and/or to
4095 *** bug-libtool@gnu.org
4105 MAGIC_CMD="$ac_save_MAGIC_CMD"
4108 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4109 if test -n "$MAGIC_CMD"; then
4110 AC_MSG_RESULT($MAGIC_CMD)
4117 # AC_PATH_MAGIC - find a file program which can recognise a shared library
4118 AC_DEFUN([AC_PATH_MAGIC],
4119 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4120 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4121 if test -z "$lt_cv_path_MAGIC_CMD"; then
4122 if test -n "$ac_tool_prefix"; then
4123 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4131 # AC_PROG_LD - find the path to the GNU or non-GNU linker
4132 AC_DEFUN([AC_PROG_LD],
4133 [AC_ARG_WITH(gnu-ld,
4134 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4135 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4136 AC_REQUIRE([AC_PROG_CC])dnl
4137 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4138 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4139 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4141 if test "$GCC" = yes; then
4142 # Check if gcc -print-prog-name=ld gives a path.
4143 AC_MSG_CHECKING([for ld used by GCC])
4146 # gcc leaves a trailing carriage return which upsets mingw
4147 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4149 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4152 # Accept absolute paths.
4153 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4154 re_direlt='/[[^/]][[^/]]*/\.\./'
4155 # Canonicalize the path of ld
4156 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4157 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4158 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4160 test -z "$LD" && LD="$ac_prog"
4163 # If it fails, then pretend we aren't using GCC.
4167 # If it is relative, then search for the first ld in PATH.
4171 elif test "$with_gnu_ld" = yes; then
4172 AC_MSG_CHECKING([for GNU ld])
4174 AC_MSG_CHECKING([for non-GNU ld])
4176 AC_CACHE_VAL(lt_cv_path_LD,
4177 [if test -z "$LD"; then
4178 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4179 for ac_dir in $PATH; do
4180 test -z "$ac_dir" && ac_dir=.
4181 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4182 lt_cv_path_LD="$ac_dir/$ac_prog"
4183 # Check to see if the program is GNU ld. I'd rather use --version,
4184 # but apparently some GNU ld's only accept -v.
4185 # Break only if it was the GNU/non-GNU ld that we prefer.
4186 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4187 test "$with_gnu_ld" != no && break
4189 test "$with_gnu_ld" != yes && break
4195 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4198 if test -n "$LD"; then
4203 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4208 AC_DEFUN([AC_PROG_LD_GNU],
4209 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4210 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4211 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4212 lt_cv_prog_gnu_ld=yes
4214 lt_cv_prog_gnu_ld=no
4216 with_gnu_ld=$lt_cv_prog_gnu_ld
4219 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4220 # -- PORTME Some linkers may need a different reload flag.
4221 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4222 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4223 [lt_cv_ld_reload_flag='-r'])
4224 reload_flag=$lt_cv_ld_reload_flag
4225 test -n "$reload_flag" && reload_flag=" $reload_flag"
4228 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4229 # -- PORTME fill in with the dynamic library characteristics
4230 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4231 [AC_CACHE_CHECK([how to recognise dependant libraries],
4232 lt_cv_deplibs_check_method,
4233 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4234 lt_cv_file_magic_test_file=
4235 lt_cv_deplibs_check_method='unknown'
4236 # Need to set the preceding variable on all platforms that support
4237 # interlibrary dependencies.
4238 # 'none' -- dependencies not supported.
4239 # `unknown' -- same as none, but documents that we really don't know.
4240 # 'pass_all' -- all dependencies passed with no checks.
4241 # 'test_compile' -- check by making test program.
4242 # 'file_magic [[regex]]' -- check by looking for files in library path
4243 # which responds to the $file_magic_cmd with a given egrep regex.
4244 # If you have `file' or equivalent on your system and you're not sure
4245 # whether `pass_all' will *always* work, you probably want this one.
4249 lt_cv_deplibs_check_method=pass_all
4253 lt_cv_deplibs_check_method=pass_all
4257 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4258 lt_cv_file_magic_cmd='/usr/bin/file -L'
4259 lt_cv_file_magic_test_file=/shlib/libc.so
4262 cygwin* | mingw* | pw32*)
4263 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4264 lt_cv_file_magic_cmd='$OBJDUMP -f'
4267 darwin* | rhapsody*)
4268 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4269 lt_cv_file_magic_cmd='/usr/bin/file -L'
4271 rhapsody* | darwin1.[[012]])
4272 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4275 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4281 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4284 # Not sure whether the presence of OpenBSD here was a mistake.
4285 # Let's accept both of them until this is cleared up.
4286 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4287 lt_cv_file_magic_cmd=/usr/bin/file
4288 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4292 lt_cv_deplibs_check_method=pass_all
4297 lt_cv_deplibs_check_method=pass_all
4301 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4302 lt_cv_file_magic_cmd=/usr/bin/file
4303 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4309 # this will be overridden with pass_all, but let us keep it just in case
4310 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4314 *-32|*"-32 ") libmagic=32-bit;;
4315 *-n32|*"-n32 ") libmagic=N32;;
4316 *-64|*"-64 ") libmagic=64-bit;;
4317 *) libmagic=never-match;;
4319 # this will be overridden with pass_all, but let us keep it just in case
4320 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4323 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4324 lt_cv_deplibs_check_method=pass_all
4327 # This must be Linux ELF.
4330 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
4331 lt_cv_deplibs_check_method=pass_all ;;
4333 # glibc up to 2.1.1 does not perform some relocations on ARM
4334 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4336 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4340 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4341 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4343 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4348 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4349 lt_cv_file_magic_cmd=/usr/bin/file
4350 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4354 lt_cv_file_magic_cmd=/usr/bin/file
4355 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4356 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4357 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4359 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4363 osf3* | osf4* | osf5*)
4364 # this will be overridden with pass_all, but let us keep it just in case
4365 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4366 lt_cv_file_magic_test_file=/shlib/libc.so
4367 lt_cv_deplibs_check_method=pass_all
4371 lt_cv_deplibs_check_method=pass_all
4375 lt_cv_deplibs_check_method=pass_all
4376 lt_cv_file_magic_test_file=/lib/libc.so
4379 sysv5uw[[78]]* | sysv4*uw2*)
4380 lt_cv_deplibs_check_method=pass_all
4383 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4384 case $host_vendor in
4386 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]]'
4387 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4390 lt_cv_deplibs_check_method=pass_all
4393 lt_cv_file_magic_cmd='/bin/file'
4394 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4397 lt_cv_file_magic_cmd='/bin/file'
4398 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4399 lt_cv_file_magic_test_file=/lib/libc.so
4405 file_magic_cmd=$lt_cv_file_magic_cmd
4406 deplibs_check_method=$lt_cv_deplibs_check_method
4410 # AC_PROG_NM - find the path to a BSD-compatible name lister
4411 AC_DEFUN([AC_PROG_NM],
4412 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4413 AC_MSG_CHECKING([for BSD-compatible nm])
4414 AC_CACHE_VAL(lt_cv_path_NM,
4415 [if test -n "$NM"; then
4416 # Let the user override the test.
4419 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4420 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4421 test -z "$ac_dir" && ac_dir=.
4422 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4423 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4424 # Check to see if the nm accepts a BSD-compat flag.
4425 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4426 # nm: unknown option "B" ignored
4427 # Tru64's nm complains that /dev/null is an invalid object file
4428 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4429 lt_cv_path_NM="$tmp_nm -B"
4431 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4432 lt_cv_path_NM="$tmp_nm -p"
4435 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4436 continue # so that we can try to find one that supports BSD flags
4441 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4444 AC_MSG_RESULT([$NM])
4447 # AC_CHECK_LIBM - check for math library
4448 AC_DEFUN([AC_CHECK_LIBM],
4449 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4452 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4453 # These system don't have libm
4456 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4457 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4460 AC_CHECK_LIB(m, main, LIBM="-lm")
4465 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4466 # the libltdl convenience library and INCLTDL to the include flags for
4467 # the libltdl header and adds --enable-ltdl-convenience to the
4468 # configure arguments. Note that LIBLTDL and INCLTDL are not
4469 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4470 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4471 # with '${top_builddir}/' and INCLTDL will be prefixed with
4472 # '${top_srcdir}/' (note the single quotes!). If your package is not
4473 # flat and you're not using automake, define top_builddir and
4474 # top_srcdir appropriately in the Makefiles.
4475 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4476 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4477 case $enable_ltdl_convenience in
4478 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4479 "") enable_ltdl_convenience=yes
4480 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4482 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4483 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4486 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4487 # the libltdl installable library and INCLTDL to the include flags for
4488 # the libltdl header and adds --enable-ltdl-install to the configure
4489 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4490 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4491 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4492 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4493 # with '${top_srcdir}/' (note the single quotes!). If your package is
4494 # not flat and you're not using automake, define top_builddir and
4495 # top_srcdir appropriately in the Makefiles.
4496 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4497 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4498 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4499 AC_CHECK_LIB(ltdl, main,
4500 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4501 [if test x"$enable_ltdl_install" = xno; then
4502 AC_MSG_WARN([libltdl not installed, but installation disabled])
4504 enable_ltdl_install=yes
4507 if test x"$enable_ltdl_install" = x"yes"; then
4508 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4509 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4510 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4512 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4519 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4520 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4521 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4522 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4523 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4524 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4525 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4527 # This is just to silence aclocal about the macro not being used
4528 ifelse([AC_DISABLE_FAST_INSTALL])
4530 dnl $Id: wflags.m4,v 1.3 1999/03/11 12:11:41 joda Exp $
4534 AC_DEFUN(AC_WFLAGS,[
4536 WFLAGS_NOIMPLICITINT=""
4537 if test -z "$WFLAGS" -a "$GCC" = "yes"; then
4538 # -Wno-implicit-int for broken X11 headers
4539 # leave these out for now:
4540 # -Wcast-align doesn't work well on alpha osf/1
4541 # -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast
4542 # -Wmissing-declarations -Wnested-externs
4543 WFLAGS="ifelse($#, 0,-Wall, $1)"
4544 WFLAGS_NOUNUSED="-Wno-unused"
4545 WFLAGS_NOIMPLICITINT="-Wno-implicit-int"
4548 AC_SUBST(WFLAGS_NOUNUSED)dnl
4549 AC_SUBST(WFLAGS_NOIMPLICITINT)dnl
4552 dnl $Id: test-package.m4,v 1.12 2002/09/10 15:23:38 joda Exp $
4554 dnl rk_TEST_PACKAGE(package,headers,libraries,extra libs,
4555 dnl default locations, conditional, config-program)
4557 AC_DEFUN(rk_TEST_PACKAGE,[
4559 AC_HELP_STRING([--with-$1=dir],[use $1 in dir]))
4561 AC_HELP_STRING([--with-$1-lib=dir],[use $1 libraries in dir]),
4562 [if test "$withval" = "yes" -o "$withval" = "no"; then
4563 AC_MSG_ERROR([No argument for --with-$1-lib])
4564 elif test "X$with_$1" = "X"; then
4567 AC_ARG_WITH($1-include,
4568 AC_HELP_STRING([--with-$1-include=dir],[use $1 headers in dir]),
4569 [if test "$withval" = "yes" -o "$withval" = "no"; then
4570 AC_MSG_ERROR([No argument for --with-$1-include])
4571 elif test "X$with_$1" = "X"; then
4574 AC_ARG_WITH($1-config,
4575 AC_HELP_STRING([--with-$1-config=path],[config program for $1]))
4578 m4_define([rk_pkgname], $6),
4579 m4_define([rk_pkgname], AS_TR_CPP($1)))
4581 AC_MSG_CHECKING(for $1)
4592 if test "$with_$1_include" = ""; then
4593 if test -d "$i/include/$1"; then
4594 header_dirs="$header_dirs $i/include/$1"
4596 if test -d "$i/include"; then
4597 header_dirs="$header_dirs $i/include"
4600 if test "$with_$1_lib" = ""; then
4601 if test -d "$i/lib$abilibdirext"; then
4602 lib_dirs="$lib_dirs $i/lib$abilibdirext"
4607 if test "$with_$1_include"; then
4608 header_dirs="$with_$1_include $header_dirs"
4610 if test "$with_$1_lib"; then
4611 lib_dirs="$with_$1_lib $lib_dirs"
4614 if test "$with_$1_config" = ""; then
4621 case "$with_$1_config" in
4625 $1_cflags="`$with_$1_config --cflags 2>&1`"
4626 $1_libs="`$with_$1_config --libs 2>&1`"
4631 if test "$with_$1" != no; then
4632 save_CFLAGS="$CFLAGS"
4634 if test "$[]$1_cflags" -a "$[]$1_libs"; then
4635 CFLAGS="$[]$1_cflags $save_CFLAGS"
4636 LIBS="$[]$1_libs $save_LIBS"
4638 INCLUDE_$1="$[]$1_cflags"
4640 AC_MSG_RESULT([from $with_$1_config])
4643 if test "$found" = no; then
4645 for i in $header_dirs; do
4646 CFLAGS="-I$i $save_CFLAGS"
4647 AC_TRY_COMPILE([$2],,ires=$i;break)
4649 for i in $lib_dirs; do
4650 LIBS="-L$i $3 $4 $save_LIBS"
4651 AC_TRY_LINK([$2],,lres=$i;break)
4653 if test "$ires" -a "$lres" -a "$with_$1" != "no"; then
4654 INCLUDE_$1="-I$ires"
4655 LIB_$1="-L$lres $3 $4"
4657 AC_MSG_RESULT([headers $ires, libraries $lres])
4660 CFLAGS="$save_CFLAGS"
4664 if test "$found" = yes; then
4665 AC_DEFINE_UNQUOTED(rk_pkgname, 1, [Define if you have the $1 package.])
4674 AC_SUBST(INCLUDE_$1)
4678 dnl $Id: find-func.m4,v 1.1 1997/12/14 15:58:58 joda Exp $
4680 dnl AC_FIND_FUNC(func, libraries, includes, arguments)
4681 AC_DEFUN(AC_FIND_FUNC, [
4682 AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4])
4683 if test -n "$LIB_$1"; then
4684 LIBS="$LIB_$1 $LIBS"
4688 dnl $Id: find-func-no-libs.m4,v 1.5 1999/10/30 21:08:18 assar Exp $
4691 dnl Look for function in any of the specified libraries
4694 dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args)
4695 AC_DEFUN(AC_FIND_FUNC_NO_LIBS, [
4696 AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])])
4698 dnl $Id: find-func-no-libs2.m4,v 1.6 2001/09/01 10:57:32 assar Exp $
4701 dnl Look for function in any of the specified libraries
4704 dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args)
4705 AC_DEFUN(AC_FIND_FUNC_NO_LIBS2, [
4707 AC_MSG_CHECKING([for $1])
4708 AC_CACHE_VAL(ac_cv_funclib_$1,
4710 if eval "test \"\$ac_cv_func_$1\" != yes" ; then
4711 ac_save_LIBS="$LIBS"
4712 for ac_lib in $2; do
4718 *) ac_lib="-l$ac_lib" ;;
4720 LIBS="$6 $ac_lib $5 $ac_save_LIBS"
4721 AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
4723 eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
4724 LIBS="$ac_save_LIBS"
4728 eval "ac_res=\$ac_cv_funclib_$1"
4732 dnl AC_CHECK_LIBS($2, foo)
4735 eval "ac_tr_func=HAVE_[]upcase($1)"
4736 eval "ac_tr_lib=HAVE_LIB[]upcase($ac_res | sed -e 's/-l//')"
4737 eval "LIB_$1=$ac_res"
4741 eval "ac_cv_func_$1=yes"
4743 AC_DEFINE_UNQUOTED($ac_tr_func)
4744 AC_MSG_RESULT([yes])
4747 eval "ac_cv_func_$1=no"
4752 eval "ac_cv_func_$1=yes"
4753 eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
4754 AC_DEFINE_UNQUOTED($ac_tr_func)
4755 AC_DEFINE_UNQUOTED($ac_tr_lib)
4756 AC_MSG_RESULT([yes, in $ac_res])
4762 dnl $Id: crypto.m4,v 1.13 2002/09/10 19:55:48 joda Exp $
4764 dnl test for crypto libraries:
4765 dnl - libcrypto (from openssl)
4766 dnl - libdes (from krb4)
4767 dnl - own-built libdes
4769 m4_define([test_headers], [
4770 #undef KRB5 /* makes md4.h et al unhappy */
4772 #include <openssl/md4.h>
4773 #include <openssl/md5.h>
4774 #include <openssl/sha.h>
4775 #include <openssl/des.h>
4776 #include <openssl/rc4.h>
4784 #ifdef OLD_HASH_NAMES
4785 typedef struct md4 MD4_CTX;
4786 #define MD4_Init(C) md4_init((C))
4787 #define MD4_Update(C, D, L) md4_update((C), (D), (L))
4788 #define MD4_Final(D, C) md4_finito((C), (D))
4789 typedef struct md5 MD5_CTX;
4790 #define MD5_Init(C) md5_init((C))
4791 #define MD5_Update(C, D, L) md5_update((C), (D), (L))
4792 #define MD5_Final(D, C) md5_finito((C), (D))
4793 typedef struct sha SHA_CTX;
4794 #define SHA1_Init(C) sha_init((C))
4795 #define SHA1_Update(C, D, L) sha_update((C), (D), (L))
4796 #define SHA1_Final(D, C) sha_finito((C), (D))
4799 m4_define([test_body], [
4809 des_cbc_encrypt(0, 0, 0, schedule, 0, 0);
4813 AC_DEFUN([KRB_CRYPTO],[
4815 AC_WITH_ALL([openssl])
4819 AC_MSG_CHECKING([for crypto library])
4824 if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then
4825 save_CPPFLAGS="$CPPFLAGS"
4829 for i in $LIB_krb4; do
4831 -L*) cdirs="$cdirs $i";;
4832 -l*) clibs="$clibs $i";;
4837 for i in $INCLUDE_krb4; do
4838 CFLAGS="-DHAVE_OPENSSL $i $save_CFLAGS"
4839 AC_TRY_COMPILE(test_headers, test_body,
4840 openssl=yes ires="$i"; break)
4841 CFLAGS="$i $save_CFLAGS"
4842 AC_TRY_COMPILE(test_headers, test_body,
4843 openssl=no ires="$i"; break)
4844 CFLAGS="-DOLD_HASH_NAMES $i $save_CFLAGS"
4845 AC_TRY_COMPILE(test_headers, test_body,
4846 openssl=no ires="$i" old_hash=yes; break)
4851 LIBS="$i $j $save_LIBS"
4852 AC_TRY_LINK(test_headers, test_body,
4853 lres="$i $j"; break 2)
4856 CFLAGS="$save_CFLAGS"
4858 if test "$ires" -a "$lres"; then
4862 AC_MSG_RESULT([same as krb4])
4863 LIB_des_a='$(LIB_des)'
4864 LIB_des_so='$(LIB_des)'
4865 LIB_des_appl='$(LIB_des)'
4869 if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then
4870 save_CFLAGS="$CFLAGS"
4874 if test "$with_openssl_include" != ""; then
4875 INCLUDE_des="-I${with_openssl}/include"
4877 if test "$with_openssl_lib" != ""; then
4878 LIB_des="-L${with_openssl}/lib"
4880 CFLAGS="-DHAVE_OPENSSL ${INCLUDE_des} ${CFLAGS}"
4881 LIB_des="${LIB_des} -lcrypto"
4882 LIB_des_a="$LIB_des"
4883 LIB_des_so="$LIB_des"
4884 LIB_des_appl="$LIB_des"
4885 LIBS="${LIBS} ${LIB_des}"
4886 AC_TRY_LINK(test_headers, test_body, [
4887 crypto_lib=libcrypto openssl=yes
4888 AC_MSG_RESULT([libcrypto])
4890 CFLAGS="$save_CFLAGS"
4894 if test "$crypto_lib" = "unknown"; then
4897 LIB_des='$(top_builddir)/lib/des/libdes.la'
4898 LIB_des_a='$(top_builddir)/lib/des/.libs/libdes.a'
4899 LIB_des_so='$(top_builddir)/lib/des/.libs/libdes.so'
4900 LIB_des_appl="-ldes"
4902 AC_MSG_RESULT([included libdes])
4906 if test "$with_krb4" != no -a "$crypto_lib" != krb4; then
4907 AC_MSG_ERROR([the crypto library used by krb4 lacks features
4908 required by Kerberos 5; to continue, you need to install a newer
4909 Kerberos 4 or configure --without-krb4])
4912 if test "$openssl" = "yes"; then
4913 AC_DEFINE([HAVE_OPENSSL], 1, [define to use openssl's libcrypto])
4915 if test "$old_hash" = yes; then
4916 AC_DEFINE([HAVE_OLD_HASH_NAMES], 1,
4917 [define if you have hash functions like md4_finito()])
4919 AM_CONDITIONAL(HAVE_OPENSSL, test "$openssl" = yes)dnl
4922 AC_SUBST(INCLUDE_des)
4925 AC_SUBST(LIB_des_so)
4926 AC_SUBST(LIB_des_appl)
4930 dnl $Id: with-all.m4,v 1.1 2001/08/29 17:01:23 assar Exp $
4933 dnl AC_WITH_ALL(name)
4935 AC_DEFUN([AC_WITH_ALL], [
4937 AC_HELP_STRING([--with-$1=dir],
4941 AC_HELP_STRING([--with-$1-lib=dir],
4942 [use $1 libraries in dir]),
4943 [if test "$withval" = "yes" -o "$withval" = "no"; then
4944 AC_MSG_ERROR([No argument for --with-$1-lib])
4945 elif test "X$with_$1" = "X"; then
4949 AC_ARG_WITH($1-include,
4950 AC_HELP_STRING([--with-$1-include=dir],
4951 [use $1 headers in dir]),
4952 [if test "$withval" = "yes" -o "$withval" = "no"; then
4953 AC_MSG_ERROR([No argument for --with-$1-include])
4954 elif test "X$with_$1" = "X"; then
4962 *) if test "$with_$1_include" = ""; then
4963 with_$1_include="$with_$1/include"
4965 if test "$with_$1_lib" = ""; then
4966 with_$1_lib="$with_$1/lib$abilibdirext"
4971 dnl $Id: db.m4,v 1.9 2002/09/10 14:29:47 joda Exp $
4973 dnl tests for various db libraries
4976 AC_ARG_ENABLE(berkeley-db,
4977 AC_HELP_STRING([--disable-berkeley-db],
4978 [if you don't want berkeley db]),[
4984 if test "$enable_berkeley_db" != no; then
4986 AC_CHECK_HEADERS([ \
4993 dnl db_create is used by db3 and db4
4995 AC_FIND_FUNC_NO_LIBS(db_create, db4 db3 db, [
4997 #ifdef HAVE_DB4_DB_H
4999 #elif defined(HAVE_DB3_DB_H)
5006 if test "$ac_cv_func_db_create" = "yes"; then
5008 if test "$ac_cv_funclib_db_create" != "yes"; then
5009 DBLIB="$ac_cv_funclib_db_create"
5013 AC_DEFINE(HAVE_DB3, 1, [define if you have a berkeley db3/4 library])
5016 dnl dbopen is used by db1/db2
5018 AC_FIND_FUNC_NO_LIBS(dbopen, db2 db, [
5020 #if defined(HAVE_DB2_DB_H)
5022 #elif defined(HAVE_DB_185_H)
5024 #elif defined(HAVE_DB_H)
5029 ],[NULL, 0, 0, 0, NULL])
5031 if test "$ac_cv_func_dbopen" = "yes"; then
5033 if test "$ac_cv_funclib_dbopen" != "yes"; then
5034 DBLIB="$ac_cv_funclib_dbopen"
5038 AC_DEFINE(HAVE_DB1, 1, [define if you have a berkeley db1/2 library])
5042 dnl test for ndbm compatability
5044 if test "$ac_cv_func_dbm_firstkey" != yes; then
5045 AC_FIND_FUNC_NO_LIBS2(dbm_firstkey, $ac_cv_funclib_dbopen $ac_cv_funclib_db_create, [
5047 #define DB_DBM_HSEARCH 1
5052 if test "$ac_cv_func_dbm_firstkey" = "yes"; then
5053 if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
5054 LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
5058 AC_DEFINE(HAVE_DB_NDBM, 1, [define if you have ndbm compat in db])
5059 AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)])
5061 $as_unset ac_cv_func_dbm_firstkey
5062 $as_unset ac_cv_funclib_dbm_firstkey
5068 if test "$db_type" = "unknown" -o "$ac_cv_func_dbm_firstkey" = ""; then
5070 AC_CHECK_HEADERS([ \
5075 AC_FIND_FUNC_NO_LIBS(dbm_firstkey, ndbm, [
5077 #if defined(HAVE_NDBM_H)
5079 #elif defined(HAVE_DBM_H)
5085 if test "$ac_cv_func_dbm_firstkey" = "yes"; then
5086 if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
5087 LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
5091 AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl
5093 if test "$db_type" = "unknown"; then
5099 $as_unset ac_cv_func_dbm_firstkey
5100 $as_unset ac_cv_funclib_dbm_firstkey
5102 AC_CHECK_HEADERS([ \
5106 AC_FIND_FUNC_NO_LIBS(dbm_firstkey, gdbm, [
5108 #include <gdbm/ndbm.h>
5112 if test "$ac_cv_func_dbm_firstkey" = "yes"; then
5113 if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
5114 LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
5118 AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl
5120 if test "$db_type" = "unknown"; then
5129 if test "$have_ndbm" = "yes"; then
5130 AC_MSG_CHECKING([if ndbm is implemented with db])
5134 #if defined(HAVE_GDBM_NDBM_H)
5135 #include <gdbm/ndbm.h>
5136 #elif defined(HAVE_NDBM_H)
5138 #elif defined(HAVE_DBM_H)
5145 d = dbm_open("conftest", O_RDWR | O_CREAT, 0666);
5151 if test -f conftest.db; then
5152 AC_MSG_RESULT([yes])
5153 AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)])
5156 fi],[AC_MSG_RESULT([no])])
5159 AM_CONDITIONAL(HAVE_DB1, test "$db_type" = db1)dnl
5160 AM_CONDITIONAL(HAVE_DB3, test "$db_type" = db3)dnl
5161 AM_CONDITIONAL(HAVE_NDBM, test "$db_type" = ndbm)dnl
5164 for i in $LDFLAGS; do
5171 AC_SUBST(LIB_NDBM)dnl
5174 dnl $Id: roken-frag.m4,v 1.44 2002/09/04 20:57:30 joda Exp $
5176 dnl some code to get roken working
5178 dnl rk_ROKEN(subdir)
5180 AC_DEFUN(rk_ROKEN, [
5182 AC_REQUIRE([rk_CONFIG_HEADER])
5185 LIB_roken='$(top_builddir)/$1/libroken.la'
5186 INCLUDES_roken='-I$(top_builddir)/$1 -I$(top_srcdir)/$1'
5188 dnl Checks for programs
5189 AC_REQUIRE([AC_PROG_CC])
5190 AC_REQUIRE([AC_PROG_AWK])
5191 AC_REQUIRE([AC_OBJEXT])
5192 AC_REQUIRE([AC_EXEEXT])
5193 AC_REQUIRE([AC_PROG_LIBTOOL])
5195 AC_REQUIRE([AC_MIPS_ABI])
5197 dnl C characteristics
5199 AC_REQUIRE([AC_C___ATTRIBUTE__])
5200 AC_REQUIRE([AC_C_INLINE])
5201 AC_REQUIRE([AC_C_CONST])
5202 AC_WFLAGS(-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs)
5208 AC_REQUIRE([AC_TYPE_SIZE_T])
5209 AC_HAVE_TYPE([ssize_t],[#include <unistd.h>])
5210 AC_REQUIRE([AC_TYPE_PID_T])
5211 AC_REQUIRE([AC_TYPE_UID_T])
5212 AC_HAVE_TYPE([long long])
5214 AC_REQUIRE([rk_RETSIGTYPE])
5216 dnl Checks for header files.
5217 AC_REQUIRE([AC_HEADER_STDC])
5218 AC_REQUIRE([AC_HEADER_TIME])
5235 netinet/in_systm.h \
5237 netinet6/in6_var.h \
5268 AC_REQUIRE([CHECK_NETINET_IP_AND_TCP])
5270 AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
5271 AM_CONDITIONAL(have_fnmatch_h, test "$ac_cv_header_fnmatch_h" = yes)
5272 AM_CONDITIONAL(have_ifaddrs_h, test "$ac_cv_header_ifaddrs_h" = yes)
5273 AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes)
5275 dnl Check for functions and libraries
5277 AC_FIND_FUNC(socket, socket)
5278 AC_FIND_FUNC(gethostbyname, nsl)
5279 AC_FIND_FUNC(syslog, syslog)
5283 AC_FIND_FUNC(gethostbyname2, inet6 ip6)
5285 AC_FIND_FUNC(res_search, resolv,
5288 #ifdef HAVE_SYS_TYPES_H
5289 #include <sys/types.h>
5291 #ifdef HAVE_NETINET_IN_H
5292 #include <netinet/in.h>
5294 #ifdef HAVE_ARPA_NAMESER_H
5295 #include <arpa/nameser.h>
5297 #ifdef HAVE_RESOLV_H
5303 AC_FIND_FUNC(res_nsearch, resolv,
5306 #ifdef HAVE_SYS_TYPES_H
5307 #include <sys/types.h>
5309 #ifdef HAVE_NETINET_IN_H
5310 #include <netinet/in.h>
5312 #ifdef HAVE_ARPA_NAMESER_H
5313 #include <arpa/nameser.h>
5315 #ifdef HAVE_RESOLV_H
5321 AC_FIND_FUNC(dn_expand, resolv,
5324 #ifdef HAVE_SYS_TYPES_H
5325 #include <sys/types.h>
5327 #ifdef HAVE_NETINET_IN_H
5328 #include <netinet/in.h>
5330 #ifdef HAVE_ARPA_NAMESER_H
5331 #include <arpa/nameser.h>
5333 #ifdef HAVE_RESOLV_H
5341 #ifdef HAVE_SYS_TYPES_H
5342 #include <sys/types.h>
5344 #ifdef HAVE_NETINET_IN_H
5345 #include <netinet/in.h>
5347 #ifdef HAVE_ARPA_NAMESER_H
5348 #include <arpa/nameser.h>
5350 #ifdef HAVE_RESOLV_H
5359 if test "$ac_cv_func_glob_working" != yes; then
5362 AM_CONDITIONAL(have_glob_h, test "$ac_cv_func_glob_working" = yes)
5394 if test "$ac_cv_func_cgetent" = no; then
5398 AC_REQUIRE([AC_FUNC_GETLOGIN])
5400 AC_REQUIRE([AC_FUNC_MMAP])
5402 AC_FIND_FUNC_NO_LIBS(getsockopt,,
5403 [#ifdef HAVE_SYS_TYPES_H
5404 #include <sys/types.h>
5406 #ifdef HAVE_SYS_SOCKET_H
5407 #include <sys/socket.h>
5410 AC_FIND_FUNC_NO_LIBS(setsockopt,,
5411 [#ifdef HAVE_SYS_TYPES_H
5412 #include <sys/types.h>
5414 #ifdef HAVE_SYS_SOCKET_H
5415 #include <sys/socket.h>
5419 AC_FIND_IF_NOT_BROKEN(hstrerror, resolv,
5420 [#ifdef HAVE_NETDB_H
5430 AC_FOREACH([rk_func], [asprintf vasprintf asnprintf vasnprintf],
5433 #include <string.h>],
5436 AC_FIND_FUNC_NO_LIBS(bswap16,,
5437 [#ifdef HAVE_SYS_BSWAP_H
5438 #include <sys/bswap.h>
5441 AC_FIND_FUNC_NO_LIBS(bswap32,,
5442 [#ifdef HAVE_SYS_BSWAP_H
5443 #include <sys/bswap.h>
5446 AC_FIND_FUNC_NO_LIBS(pidfile,util,
5451 AC_FIND_IF_NOT_BROKEN(getaddrinfo,,
5452 [#ifdef HAVE_NETDB_H
5456 AC_FIND_IF_NOT_BROKEN(getnameinfo,,
5457 [#ifdef HAVE_NETDB_H
5459 #endif],[0,0,0,0,0,0,0])
5461 AC_FIND_IF_NOT_BROKEN(freeaddrinfo,,
5462 [#ifdef HAVE_NETDB_H
5466 AC_FIND_IF_NOT_BROKEN(gai_strerror,,
5467 [#ifdef HAVE_NETDB_H
5540 AC_FOREACH([rk_func], [strndup strsep strtok_r],
5541 [AC_NEED_PROTO([#include <string.h>], rk_func)])
5543 AC_FOREACH([rk_func], [strsvis strunvis strvis strvisx svis unvis vis],
5544 [AC_NEED_PROTO([#ifdef HAVE_VIS_H
5548 AC_BROKEN2(inet_aton,
5549 [#ifdef HAVE_SYS_TYPES_H
5550 #include <sys/types.h>
5552 #ifdef HAVE_SYS_SOCKET_H
5553 #include <sys/socket.h>
5555 #ifdef HAVE_NETINET_IN_H
5556 #include <netinet/in.h>
5558 #ifdef HAVE_ARPA_INET_H
5559 #include <arpa/inet.h>
5563 AC_BROKEN2(inet_ntop,
5564 [#ifdef HAVE_SYS_TYPES_H
5565 #include <sys/types.h>
5567 #ifdef HAVE_SYS_SOCKET_H
5568 #include <sys/socket.h>
5570 #ifdef HAVE_NETINET_IN_H
5571 #include <netinet/in.h>
5573 #ifdef HAVE_ARPA_INET_H
5574 #include <arpa/inet.h>
5578 AC_BROKEN2(inet_pton,
5579 [#ifdef HAVE_SYS_TYPES_H
5580 #include <sys/types.h>
5582 #ifdef HAVE_SYS_SOCKET_H
5583 #include <sys/socket.h>
5585 #ifdef HAVE_NETINET_IN_H
5586 #include <netinet/in.h>
5588 #ifdef HAVE_ARPA_INET_H
5589 #include <arpa/inet.h>
5594 dnl Check for sa_len in struct sockaddr,
5595 dnl needs to come before the getnameinfo test
5597 AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
5598 #include <sys/socket.h>])
5600 if test "$ac_cv_func_getnameinfo" = "yes"; then
5601 rk_BROKEN_GETNAMEINFO
5602 if test "$ac_cv_func_getnameinfo_broken" = yes; then
5603 AC_LIBOBJ(getnameinfo)
5607 if test "$ac_cv_func_getaddrinfo" = "yes"; then
5608 rk_BROKEN_GETADDRINFO
5609 if test "$ac_cv_func_getaddrinfo_numserv" = no; then
5610 AC_LIBOBJ(getaddrinfo)
5611 AC_LIBOBJ(freeaddrinfo)
5615 AC_NEED_PROTO([#include <stdlib.h>], setenv)
5616 AC_NEED_PROTO([#include <stdlib.h>], unsetenv)
5617 AC_NEED_PROTO([#include <unistd.h>], gethostname)
5618 AC_NEED_PROTO([#include <unistd.h>], mkstemp)
5619 AC_NEED_PROTO([#include <unistd.h>], getusershell)
5622 #ifdef HAVE_SYS_TYPES_H
5623 #include <sys/types.h>
5625 #ifdef HAVE_SYS_SOCKET_H
5626 #include <sys/socket.h>
5628 #ifdef HAVE_NETINET_IN_H
5629 #include <netinet/in.h>
5631 #ifdef HAVE_ARPA_INET_H
5632 #include <arpa/inet.h>
5636 AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl
5638 AC_REQUIRE([rk_BROKEN_REALLOC])dnl
5640 dnl AC_KRB_FUNC_GETCWD_BROKEN
5643 dnl Checks for prototypes and declarations
5647 #ifdef HAVE_SYS_TYPES_H
5648 #include <sys/types.h>
5650 #ifdef HAVE_SYS_SOCKET_H
5651 #include <sys/socket.h>
5653 #ifdef HAVE_NETINET_IN_H
5654 #include <netinet/in.h>
5656 #ifdef HAVE_ARPA_INET_H
5657 #include <arpa/inet.h>
5663 gethostbyname, struct hostent *gethostbyname(const char *))
5666 #ifdef HAVE_SYS_TYPES_H
5667 #include <sys/types.h>
5669 #ifdef HAVE_SYS_SOCKET_H
5670 #include <sys/socket.h>
5672 #ifdef HAVE_NETINET_IN_H
5673 #include <netinet/in.h>
5675 #ifdef HAVE_ARPA_INET_H
5676 #include <arpa/inet.h>
5682 gethostbyaddr, struct hostent *gethostbyaddr(const void *, size_t, int))
5685 #ifdef HAVE_SYS_TYPES_H
5686 #include <sys/types.h>
5688 #ifdef HAVE_SYS_SOCKET_H
5689 #include <sys/socket.h>
5691 #ifdef HAVE_NETINET_IN_H
5692 #include <netinet/in.h>
5694 #ifdef HAVE_ARPA_INET_H
5695 #include <arpa/inet.h>
5701 getservbyname, struct servent *getservbyname(const char *, const char *))
5704 #ifdef HAVE_SYS_TYPES_H
5705 #include <sys/types.h>
5707 #ifdef HAVE_SYS_SOCKET_H
5708 #include <sys/socket.h>
5711 getsockname, int getsockname(int, struct sockaddr*, socklen_t*))
5714 #ifdef HAVE_SYSLOG_H
5718 openlog, void openlog(const char *, int, int))
5724 #ifdef HAVE_UNISTD_H
5732 rk_CHECK_VAR(h_errno,
5733 [#ifdef HAVE_SYS_TYPES_H
5734 #include <sys/types.h>
5740 rk_CHECK_VAR(h_errlist,
5741 [#ifdef HAVE_NETDB_H
5745 rk_CHECK_VAR(h_nerr,
5746 [#ifdef HAVE_NETDB_H
5750 rk_CHECK_VAR([__progname],
5755 AC_CHECK_DECLARATION([#include <stdlib.h>
5756 #ifdef HAVE_UNISTD_H
5759 AC_CHECK_DECLARATION([#include <stdlib.h>
5760 #ifdef HAVE_UNISTD_H
5763 AC_CHECK_DECLARATION([#include <stdlib.h>
5764 #ifdef HAVE_UNISTD_H
5767 AC_CHECK_DECLARATION([#include <stdlib.h>
5768 #ifdef HAVE_UNISTD_H
5772 AC_CHECK_DECLARATION([#include <stdlib.h>], environ)
5775 dnl Check for fields in struct tm
5778 AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
5779 AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
5782 dnl or do we have a variable `timezone' ?
5785 rk_CHECK_VAR(timezone,[#include <time.h>])
5786 rk_CHECK_VAR(altzone,[#include <time.h>])
5788 AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>])
5789 AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>])
5790 AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>])
5791 AC_HAVE_TYPE([struct sockaddr_storage], [#include <sys/socket.h>])
5792 AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
5793 AC_HAVE_TYPE([struct ifaddrs], [#include <ifaddrs.h>])
5794 AC_HAVE_TYPE([struct iovec],[
5795 #include <sys/types.h>
5796 #include <sys/uio.h>
5798 AC_HAVE_TYPE([struct msghdr],[
5799 #include <sys/types.h>
5800 #include <sys/socket.h>
5804 dnl Check for struct winsize
5807 AC_KRB_STRUCT_WINSIZE
5810 dnl Check for struct spwd
5815 dnl won't work with automake
5816 dnl moved to AC_OUTPUT in configure.in
5817 dnl AC_CONFIG_FILES($1/Makefile)
5819 LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
5821 AC_SUBST(DIR_roken)dnl
5822 AC_SUBST(LIB_roken)dnl
5823 AC_SUBST(INCLUDES_roken)dnl
5826 dnl $Id: have-type.m4,v 1.6 2000/07/15 18:10:00 joda Exp $
5828 dnl check for existance of a type
5830 dnl AC_HAVE_TYPE(TYPE,INCLUDES)
5831 AC_DEFUN(AC_HAVE_TYPE, [
5832 AC_REQUIRE([AC_HEADER_STDC])
5833 cv=`echo "$1" | sed 'y%./+- %__p__%'`
5834 AC_MSG_CHECKING(for $1)
5835 AC_CACHE_VAL([ac_cv_type_$cv],
5837 [#include <sys/types.h>
5844 eval "ac_cv_type_$cv=yes",
5845 eval "ac_cv_type_$cv=no"))dnl
5846 ac_foo=`eval echo \\$ac_cv_type_$cv`
5847 AC_MSG_RESULT($ac_foo)
5848 if test "$ac_foo" = yes; then
5849 ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
5853 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
5858 dnl $Id: retsigtype.m4,v 1.1 2000/07/15 18:05:56 joda Exp $
5860 dnl Figure out return type of signal handlers, and define SIGRETURN macro
5861 dnl that can be used to return from one
5863 AC_DEFUN(rk_RETSIGTYPE,[
5865 if test "$ac_cv_type_signal" = "void" ; then
5866 AC_DEFINE(VOID_RETSIGTYPE, 1, [Define if signal handlers return void.])
5868 AC_SUBST(VOID_RETSIGTYPE)
5869 AH_BOTTOM([#ifdef VOID_RETSIGTYPE
5870 #define SIGRETURN(x) return
5872 #define SIGRETURN(x) return (RETSIGTYPE)(x)
5876 dnl $Id: check-netinet-ip-and-tcp.m4,v 1.3 2000/07/18 10:33:02 joda Exp $
5879 dnl extra magic check for netinet/{ip.h,tcp.h} because on irix 6.5.3
5880 dnl you have to include standards.h before including these files
5882 AC_DEFUN(CHECK_NETINET_IP_AND_TCP,
5884 AC_CHECK_HEADERS(standards.h)
5885 for i in netinet/ip.h netinet/tcp.h; do
5887 cv=`echo "$i" | sed 'y%./+-%__p_%'`
5889 AC_CACHE_CHECK([for $i],ac_cv_header_$cv,
5891 #ifdef HAVE_STANDARDS_H
5892 #include <standards.h>
5896 eval "ac_cv_header_$cv=yes",
5897 eval "ac_cv_header_$cv=no")])
5898 ac_res=`eval echo \\$ac_cv_header_$cv`
5899 if test "$ac_res" = yes; then
5900 ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5901 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)
5905 AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h)
5909 dnl $Id: krb-ipv6.m4,v 1.13 2002/04/30 16:48:13 joda Exp $
5913 AC_DEFUN(AC_KRB_IPV6, [
5915 AC_HELP_STRING([--without-ipv6],[do not enable IPv6 support]),[
5916 if test "$withval" = "no"; then
5919 save_CFLAGS="${CFLAGS}"
5920 AC_CACHE_CHECK([for IPv6 stack type], v6type,
5921 [dnl check for different v6 implementations (by itojun)
5925 for i in v6d toshiba kame inria zeta linux; do
5929 #include </usr/local/v6/include/sys/types.h>
5933 [v6type=$i; v6lib=v6;
5934 v6libdir=/usr/local/v6/lib;
5935 CFLAGS="-I/usr/local/v6/include $CFLAGS"])
5939 #include <sys/param.h>
5940 #ifdef _TOSHIBA_INET6
5943 [v6type=$i; v6lib=inet6;
5944 v6libdir=/usr/local/v6/lib;
5945 CFLAGS="-DINET6 $CFLAGS"])
5949 #include <netinet/in.h>
5953 [v6type=$i; v6lib=inet6;
5954 v6libdir=/usr/local/v6/lib;
5955 CFLAGS="-DINET6 $CFLAGS"])
5959 #include <netinet/in.h>
5960 #ifdef IPV6_INRIA_VERSION
5963 [v6type=$i; CFLAGS="-DINET6 $CFLAGS"])
5967 #include <sys/param.h>
5968 #ifdef _ZETA_MINAMI_INET6
5971 [v6type=$i; v6lib=inet6;
5972 v6libdir=/usr/local/v6/lib;
5973 CFLAGS="-DINET6 $CFLAGS"])
5976 if test -d /usr/inet6; then
5980 CFLAGS="-DINET6 $CFLAGS"
5984 if test "$v6type" != "unknown"; then
5989 if test "$v6lib" != "none"; then
5990 for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do
5991 if test -d $dir -a -f $dir/lib$v6lib.a; then
5992 LIBS="-L$dir -l$v6lib $LIBS"
5999 AC_CACHE_CHECK([for IPv6], ac_cv_lib_ipv6, [
6001 #ifdef HAVE_SYS_TYPES_H
6002 #include <sys/types.h>
6004 #ifdef HAVE_SYS_SOCKET_H
6005 #include <sys/socket.h>
6007 #ifdef HAVE_NETINET_IN_H
6008 #include <netinet/in.h>
6010 #ifdef HAVE_NETINET_IN6_H
6011 #include <netinet/in6.h>
6015 struct sockaddr_in6 sin6;
6018 s = socket(AF_INET6, SOCK_DGRAM, 0);
6020 sin6.sin6_family = AF_INET6;
6021 sin6.sin6_port = htons(17);
6022 sin6.sin6_addr = in6addr_any;
6023 bind(s, (struct sockaddr *)&sin6, sizeof(sin6));
6026 ac_cv_lib_ipv6=no)])
6027 if test "$ac_cv_lib_ipv6" = yes; then
6028 AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.])
6030 CFLAGS="${save_CFLAGS}"
6033 if test "$ac_cv_lib_ipv6" = yes; then
6034 AC_CACHE_CHECK([for in6addr_loopback],[ac_cv_var_in6addr_loopback],[
6036 #ifdef HAVE_SYS_TYPES_H
6037 #include <sys/types.h>
6039 #ifdef HAVE_SYS_SOCKET_H
6040 #include <sys/socket.h>
6042 #ifdef HAVE_NETINET_IN_H
6043 #include <netinet/in.h>
6045 #ifdef HAVE_NETINET_IN6_H
6046 #include <netinet/in6.h>
6048 struct sockaddr_in6 sin6;
6049 sin6.sin6_addr = in6addr_loopback;
6050 ],ac_cv_var_in6addr_loopback=yes,ac_cv_var_in6addr_loopback=no)])
6051 if test "$ac_cv_var_in6addr_loopback" = yes; then
6052 AC_DEFINE(HAVE_IN6ADDR_LOOPBACK, 1,
6053 [Define if you have the in6addr_loopback variable])
6057 dnl $Id: check-var.m4,v 1.6 2001/08/21 12:00:16 joda Exp $
6059 dnl rk_CHECK_VAR(variable, includes)
6060 AC_DEFUN([rk_CHECK_VAR], [
6061 AC_MSG_CHECKING(for $1)
6062 AC_CACHE_VAL(ac_cv_var_$1, [
6063 AC_TRY_LINK([extern int $1;
6064 int foo() { return $1; }],
6066 ac_cv_var_$1=yes, ac_cv_var_$1=no)
6068 ac_foo=`eval echo \\$ac_cv_var_$1`
6069 AC_MSG_RESULT($ac_foo)
6070 if test "$ac_foo" = yes; then
6071 AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1,
6072 [Define if you have the `]$1[' variable.])
6073 m4_ifval([$2], AC_CHECK_DECLARATION([$2],[$1]))
6077 AC_WARNING_ENABLE([obsolete])
6078 AU_DEFUN([AC_CHECK_VAR], [rk_CHECK_VAR([$2], [$1])], [foo])
6079 dnl $Id: check-declaration.m4,v 1.3 1999/03/01 13:03:08 joda Exp $
6082 dnl Check if we need the declaration of a variable
6085 dnl AC_HAVE_DECLARATION(includes, variable)
6086 AC_DEFUN(AC_CHECK_DECLARATION, [
6087 AC_MSG_CHECKING([if $2 is properly declared])
6088 AC_CACHE_VAL(ac_cv_var_$2_declaration, [
6090 extern struct { int foo; } $2;],
6092 eval "ac_cv_var_$2_declaration=no",
6093 eval "ac_cv_var_$2_declaration=yes")
6096 define(foo, [HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION])
6098 AC_MSG_RESULT($ac_cv_var_$2_declaration)
6099 if eval "test \"\$ac_cv_var_$2_declaration\" = yes"; then
6100 AC_DEFINE(foo, 1, [define if your system declares $2])
6105 dnl $Id: broken-snprintf.m4,v 1.4 2001/09/01 11:56:05 assar Exp $
6107 AC_DEFUN(AC_BROKEN_SNPRINTF, [
6108 AC_CACHE_CHECK(for working snprintf,ac_cv_func_snprintf_working,
6109 ac_cv_func_snprintf_working=yes
6116 snprintf(foo, 2, "12");
6117 return strcmp(foo, "1");
6118 }],:,ac_cv_func_snprintf_working=no,:))
6120 if test "$ac_cv_func_snprintf_working" = yes; then
6121 AC_DEFINE_UNQUOTED(HAVE_SNPRINTF, 1, [define if you have a working snprintf])
6123 if test "$ac_cv_func_snprintf_working" = yes; then
6124 AC_NEED_PROTO([#include <stdio.h>],snprintf)
6128 AC_DEFUN(AC_BROKEN_VSNPRINTF,[
6129 AC_CACHE_CHECK(for working vsnprintf,ac_cv_func_vsnprintf_working,
6130 ac_cv_func_vsnprintf_working=yes
6136 int foo(int num, ...)
6141 vsnprintf(bar, 2, "%s", arg);
6143 return strcmp(bar, "1");
6149 return foo(0, "12");
6150 }],:,ac_cv_func_vsnprintf_working=no,:))
6152 if test "$ac_cv_func_vsnprintf_working" = yes; then
6153 AC_DEFINE_UNQUOTED(HAVE_VSNPRINTF, 1, [define if you have a working vsnprintf])
6155 if test "$ac_cv_func_vsnprintf_working" = yes; then
6156 AC_NEED_PROTO([#include <stdio.h>],vsnprintf)
6160 dnl $Id: need-proto.m4,v 1.4 2002/08/23 15:07:41 joda Exp $
6163 dnl Check if we need the prototype for a function
6166 dnl AC_NEED_PROTO(includes, function)
6168 AC_DEFUN(AC_NEED_PROTO, [
6169 if test "$ac_cv_func_$2+set" != set -o "$ac_cv_func_$2" = yes; then
6170 AC_CACHE_CHECK([if $2 needs a prototype], ac_cv_func_$2_noproto,
6171 AC_TRY_COMPILE([$1],
6172 [struct foo { int foo; } xx;
6173 extern int $2 (struct foo*);
6176 eval "ac_cv_func_$2_noproto=yes",
6177 eval "ac_cv_func_$2_noproto=no"))
6178 if test "$ac_cv_func_$2_noproto" = yes; then
6179 AC_DEFINE(AS_TR_CPP(NEED_[]$2[]_PROTO), 1,
6180 [define if the system is missing a prototype for $2()])
6185 dnl $Id: broken-glob.m4,v 1.4 2001/06/19 09:59:46 assar Exp $
6187 dnl check for glob(3)
6189 AC_DEFUN(AC_BROKEN_GLOB,[
6190 AC_CACHE_CHECK(for working glob, ac_cv_func_glob_working,
6191 ac_cv_func_glob_working=yes
6194 #include <glob.h>],[
6195 glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|
6203 ],:,ac_cv_func_glob_working=no,:))
6205 if test "$ac_cv_func_glob_working" = yes; then
6206 AC_DEFINE(HAVE_GLOB, 1, [define if you have a glob() that groks
6207 GLOB_BRACE, GLOB_NOCHECK, GLOB_QUOTE, GLOB_TILDE, and GLOB_LIMIT])
6209 if test "$ac_cv_func_glob_working" = yes; then
6210 AC_NEED_PROTO([#include <stdio.h>
6211 #include <glob.h>],glob)
6216 dnl $Id: krb-func-getlogin.m4,v 1.1 1999/07/13 17:45:30 assar Exp $
6218 dnl test for POSIX (broken) getlogin
6222 AC_DEFUN(AC_FUNC_GETLOGIN, [
6223 AC_CHECK_FUNCS(getlogin setlogin)
6224 if test "$ac_cv_func_getlogin" = yes; then
6225 AC_CACHE_CHECK(if getlogin is posix, ac_cv_func_getlogin_posix, [
6226 if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then
6227 ac_cv_func_getlogin_posix=no
6229 ac_cv_func_getlogin_posix=yes
6232 if test "$ac_cv_func_getlogin_posix" = yes; then
6233 AC_DEFINE(POSIX_GETLOGIN, 1, [Define if getlogin has POSIX flavour (and not BSD).])
6238 dnl $Id: find-if-not-broken.m4,v 1.4 2002/05/19 19:37:08 joda Exp $
6241 dnl Mix between AC_FIND_FUNC and AC_BROKEN
6244 AC_DEFUN(AC_FIND_IF_NOT_BROKEN,
6245 [AC_FIND_FUNC([$1], [$2], [$3], [$4])
6246 if eval "test \"$ac_cv_func_$1\" != yes"; then
6251 dnl $Id: broken.m4,v 1.6 2002/05/19 19:36:52 joda Exp $
6254 dnl Same as AC _REPLACE_FUNCS, just define HAVE_func if found in normal
6257 AC_DEFUN([AC_BROKEN],
6258 [AC_FOREACH([rk_func], [$1],
6259 [AC_CHECK_FUNC(rk_func,
6260 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]rk_func), 1,
6261 [Define if you have the function `]rk_func['.])],
6262 [rk_LIBOBJ(rk_func)])])])
6264 dnl $Id: broken2.m4,v 1.4 2002/05/19 22:16:46 joda Exp $
6266 dnl AC_BROKEN but with more arguments
6268 dnl AC_BROKEN2(func, includes, arguments)
6269 AC_DEFUN([AC_BROKEN2],
6270 [AC_MSG_CHECKING([for $1])
6271 AC_CACHE_VAL(ac_cv_func_[]$1,
6274 /* The GNU C library defines this for functions which it implements
6275 to always fail with ENOSYS. Some functions are actually named
6276 something starting with __ and the normal name is an alias. */
6277 #if defined (__stub_$1) || defined (__stub___$1)
6282 ], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])])
6283 if eval "test \"\${ac_cv_func_[]$1}\" = yes"; then
6284 AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define)
6291 dnl $Id: have-struct-field.m4,v 1.6 1999/07/29 01:44:32 assar Exp $
6293 dnl check for fields in a structure
6295 dnl AC_HAVE_STRUCT_FIELD(struct, field, headers)
6297 AC_DEFUN(AC_HAVE_STRUCT_FIELD, [
6298 define(cache_val, translit(ac_cv_type_$1_$2, [A-Z ], [a-z_]))
6299 AC_CACHE_CHECK([for $2 in $1], cache_val,[
6300 AC_TRY_COMPILE([$3],[$1 x; x.$2;],
6303 if test "$cache_val" = yes; then
6304 define(foo, translit(HAVE_$1_$2, [a-z ], [A-Z_]))
6305 AC_DEFINE(foo, 1, [Define if $1 has field $2.])
6308 undefine([cache_val])
6311 dnl $Id: broken-getnameinfo.m4,v 1.2 2000/12/05 09:09:00 joda Exp $
6313 dnl test for broken AIX getnameinfo
6315 AC_DEFUN(rk_BROKEN_GETNAMEINFO,[
6316 AC_CACHE_CHECK([if getnameinfo is broken], ac_cv_func_getnameinfo_broken,
6317 AC_TRY_RUN([[#include <stdio.h>
6318 #include <sys/types.h>
6319 #include <sys/socket.h>
6320 #include <netinet/in.h>
6324 main(int argc, char **argv)
6326 struct sockaddr_in sin;
6328 memset(&sin, 0, sizeof(sin));
6329 #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
6330 sin.sin_len = sizeof(sin);
6332 sin.sin_family = AF_INET;
6333 sin.sin_addr.s_addr = 0xffffffff;
6335 return getnameinfo((struct sockaddr*)&sin, sizeof(sin), host, sizeof(host),
6338 ]], ac_cv_func_getnameinfo_broken=no, ac_cv_func_getnameinfo_broken=yes))])
6340 dnl $Id: broken-getaddrinfo.m4,v 1.3 2002/08/20 14:09:40 joda Exp $
6342 dnl test if getaddrinfo can handle numeric services
6344 AC_DEFUN(rk_BROKEN_GETADDRINFO,[
6345 AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv,
6346 AC_TRY_RUN([[#include <stdio.h>
6347 #include <sys/types.h>
6348 #include <sys/socket.h>
6352 main(int argc, char **argv)
6354 struct addrinfo hints, *ai;
6355 memset(&hints, 0, sizeof(hints));
6356 hints.ai_flags = AI_PASSIVE;
6357 hints.ai_socktype = SOCK_STREAM;
6358 hints.ai_family = PF_UNSPEC;
6359 if(getaddrinfo(NULL, "17", &hints, &ai) != 0)
6363 ]], ac_cv_func_getaddrinfo_numserv=yes, ac_cv_func_getaddrinfo_numserv=no))])
6366 dnl $Id: broken-realloc.m4,v 1.1 2000/07/15 18:05:36 joda Exp $
6368 dnl Test for realloc that doesn't handle NULL as first parameter
6370 AC_DEFUN(rk_BROKEN_REALLOC, [
6371 AC_CACHE_CHECK(if realloc if broken, ac_cv_func_realloc_broken, [
6372 ac_cv_func_realloc_broken=no
6379 return realloc(NULL, 17) == NULL;
6381 ],:, ac_cv_func_realloc_broken=yes, :)
6383 if test "$ac_cv_func_realloc_broken" = yes ; then
6384 AC_DEFINE(BROKEN_REALLOC, 1, [Define if realloc(NULL) doesn't work.])
6386 AH_BOTTOM([#ifdef BROKEN_REALLOC
6387 #define realloc(X, Y) isoc_realloc((X), (Y))
6388 #define isoc_realloc(X, Y) ((X) ? realloc((X), (Y)) : malloc(Y))
6392 dnl $Id: proto-compat.m4,v 1.3 1999/03/01 13:03:48 joda Exp $
6395 dnl Check if the prototype of a function is compatible with another one
6398 dnl AC_PROTO_COMPAT(includes, function, prototype)
6400 AC_DEFUN(AC_PROTO_COMPAT, [
6401 AC_CACHE_CHECK([if $2 is compatible with system prototype],
6402 ac_cv_func_$2_proto_compat,
6403 AC_TRY_COMPILE([$1],
6405 eval "ac_cv_func_$2_proto_compat=yes",
6406 eval "ac_cv_func_$2_proto_compat=no"))
6407 define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE])
6408 if test "$ac_cv_func_$2_proto_compat" = yes; then
6409 AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with
6414 dnl $Id: krb-struct-winsize.m4,v 1.3 2001/09/01 11:56:05 assar Exp $
6417 dnl Search for struct winsize
6420 AC_DEFUN(AC_KRB_STRUCT_WINSIZE, [
6421 AC_MSG_CHECKING(for struct winsize)
6422 AC_CACHE_VAL(ac_cv_struct_winsize, [
6423 ac_cv_struct_winsize=no
6424 for i in sys/termios.h sys/ioctl.h; do
6426 struct[[ ]]*winsize,dnl
6427 $i, ac_cv_struct_winsize=yes; break)dnl
6430 if test "$ac_cv_struct_winsize" = "yes"; then
6431 AC_DEFINE(HAVE_STRUCT_WINSIZE, 1, [define if struct winsize is declared in sys/termios.h])
6433 AC_MSG_RESULT($ac_cv_struct_winsize)
6434 AC_EGREP_HEADER(ws_xpixel, termios.h,
6435 AC_DEFINE(HAVE_WS_XPIXEL, 1, [define if struct winsize has ws_xpixel]))
6436 AC_EGREP_HEADER(ws_ypixel, termios.h,
6437 AC_DEFINE(HAVE_WS_YPIXEL, 1, [define if struct winsize has ws_ypixel]))
6440 dnl $Id: krb-struct-spwd.m4,v 1.3 1999/07/13 21:04:11 assar Exp $
6442 dnl Test for `struct spwd'
6444 AC_DEFUN(AC_KRB_STRUCT_SPWD, [
6445 AC_MSG_CHECKING(for struct spwd)
6446 AC_CACHE_VAL(ac_cv_struct_spwd, [
6449 #ifdef HAVE_SHADOW_H
6453 ac_cv_struct_spwd=yes,
6454 ac_cv_struct_spwd=no)
6456 AC_MSG_RESULT($ac_cv_struct_spwd)
6458 if test "$ac_cv_struct_spwd" = "yes"; then
6459 AC_DEFINE(HAVE_STRUCT_SPWD, 1, [define if you have struct spwd])
6463 dnl $Id: otp.m4,v 1.2 2002/05/19 20:51:08 joda Exp $
6465 dnl check requirements for OTP library
6468 AC_REQUIRE([rk_DB])dnl
6470 AC_HELP_STRING([--disable-otp],[if you don't want OTP support]))
6471 if test "$enable_otp" = yes -a "$db_type" = unknown; then
6472 AC_MSG_ERROR([OTP requires a NDBM/DB compatible library])
6474 if test "$enable_otp" != no; then
6475 if test "$db_type" != unknown; then
6481 if test "$enable_otp" = yes; then
6482 AC_DEFINE(OTP, 1, [Define if you want OTP support in applications.])
6483 LIB_otp='$(top_builddir)/lib/otp/libotp.la'
6486 AC_MSG_CHECKING([whether to enable OTP library])
6487 AC_MSG_RESULT($enable_otp)
6488 AM_CONDITIONAL(OTP, test "$enable_otp" = yes)dnl
6491 dnl $Id: osfc2.m4,v 1.3 2002/04/30 16:46:18 joda Exp $
6493 dnl enable OSF C2 stuff
6495 AC_DEFUN(AC_CHECK_OSFC2,[
6496 AC_ARG_ENABLE(osfc2,
6497 AC_HELP_STRING([--enable-osfc2],[enable some OSF C2 support]))
6499 if test "$enable_osfc2" = yes; then
6500 AC_DEFINE(HAVE_OSFC2, 1, [Define to enable basic OSF C2 support.])
6501 LIB_security=-lsecurity
6503 AC_SUBST(LIB_security)
6506 dnl $Id: check-man.m4,v 1.3 2000/11/30 01:47:17 joda Exp $
6507 dnl check how to format manual pages
6510 AC_DEFUN(rk_CHECK_MAN,
6511 [AC_PATH_PROG(NROFF, nroff)
6512 AC_PATH_PROG(GROFF, groff)
6513 AC_CACHE_CHECK(how to format man pages,ac_cv_sys_man_format,
6514 [cat > conftest.1 << END
6523 if test "$NROFF" ; then
6524 for i in "-mdoc" "-mandoc"; do
6525 if "$NROFF" $i conftest.1 2> /dev/null | \
6526 grep Jan > /dev/null 2>&1 ; then
6527 ac_cv_sys_man_format="$NROFF $i"
6532 if test "$ac_cv_sys_man_format" = "" -a "$GROFF" ; then
6533 for i in "-mdoc" "-mandoc"; do
6534 if "$GROFF" -Tascii $i conftest.1 2> /dev/null | \
6535 grep Jan > /dev/null 2>&1 ; then
6536 ac_cv_sys_man_format="$GROFF -Tascii $i"
6541 if test "$ac_cv_sys_man_format"; then
6542 ac_cv_sys_man_format="$ac_cv_sys_man_format \[$]< > \[$]@"
6545 if test "$ac_cv_sys_man_format"; then
6546 CATMAN="$ac_cv_sys_man_format"
6549 AM_CONDITIONAL(CATMAN, test "$CATMAN")
6550 AC_CACHE_CHECK(extension of pre-formatted manual pages,ac_cv_sys_catman_ext,
6551 [if grep _suffix /etc/man.conf > /dev/null 2>&1; then
6552 ac_cv_sys_catman_ext=0
6554 ac_cv_sys_catman_ext=number
6557 if test "$ac_cv_sys_catman_ext" = number; then
6558 CATMANEXT='$$section'
6565 dnl $Id: krb-bigendian.m4,v 1.8 2002/08/28 19:20:19 joda Exp $
6568 dnl check if this computer is little or big-endian
6569 dnl if we can figure it out at compile-time then don't define the cpp symbol
6570 dnl otherwise test for it and define it. also allow options for overriding
6571 dnl it when cross-compiling
6573 AC_DEFUN(KRB_C_BIGENDIAN, [
6574 AC_ARG_ENABLE(bigendian,
6575 AC_HELP_STRING([--enable-bigendian],[the target is big endian]),
6576 krb_cv_c_bigendian=yes)
6577 AC_ARG_ENABLE(littleendian,
6578 AC_HELP_STRING([--enable-littleendian],[the target is little endian]),
6579 krb_cv_c_bigendian=no)
6580 AC_CACHE_CHECK(whether byte order is known at compile time,
6581 krb_cv_c_bigendian_compile,
6583 #include <sys/types.h>
6584 #include <sys/param.h>],[
6585 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6587 #endif], krb_cv_c_bigendian_compile=yes, krb_cv_c_bigendian_compile=no)])
6588 AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[
6589 if test "$krb_cv_c_bigendian_compile" = "yes"; then
6591 #include <sys/types.h>
6592 #include <sys/param.h>],[
6593 #if BYTE_ORDER != BIG_ENDIAN
6595 #endif], krb_cv_c_bigendian=yes, krb_cv_c_bigendian=no)
6597 AC_TRY_RUN([main () {
6598 /* Are we little or big endian? From Harbison&Steele. */
6602 char c[sizeof (long)];
6605 exit (u.c[sizeof (long) - 1] == 1);
6606 }], krb_cv_c_bigendian=no, krb_cv_c_bigendian=yes,
6607 AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian]))
6610 if test "$krb_cv_c_bigendian" = "yes"; then
6611 AC_DEFINE(WORDS_BIGENDIAN, 1, [define if target is big endian])dnl
6613 if test "$krb_cv_c_bigendian_compile" = "yes"; then
6614 AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl
6617 #if ENDIANESS_IN_SYS_PARAM_H
6618 # include <sys/types.h>
6619 # include <sys/param.h>
6620 # if BYTE_ORDER == BIG_ENDIAN
6621 # define WORDS_BIGENDIAN 1
6628 dnl $Id: aix.m4,v 1.9 2002/08/28 19:19:43 joda Exp $
6638 *-*-aix4*|*-*-aix5*)
6643 AM_CONDITIONAL(AIX, test "$aix" != no)dnl
6644 AM_CONDITIONAL(AIX4, test "$aix" = 4)
6647 AC_ARG_ENABLE(dynamic-afs,
6648 AC_HELP_STRING([--disable-dynamic-afs],
6649 [do not use loaded AFS library with AIX]))
6651 if test "$aix" != no; then
6652 if test "$enable_dynamic_afs" != no; then
6653 AC_REQUIRE([rk_DLOPEN])
6654 if test "$ac_cv_func_dlopen" = no; then
6655 AC_FIND_FUNC_NO_LIBS(loadquery, ld)
6657 if test "$ac_cv_func_dlopen" != no; then
6658 AIX_EXTRA_KAFS='$(LIB_dlopen)'
6659 elif test "$ac_cv_func_loadquery" != no; then
6660 AIX_EXTRA_KAFS='$(LIB_loadquery)'
6662 AC_MSG_NOTICE([not using dynloaded AFS library])
6664 enable_dynamic_afs=no
6671 AM_CONDITIONAL(AIX_DYNAMIC_AFS, test "$enable_dynamic_afs" != no)dnl
6672 AC_SUBST(AIX_EXTRA_KAFS)dnl
6676 /* XXX this is gross, but kills about a gazillion warnings */
6686 dnl $Id: dlopen.m4,v 1.1 2002/08/28 16:32:16 joda Exp $
6689 AC_DEFUN([rk_DLOPEN], [
6690 AC_FIND_FUNC_NO_LIBS(dlopen, dl)
6691 AM_CONDITIONAL(HAVE_DLOPEN, test "$ac_cv_funclib_dlopen" != no)
6695 dnl $Id: irix.m4,v 1.1 2002/08/28 19:11:44 joda Exp $
6703 AC_DEFINE([IRIX4], 1,
6704 [Define if you are running IRIX 4.])
6711 AM_CONDITIONAL(IRIX, test "$irix" != no)dnl
6714 /* IRIX 4 braindamage */
6715 #if IRIX == 4 && !defined(__STDC__)
6722 dnl $Id: sunos.m4,v 1.1.4.1 2002/10/21 14:29:36 joda Exp $
6725 AC_DEFUN([rk_SUNOS],[
6734 *-*-solaris2.[[89]])
6741 if test "$sunos" != no; then
6742 AC_DEFINE_UNQUOTED(SunOS, $sunos,
6743 [Define to what version of SunOS you are running.])
6747 dnl See if there is any X11 present
6749 dnl $Id: check-x.m4,v 1.2 1999/11/05 04:25:23 assar Exp $
6751 AC_DEFUN(KRB_CHECK_X,[
6754 # try to figure out if we need any additional ld flags, like -R
6755 # and yes, the autoconf X test is utterly broken
6756 if test "$no_x" != yes; then
6757 AC_CACHE_CHECK(for special X linker flags,krb_cv_sys_x_libs_rpath,[
6758 ac_save_libs="$LIBS"
6759 ac_save_cflags="$CFLAGS"
6760 CFLAGS="$CFLAGS $X_CFLAGS"
6761 krb_cv_sys_x_libs_rpath=""
6762 krb_cv_sys_x_libs=""
6763 for rflag in "" "-R" "-R " "-rpath "; do
6764 if test "$rflag" = ""; then
6768 for flag in $X_LIBS; do
6771 foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`"
6779 LIBS="$ac_save_libs $foo $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
6781 #include <X11/Xlib.h>
6790 ], krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break,:)
6792 LIBS="$ac_save_libs"
6793 CFLAGS="$ac_save_cflags"
6795 X_LIBS="$krb_cv_sys_x_libs"
6799 dnl $Id: check-xau.m4,v 1.3 1999/05/14 01:17:06 assar Exp $
6801 dnl check for Xau{Read,Write}Auth and XauFileName
6803 AC_DEFUN(AC_CHECK_XAU,[
6804 save_CFLAGS="$CFLAGS"
6805 CFLAGS="$X_CFLAGS $CFLAGS"
6807 dnl LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
6808 LIBS="$X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
6809 save_LDFLAGS="$LDFLAGS"
6810 LDFLAGS="$LDFLAGS $X_LIBS"
6813 AC_FIND_FUNC_NO_LIBS(XauWriteAuth, X11 Xau)
6815 LIBS="$LIB_XauWriteAuth $LIBS"
6816 AC_FIND_FUNC_NO_LIBS(XauReadAuth, X11 Xau)
6817 LIBS="$LIB_XauReadAauth $LIBS"
6818 AC_FIND_FUNC_NO_LIBS(XauFileName, X11 Xau)
6821 case "$ac_cv_funclib_XauWriteAuth" in
6824 *) if test "$ac_cv_funclib_XauReadAuth" = yes; then
6825 if test "$ac_cv_funclib_XauFileName" = yes; then
6826 LIB_XauReadAuth="$LIB_XauWriteAuth"
6828 LIB_XauReadAuth="$LIB_XauWriteAuth $LIB_XauFileName"
6831 if test "$ac_cv_funclib_XauFileName" = yes; then
6832 LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth"
6834 LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth $LIB_XauFileName"
6840 if test "$AUTOMAKE" != ""; then
6841 AM_CONDITIONAL(NEED_WRITEAUTH, test "$ac_cv_func_XauWriteAuth" != "yes")
6843 AC_SUBST(NEED_WRITEAUTH_TRUE)
6844 AC_SUBST(NEED_WRITEAUTH_FALSE)
6845 if test "$ac_cv_func_XauWriteAuth" != "yes"; then
6846 NEED_WRITEAUTH_TRUE=
6847 NEED_WRITEAUTH_FALSE='#'
6849 NEED_WRITEAUTH_TRUE='#'
6850 NEED_WRITEAUTH_FALSE=
6855 LDFLAGS=$save_LDFLAGS
6858 dnl $Id: check-type-extra.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
6860 dnl ac_check_type + extra headers
6862 dnl AC_CHECK_TYPE_EXTRA(TYPE, DEFAULT, HEADERS)
6863 AC_DEFUN(AC_CHECK_TYPE_EXTRA,
6864 [AC_REQUIRE([AC_HEADER_STDC])dnl
6865 AC_MSG_CHECKING(for $1)
6866 AC_CACHE_VAL(ac_cv_type_$1,
6868 changequote(<<,>>)dnl
6869 <<$1[^a-zA-Z_0-9]>>dnl
6870 changequote([,]), [#include <sys/types.h>
6875 $3], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
6876 AC_MSG_RESULT($ac_cv_type_$1)
6877 if test $ac_cv_type_$1 = no; then
6878 AC_DEFINE($1, $2, [Define this to what the type $1 should be.])
6883 dnl $Id: capabilities.m4,v 1.2 1999/09/01 11:02:26 joda Exp $
6887 dnl Test SGI capabilities
6890 AC_DEFUN(KRB_CAPABILITIES,[
6892 AC_CHECK_HEADERS(capability.h sys/capability.h)
6894 AC_CHECK_FUNCS(sgi_getcapabilitybyname cap_set_proc)
6897 dnl $Id: check-getpwnam_r-posix.m4,v 1.2 1999/03/23 16:47:31 joda Exp $
6899 dnl check for getpwnam_r, and if it's posix or not
6901 AC_DEFUN(AC_CHECK_GETPWNAM_R_POSIX,[
6902 AC_FIND_FUNC_NO_LIBS(getpwnam_r,c_r)
6903 if test "$ac_cv_func_getpwnam_r" = yes; then
6904 AC_CACHE_CHECK(if getpwnam_r is posix,ac_cv_func_getpwnam_r_posix,
6906 LIBS="$LIBS $LIB_getpwnam_r"
6911 struct passwd pw, *pwd;
6912 return getpwnam_r("", &pw, NULL, 0, &pwd) < 0;
6914 ],ac_cv_func_getpwnam_r_posix=yes,ac_cv_func_getpwnam_r_posix=no,:)
6916 if test "$ac_cv_func_getpwnam_r_posix" = yes; then
6917 AC_DEFINE(POSIX_GETPWNAM_R, 1, [Define if getpwnam_r has POSIX flavour.])
6921 dnl $Id: krb-readline.m4,v 1.5 2002/08/29 02:22:32 assar Exp $
6923 dnl Tests for readline functions
6928 AC_DEFUN(KRB_READLINE,[
6929 AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent])
6930 if test "$ac_cv_func_el_init" = yes ; then
6931 AC_CACHE_CHECK(for four argument el_init, ac_cv_func_el_init_four,[
6932 AC_TRY_COMPILE([#include <stdio.h>
6933 #include <histedit.h>],
6934 [el_init("", NULL, NULL, NULL);],
6935 ac_cv_func_el_init_four=yes,
6936 ac_cv_func_el_init_four=no)])
6937 if test "$ac_cv_func_el_init_four" = yes; then
6938 AC_DEFINE(HAVE_FOUR_VALUED_EL_INIT, 1, [Define if el_init takes four arguments.])
6945 if test "$with_readline" = yes; then
6947 elif test "$ac_cv_func_readline" = yes; then
6949 elif test "$ac_cv_func_el_init" = yes; then
6951 LIB_readline="\$(top_builddir)/lib/editline/libel_compat.la \$(LIB_el_init) \$(LIB_tgetent)"
6953 LIB_readline="\$(top_builddir)/lib/editline/libeditline.la \$(LIB_tgetent)"
6955 AM_CONDITIONAL(el_compat, test "$ac_foo" = yes)
6956 AC_DEFINE(HAVE_READLINE, 1,
6957 [Define if you have a readline compatible library.])dnl
6962 dnl $Id: telnet.m4,v 1.1 2002/08/28 19:19:01 joda Exp $
6964 dnl stuff used by telnet
6966 AC_DEFUN([rk_TELNET],[
6967 AC_DEFINE(AUTHENTICATION, 1,
6968 [Define if you want authentication support in telnet.])dnl
6969 AC_DEFINE(ENCRYPTION, 1,
6970 [Define if you want encryption support in telnet.])dnl
6971 AC_DEFINE(DES_ENCRYPTION, 1,
6972 [Define if you want to use DES encryption in telnet.])dnl
6973 AC_DEFINE(DIAGNOSTICS, 1,
6974 [Define this to enable diagnostics in telnet.])dnl
6975 AC_DEFINE(OLD_ENVIRON, 1,
6976 [Define this to enable old environment option in telnet.])dnl
6978 AC_DEFINE(ENV_HACK, 1,
6979 [Define this if you want support for broken ENV_{VAR,VAL} telnets.])
6982 # Simple test for streamspty, based on the existance of getmsg(), alas
6983 # this breaks on SunOS4 which have streams but BSD-like ptys
6985 # And also something wierd has happend with dec-osf1, fallback to bsd-ptys
6988 *-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*)
6991 AC_CHECK_FUNC(getmsg)
6992 if test "$ac_cv_func_getmsg" = "yes"; then
6993 AC_CACHE_CHECK([if getmsg works], ac_cv_func_getmsg_works,
7001 ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL);
7002 if(ret < 0 && errno == ENOSYS)
7006 ], ac_cv_func_getmsg_works=yes,
7007 ac_cv_func_getmsg_works=no,
7008 ac_cv_func_getmsg_works=no))
7009 if test "$ac_cv_func_getmsg_works" = "yes"; then
7010 AC_DEFINE(HAVE_GETMSG, 1,
7011 [Define if you have a working getmsg.])
7012 AC_DEFINE(STREAMSPTY, 1,
7013 [Define if you have streams ptys.])
7020 #if defined(ENCRYPTION) && !defined(AUTHENTICATION)
7021 #define AUTHENTICATION 1
7024 /* Set this to the default system lead string for telnetd
7025 * can contain %-escapes: %s=sysname, %m=machine, %r=os-release
7026 * %v=os-version, %t=tty, %h=hostname, %d=date and time
7030 /* Used with login -p */
7033 /* set this to a sensible login */
7035 #define LOGIN_PATH BINDIR "/login"
7040 dnl $Id: check-compile-et.m4,v 1.6 2001/09/02 17:08:48 assar Exp $
7042 dnl CHECK_COMPILE_ET
7043 AC_DEFUN([CHECK_COMPILE_ET], [
7045 AC_CHECK_PROG(COMPILE_ET, compile_et, [compile_et])
7047 krb_cv_compile_et="no"
7048 if test "${COMPILE_ET}" = "compile_et"; then
7050 dnl We have compile_et. Now let's see if it supports `prefix' and `index'.
7051 AC_MSG_CHECKING(whether compile_et has the features we need)
7052 cat > conftest_et.et <<'EOF'
7056 error_code CODE1, "CODE1"
7058 error_code CODE2, "CODE2"
7061 if ${COMPILE_ET} conftest_et.et >/dev/null 2>&1; then
7062 dnl XXX Some systems have <et/com_err.h>.
7063 save_CPPFLAGS="${save_CPPFLAGS}"
7064 if test -d "/usr/include/et"; then
7065 CPPFLAGS="-I/usr/include/et ${CPPFLAGS}"
7067 dnl Check that the `prefix' and `index' directives were honored.
7069 #include <com_err.h>
7071 #include "conftest_et.h"
7072 int main(){return (CONFTEST_CODE2 - CONFTEST_CODE1) != 127;}
7073 ], [krb_cv_compile_et="yes"],[CPPFLAGS="${save_CPPFLAGS}"])
7075 AC_MSG_RESULT(${krb_cv_compile_et})
7079 if test "${krb_cv_compile_et}" = "yes"; then
7080 dnl Since compile_et seems to work, let's check libcom_err
7081 krb_cv_save_LIBS="${LIBS}"
7082 LIBS="${LIBS} -lcom_err"
7083 AC_MSG_CHECKING(for com_err)
7084 AC_TRY_LINK([#include <com_err.h>],[
7086 p = error_message(0);
7087 ],[krb_cv_com_err="yes"],[krb_cv_com_err="no"; CPPFLAGS="${save_CPPFLAGS}"])
7088 AC_MSG_RESULT(${krb_cv_com_err})
7089 LIBS="${krb_cv_save_LIBS}"
7091 dnl Since compile_et doesn't work, forget about libcom_err
7095 dnl Only use the system's com_err if we found compile_et, libcom_err, and
7097 if test "${krb_cv_com_err}" = "yes"; then
7099 LIB_com_err="-lcom_err"
7102 AC_MSG_NOTICE(Using the already-installed com_err)
7104 COMPILE_ET="\$(top_builddir)/lib/com_err/compile_et"
7105 DIR_com_err="com_err"
7106 LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la"
7107 LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a"
7108 LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so"
7109 AC_MSG_NOTICE(Using our own com_err)
7111 AC_SUBST(DIR_com_err)
7112 AC_SUBST(LIB_com_err)
7113 AC_SUBST(LIB_com_err_a)
7114 AC_SUBST(LIB_com_err_so)
7118 dnl $Id: auth-modules.m4,v 1.5 2002/09/09 13:31:45 joda Exp $
7120 dnl Figure what authentication modules should be built
7122 dnl rk_AUTH_MODULES(module-list)
7124 AC_DEFUN(rk_AUTH_MODULES,[
7125 AC_MSG_CHECKING([which authentication modules should be built])
7127 z='m4_ifval([$1], $1, [sia pam afskauthlib])'
7132 if test "$ac_cv_header_siad_h" = yes; then
7133 LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS sia"
7138 *-*-freebsd*) ac_cv_want_pam_krb4=no ;;
7139 *) ac_cv_want_pam_krb4=yes ;;
7142 if test "$ac_cv_want_pam_krb4" = yes -a \
7143 "$ac_cv_header_security_pam_modules_h" = yes -a \
7144 "$enable_shared" = yes; then
7145 LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS pam"
7150 *-*-irix[[56]]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;;
7155 if test "$LIB_AUTH_SUBDIRS"; then
7156 AC_MSG_RESULT($LIB_AUTH_SUBDIRS)
7161 AC_SUBST(LIB_AUTH_SUBDIRS)dnl
7165 dnl $Id: destdirs.m4,v 1.2 2002/08/12 15:12:50 joda Exp $
7168 AC_DEFUN([rk_DESTDIRS], [
7169 # This is done by AC_OUTPUT but we need the result here.
7170 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7171 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7173 AC_FOREACH([rk_dir], [bin lib libexec localstate sbin sysconf], [
7176 while test "x$y" != "x$x"; do
7180 AC_DEFINE_UNQUOTED(AS_TR_CPP(rk_dir[]dir), "$x", [path to ]rk_dir[])])