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 dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
14 AC_DEFUN(GAS_CHECK_DECL_NEEDED,[
15 AC_MSG_CHECKING(whether declaration is required for $1)
16 AC_CACHE_VAL(gas_cv_decl_needed_$1,
22 ], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
23 AC_MSG_RESULT($gas_cv_decl_needed_$1)
24 test $gas_cv_decl_needed_$1 = no || {
25 ifelse(index($1,[$]),-1,
26 [AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]))],
27 [gas_decl_name_upcase=`echo $1 | tr '[a-z]' '[A-Z]'`
28 AC_DEFINE_UNQUOTED(NEED_DECLARATION_$gas_decl_name_upcase)])
32 dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
33 dnl enough, but on some of those systems, the assert macro relies on requoting
35 dnl GAS_WORKING_ASSERT
36 AC_DEFUN(GAS_WORKING_ASSERT,
37 [AC_MSG_CHECKING([for working assert macro])
38 AC_CACHE_VAL(gas_cv_assert_ok,
39 AC_TRY_LINK([#include <assert.h>
40 #include <stdio.h>], [
41 /* check for requoting problems */
42 static int a, b, c, d;
44 assert (!strcmp(s, "foo bar baz quux"));
45 /* check for newline handling */
48 ], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
49 AC_MSG_RESULT($gas_cv_assert_ok)
50 test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT)
53 dnl Since many Bourne shell implementations lack subroutines, use this
54 dnl hack to simplify the code in configure.in.
57 [_gas_uniq_list="[$]$1"
59 dnl Protect against empty input list.
60 for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
61 case [$]_gas_uniq_i in
63 *) case " [$]_gas_uniq_newlist " in
64 *" [$]_gas_uniq_i "*) ;;
65 *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
69 $1=[$]_gas_uniq_newlist
72 # Do all the work for Automake. This macro actually does too much --
73 # some checks are only needed if your package does certain things.
74 # But this isn't really a big deal.
79 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
81 AC_DEFUN(AM_INIT_AUTOMAKE,
82 [AC_REQUIRE([AM_PROG_INSTALL])
87 dnl test to see if srcdir already configured
88 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
89 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
92 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
93 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
94 AC_REQUIRE([AM_SANITY_CHECK])
95 AC_REQUIRE([AC_ARG_PROGRAM])
96 dnl FIXME This is truly gross.
97 missing_dir=`cd $ac_aux_dir && pwd`
98 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
99 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
100 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
101 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
102 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
103 AC_REQUIRE([AC_PROG_MAKE_SET])])
108 AC_DEFUN(AM_PROG_INSTALL,
109 [AC_REQUIRE([AC_PROG_INSTALL])
110 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
111 AC_SUBST(INSTALL_SCRIPT)dnl
115 # Check to make sure that the build environment is sane.
118 AC_DEFUN(AM_SANITY_CHECK,
119 [AC_MSG_CHECKING([whether build environment is sane])
122 echo timestamp > conftestfile
123 # Do `set' in a subshell so we don't clobber the current shell's
124 # arguments. Must try -L first in case configure is actually a
125 # symlink; some systems play weird games with the mod time of symlinks
126 # (eg FreeBSD returns the mod time of the symlink's containing
129 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
130 if test "[$]*" = "X"; then
132 set X `ls -t $srcdir/configure conftestfile`
134 if test "[$]*" != "X $srcdir/configure conftestfile" \
135 && test "[$]*" != "X conftestfile $srcdir/configure"; then
137 # If neither matched, then we have a broken ls. This can happen
138 # if, for instance, CONFIG_SHELL is bash and it inherits a
139 # broken ls alias from the environment. This has actually
140 # happened. Such a system could not be considered "sane".
141 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
142 alias in your environment])
145 test "[$]2" = conftestfile
151 AC_MSG_ERROR([newly created file is older than distributed files!
152 Check your system clock])
157 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
158 dnl The program must properly implement --version.
159 AC_DEFUN(AM_MISSING_PROG,
160 [AC_MSG_CHECKING(for working $2)
161 # Run test in a subshell; some versions of sh will print an error if
162 # an executable is not found, even if stderr is redirected.
163 # Redirect stdin to placate older versions of autoconf. Sigh.
164 if ($2 --version) < /dev/null > /dev/null 2>&1; then
169 AC_MSG_RESULT(missing)
174 # serial 24 AM_PROG_LIBTOOL
175 AC_DEFUN(AM_PROG_LIBTOOL,
176 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
177 AC_REQUIRE([AM_ENABLE_STATIC])dnl
178 AC_REQUIRE([AC_CANONICAL_HOST])dnl
179 AC_REQUIRE([AC_PROG_RANLIB])dnl
180 AC_REQUIRE([AC_PROG_CC])dnl
181 AC_REQUIRE([AM_PROG_LD])dnl
182 AC_REQUIRE([AM_PROG_NM])dnl
183 AC_REQUIRE([AC_PROG_LN_S])dnl
185 # Always use our own libtool.
186 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
189 # Check for any special flags to pass to ltconfig.
191 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
192 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
193 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
194 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
195 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
197 # Some flags need to be propagated to the compiler or linker for good
201 # Find out which ABI we are using.
202 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
203 if AC_TRY_EVAL(ac_compile); then
204 case "`/usr/bin/file conftest.o`" in
220 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
221 CFLAGS="$CFLAGS -belf"
225 AM_SYS_LIBTOOL_CYGWIN32
230 # Actually configure libtool. ac_aux_dir is where install-sh is found.
231 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
232 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
233 DLLTOOL="$DLLTOOL" AS="$AS" \
234 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
235 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
236 || AC_MSG_ERROR([libtool configure failed])
239 # AM_ENABLE_SHARED - implement the --enable-shared flag
240 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
241 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
243 AC_DEFUN(AM_ENABLE_SHARED,
244 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
245 AC_ARG_ENABLE(shared,
246 changequote(<<, >>)dnl
247 << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
249 [ --enable-shared=PKGS only build shared libraries if the current package
250 appears as an element in the PKGS list],
251 [p=${PACKAGE-default}
253 yes) enable_shared=yes ;;
254 no) enable_shared=no ;;
257 # Look at the argument we got. We use all the common list separators.
258 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
259 for pkg in $enableval; do
260 if test "X$pkg" = "X$p"; then
267 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
270 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
271 AC_DEFUN(AM_DISABLE_SHARED,
272 [AM_ENABLE_SHARED(no)])
274 # AM_DISABLE_STATIC - set the default static flag to --disable-static
275 AC_DEFUN(AM_DISABLE_STATIC,
276 [AM_ENABLE_STATIC(no)])
278 # AM_ENABLE_STATIC - implement the --enable-static flag
279 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
280 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
282 AC_DEFUN(AM_ENABLE_STATIC,
283 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
284 AC_ARG_ENABLE(static,
285 changequote(<<, >>)dnl
286 << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
288 [ --enable-static=PKGS only build shared libraries if the current package
289 appears as an element in the PKGS list],
290 [p=${PACKAGE-default}
292 yes) enable_static=yes ;;
293 no) enable_static=no ;;
296 # Look at the argument we got. We use all the common list separators.
297 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
298 for pkg in $enableval; do
299 if test "X$pkg" = "X$p"; then
306 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
310 # AM_PROG_LD - find the path to the GNU or non-GNU linker
313 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
314 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
315 AC_REQUIRE([AC_PROG_CC])
317 if test "$ac_cv_prog_gcc" = yes; then
318 # Check if gcc -print-prog-name=ld gives a path.
319 AC_MSG_CHECKING([for ld used by GCC])
320 ac_prog=`($CC -print-prog-name=ld) 2>&5`
322 # Accept absolute paths.
326 test -z "$LD" && LD="$ac_prog"
329 # If it fails, then pretend we aren't using GCC.
333 # If it is relative, then search for the first ld in PATH.
337 elif test "$with_gnu_ld" = yes; then
338 AC_MSG_CHECKING([for GNU ld])
340 AC_MSG_CHECKING([for non-GNU ld])
342 AC_CACHE_VAL(ac_cv_path_LD,
343 [if test -z "$LD"; then
344 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
345 for ac_dir in $PATH; do
346 test -z "$ac_dir" && ac_dir=.
347 if test -f "$ac_dir/$ac_prog"; then
348 ac_cv_path_LD="$ac_dir/$ac_prog"
349 # Check to see if the program is GNU ld. I'd rather use --version,
350 # but apparently some GNU ld's only accept -v.
351 # Break only if it was the GNU/non-GNU ld that we prefer.
352 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
353 test "$with_gnu_ld" != no && break
355 test "$with_gnu_ld" != yes && break
361 ac_cv_path_LD="$LD" # Let the user override the test with a path.
364 if test -n "$LD"; then
369 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
374 AC_DEFUN(AM_PROG_LD_GNU,
375 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
376 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
377 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
378 ac_cv_prog_gnu_ld=yes
384 # AM_PROG_NM - find the path to a BSD-compatible name lister
386 [AC_MSG_CHECKING([for BSD-compatible nm])
387 AC_CACHE_VAL(ac_cv_path_NM,
388 [if test -z "$NM"; then
389 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
390 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
391 test -z "$ac_dir" && ac_dir=.
392 if test -f $ac_dir/nm; then
393 # Check to see if the nm accepts a BSD-compat flag.
394 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
395 # nm: unknown option "B" ignored
396 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
397 ac_cv_path_NM="$ac_dir/nm -B"
398 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
399 ac_cv_path_NM="$ac_dir/nm -p"
401 ac_cv_path_NM="$ac_dir/nm"
407 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
409 ac_cv_path_NM="$NM" # Let the user override the test with a path.
416 # AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
417 AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32,
418 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
419 AC_CHECK_TOOL(AS, as, false)
422 # Like AC_CONFIG_HEADER, but automatically create stamp file.
424 AC_DEFUN(AM_CONFIG_HEADER,
426 AC_CONFIG_HEADER([$1])
427 dnl When config.status generates a header, we must update the stamp-h file.
428 dnl This file resides in the same directory as the config header
429 dnl that is generated. We must strip everything past the first ":",
430 dnl and everything past the last "/".
431 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
432 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
433 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
435 for am_file in <<$1>>; do
436 case " <<$>>CONFIG_HEADERS " in
437 *" <<$>>am_file "*<<)>>
438 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
441 am_indx=`expr "<<$>>am_indx" + 1`
447 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
448 AC_DEFUN(AM_PROG_LEX,
449 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
450 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
454 # Add --enable-maintainer-mode option to configure.
459 AC_DEFUN(AM_MAINTAINER_MODE,
460 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
461 dnl maintainer-mode is disabled by default
462 AC_ARG_ENABLE(maintainer-mode,
463 [ --enable-maintainer-mode enable make rules and dependencies not useful
464 (and sometimes confusing) to the casual installer],
465 USE_MAINTAINER_MODE=$enableval,
466 USE_MAINTAINER_MODE=no)
467 AC_MSG_RESULT($USE_MAINTAINER_MODE)
468 if test $USE_MAINTAINER_MODE = yes; then
477 # Check to see if we're running under Cygwin32, without using
478 # AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
479 # Otherwise set it to "no".
482 AC_DEFUN(AM_CYGWIN32,
483 [AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
484 [AC_TRY_COMPILE(,[return __CYGWIN32__;],
485 am_cv_cygwin32=yes, am_cv_cygwin32=no)
488 test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
490 # Check to see if we're running under Win32, without using
491 # AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
492 # Otherwise set it to "".
495 dnl This knows we add .exe if we're building in the Cygwin32
496 dnl environment. But if we're not, then it compiles a test program
497 dnl to see if there is a suffix for executables.
499 [AC_REQUIRE([AM_CYGWIN32])
500 AC_REQUIRE([AM_MINGW32])
501 AC_MSG_CHECKING([for executable suffix])
502 AC_CACHE_VAL(am_cv_exeext,
503 [if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
506 cat > am_c_test.c << 'EOF'
508 /* Nothing needed here */
511 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
513 for file in am_c_test.*; do
517 *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
521 test x"${am_cv_exeext}" = x && am_cv_exeext=no
524 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
525 AC_MSG_RESULT(${am_cv_exeext})
528 # Check to see if we're running under Mingw, without using
529 # AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
530 # Otherwise set it to "no".
534 [AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
535 [AC_TRY_COMPILE(,[return __MINGW32__;],
536 am_cv_mingw32=yes, am_cv_mingw32=no)
539 test "$am_cv_mingw32" = yes && MINGW32=yes])