1 dnl aclocal.m4 generated automatically by aclocal 1.2f
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 24 AM_PROG_LIBTOOL
116 AC_DEFUN(AM_PROG_LIBTOOL,
117 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
118 AC_REQUIRE([AM_ENABLE_STATIC])dnl
119 AC_REQUIRE([AC_CANONICAL_HOST])dnl
120 AC_REQUIRE([AC_PROG_RANLIB])dnl
121 AC_REQUIRE([AC_PROG_CC])dnl
122 AC_REQUIRE([AM_PROG_LD])dnl
123 AC_REQUIRE([AM_PROG_NM])dnl
124 AC_REQUIRE([AC_PROG_LN_S])dnl
126 # Always use our own libtool.
127 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
130 # Check for any special flags to pass to ltconfig.
132 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
133 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
134 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
135 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
136 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
138 # Some flags need to be propagated to the compiler or linker for good
142 # Find out which ABI we are using.
143 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
144 if AC_TRY_EVAL(ac_compile); then
145 case "`/usr/bin/file conftest.o`" in
161 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
162 CFLAGS="$CFLAGS -belf"
166 # Actually configure libtool. ac_aux_dir is where install-sh is found.
167 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
168 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
169 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
170 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
171 || AC_MSG_ERROR([libtool configure failed])
174 # AM_ENABLE_SHARED - implement the --enable-shared flag
175 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
176 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
178 AC_DEFUN(AM_ENABLE_SHARED,
179 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
180 AC_ARG_ENABLE(shared,
181 changequote(<<, >>)dnl
182 << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
184 [ --enable-shared=PKGS only build shared libraries if the current package
185 appears as an element in the PKGS list],
186 [p=${PACKAGE-default}
188 yes) enable_shared=yes ;;
189 no) enable_shared=no ;;
192 # Look at the argument we got. We use all the common list separators.
193 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
194 for pkg in $enableval; do
195 if test "X$pkg" = "X$p"; then
202 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
205 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
206 AC_DEFUN(AM_DISABLE_SHARED,
207 [AM_ENABLE_SHARED(no)])
209 # AM_DISABLE_STATIC - set the default static flag to --disable-static
210 AC_DEFUN(AM_DISABLE_STATIC,
211 [AM_ENABLE_STATIC(no)])
213 # AM_ENABLE_STATIC - implement the --enable-static flag
214 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
215 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
217 AC_DEFUN(AM_ENABLE_STATIC,
218 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
219 AC_ARG_ENABLE(static,
220 changequote(<<, >>)dnl
221 << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
223 [ --enable-static=PKGS only build shared libraries if the current package
224 appears as an element in the PKGS list],
225 [p=${PACKAGE-default}
227 yes) enable_static=yes ;;
228 no) enable_static=no ;;
231 # Look at the argument we got. We use all the common list separators.
232 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
233 for pkg in $enableval; do
234 if test "X$pkg" = "X$p"; then
241 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
245 # AM_PROG_LD - find the path to the GNU or non-GNU linker
248 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
249 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
250 AC_REQUIRE([AC_PROG_CC])
252 if test "$ac_cv_prog_gcc" = yes; then
253 # Check if gcc -print-prog-name=ld gives a path.
254 AC_MSG_CHECKING([for ld used by GCC])
255 ac_prog=`($CC -print-prog-name=ld) 2>&5`
257 # Accept absolute paths.
259 test -z "$LD" && LD="$ac_prog"
262 # If it fails, then pretend we aren't using GCC.
266 # If it is relative, then search for the first ld in PATH.
270 elif test "$with_gnu_ld" = yes; then
271 AC_MSG_CHECKING([for GNU ld])
273 AC_MSG_CHECKING([for non-GNU ld])
275 AC_CACHE_VAL(ac_cv_path_LD,
276 [if test -z "$LD"; then
277 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
278 for ac_dir in $PATH; do
279 test -z "$ac_dir" && ac_dir=.
280 if test -f "$ac_dir/$ac_prog"; then
281 ac_cv_path_LD="$ac_dir/$ac_prog"
282 # Check to see if the program is GNU ld. I'd rather use --version,
283 # but apparently some GNU ld's only accept -v.
284 # Break only if it was the GNU/non-GNU ld that we prefer.
285 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
286 test "$with_gnu_ld" != no && break
288 test "$with_gnu_ld" != yes && break
294 ac_cv_path_LD="$LD" # Let the user override the test with a path.
297 if test -n "$LD"; then
302 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
307 AC_DEFUN(AM_PROG_LD_GNU,
308 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
309 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
310 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
311 ac_cv_prog_gnu_ld=yes
317 # AM_PROG_NM - find the path to a BSD-compatible name lister
319 [AC_MSG_CHECKING([for BSD-compatible nm])
320 AC_CACHE_VAL(ac_cv_path_NM,
323 ac_cv_path_NM="$NM" # Let the user override the test with a path.
326 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
327 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
328 test -z "$ac_dir" && ac_dir=.
329 if test -f $ac_dir/nm; then
330 # Check to see if the nm accepts a BSD-compat flag.
331 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
332 # nm: unknown option "B" ignored
333 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
334 ac_cv_path_NM="$ac_dir/nm -B"
335 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
336 ac_cv_path_NM="$ac_dir/nm -p"
338 ac_cv_path_NM="$ac_dir/nm"
344 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
352 # Like AC_CONFIG_HEADER, but automatically create stamp file.
354 AC_DEFUN(AM_CONFIG_HEADER,
356 AC_CONFIG_HEADER([$1])
357 dnl When config.status generates a header, we must update the stamp-h file.
358 dnl This file resides in the same directory as the config header
359 dnl that is generated. We must strip everything past the first ":",
360 dnl and everything past the last "/".
361 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
362 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
363 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
365 for am_file in <<$1>>; do
366 case " <<$>>CONFIG_HEADERS " in
367 *" <<$>>am_file "*<<)>>
368 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
371 am_indx=`expr "<<$>>am_indx" + 1`