1 # generated automatically by aclocal 1.7.8 -*- Autoconf -*-
3 # Copyright (C) 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 ---------------------------------------------------------------------------
15 dnl Look for the curses libraries. Older curses implementations may require
16 dnl termcap/termlib to be linked as well.
17 AC_DEFUN([CF_CURSES_LIBS],[
18 AC_CHECK_FUNC(initscr,,[
21 AC_CHECK_LIB(mytinfo,tgoto,[LIBS="-lmytinfo $LIBS"])
24 AC_CHECK_LIB(cur_colr,initscr,[
25 LIBS="-lcur_colr $LIBS"
26 CFLAGS="-I/usr/include/curses_colr $CFLAGS"
27 ac_cv_func_initscr=yes
29 AC_CHECK_LIB(Hcurses,initscr,[
30 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
31 LIBS="-lHcurses $LIBS"
32 CFLAGS="-D__HP_CURSES -D_HP_CURSES $CFLAGS"
33 ac_cv_func_initscr=yes
36 linux*) # Suse Linux does not follow /usr/lib convention
41 if test ".$With5lib" != ".no" ; then
42 if test -d /usr/5lib ; then
44 CPPFLAGS="$CPPFLAGS -I/usr/5include"
45 LIBS="$LIBS -L/usr/5lib"
49 if test ".$ac_cv_func_initscr" != .yes ; then
54 # Check for library containing tgoto. Do this before curses library
55 # because it may be needed to link the test-case for initscr.
56 AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
57 for cf_term_lib in termcap termlib unknown
59 AC_CHECK_LIB($cf_term_lib,tgoto,[break])
63 # Check for library containing initscr
64 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
65 for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown
67 AC_CHECK_LIB($cf_curs_lib,initscr,[break])
69 test $cf_curs_lib = unknown && AC_ERROR(no curses library found)
71 LIBS="-l$cf_curs_lib $cf_save_LIBS"
72 if test "$cf_term_lib" = unknown ; then
73 AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
74 AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],
78 AC_MSG_RESULT($cf_result)
79 test $cf_result = no && AC_ERROR(Cannot link curses library)
80 elif test "$cf_term_lib" != predefined ; then
81 AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
82 AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],
83 [initscr(); tgoto((char *)0, 0, 0);],
86 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
87 AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],
92 AC_MSG_RESULT($cf_result)
100 dnl @synopsis AC_LIB_READLINE
102 dnl Searches for a readline compatible library. If found, defines
103 dnl `HAVE_LIBREADLINE'. If the found library has the `add_history'
104 dnl function, sets also `HAVE_READLINE_HISTORY'. Also checks for the
105 dnl locations of the necessary include files and sets `HAVE_READLINE_H'
106 dnl or `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
107 dnl 'HAVE_HISTORY_H' if the corresponding include files exists.
109 dnl The libraries that may be readline compatible are `libedit',
110 dnl `libeditline' and `libreadline'. Sometimes we need to link a termcap
111 dnl library for readline to work, this macro tests these cases too by
112 dnl trying to link with `libtermcap', `libcurses' or `libncurses' before
115 dnl Here is an example of how to use the information provided by this
116 dnl macro to perform the necessary includes or declarations in a C file:
118 dnl #include <config.h>
120 dnl #ifdef HAVE_LIBREADLINE
121 dnl #if defined(HAVE_READLINE_READLINE_H)
122 dnl #include <readline/readline.h>
123 dnl #elif defined(HAVE_READLINE_H)
124 dnl #include <readline.h>
125 dnl #else /* !defined(HAVE_READLINE_H) */
126 dnl extern char *readline ();
127 dnl #endif /* !defined(HAVE_READLINE_H) */
128 dnl char *cmdline = NULL;
129 dnl #else /* !defined(HAVE_READLINE_READLINE_H) */
130 dnl /* no readline */
131 dnl #endif /* HAVE_LIBREADLINE */
133 dnl #ifdef HAVE_READLINE_HISTORY
134 dnl #if defined(HAVE_READLINE_HISTORY_H)
135 dnl #include <readline/history.h>
136 dnl #elif defined(HAVE_HISTORY_H)
137 dnl #include <history.h>
138 dnl #else /* !defined(HAVE_HISTORY_H) */
139 dnl extern void add_history ();
140 dnl extern int write_history ();
141 dnl extern int read_history ();
142 dnl #endif /* defined(HAVE_READLINE_HISTORY_H) */
144 dnl #endif /* HAVE_READLINE_HISTORY */
148 dnl @author Ville Laurikari <vl@iki.fi>
150 AC_DEFUN([AC_LIB_READLINE], [
151 AC_CACHE_CHECK([for a readline compatible library],
152 ac_cv_lib_readline, [
154 for readline_lib in readline edit editline; do
155 for termcap_lib in "" termcap curses ncurses; do
156 if test -z "$termcap_lib"; then
157 TRY_LIB="-l$readline_lib"
159 TRY_LIB="-l$readline_lib -l$termcap_lib"
161 LIBS="$ORIG_LIBS $TRY_LIB"
162 AC_TRY_LINK_FUNC(readline, ac_cv_lib_readline="$TRY_LIB")
163 if test -n "$ac_cv_lib_readline"; then
167 if test -n "$ac_cv_lib_readline"; then
171 if test -z "$ac_cv_lib_readline"; then
172 ac_cv_lib_readline="no"
177 if test "$ac_cv_lib_readline" != "no"; then
178 LIBS="$LIBS $ac_cv_lib_readline"
179 AC_DEFINE(HAVE_LIBREADLINE, 1,
180 [Define if you have a readline compatible library])
181 AC_CHECK_HEADERS(readline.h readline/readline.h)
182 AC_CACHE_CHECK([whether readline supports history],
183 ac_cv_lib_readline_history, [
184 ac_cv_lib_readline_history="no"
185 AC_TRY_LINK_FUNC(add_history, ac_cv_lib_readline_history="yes")
187 if test "$ac_cv_lib_readline_history" = "yes"; then
188 AC_DEFINE(HAVE_READLINE_HISTORY, 1,
189 [Define if your readline library has \`add_history'])
190 AC_CHECK_HEADERS(history.h readline/history.h)
196 # Do all the work for Automake. -*- Autoconf -*-
198 # This macro actually does too much some checks are only needed if
199 # your package does certain things. But this isn't really a big deal.
201 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
202 # Free Software Foundation, Inc.
204 # This program is free software; you can redistribute it and/or modify
205 # it under the terms of the GNU General Public License as published by
206 # the Free Software Foundation; either version 2, or (at your option)
209 # This program is distributed in the hope that it will be useful,
210 # but WITHOUT ANY WARRANTY; without even the implied warranty of
211 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
212 # GNU General Public License for more details.
214 # You should have received a copy of the GNU General Public License
215 # along with this program; if not, write to the Free Software
216 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
223 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
224 # the ones we care about.
225 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
227 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
228 # AM_INIT_AUTOMAKE([OPTIONS])
229 # -----------------------------------------------
230 # The call with PACKAGE and VERSION arguments is the old style
231 # call (pre autoconf-2.50), which is being phased out. PACKAGE
232 # and VERSION should now be passed to AC_INIT and removed from
233 # the call to AM_INIT_AUTOMAKE.
234 # We support both call styles for the transition. After
235 # the next Automake release, Autoconf can make the AC_INIT
236 # arguments mandatory, and then we can depend on a new Autoconf
237 # release and drop the old call support.
238 AC_DEFUN([AM_INIT_AUTOMAKE],
239 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
240 AC_REQUIRE([AC_PROG_INSTALL])dnl
241 # test to see if srcdir already configured
242 if test "`cd $srcdir && pwd`" != "`pwd`" &&
243 test -f $srcdir/config.status; then
244 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
247 # test whether we have cygpath
248 if test -z "$CYGPATH_W"; then
249 if (cygpath --version) >/dev/null 2>/dev/null; then
250 CYGPATH_W='cygpath -w'
255 AC_SUBST([CYGPATH_W])
257 # Define the identity of the package.
258 dnl Distinguish between old-style and new-style calls.
260 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
261 AC_SUBST([PACKAGE], [$1])dnl
262 AC_SUBST([VERSION], [$2])],
263 [_AM_SET_OPTIONS([$1])dnl
264 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
265 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
267 _AM_IF_OPTION([no-define],,
268 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
269 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
271 # Some tools Automake needs.
272 AC_REQUIRE([AM_SANITY_CHECK])dnl
273 AC_REQUIRE([AC_ARG_PROGRAM])dnl
274 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
275 AM_MISSING_PROG(AUTOCONF, autoconf)
276 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
277 AM_MISSING_PROG(AUTOHEADER, autoheader)
278 AM_MISSING_PROG(MAKEINFO, makeinfo)
279 AM_MISSING_PROG(AMTAR, tar)
281 AM_PROG_INSTALL_STRIP
282 # We need awk for the "check" target. The system "awk" is bad on
284 AC_REQUIRE([AC_PROG_AWK])dnl
285 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
286 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
288 _AM_IF_OPTION([no-dependencies],,
289 [AC_PROVIDE_IFELSE([AC_PROG_CC],
290 [_AM_DEPENDENCIES(CC)],
291 [define([AC_PROG_CC],
292 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
293 AC_PROVIDE_IFELSE([AC_PROG_CXX],
294 [_AM_DEPENDENCIES(CXX)],
295 [define([AC_PROG_CXX],
296 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
301 # When config.status generates a header, we must update the stamp-h file.
302 # This file resides in the same directory as the config header
303 # that is generated. The stamp files are numbered to have different names.
305 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
306 # loop where config.status creates the headers, so we can generate
307 # our stamp files there.
308 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
309 [# Compute $1's index in $config_headers.
311 for _am_header in $config_headers :; do
316 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
319 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
321 # Copyright 2002 Free Software Foundation, Inc.
323 # This program is free software; you can redistribute it and/or modify
324 # it under the terms of the GNU General Public License as published by
325 # the Free Software Foundation; either version 2, or (at your option)
328 # This program is distributed in the hope that it will be useful,
329 # but WITHOUT ANY WARRANTY; without even the implied warranty of
330 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
331 # GNU General Public License for more details.
333 # You should have received a copy of the GNU General Public License
334 # along with this program; if not, write to the Free Software
335 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
337 # AM_AUTOMAKE_VERSION(VERSION)
338 # ----------------------------
339 # Automake X.Y traces this macro to ensure aclocal.m4 has been
340 # generated from the m4 files accompanying Automake X.Y.
341 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
343 # AM_SET_CURRENT_AUTOMAKE_VERSION
344 # -------------------------------
345 # Call AM_AUTOMAKE_VERSION so it can be traced.
346 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
347 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
348 [AM_AUTOMAKE_VERSION([1.7.8])])
350 # Helper functions for option handling. -*- Autoconf -*-
352 # Copyright 2001, 2002 Free Software Foundation, Inc.
354 # This program is free software; you can redistribute it and/or modify
355 # it under the terms of the GNU General Public License as published by
356 # the Free Software Foundation; either version 2, or (at your option)
359 # This program is distributed in the hope that it will be useful,
360 # but WITHOUT ANY WARRANTY; without even the implied warranty of
361 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
362 # GNU General Public License for more details.
364 # You should have received a copy of the GNU General Public License
365 # along with this program; if not, write to the Free Software
366 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
371 # _AM_MANGLE_OPTION(NAME)
372 # -----------------------
373 AC_DEFUN([_AM_MANGLE_OPTION],
374 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
376 # _AM_SET_OPTION(NAME)
377 # ------------------------------
378 # Set option NAME. Presently that only means defining a flag for this option.
379 AC_DEFUN([_AM_SET_OPTION],
380 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
382 # _AM_SET_OPTIONS(OPTIONS)
383 # ----------------------------------
384 # OPTIONS is a space-separated list of Automake options.
385 AC_DEFUN([_AM_SET_OPTIONS],
386 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
388 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
389 # -------------------------------------------
390 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
391 AC_DEFUN([_AM_IF_OPTION],
392 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
395 # Check to make sure that the build environment is sane.
398 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
400 # This program is free software; you can redistribute it and/or modify
401 # it under the terms of the GNU General Public License as published by
402 # the Free Software Foundation; either version 2, or (at your option)
405 # This program is distributed in the hope that it will be useful,
406 # but WITHOUT ANY WARRANTY; without even the implied warranty of
407 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
408 # GNU General Public License for more details.
410 # You should have received a copy of the GNU General Public License
411 # along with this program; if not, write to the Free Software
412 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
419 AC_DEFUN([AM_SANITY_CHECK],
420 [AC_MSG_CHECKING([whether build environment is sane])
423 echo timestamp > conftest.file
424 # Do `set' in a subshell so we don't clobber the current shell's
425 # arguments. Must try -L first in case configure is actually a
426 # symlink; some systems play weird games with the mod time of symlinks
427 # (eg FreeBSD returns the mod time of the symlink's containing
430 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
431 if test "$[*]" = "X"; then
433 set X `ls -t $srcdir/configure conftest.file`
436 if test "$[*]" != "X $srcdir/configure conftest.file" \
437 && test "$[*]" != "X conftest.file $srcdir/configure"; then
439 # If neither matched, then we have a broken ls. This can happen
440 # if, for instance, CONFIG_SHELL is bash and it inherits a
441 # broken ls alias from the environment. This has actually
442 # happened. Such a system could not be considered "sane".
443 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
444 alias in your environment])
447 test "$[2]" = conftest.file
453 AC_MSG_ERROR([newly created file is older than distributed files!
454 Check your system clock])
461 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
463 # This program is free software; you can redistribute it and/or modify
464 # it under the terms of the GNU General Public License as published by
465 # the Free Software Foundation; either version 2, or (at your option)
468 # This program is distributed in the hope that it will be useful,
469 # but WITHOUT ANY WARRANTY; without even the implied warranty of
470 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
471 # GNU General Public License for more details.
473 # You should have received a copy of the GNU General Public License
474 # along with this program; if not, write to the Free Software
475 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
480 # AM_MISSING_PROG(NAME, PROGRAM)
481 # ------------------------------
482 AC_DEFUN([AM_MISSING_PROG],
483 [AC_REQUIRE([AM_MISSING_HAS_RUN])
484 $1=${$1-"${am_missing_run}$2"}
490 # Define MISSING if not defined so far and test if it supports --run.
491 # If it does, set am_missing_run to use it, otherwise, to nothing.
492 AC_DEFUN([AM_MISSING_HAS_RUN],
493 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
494 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
495 # Use eval to expand $SHELL
496 if eval "$MISSING --run true"; then
497 am_missing_run="$MISSING --run "
500 AC_MSG_WARN([`missing' script is too old or missing])
506 # Copyright 2001 Free Software Foundation, Inc.
508 # This program is free software; you can redistribute it and/or modify
509 # it under the terms of the GNU General Public License as published by
510 # the Free Software Foundation; either version 2, or (at your option)
513 # This program is distributed in the hope that it will be useful,
514 # but WITHOUT ANY WARRANTY; without even the implied warranty of
515 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
516 # GNU General Public License for more details.
518 # You should have received a copy of the GNU General Public License
519 # along with this program; if not, write to the Free Software
520 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
523 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
524 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
525 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
527 # Of course, Automake must honor this variable whenever it calls a
528 # tool from the auxiliary directory. The problem is that $srcdir (and
529 # therefore $ac_aux_dir as well) can be either absolute or relative,
530 # depending on how configure is run. This is pretty annoying, since
531 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
532 # source directory, any form will work fine, but in subdirectories a
533 # relative path needs to be adjusted first.
535 # $ac_aux_dir/missing
536 # fails when called from a subdirectory if $ac_aux_dir is relative
537 # $top_srcdir/$ac_aux_dir/missing
538 # fails if $ac_aux_dir is absolute,
539 # fails when called from a subdirectory in a VPATH build with
540 # a relative $ac_aux_dir
542 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
543 # are both prefixed by $srcdir. In an in-source build this is usually
544 # harmless because $srcdir is `.', but things will broke when you
545 # start a VPATH build or use an absolute $srcdir.
547 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
548 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
549 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
550 # and then we would define $MISSING as
551 # MISSING="\${SHELL} $am_aux_dir/missing"
552 # This will work as long as MISSING is not called from configure, because
553 # unfortunately $(top_srcdir) has no meaning in configure.
554 # However there are other variables, like CC, which are often used in
555 # configure, and could therefore not use this "fixed" $ac_aux_dir.
557 # Another solution, used here, is to always expand $ac_aux_dir to an
558 # absolute PATH. The drawback is that using absolute paths prevent a
559 # configured tree to be moved without reconfiguration.
561 # Rely on autoconf to set up CDPATH properly.
564 AC_DEFUN([AM_AUX_DIR_EXPAND], [
565 # expand $ac_aux_dir to an absolute path
566 am_aux_dir=`cd $ac_aux_dir && pwd`
571 # Define $install_sh.
573 # Copyright 2001 Free Software Foundation, Inc.
575 # This program is free software; you can redistribute it and/or modify
576 # it under the terms of the GNU General Public License as published by
577 # the Free Software Foundation; either version 2, or (at your option)
580 # This program is distributed in the hope that it will be useful,
581 # but WITHOUT ANY WARRANTY; without even the implied warranty of
582 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
583 # GNU General Public License for more details.
585 # You should have received a copy of the GNU General Public License
586 # along with this program; if not, write to the Free Software
587 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
590 AC_DEFUN([AM_PROG_INSTALL_SH],
591 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
592 install_sh=${install_sh-"$am_aux_dir/install-sh"}
593 AC_SUBST(install_sh)])
595 # AM_PROG_INSTALL_STRIP
597 # Copyright 2001 Free Software Foundation, Inc.
599 # This program is free software; you can redistribute it and/or modify
600 # it under the terms of the GNU General Public License as published by
601 # the Free Software Foundation; either version 2, or (at your option)
604 # This program is distributed in the hope that it will be useful,
605 # but WITHOUT ANY WARRANTY; without even the implied warranty of
606 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
607 # GNU General Public License for more details.
609 # You should have received a copy of the GNU General Public License
610 # along with this program; if not, write to the Free Software
611 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
614 # One issue with vendor `install' (even GNU) is that you can't
615 # specify the program used to strip binaries. This is especially
616 # annoying in cross-compiling environments, where the build's strip
617 # is unlikely to handle the host's binaries.
618 # Fortunately install-sh will honor a STRIPPROG variable, so we
619 # always use install-sh in `make install-strip', and initialize
620 # STRIPPROG with the value of the STRIP variable (set by the user).
621 AC_DEFUN([AM_PROG_INSTALL_STRIP],
622 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
623 # Installed binaries are usually stripped using `strip' when the user
624 # run `make install-strip'. However `strip' might not be the right
625 # tool to use in cross-compilation environments, therefore Automake
626 # will honor the `STRIP' environment variable to overrule this program.
627 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
628 if test "$cross_compiling" != no; then
629 AC_CHECK_TOOL([STRIP], [strip], :)
631 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
632 AC_SUBST([INSTALL_STRIP_PROGRAM])])
635 # Copyright (C) 2003 Free Software Foundation, Inc.
637 # This program is free software; you can redistribute it and/or modify
638 # it under the terms of the GNU General Public License as published by
639 # the Free Software Foundation; either version 2, or (at your option)
642 # This program is distributed in the hope that it will be useful,
643 # but WITHOUT ANY WARRANTY; without even the implied warranty of
644 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 # GNU General Public License for more details.
647 # You should have received a copy of the GNU General Public License
648 # along with this program; if not, write to the Free Software
649 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
654 # Check whether the underlying file-system supports filenames
655 # with a leading dot. For instance MS-DOS doesn't.
656 AC_DEFUN([AM_SET_LEADING_DOT],
657 [rm -rf .tst 2>/dev/null
658 mkdir .tst 2>/dev/null
659 if test -d .tst; then
664 rmdir .tst 2>/dev/null
665 AC_SUBST([am__leading_dot])])
667 # serial 5 -*- Autoconf -*-
669 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
671 # This program is free software; you can redistribute it and/or modify
672 # it under the terms of the GNU General Public License as published by
673 # the Free Software Foundation; either version 2, or (at your option)
676 # This program is distributed in the hope that it will be useful,
677 # but WITHOUT ANY WARRANTY; without even the implied warranty of
678 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
679 # GNU General Public License for more details.
681 # You should have received a copy of the GNU General Public License
682 # along with this program; if not, write to the Free Software
683 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
687 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
688 # written in clear, in which case automake, when reading aclocal.m4,
689 # will think it sees a *use*, and therefore will trigger all it's
690 # C support machinery. Also note that it means that autoscan, seeing
691 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
695 # _AM_DEPENDENCIES(NAME)
696 # ----------------------
697 # See how the compiler implements dependency checking.
698 # NAME is "CC", "CXX", "GCJ", or "OBJC".
699 # We try a few techniques and use that to set a single cache variable.
701 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
702 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
703 # dependency, and given that the user is not expected to run this macro,
704 # just rely on AC_PROG_CC.
705 AC_DEFUN([_AM_DEPENDENCIES],
706 [AC_REQUIRE([AM_SET_DEPDIR])dnl
707 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
708 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
709 AC_REQUIRE([AM_DEP_TRACK])dnl
711 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
712 [$1], CXX, [depcc="$CXX" am_compiler_list=],
713 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
714 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
715 [depcc="$$1" am_compiler_list=])
717 AC_CACHE_CHECK([dependency style of $depcc],
718 [am_cv_$1_dependencies_compiler_type],
719 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
720 # We make a subdir and do the tests there. Otherwise we can end up
721 # making bogus files that we don't know about and never remove. For
722 # instance it was reported that on HP-UX the gcc test will end up
723 # making a dummy file named `D' -- because `-MD' means `put the output
726 # Copy depcomp to subdir because otherwise we won't find it if we're
727 # using a relative directory.
728 cp "$am_depcomp" conftest.dir
730 # We will build objects and dependencies in a subdirectory because
731 # it helps to detect inapplicable dependency modes. For instance
732 # both Tru64's cc and ICC support -MD to output dependencies as a
733 # side effect of compilation, but ICC will put the dependencies in
734 # the current directory while Tru64 will put them in the object
738 am_cv_$1_dependencies_compiler_type=none
739 if test "$am_compiler_list" = ""; then
740 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
742 for depmode in $am_compiler_list; do
743 # Setup a source with many dependencies, because some compilers
744 # like to wrap large dependency lists on column 80 (with \), and
745 # we should not choose a depcomp mode which is confused by this.
747 # We need to recreate these files for each test, as the compiler may
748 # overwrite some of them when testing with obscure command lines.
749 # This happens at least with the AIX C compiler.
751 for i in 1 2 3 4 5 6; do
752 echo '#include "conftst'$i'.h"' >> sub/conftest.c
755 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
759 # after this tag, mechanisms are not by side-effect, so they'll
760 # only be used when explicitly requested
761 if test "x$enable_dependency_tracking" = xyes; then
769 # We check with `-c' and `-o' for the sake of the "dashmstdout"
770 # mode. It turns out that the SunPro C++ compiler does not properly
771 # handle `-M -o', and we need to detect this.
772 if depmode=$depmode \
773 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
774 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
775 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
776 >/dev/null 2>conftest.err &&
777 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
778 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
779 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
780 # icc doesn't choke on unknown options, it will just issue warnings
781 # (even with -Werror). So we grep stderr for any message
782 # that says an option was ignored.
783 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
784 am_cv_$1_dependencies_compiler_type=$depmode
793 am_cv_$1_dependencies_compiler_type=none
796 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
797 AM_CONDITIONAL([am__fastdep$1], [
798 test "x$enable_dependency_tracking" != xno \
799 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
805 # Choose a directory name for dependency files.
806 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
807 AC_DEFUN([AM_SET_DEPDIR],
808 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
809 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
815 AC_DEFUN([AM_DEP_TRACK],
816 [AC_ARG_ENABLE(dependency-tracking,
817 [ --disable-dependency-tracking Speeds up one-time builds
818 --enable-dependency-tracking Do not reject slow dependency extractors])
819 if test "x$enable_dependency_tracking" != xno; then
820 am_depcomp="$ac_aux_dir/depcomp"
823 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
824 AC_SUBST([AMDEPBACKSLASH])
827 # Generate code to set up dependency tracking. -*- Autoconf -*-
829 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
831 # This program is free software; you can redistribute it and/or modify
832 # it under the terms of the GNU General Public License as published by
833 # the Free Software Foundation; either version 2, or (at your option)
836 # This program is distributed in the hope that it will be useful,
837 # but WITHOUT ANY WARRANTY; without even the implied warranty of
838 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
839 # GNU General Public License for more details.
841 # You should have received a copy of the GNU General Public License
842 # along with this program; if not, write to the Free Software
843 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
848 # _AM_OUTPUT_DEPENDENCY_COMMANDS
849 # ------------------------------
850 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
851 [for mf in $CONFIG_FILES; do
852 # Strip MF so we end up with the name of the file.
853 mf=`echo "$mf" | sed -e 's/:.*$//'`
854 # Check whether this is an Automake generated Makefile or not.
855 # We used to match only the files named `Makefile.in', but
856 # some people rename them; so instead we look at the file content.
857 # Grep'ing the first line is not enough: some people post-process
858 # each Makefile.in and add a new line on top of each file to say so.
859 # So let's grep whole file.
860 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
861 dirpart=`AS_DIRNAME("$mf")`
865 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
866 # Extract the definition of DEP_FILES from the Makefile without
868 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
869 test -z "$DEPDIR" && continue
870 # When using ansi2knr, U may be empty or an underscore; expand it
871 U=`sed -n -e '/^U = / s///p' < "$mf"`
872 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
873 # We invoke sed twice because it is the simplest approach to
874 # changing $(DEPDIR) to its actual value in the expansion.
875 for file in `sed -n -e '
876 /^DEP_FILES = .*\\\\$/ {
885 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
886 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
887 # Make sure the directory exists.
888 test -f "$dirpart/$file" && continue
889 fdir=`AS_DIRNAME(["$file"])`
890 AS_MKDIR_P([$dirpart/$fdir])
891 # echo "creating $dirpart/$file"
892 echo '# dummy' > "$dirpart/$file"
895 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
898 # AM_OUTPUT_DEPENDENCY_COMMANDS
899 # -----------------------------
900 # This macro should only be invoked once -- use via AC_REQUIRE.
902 # This code is only required when automatic dependency tracking
903 # is enabled. FIXME. This creates each `.P' file that we will
904 # need in order to bootstrap the dependency handling code.
905 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
906 [AC_CONFIG_COMMANDS([depfiles],
907 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
908 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
911 # Check to see how 'make' treats includes. -*- Autoconf -*-
913 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
915 # This program is free software; you can redistribute it and/or modify
916 # it under the terms of the GNU General Public License as published by
917 # the Free Software Foundation; either version 2, or (at your option)
920 # This program is distributed in the hope that it will be useful,
921 # but WITHOUT ANY WARRANTY; without even the implied warranty of
922 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
923 # GNU General Public License for more details.
925 # You should have received a copy of the GNU General Public License
926 # along with this program; if not, write to the Free Software
927 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
934 # Check to see how make treats includes.
935 AC_DEFUN([AM_MAKE_INCLUDE],
936 [am_make=${MAKE-make}
937 cat > confinc << 'END'
942 # If we don't find an include directive, just comment out the code.
943 AC_MSG_CHECKING([for style of include used by $am_make])
947 # First try GNU make style include.
948 echo "include confinc" > confmf
949 # We grep out `Entering directory' and `Leaving directory'
950 # messages which can occur if `w' ends up in MAKEFLAGS.
951 # In particular we don't look at `^make:' because GNU make might
952 # be invoked under some other name (usually "gmake"), in which
953 # case it prints its new name instead of `make'.
954 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
959 # Now try BSD make style include.
960 if test "$am__include" = "#"; then
961 echo '.include "confinc"' > confmf
962 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
968 AC_SUBST([am__include])
969 AC_SUBST([am__quote])
970 AC_MSG_RESULT([$_am_result])
974 # AM_CONDITIONAL -*- Autoconf -*-
976 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
978 # This program is free software; you can redistribute it and/or modify
979 # it under the terms of the GNU General Public License as published by
980 # the Free Software Foundation; either version 2, or (at your option)
983 # This program is distributed in the hope that it will be useful,
984 # but WITHOUT ANY WARRANTY; without even the implied warranty of
985 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
986 # GNU General Public License for more details.
988 # You should have received a copy of the GNU General Public License
989 # along with this program; if not, write to the Free Software
990 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
997 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
998 # -------------------------------------
999 # Define a conditional.
1000 AC_DEFUN([AM_CONDITIONAL],
1001 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1002 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1004 AC_SUBST([$1_FALSE])
1012 AC_CONFIG_COMMANDS_PRE(
1013 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1014 AC_MSG_ERROR([conditional "$1" was never defined.
1015 Usually this means the macro was only invoked conditionally.])
1018 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
1020 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1022 # This program is free software; you can redistribute it and/or modify
1023 # it under the terms of the GNU General Public License as published by
1024 # the Free Software Foundation; either version 2, or (at your option)
1025 # any later version.
1027 # This program is distributed in the hope that it will be useful,
1028 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1029 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1030 # GNU General Public License for more details.
1032 # You should have received a copy of the GNU General Public License
1033 # along with this program; if not, write to the Free Software
1034 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1041 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1042 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1044 # isc-posix.m4 serial 2 (gettext-0.11.2)
1045 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1046 dnl This file is free software, distributed under the terms of the GNU
1047 dnl General Public License. As a special exception to the GNU General
1048 dnl Public License, this file may be distributed as part of a program
1049 dnl that contains a configuration script generated by Autoconf, under
1050 dnl the same distribution terms as the rest of that program.
1052 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1054 # This test replaces the one in autoconf.
1055 # Currently this macro should have the same name as the autoconf macro
1056 # because gettext's gettext.m4 (distributed in the automake package)
1057 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
1058 # give these diagnostics:
1059 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1060 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1062 undefine([AC_ISC_POSIX])
1064 AC_DEFUN([AC_ISC_POSIX],
1066 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1067 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1072 # Copyright 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
1074 # This program is free software; you can redistribute it and/or modify
1075 # it under the terms of the GNU General Public License as published by
1076 # the Free Software Foundation; either version 2, or (at your option)
1077 # any later version.
1079 # This program is distributed in the hope that it will be useful,
1080 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1081 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1082 # GNU General Public License for more details.
1084 # You should have received a copy of the GNU General Public License
1085 # along with this program; if not, write to the Free Software
1086 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1091 AC_DEFUN([AM_C_PROTOTYPES],
1092 [AC_REQUIRE([AM_PROG_CC_STDC])
1093 AC_REQUIRE([AC_PROG_CPP])
1094 AC_MSG_CHECKING([for function prototypes])
1095 if test "$am_cv_prog_cc_stdc" != no; then
1097 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
1101 U=_ ANSI2KNR=./ansi2knr
1103 # Ensure some checks needed by ansi2knr itself.
1105 AC_CHECK_HEADERS(string.h)
1107 AC_SUBST(ANSI2KNR)dnl
1110 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
1113 # Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1115 # This program is free software; you can redistribute it and/or modify
1116 # it under the terms of the GNU General Public License as published by
1117 # the Free Software Foundation; either version 2, or (at your option)
1118 # any later version.
1120 # This program is distributed in the hope that it will be useful,
1121 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1122 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1123 # GNU General Public License for more details.
1125 # You should have received a copy of the GNU General Public License
1126 # along with this program; if not, write to the Free Software
1127 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1132 # @defmac AC_PROG_CC_STDC
1133 # @maindex PROG_CC_STDC
1135 # If the C compiler in not in ANSI C mode by default, try to add an option
1136 # to output variable @code{CC} to make it so. This macro tries various
1137 # options that select ANSI C on some system or another. It considers the
1138 # compiler to be in ANSI C mode if it handles function prototypes correctly.
1140 # If you use this macro, you should check after calling it whether the C
1141 # compiler has been set to accept ANSI C; if not, the shell variable
1142 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
1143 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
1144 # program @code{ansi2knr}, which comes with Ghostscript.
1147 AC_DEFUN([AM_PROG_CC_STDC],
1148 [AC_REQUIRE([AC_PROG_CC])
1149 AC_BEFORE([$0], [AC_C_INLINE])
1150 AC_BEFORE([$0], [AC_C_CONST])
1151 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
1152 dnl a magic option to avoid problems with ANSI preprocessor commands
1154 dnl FIXME: can't do this because then AC_AIX won't work due to a
1155 dnl circular dependency.
1156 dnl AC_BEFORE([$0], [AC_PROG_CPP])
1157 AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
1158 AC_CACHE_VAL(am_cv_prog_cc_stdc,
1159 [am_cv_prog_cc_stdc=no
1161 # Don't try gcc -ansi; that turns off useful extensions and
1162 # breaks some systems' header files.
1163 # AIX -qlanglvl=ansi
1164 # Ultrix and OSF/1 -std1
1165 # HP-UX 10.20 and later -Ae
1166 # HP-UX older versions -Aa -D_HPUX_SOURCE
1167 # SVR4 -Xc -D__EXTENSIONS__
1168 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1170 CC="$ac_save_CC $ac_arg"
1172 [#include <stdarg.h>
1174 #include <sys/types.h>
1175 #include <sys/stat.h>
1176 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1177 struct buf { int x; };
1178 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1179 static char *e (p, i)
1185 static char *f (char * (*g) (char **, int), char **p, ...)
1190 s = g (p, va_arg (v,int));
1194 int test (int i, double x);
1195 struct s1 {int (*f) (int a);};
1196 struct s2 {int (*f) (double a);};
1197 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1201 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1203 [am_cv_prog_cc_stdc="$ac_arg"; break])
1207 if test -z "$am_cv_prog_cc_stdc"; then
1208 AC_MSG_RESULT([none needed])
1210 AC_MSG_RESULT([$am_cv_prog_cc_stdc])
1212 case "x$am_cv_prog_cc_stdc" in
1214 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1218 AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])