1 dnl aclocal.m4 generated automatically by aclocal 1.2
3 # Do all the work for Automake. This macro actually does too much --
4 # some checks are only needed if your package does certain things.
5 # But this isn't really a big deal.
10 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
12 AC_DEFUN(AM_INIT_AUTOMAKE,
13 [AC_REQUIRE([AM_PROG_INSTALL])
18 dnl test to see if srcdir already configured
19 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
20 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
23 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
24 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
27 dnl FIXME This is truly gross.
28 missing_dir=`cd $ac_aux_dir && pwd`
29 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
30 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
31 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
32 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
33 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
39 AC_DEFUN(AM_PROG_INSTALL,
40 [AC_REQUIRE([AC_PROG_INSTALL])
41 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
42 AC_SUBST(INSTALL_SCRIPT)dnl
46 # Check to make sure that the build environment is sane.
49 AC_DEFUN(AM_SANITY_CHECK,
50 [AC_MSG_CHECKING([whether build environment is sane])
53 echo timestamp > conftestfile
54 # Do `set' in a subshell so we don't clobber the current shell's
55 # arguments. Must try -L first in case configure is actually a
56 # symlink; some systems play weird games with the mod time of symlinks
57 # (eg FreeBSD returns the mod time of the symlink's containing
60 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
61 if test "$@" = "X"; then
63 set X `ls -t $srcdir/configure conftestfile`
65 test "[$]2" = conftestfile
71 AC_MSG_ERROR([newly created file is older than distributed files!
72 Check your system clock])
77 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
78 dnl The program must properly implement --version.
79 AC_DEFUN(AM_MISSING_PROG,
80 [AC_MSG_CHECKING(for working $2)
81 # Run test in a subshell; some versions of sh will print an error if
82 # an executable is not found, even if stderr is redirected.
83 # Redirect stdin to placate older versions of autoconf. Sigh.
84 if ($2 --version) < /dev/null > /dev/null 2>&1; then
89 AC_MSG_RESULT(missing)
93 # Like AC_CONFIG_HEADER, but automatically create stamp file.
95 AC_DEFUN(AM_CONFIG_HEADER,
97 AC_CONFIG_HEADER([$1])
98 dnl When config.status generates a header, we must update the stamp-h file.
99 dnl This file resides in the same directory as the config header
100 dnl that is generated. We must strip everything past the first ":",
101 dnl and everything past the last "/".
102 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
103 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
104 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
106 for am_file in <<$1>>; do
107 case " <<$>>CONFIG_HEADERS " in
108 *" <<$>>am_file "*<<)>>
109 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
112 am_indx=`expr "<<$>>am_indx" + 1`
117 # serial 17 AM_PROG_LIBTOOL
118 AC_DEFUN(AM_PROG_LIBTOOL,
119 [AC_REQUIRE([AC_CANONICAL_HOST])
120 AC_REQUIRE([AC_PROG_RANLIB])
121 AC_REQUIRE([AC_PROG_CC])
122 AC_REQUIRE([AM_PROG_LD])
123 AC_REQUIRE([AM_PROG_NM])
124 AC_REQUIRE([AC_PROG_LN_S])
126 # Always use our own libtool.
127 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
130 dnl Allow the --disable-shared flag to stop us from building shared libs.
131 AC_ARG_ENABLE(shared,
132 [ --enable-shared build shared libraries [default=yes]],
133 [if test "$enableval" = no; then
134 libtool_enable_shared=no
136 libtool_enable_shared=yes
138 test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared"
140 test "$enable_shared" = no && libtool_shared=" --disable-shared"
142 dnl Allow the --disable-static flag to stop us from building static libs.
143 AC_ARG_ENABLE(static,
144 [ --enable-static build static libraries [default=yes]],
145 [if test "$enableval" = no; then
146 libtool_enable_static=no
148 libtool_enable_static=yes
150 test -n "$libtool_enable_static" && enable_static="$libtool_enable_static"
152 test "$enable_static" = no && libtool_static=" --disable-static"
154 libtool_flags="$libtool_shared$libtool_static"
155 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
156 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
157 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
159 # Some flags need to be propagated to the compiler or linker for good
163 ac_save_CFLAGS="$CFLAGS"
165 for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do
168 test -n "$SGI_ABI" && flag_passed=yes
169 if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then
170 # Choose the ABI flag according to GCC's specs.
171 if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[ ]-32' >/dev/null; then
180 if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
187 CFLAGS="$ac_save_CFLAGS"
191 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
192 CFLAGS="$CFLAGS -belf"
196 # Actually configure libtool. ac_aux_dir is where install-sh is found.
197 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
198 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
199 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
200 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
201 || AC_MSG_ERROR([libtool configure failed])
204 # AM_PROG_LD - find the path to the GNU or non-GNU linker
207 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
208 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
209 AC_REQUIRE([AC_PROG_CC])
211 if test "$ac_cv_prog_gcc" = yes; then
212 # Check if gcc -print-prog-name=ld gives a path.
213 AC_MSG_CHECKING([for ld used by GCC])
214 ac_prog=`($CC -print-prog-name=ld) 2>&5`
216 # Accept absolute paths.
218 test -z "$LD" && LD="$ac_prog"
221 # If it fails, then pretend we aren't using GCC.
225 # If it is relative, then search for the first ld in PATH.
229 elif test "$with_gnu_ld" = yes; then
230 AC_MSG_CHECKING([for GNU ld])
232 AC_MSG_CHECKING([for non-GNU ld])
234 AC_CACHE_VAL(ac_cv_path_LD,
235 [if test -z "$LD"; then
236 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
237 for ac_dir in $PATH; do
238 test -z "$ac_dir" && ac_dir=.
239 if test -f "$ac_dir/$ac_prog"; then
240 ac_cv_path_LD="$ac_dir/$ac_prog"
241 # Check to see if the program is GNU ld. I'd rather use --version,
242 # but apparently some GNU ld's only accept -v.
243 # Break only if it was the GNU/non-GNU ld that we prefer.
244 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
245 test "$with_gnu_ld" != no && break
247 test "$with_gnu_ld" != yes && break
253 ac_cv_path_LD="$LD" # Let the user override the test with a path.
256 if test -n "$LD"; then
261 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
266 AC_DEFUN(AM_PROG_LD_GNU,
267 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
268 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
269 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
270 ac_cv_prog_gnu_ld=yes
276 # AM_PROG_NM - find the path to a BSD-compatible name lister
278 [AC_MSG_CHECKING([for BSD-compatible nm])
279 AC_CACHE_VAL(ac_cv_path_NM,
282 ac_cv_path_NM="$NM" # Let the user override the test with a path.
285 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
286 for ac_dir in /usr/ucb $PATH /bin; do
287 test -z "$ac_dir" && dir=.
288 if test -f $ac_dir/nm; then
289 # Check to see if the nm accepts a BSD-compat flag.
290 if ($ac_dir/nm -B /dev/null 2>&1; exit 0) | grep /dev/null >/dev/null; then
291 ac_cv_path_NM="$ac_dir/nm -B"
292 elif ($ac_dir/nm -p /dev/null 2>&1; exit 0) | grep /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 # Add --enable-maintainer-mode option to configure.
314 AC_DEFUN(AM_MAINTAINER_MODE,
315 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
316 dnl maintainer-mode is disabled by default
317 AC_ARG_ENABLE(maintainer-mode,
318 [ --enable-maintainer-mode enable make rules and dependencies not useful
319 (and sometimes confusing) to the casual installer],
320 USE_MAINTAINER_MODE=$enableval,
321 USE_MAINTAINER_MODE=no)
322 AC_MSG_RESULT($USE_MAINTAINER_MODE)
323 if test $USE_MAINTAINER_MODE = yes; then
335 # @defmac AC_PROG_CC_STDC
336 # @maindex PROG_CC_STDC
338 # If the C compiler in not in ANSI C mode by default, try to add an option
339 # to output variable @code{CC} to make it so. This macro tries various
340 # options that select ANSI C on some system or another. It considers the
341 # compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
342 # handles function prototypes correctly.
344 # If you use this macro, you should check after calling it whether the C
345 # compiler has been set to accept ANSI C; if not, the shell variable
346 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
347 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
348 # program @code{ansi2knr}, which comes with Ghostscript.
351 AC_DEFUN(AM_PROG_CC_STDC,
352 [AC_REQUIRE([AC_PROG_CC])
353 AC_BEFORE([$0], [AC_C_INLINE])
354 AC_BEFORE([$0], [AC_C_CONST])
355 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
356 AC_CACHE_VAL(am_cv_prog_cc_stdc,
357 [am_cv_prog_cc_stdc=no
359 # Don't try gcc -ansi; that turns off useful extensions and
360 # breaks some systems' header files.
362 # Ultrix and OSF/1 -std1
363 # HP-UX -Aa -D_HPUX_SOURCE
364 # SVR4 -Xc -D__EXTENSIONS__
365 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
367 CC="$ac_save_CC $ac_arg"
369 [#if !defined(__STDC__) || __STDC__ != 1
372 /* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
374 # include <sys/types.h>
375 # include <sys/stat.h>
378 int test (int i, double x);
379 struct s1 {int (*f) (int a);};
380 struct s2 {int (*f) (double a);};],
381 [am_cv_prog_cc_stdc="$ac_arg"; break])
385 if test -z "$am_cv_prog_cc_stdc"; then
386 AC_MSG_RESULT([none needed])
388 AC_MSG_RESULT($am_cv_prog_cc_stdc)
390 case "x$am_cv_prog_cc_stdc" in
392 *) CC="$CC $am_cv_prog_cc_stdc" ;;