1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13# Do all the work for Automake.  This macro actually does too much --
14# some checks are only needed if your package does certain things.
15# But this isn't really a big deal.
16
17# serial 1
18
19dnl Usage:
20dnl AM_INIT_AUTOMAKE(package,version, [no-define])
21
22AC_DEFUN(AM_INIT_AUTOMAKE,
23[AC_REQUIRE([AC_PROG_INSTALL])
24PACKAGE=[$1]
25AC_SUBST(PACKAGE)
26VERSION=[$2]
27AC_SUBST(VERSION)
28dnl test to see if srcdir already configured
29if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
30  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
31fi
32ifelse([$3],,
33AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
34AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
35AC_REQUIRE([AM_SANITY_CHECK])
36AC_REQUIRE([AC_ARG_PROGRAM])
37dnl FIXME This is truly gross.
38missing_dir=`cd $ac_aux_dir && pwd`
39AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
40AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
41AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
42AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
43AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
44AC_REQUIRE([AC_PROG_MAKE_SET])])
45
46#
47# Check to make sure that the build environment is sane.
48#
49
50AC_DEFUN(AM_SANITY_CHECK,
51[AC_MSG_CHECKING([whether build environment is sane])
52# Just in case
53sleep 1
54echo timestamp > conftestfile
55# Do `set' in a subshell so we don't clobber the current shell's
56# arguments.  Must try -L first in case configure is actually a
57# symlink; some systems play weird games with the mod time of symlinks
58# (eg FreeBSD returns the mod time of the symlink's containing
59# directory).
60if (
61   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
62   if test "[$]*" = "X"; then
63      # -L didn't work.
64      set X `ls -t $srcdir/configure conftestfile`
65   fi
66   if test "[$]*" != "X $srcdir/configure conftestfile" \
67      && test "[$]*" != "X conftestfile $srcdir/configure"; then
68
69      # If neither matched, then we have a broken ls.  This can happen
70      # if, for instance, CONFIG_SHELL is bash and it inherits a
71      # broken ls alias from the environment.  This has actually
72      # happened.  Such a system could not be considered "sane".
73      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
74alias in your environment])
75   fi
76
77   test "[$]2" = conftestfile
78   )
79then
80   # Ok.
81   :
82else
83   AC_MSG_ERROR([newly created file is older than distributed files!
84Check your system clock])
85fi
86rm -f conftest*
87AC_MSG_RESULT(yes)])
88
89dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
90dnl The program must properly implement --version.
91AC_DEFUN(AM_MISSING_PROG,
92[AC_MSG_CHECKING(for working $2)
93# Run test in a subshell; some versions of sh will print an error if
94# an executable is not found, even if stderr is redirected.
95# Redirect stdin to placate older versions of autoconf.  Sigh.
96if ($2 --version) < /dev/null > /dev/null 2>&1; then
97   $1=$2
98   AC_MSG_RESULT(found)
99else
100   $1="$3/missing $2"
101   AC_MSG_RESULT(missing)
102fi
103AC_SUBST($1)])
104
105# Like AC_CONFIG_HEADER, but automatically create stamp file.
106
107AC_DEFUN(AM_CONFIG_HEADER,
108[AC_PREREQ([2.12])
109AC_CONFIG_HEADER([$1])
110dnl When config.status generates a header, we must update the stamp-h file.
111dnl This file resides in the same directory as the config header
112dnl that is generated.  We must strip everything past the first ":",
113dnl and everything past the last "/".
114AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
115ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
116<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
117<<am_indx=1
118for am_file in <<$1>>; do
119  case " <<$>>CONFIG_HEADERS " in
120  *" <<$>>am_file "*<<)>>
121    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
122    ;;
123  esac
124  am_indx=`expr "<<$>>am_indx" + 1`
125done<<>>dnl>>)
126changequote([,]))])
127
128
129# serial 1
130
131# @defmac AC_PROG_CC_STDC
132# @maindex PROG_CC_STDC
133# @ovindex CC
134# If the C compiler in not in ANSI C mode by default, try to add an option
135# to output variable @code{CC} to make it so.  This macro tries various
136# options that select ANSI C on some system or another.  It considers the
137# compiler to be in ANSI C mode if it handles function prototypes correctly.
138#
139# If you use this macro, you should check after calling it whether the C
140# compiler has been set to accept ANSI C; if not, the shell variable
141# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
142# code in ANSI C, you can make an un-ANSIfied copy of it by using the
143# program @code{ansi2knr}, which comes with Ghostscript.
144# @end defmac
145
146AC_DEFUN(AM_PROG_CC_STDC,
147[AC_REQUIRE([AC_PROG_CC])
148AC_BEFORE([$0], [AC_C_INLINE])
149AC_BEFORE([$0], [AC_C_CONST])
150dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
151dnl a magic option to avoid problems with ANSI preprocessor commands
152dnl like #elif.
153dnl FIXME: can't do this because then AC_AIX won't work due to a
154dnl circular dependency.
155dnl AC_BEFORE([$0], [AC_PROG_CPP])
156AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
157AC_CACHE_VAL(am_cv_prog_cc_stdc,
158[am_cv_prog_cc_stdc=no
159ac_save_CC="$CC"
160# Don't try gcc -ansi; that turns off useful extensions and
161# breaks some systems' header files.
162# AIX			-qlanglvl=ansi
163# Ultrix and OSF/1	-std1
164# HP-UX			-Aa -D_HPUX_SOURCE
165# SVR4			-Xc -D__EXTENSIONS__
166for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
167do
168  CC="$ac_save_CC $ac_arg"
169  AC_TRY_COMPILE(
170[#include <stdarg.h>
171#include <stdio.h>
172#include <sys/types.h>
173#include <sys/stat.h>
174/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
175struct buf { int x; };
176FILE * (*rcsopen) (struct buf *, struct stat *, int);
177static char *e (p, i)
178     char **p;
179     int i;
180{
181  return p[i];
182}
183static char *f (char * (*g) (char **, int), char **p, ...)
184{
185  char *s;
186  va_list v;
187  va_start (v,p);
188  s = g (p, va_arg (v,int));
189  va_end (v);
190  return s;
191}
192int test (int i, double x);
193struct s1 {int (*f) (int a);};
194struct s2 {int (*f) (double a);};
195int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
196int argc;
197char **argv;
198], [
199return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
200],
201[am_cv_prog_cc_stdc="$ac_arg"; break])
202done
203CC="$ac_save_CC"
204])
205if test -z "$am_cv_prog_cc_stdc"; then
206  AC_MSG_RESULT([none needed])
207else
208  AC_MSG_RESULT($am_cv_prog_cc_stdc)
209fi
210case "x$am_cv_prog_cc_stdc" in
211  x|xno) ;;
212  *) CC="$CC $am_cv_prog_cc_stdc" ;;
213esac
214])
215
216