1 # aclocal.m4 generated automatically by aclocal 1.6.3 -*- 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 ---------------------------------------------------------------------------
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 1996, 1997, 1998, 1999, 2000, 2001, 2002
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
221 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
222 # written in clear, in which case automake, when reading aclocal.m4,
223 # will think it sees a *use*, and therefore will trigger all it's
224 # C support machinery. Also note that it means that autoscan, seeing
225 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
230 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
231 # the ones we care about.
232 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
234 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
235 # AM_INIT_AUTOMAKE([OPTIONS])
236 # -----------------------------------------------
237 # The call with PACKAGE and VERSION arguments is the old style
238 # call (pre autoconf-2.50), which is being phased out. PACKAGE
239 # and VERSION should now be passed to AC_INIT and removed from
240 # the call to AM_INIT_AUTOMAKE.
241 # We support both call styles for the transition. After
242 # the next Automake release, Autoconf can make the AC_INIT
243 # arguments mandatory, and then we can depend on a new Autoconf
244 # release and drop the old call support.
245 AC_DEFUN([AM_INIT_AUTOMAKE],
246 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
247 AC_REQUIRE([AC_PROG_INSTALL])dnl
248 # test to see if srcdir already configured
249 if test "`cd $srcdir && pwd`" != "`pwd`" &&
250 test -f $srcdir/config.status; then
251 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
254 # Define the identity of the package.
255 dnl Distinguish between old-style and new-style calls.
257 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
258 AC_SUBST([PACKAGE], [$1])dnl
259 AC_SUBST([VERSION], [$2])],
260 [_AM_SET_OPTIONS([$1])dnl
261 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
262 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
264 _AM_IF_OPTION([no-define],,
265 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
266 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
268 # Some tools Automake needs.
269 AC_REQUIRE([AM_SANITY_CHECK])dnl
270 AC_REQUIRE([AC_ARG_PROGRAM])dnl
271 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
272 AM_MISSING_PROG(AUTOCONF, autoconf)
273 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
274 AM_MISSING_PROG(AUTOHEADER, autoheader)
275 AM_MISSING_PROG(MAKEINFO, makeinfo)
276 AM_MISSING_PROG(AMTAR, tar)
278 AM_PROG_INSTALL_STRIP
279 # We need awk for the "check" target. The system "awk" is bad on
281 AC_REQUIRE([AC_PROG_AWK])dnl
282 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
284 _AM_IF_OPTION([no-dependencies],,
285 [AC_PROVIDE_IFELSE([AC_PROG_][CC],
286 [_AM_DEPENDENCIES(CC)],
287 [define([AC_PROG_][CC],
288 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
289 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
290 [_AM_DEPENDENCIES(CXX)],
291 [define([AC_PROG_][CXX],
292 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
296 # Copyright 2002 Free Software Foundation, Inc.
298 # This program is free software; you can redistribute it and/or modify
299 # it under the terms of the GNU General Public License as published by
300 # the Free Software Foundation; either version 2, or (at your option)
303 # This program is distributed in the hope that it will be useful,
304 # but WITHOUT ANY WARRANTY; without even the implied warranty of
305 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
306 # GNU General Public License for more details.
308 # You should have received a copy of the GNU General Public License
309 # along with this program; if not, write to the Free Software
310 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
312 # AM_AUTOMAKE_VERSION(VERSION)
313 # ----------------------------
314 # Automake X.Y traces this macro to ensure aclocal.m4 has been
315 # generated from the m4 files accompanying Automake X.Y.
316 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
318 # AM_SET_CURRENT_AUTOMAKE_VERSION
319 # -------------------------------
320 # Call AM_AUTOMAKE_VERSION so it can be traced.
321 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
322 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
323 [AM_AUTOMAKE_VERSION([1.6.3])])
325 # Helper functions for option handling. -*- Autoconf -*-
327 # Copyright 2001, 2002 Free Software Foundation, Inc.
329 # This program is free software; you can redistribute it and/or modify
330 # it under the terms of the GNU General Public License as published by
331 # the Free Software Foundation; either version 2, or (at your option)
334 # This program is distributed in the hope that it will be useful,
335 # but WITHOUT ANY WARRANTY; without even the implied warranty of
336 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
337 # GNU General Public License for more details.
339 # You should have received a copy of the GNU General Public License
340 # along with this program; if not, write to the Free Software
341 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
346 # _AM_MANGLE_OPTION(NAME)
347 # -----------------------
348 AC_DEFUN([_AM_MANGLE_OPTION],
349 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
351 # _AM_SET_OPTION(NAME)
352 # ------------------------------
353 # Set option NAME. Presently that only means defining a flag for this option.
354 AC_DEFUN([_AM_SET_OPTION],
355 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
357 # _AM_SET_OPTIONS(OPTIONS)
358 # ----------------------------------
359 # OPTIONS is a space-separated list of Automake options.
360 AC_DEFUN([_AM_SET_OPTIONS],
361 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
363 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
364 # -------------------------------------------
365 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
366 AC_DEFUN([_AM_IF_OPTION],
367 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
370 # Check to make sure that the build environment is sane.
373 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
375 # This program is free software; you can redistribute it and/or modify
376 # it under the terms of the GNU General Public License as published by
377 # the Free Software Foundation; either version 2, or (at your option)
380 # This program is distributed in the hope that it will be useful,
381 # but WITHOUT ANY WARRANTY; without even the implied warranty of
382 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
383 # GNU General Public License for more details.
385 # You should have received a copy of the GNU General Public License
386 # along with this program; if not, write to the Free Software
387 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
394 AC_DEFUN([AM_SANITY_CHECK],
395 [AC_MSG_CHECKING([whether build environment is sane])
398 echo timestamp > conftest.file
399 # Do `set' in a subshell so we don't clobber the current shell's
400 # arguments. Must try -L first in case configure is actually a
401 # symlink; some systems play weird games with the mod time of symlinks
402 # (eg FreeBSD returns the mod time of the symlink's containing
405 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
406 if test "$[*]" = "X"; then
408 set X `ls -t $srcdir/configure conftest.file`
411 if test "$[*]" != "X $srcdir/configure conftest.file" \
412 && test "$[*]" != "X conftest.file $srcdir/configure"; then
414 # If neither matched, then we have a broken ls. This can happen
415 # if, for instance, CONFIG_SHELL is bash and it inherits a
416 # broken ls alias from the environment. This has actually
417 # happened. Such a system could not be considered "sane".
418 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
419 alias in your environment])
422 test "$[2]" = conftest.file
428 AC_MSG_ERROR([newly created file is older than distributed files!
429 Check your system clock])
436 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
438 # This program is free software; you can redistribute it and/or modify
439 # it under the terms of the GNU General Public License as published by
440 # the Free Software Foundation; either version 2, or (at your option)
443 # This program is distributed in the hope that it will be useful,
444 # but WITHOUT ANY WARRANTY; without even the implied warranty of
445 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
446 # GNU General Public License for more details.
448 # You should have received a copy of the GNU General Public License
449 # along with this program; if not, write to the Free Software
450 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
455 # AM_MISSING_PROG(NAME, PROGRAM)
456 # ------------------------------
457 AC_DEFUN([AM_MISSING_PROG],
458 [AC_REQUIRE([AM_MISSING_HAS_RUN])
459 $1=${$1-"${am_missing_run}$2"}
465 # Define MISSING if not defined so far and test if it supports --run.
466 # If it does, set am_missing_run to use it, otherwise, to nothing.
467 AC_DEFUN([AM_MISSING_HAS_RUN],
468 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
469 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
470 # Use eval to expand $SHELL
471 if eval "$MISSING --run true"; then
472 am_missing_run="$MISSING --run "
475 AC_MSG_WARN([`missing' script is too old or missing])
481 # Copyright 2001 Free Software Foundation, Inc.
483 # This program is free software; you can redistribute it and/or modify
484 # it under the terms of the GNU General Public License as published by
485 # the Free Software Foundation; either version 2, or (at your option)
488 # This program is distributed in the hope that it will be useful,
489 # but WITHOUT ANY WARRANTY; without even the implied warranty of
490 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
491 # GNU General Public License for more details.
493 # You should have received a copy of the GNU General Public License
494 # along with this program; if not, write to the Free Software
495 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
498 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
499 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
500 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
502 # Of course, Automake must honor this variable whenever it calls a
503 # tool from the auxiliary directory. The problem is that $srcdir (and
504 # therefore $ac_aux_dir as well) can be either absolute or relative,
505 # depending on how configure is run. This is pretty annoying, since
506 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
507 # source directory, any form will work fine, but in subdirectories a
508 # relative path needs to be adjusted first.
510 # $ac_aux_dir/missing
511 # fails when called from a subdirectory if $ac_aux_dir is relative
512 # $top_srcdir/$ac_aux_dir/missing
513 # fails if $ac_aux_dir is absolute,
514 # fails when called from a subdirectory in a VPATH build with
515 # a relative $ac_aux_dir
517 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
518 # are both prefixed by $srcdir. In an in-source build this is usually
519 # harmless because $srcdir is `.', but things will broke when you
520 # start a VPATH build or use an absolute $srcdir.
522 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
523 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
524 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
525 # and then we would define $MISSING as
526 # MISSING="\${SHELL} $am_aux_dir/missing"
527 # This will work as long as MISSING is not called from configure, because
528 # unfortunately $(top_srcdir) has no meaning in configure.
529 # However there are other variables, like CC, which are often used in
530 # configure, and could therefore not use this "fixed" $ac_aux_dir.
532 # Another solution, used here, is to always expand $ac_aux_dir to an
533 # absolute PATH. The drawback is that using absolute paths prevent a
534 # configured tree to be moved without reconfiguration.
536 # Rely on autoconf to set up CDPATH properly.
539 AC_DEFUN([AM_AUX_DIR_EXPAND], [
540 # expand $ac_aux_dir to an absolute path
541 am_aux_dir=`cd $ac_aux_dir && pwd`
546 # Define $install_sh.
548 # Copyright 2001 Free Software Foundation, Inc.
550 # This program is free software; you can redistribute it and/or modify
551 # it under the terms of the GNU General Public License as published by
552 # the Free Software Foundation; either version 2, or (at your option)
555 # This program is distributed in the hope that it will be useful,
556 # but WITHOUT ANY WARRANTY; without even the implied warranty of
557 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
558 # GNU General Public License for more details.
560 # You should have received a copy of the GNU General Public License
561 # along with this program; if not, write to the Free Software
562 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
565 AC_DEFUN([AM_PROG_INSTALL_SH],
566 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
567 install_sh=${install_sh-"$am_aux_dir/install-sh"}
568 AC_SUBST(install_sh)])
570 # AM_PROG_INSTALL_STRIP
572 # Copyright 2001 Free Software Foundation, Inc.
574 # This program is free software; you can redistribute it and/or modify
575 # it under the terms of the GNU General Public License as published by
576 # the Free Software Foundation; either version 2, or (at your option)
579 # This program is distributed in the hope that it will be useful,
580 # but WITHOUT ANY WARRANTY; without even the implied warranty of
581 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
582 # GNU General Public License for more details.
584 # You should have received a copy of the GNU General Public License
585 # along with this program; if not, write to the Free Software
586 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
589 # One issue with vendor `install' (even GNU) is that you can't
590 # specify the program used to strip binaries. This is especially
591 # annoying in cross-compiling environments, where the build's strip
592 # is unlikely to handle the host's binaries.
593 # Fortunately install-sh will honor a STRIPPROG variable, so we
594 # always use install-sh in `make install-strip', and initialize
595 # STRIPPROG with the value of the STRIP variable (set by the user).
596 AC_DEFUN([AM_PROG_INSTALL_STRIP],
597 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
598 # Installed binaries are usually stripped using `strip' when the user
599 # run `make install-strip'. However `strip' might not be the right
600 # tool to use in cross-compilation environments, therefore Automake
601 # will honor the `STRIP' environment variable to overrule this program.
602 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
603 if test "$cross_compiling" != no; then
604 AC_CHECK_TOOL([STRIP], [strip], :)
606 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
607 AC_SUBST([INSTALL_STRIP_PROGRAM])])
609 # serial 4 -*- Autoconf -*-
611 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
613 # This program is free software; you can redistribute it and/or modify
614 # it under the terms of the GNU General Public License as published by
615 # the Free Software Foundation; either version 2, or (at your option)
618 # This program is distributed in the hope that it will be useful,
619 # but WITHOUT ANY WARRANTY; without even the implied warranty of
620 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
621 # GNU General Public License for more details.
623 # You should have received a copy of the GNU General Public License
624 # along with this program; if not, write to the Free Software
625 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
629 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
630 # written in clear, in which case automake, when reading aclocal.m4,
631 # will think it sees a *use*, and therefore will trigger all it's
632 # C support machinery. Also note that it means that autoscan, seeing
633 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
637 # _AM_DEPENDENCIES(NAME)
638 # ----------------------
639 # See how the compiler implements dependency checking.
640 # NAME is "CC", "CXX", "GCJ", or "OBJC".
641 # We try a few techniques and use that to set a single cache variable.
643 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
644 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
645 # dependency, and given that the user is not expected to run this macro,
646 # just rely on AC_PROG_CC.
647 AC_DEFUN([_AM_DEPENDENCIES],
648 [AC_REQUIRE([AM_SET_DEPDIR])dnl
649 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
650 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
651 AC_REQUIRE([AM_DEP_TRACK])dnl
653 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
654 [$1], CXX, [depcc="$CXX" am_compiler_list=],
655 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
656 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
657 [depcc="$$1" am_compiler_list=])
659 AC_CACHE_CHECK([dependency style of $depcc],
660 [am_cv_$1_dependencies_compiler_type],
661 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
662 # We make a subdir and do the tests there. Otherwise we can end up
663 # making bogus files that we don't know about and never remove. For
664 # instance it was reported that on HP-UX the gcc test will end up
665 # making a dummy file named `D' -- because `-MD' means `put the output
668 # Copy depcomp to subdir because otherwise we won't find it if we're
669 # using a relative directory.
670 cp "$am_depcomp" conftest.dir
673 am_cv_$1_dependencies_compiler_type=none
674 if test "$am_compiler_list" = ""; then
675 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
677 for depmode in $am_compiler_list; do
678 # We need to recreate these files for each test, as the compiler may
679 # overwrite some of them when testing with obscure command lines.
680 # This happens at least with the AIX C compiler.
681 echo '#include "conftest.h"' > conftest.c
682 echo 'int i;' > conftest.h
683 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
687 # after this tag, mechanisms are not by side-effect, so they'll
688 # only be used when explicitly requested
689 if test "x$enable_dependency_tracking" = xyes; then
697 # We check with `-c' and `-o' for the sake of the "dashmstdout"
698 # mode. It turns out that the SunPro C++ compiler does not properly
699 # handle `-M -o', and we need to detect this.
700 if depmode=$depmode \
701 source=conftest.c object=conftest.o \
702 depfile=conftest.Po tmpdepfile=conftest.TPo \
703 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
704 grep conftest.h conftest.Po > /dev/null 2>&1 &&
705 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
706 am_cv_$1_dependencies_compiler_type=$depmode
714 am_cv_$1_dependencies_compiler_type=none
717 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
723 # Choose a directory name for dependency files.
724 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
725 AC_DEFUN([AM_SET_DEPDIR],
726 [rm -f .deps 2>/dev/null
727 mkdir .deps 2>/dev/null
728 if test -d .deps; then
731 # MS-DOS does not allow filenames that begin with a dot.
734 rmdir .deps 2>/dev/null
741 AC_DEFUN([AM_DEP_TRACK],
742 [AC_ARG_ENABLE(dependency-tracking,
743 [ --disable-dependency-tracking Speeds up one-time builds
744 --enable-dependency-tracking Do not reject slow dependency extractors])
745 if test "x$enable_dependency_tracking" != xno; then
746 am_depcomp="$ac_aux_dir/depcomp"
749 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
750 AC_SUBST([AMDEPBACKSLASH])
753 # Generate code to set up dependency tracking. -*- Autoconf -*-
755 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
757 # This program is free software; you can redistribute it and/or modify
758 # it under the terms of the GNU General Public License as published by
759 # the Free Software Foundation; either version 2, or (at your option)
762 # This program is distributed in the hope that it will be useful,
763 # but WITHOUT ANY WARRANTY; without even the implied warranty of
764 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
765 # GNU General Public License for more details.
767 # You should have received a copy of the GNU General Public License
768 # along with this program; if not, write to the Free Software
769 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
774 # _AM_OUTPUT_DEPENDENCY_COMMANDS
775 # ------------------------------
776 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
777 [for mf in $CONFIG_FILES; do
778 # Strip MF so we end up with the name of the file.
779 mf=`echo "$mf" | sed -e 's/:.*$//'`
780 # Check whether this is an Automake generated Makefile or not.
781 # We used to match only the files named `Makefile.in', but
782 # some people rename them; so instead we look at the file content.
783 # Grep'ing the first line is not enough: some people post-process
784 # each Makefile.in and add a new line on top of each file to say so.
785 # So let's grep whole file.
786 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
787 dirpart=`AS_DIRNAME("$mf")`
791 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
792 # Extract the definition of DEP_FILES from the Makefile without
794 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
795 test -z "$DEPDIR" && continue
796 # When using ansi2knr, U may be empty or an underscore; expand it
797 U=`sed -n -e '/^U = / s///p' < "$mf"`
798 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
799 # We invoke sed twice because it is the simplest approach to
800 # changing $(DEPDIR) to its actual value in the expansion.
801 for file in `sed -n -e '
802 /^DEP_FILES = .*\\\\$/ {
811 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
812 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
813 # Make sure the directory exists.
814 test -f "$dirpart/$file" && continue
815 fdir=`AS_DIRNAME(["$file"])`
816 AS_MKDIR_P([$dirpart/$fdir])
817 # echo "creating $dirpart/$file"
818 echo '# dummy' > "$dirpart/$file"
821 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
824 # AM_OUTPUT_DEPENDENCY_COMMANDS
825 # -----------------------------
826 # This macro should only be invoked once -- use via AC_REQUIRE.
828 # This code is only required when automatic dependency tracking
829 # is enabled. FIXME. This creates each `.P' file that we will
830 # need in order to bootstrap the dependency handling code.
831 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
832 [AC_CONFIG_COMMANDS([depfiles],
833 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
834 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
837 # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
839 # This program is free software; you can redistribute it and/or modify
840 # it under the terms of the GNU General Public License as published by
841 # the Free Software Foundation; either version 2, or (at your option)
844 # This program is distributed in the hope that it will be useful,
845 # but WITHOUT ANY WARRANTY; without even the implied warranty of
846 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
847 # GNU General Public License for more details.
849 # You should have received a copy of the GNU General Public License
850 # along with this program; if not, write to the Free Software
851 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
858 # Check to see how make treats includes.
859 AC_DEFUN([AM_MAKE_INCLUDE],
860 [am_make=${MAKE-make}
861 cat > confinc << 'END'
865 # If we don't find an include directive, just comment out the code.
866 AC_MSG_CHECKING([for style of include used by $am_make])
870 # First try GNU make style include.
871 echo "include confinc" > confmf
872 # We grep out `Entering directory' and `Leaving directory'
873 # messages which can occur if `w' ends up in MAKEFLAGS.
874 # In particular we don't look at `^make:' because GNU make might
875 # be invoked under some other name (usually "gmake"), in which
876 # case it prints its new name instead of `make'.
877 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
882 # Now try BSD make style include.
883 if test "$am__include" = "#"; then
884 echo '.include "confinc"' > confmf
885 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
891 AC_SUBST(am__include)
893 AC_MSG_RESULT($_am_result)
897 # AM_CONDITIONAL -*- Autoconf -*-
899 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
901 # This program is free software; you can redistribute it and/or modify
902 # it under the terms of the GNU General Public License as published by
903 # the Free Software Foundation; either version 2, or (at your option)
906 # This program is distributed in the hope that it will be useful,
907 # but WITHOUT ANY WARRANTY; without even the implied warranty of
908 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
909 # GNU General Public License for more details.
911 # You should have received a copy of the GNU General Public License
912 # along with this program; if not, write to the Free Software
913 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
920 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
921 # -------------------------------------
922 # Define a conditional.
923 AC_DEFUN([AM_CONDITIONAL],
924 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
925 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
935 AC_CONFIG_COMMANDS_PRE(
936 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
937 AC_MSG_ERROR([conditional \"$1\" was never defined.
938 Usually this means the macro was only invoked conditionally.])
941 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
943 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
945 # This program is free software; you can redistribute it and/or modify
946 # it under the terms of the GNU General Public License as published by
947 # the Free Software Foundation; either version 2, or (at your option)
950 # This program is distributed in the hope that it will be useful,
951 # but WITHOUT ANY WARRANTY; without even the implied warranty of
952 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
953 # GNU General Public License for more details.
955 # You should have received a copy of the GNU General Public License
956 # along with this program; if not, write to the Free Software
957 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
964 # When config.status generates a header, we must update the stamp-h file.
965 # This file resides in the same directory as the config header
966 # that is generated. We must strip everything past the first ":",
967 # and everything past the last "/".
971 # Like AS_DIRNAME, only do it during macro expansion
972 AC_DEFUN([_AM_DIRNAME],
973 [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
974 m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
975 m4_if(regexp([$1], [^/.*]), -1,
977 patsubst([$1], [^\(/\).*], [\1])),
978 patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
979 patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
983 # The stamp files are numbered to have different names.
984 # We could number them on a directory basis, but that's additional
985 # complications, let's have a unique counter.
986 m4_define([_AM_STAMP_Count], [0])
991 # The name of the stamp file for HEADER.
992 AC_DEFUN([_AM_STAMP],
993 [m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
994 AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
995 [:.*])))/stamp-h[]_AM_STAMP_Count])
998 # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
999 # ------------------------------------------------------------
1000 # We used to try to get a real timestamp in stamp-h. But the fear is that
1001 # that will cause unnecessary cvs conflicts.
1002 AC_DEFUN([_AM_CONFIG_HEADER],
1003 [# Add the stamp file to the list of files AC keeps track of,
1004 # along with our hook.
1005 AC_CONFIG_HEADERS([$1],
1006 [# update the timestamp
1007 echo 'timestamp for $1' >"_AM_STAMP([$1])"
1010 ])# _AM_CONFIG_HEADER
1013 # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
1014 # --------------------------------------------------------------
1015 AC_DEFUN([AM_CONFIG_HEADER],
1016 [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
1017 ])# AM_CONFIG_HEADER
1019 # isc-posix.m4 serial 2 (gettext-0.11.2)
1020 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1021 dnl This file is free software, distributed under the terms of the GNU
1022 dnl General Public License. As a special exception to the GNU General
1023 dnl Public License, this file may be distributed as part of a program
1024 dnl that contains a configuration script generated by Autoconf, under
1025 dnl the same distribution terms as the rest of that program.
1027 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1029 # This test replaces the one in autoconf.
1030 # Currently this macro should have the same name as the autoconf macro
1031 # because gettext's gettext.m4 (distributed in the automake package)
1032 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
1033 # give these diagnostics:
1034 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1035 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1037 undefine([AC_ISC_POSIX])
1039 AC_DEFUN([AC_ISC_POSIX],
1041 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1042 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1047 # Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
1049 # This program is free software; you can redistribute it and/or modify
1050 # it under the terms of the GNU General Public License as published by
1051 # the Free Software Foundation; either version 2, or (at your option)
1052 # any later version.
1054 # This program is distributed in the hope that it will be useful,
1055 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1056 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1057 # GNU General Public License for more details.
1059 # You should have received a copy of the GNU General Public License
1060 # along with this program; if not, write to the Free Software
1061 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1066 AC_DEFUN([AM_C_PROTOTYPES],
1067 [AC_REQUIRE([AM_PROG_CC_STDC])
1068 AC_REQUIRE([AC_PROG_CPP])
1069 AC_MSG_CHECKING([for function prototypes])
1070 if test "$am_cv_prog_cc_stdc" != no; then
1072 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
1076 U=_ ANSI2KNR=./ansi2knr
1078 # Ensure some checks needed by ansi2knr itself.
1080 AC_CHECK_HEADERS(string.h)
1082 AC_SUBST(ANSI2KNR)dnl
1086 # Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
1088 # This program is free software; you can redistribute it and/or modify
1089 # it under the terms of the GNU General Public License as published by
1090 # the Free Software Foundation; either version 2, or (at your option)
1091 # any later version.
1093 # This program is distributed in the hope that it will be useful,
1094 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1095 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1096 # GNU General Public License for more details.
1098 # You should have received a copy of the GNU General Public License
1099 # along with this program; if not, write to the Free Software
1100 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1105 # @defmac AC_PROG_CC_STDC
1106 # @maindex PROG_CC_STDC
1108 # If the C compiler in not in ANSI C mode by default, try to add an option
1109 # to output variable @code{CC} to make it so. This macro tries various
1110 # options that select ANSI C on some system or another. It considers the
1111 # compiler to be in ANSI C mode if it handles function prototypes correctly.
1113 # If you use this macro, you should check after calling it whether the C
1114 # compiler has been set to accept ANSI C; if not, the shell variable
1115 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
1116 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
1117 # program @code{ansi2knr}, which comes with Ghostscript.
1120 AC_DEFUN([AM_PROG_CC_STDC],
1121 [AC_REQUIRE([AC_PROG_CC])
1122 AC_BEFORE([$0], [AC_C_INLINE])
1123 AC_BEFORE([$0], [AC_C_CONST])
1124 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
1125 dnl a magic option to avoid problems with ANSI preprocessor commands
1127 dnl FIXME: can't do this because then AC_AIX won't work due to a
1128 dnl circular dependency.
1129 dnl AC_BEFORE([$0], [AC_PROG_CPP])
1130 AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
1131 AC_CACHE_VAL(am_cv_prog_cc_stdc,
1132 [am_cv_prog_cc_stdc=no
1134 # Don't try gcc -ansi; that turns off useful extensions and
1135 # breaks some systems' header files.
1136 # AIX -qlanglvl=ansi
1137 # Ultrix and OSF/1 -std1
1138 # HP-UX 10.20 and later -Ae
1139 # HP-UX older versions -Aa -D_HPUX_SOURCE
1140 # SVR4 -Xc -D__EXTENSIONS__
1141 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1143 CC="$ac_save_CC $ac_arg"
1145 [#include <stdarg.h>
1147 #include <sys/types.h>
1148 #include <sys/stat.h>
1149 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1150 struct buf { int x; };
1151 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1152 static char *e (p, i)
1158 static char *f (char * (*g) (char **, int), char **p, ...)
1163 s = g (p, va_arg (v,int));
1167 int test (int i, double x);
1168 struct s1 {int (*f) (int a);};
1169 struct s2 {int (*f) (double a);};
1170 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1174 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1176 [am_cv_prog_cc_stdc="$ac_arg"; break])
1180 if test -z "$am_cv_prog_cc_stdc"; then
1181 AC_MSG_RESULT([none needed])
1183 AC_MSG_RESULT([$am_cv_prog_cc_stdc])
1185 case "x$am_cv_prog_cc_stdc" in
1187 *) CC="$CC $am_cv_prog_cc_stdc" ;;