1 dnl aclocal.m4 generated automatically by aclocal 1.3
3 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4 dnl This Makefile.in is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
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.
20 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
22 AC_DEFUN(AM_INIT_AUTOMAKE,
23 [AC_REQUIRE([AM_PROG_INSTALL])
28 dnl test to see if srcdir already configured
29 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
30 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
33 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
34 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
35 AC_REQUIRE([AM_SANITY_CHECK])
36 AC_REQUIRE([AC_ARG_PROGRAM])
37 dnl FIXME This is truly gross.
38 missing_dir=`cd $ac_aux_dir && pwd`
39 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
40 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
41 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
42 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
43 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
44 AC_REQUIRE([AC_PROG_MAKE_SET])])
49 AC_DEFUN(AM_PROG_INSTALL,
50 [AC_REQUIRE([AC_PROG_INSTALL])
51 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
52 AC_SUBST(INSTALL_SCRIPT)dnl
56 # Check to make sure that the build environment is sane.
59 AC_DEFUN(AM_SANITY_CHECK,
60 [AC_MSG_CHECKING([whether build environment is sane])
63 echo timestamp > conftestfile
64 # Do `set' in a subshell so we don't clobber the current shell's
65 # arguments. Must try -L first in case configure is actually a
66 # symlink; some systems play weird games with the mod time of symlinks
67 # (eg FreeBSD returns the mod time of the symlink's containing
70 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
71 if test "[$]*" = "X"; then
73 set X `ls -t $srcdir/configure conftestfile`
75 if test "[$]*" != "X $srcdir/configure conftestfile" \
76 && test "[$]*" != "X conftestfile $srcdir/configure"; then
78 # If neither matched, then we have a broken ls. This can happen
79 # if, for instance, CONFIG_SHELL is bash and it inherits a
80 # broken ls alias from the environment. This has actually
81 # happened. Such a system could not be considered "sane".
82 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
83 alias in your environment])
86 test "[$]2" = conftestfile
92 AC_MSG_ERROR([newly created file is older than distributed files!
93 Check your system clock])
98 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
99 dnl The program must properly implement --version.
100 AC_DEFUN(AM_MISSING_PROG,
101 [AC_MSG_CHECKING(for working $2)
102 # Run test in a subshell; some versions of sh will print an error if
103 # an executable is not found, even if stderr is redirected.
104 # Redirect stdin to placate older versions of autoconf. Sigh.
105 if ($2 --version) < /dev/null > /dev/null 2>&1; then
110 AC_MSG_RESULT(missing)
115 # serial 18 AM_PROG_LIBTOOL
116 AC_DEFUN(AM_PROG_LIBTOOL,
117 [AC_REQUIRE([AC_CANONICAL_HOST])
118 AC_REQUIRE([AC_PROG_RANLIB])
119 AC_REQUIRE([AC_PROG_CC])
120 AC_REQUIRE([AM_PROG_LD])
121 AC_REQUIRE([AM_PROG_NM])
122 AC_REQUIRE([AC_PROG_LN_S])
124 # Always use our own libtool.
125 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
128 dnl Allow the --disable-shared flag to stop us from building shared libs.
129 AC_ARG_ENABLE(shared,
130 [ --enable-shared build shared libraries [default=yes]],
131 [if test "$enableval" = no; then
132 libtool_enable_shared=no
134 libtool_enable_shared=yes
136 test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared"
138 test "$enable_shared" = no && libtool_shared=" --disable-shared"
140 dnl Allow the --disable-static flag to stop us from building static libs.
141 AC_ARG_ENABLE(static,
142 [ --enable-static build static libraries [default=yes]],
143 [if test "$enableval" = no; then
144 libtool_enable_static=no
146 libtool_enable_static=yes
148 test -n "$libtool_enable_static" && enable_static="$libtool_enable_static"
150 test "$enable_static" = no && libtool_static=" --disable-static"
152 libtool_flags="$libtool_shared$libtool_static"
153 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
154 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
155 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
157 # Some flags need to be propagated to the compiler or linker for good
161 ac_save_CFLAGS="$CFLAGS"
163 for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do
166 test -n "$SGI_ABI" && flag_passed=yes
167 if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then
168 # Choose the ABI flag according to GCC's specs.
169 if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[ ]-32' >/dev/null; then
178 if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
185 CFLAGS="$ac_save_CFLAGS"
189 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
190 CFLAGS="$CFLAGS -belf"
194 # Actually configure libtool. ac_aux_dir is where install-sh is found.
195 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
196 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
197 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
198 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
199 || AC_MSG_ERROR([libtool configure failed])
202 # AM_PROG_LD - find the path to the GNU or non-GNU linker
205 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
206 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
207 AC_REQUIRE([AC_PROG_CC])
209 if test "$ac_cv_prog_gcc" = yes; then
210 # Check if gcc -print-prog-name=ld gives a path.
211 AC_MSG_CHECKING([for ld used by GCC])
212 ac_prog=`($CC -print-prog-name=ld) 2>&5`
214 # Accept absolute paths.
216 test -z "$LD" && LD="$ac_prog"
219 # If it fails, then pretend we aren't using GCC.
223 # If it is relative, then search for the first ld in PATH.
227 elif test "$with_gnu_ld" = yes; then
228 AC_MSG_CHECKING([for GNU ld])
230 AC_MSG_CHECKING([for non-GNU ld])
232 AC_CACHE_VAL(ac_cv_path_LD,
233 [if test -z "$LD"; then
234 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
235 for ac_dir in $PATH; do
236 test -z "$ac_dir" && ac_dir=.
237 if test -f "$ac_dir/$ac_prog"; then
238 ac_cv_path_LD="$ac_dir/$ac_prog"
239 # Check to see if the program is GNU ld. I'd rather use --version,
240 # but apparently some GNU ld's only accept -v.
241 # Break only if it was the GNU/non-GNU ld that we prefer.
242 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
243 test "$with_gnu_ld" != no && break
245 test "$with_gnu_ld" != yes && break
251 ac_cv_path_LD="$LD" # Let the user override the test with a path.
254 if test -n "$LD"; then
259 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
264 AC_DEFUN(AM_PROG_LD_GNU,
265 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
266 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
267 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
268 ac_cv_prog_gnu_ld=yes
274 # AM_PROG_NM - find the path to a BSD-compatible name lister
276 [AC_MSG_CHECKING([for BSD-compatible nm])
277 AC_CACHE_VAL(ac_cv_path_NM,
280 ac_cv_path_NM="$NM" # Let the user override the test with a path.
283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
284 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
285 test -z "$ac_dir" && dir=.
286 if test -f $ac_dir/nm; then
287 # Check to see if the nm accepts a BSD-compat flag.
288 # Adding the `sed 1!d' prevents false positives on HP-UX, which says:
289 # nm: unknown option "B" ignored
290 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
291 ac_cv_path_NM="$ac_dir/nm -B"
292 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
293 ac_cv_path_NM="$ac_dir/nm -p"
295 ac_cv_path_NM="$ac_dir/nm"
301 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
309 # Like AC_CONFIG_HEADER, but automatically create stamp file.
311 AC_DEFUN(AM_CONFIG_HEADER,
313 AC_CONFIG_HEADER([$1])
314 dnl When config.status generates a header, we must update the stamp-h file.
315 dnl This file resides in the same directory as the config header
316 dnl that is generated. We must strip everything past the first ":",
317 dnl and everything past the last "/".
318 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
319 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
320 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
322 for am_file in <<$1>>; do
323 case " <<$>>CONFIG_HEADERS " in
324 *" <<$>>am_file "*<<)>>
325 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
328 am_indx=`expr "<<$>>am_indx" + 1`