1 dnl aclocal.m4 generated automatically by aclocal 1.2e
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 # Actually configure libtool. ac_aux_dir is where install-sh is found.
226 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
227 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
228 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
229 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
230 || AC_MSG_ERROR([libtool configure failed])
233 # AM_ENABLE_SHARED - implement the --enable-shared flag
234 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
235 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
237 AC_DEFUN(AM_ENABLE_SHARED,
238 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
239 AC_ARG_ENABLE(shared,
240 changequote(<<, >>)dnl
241 << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
243 [ --enable-shared=PKGS only build shared libraries if the current package
244 appears as an element in the PKGS list],
245 [p=${PACKAGE-default}
247 yes) enable_shared=yes ;;
248 no) enable_shared=no ;;
251 # Look at the argument we got. We use all the common list separators.
252 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
253 for pkg in $enableval; do
254 if test "X$pkg" = "X$p"; then
261 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
264 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
265 AC_DEFUN(AM_DISABLE_SHARED,
266 [AM_ENABLE_SHARED(no)])
268 # AM_DISABLE_STATIC - set the default static flag to --disable-static
269 AC_DEFUN(AM_DISABLE_STATIC,
270 [AM_ENABLE_STATIC(no)])
272 # AM_ENABLE_STATIC - implement the --enable-static flag
273 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
274 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
276 AC_DEFUN(AM_ENABLE_STATIC,
277 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
278 AC_ARG_ENABLE(static,
279 changequote(<<, >>)dnl
280 << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
282 [ --enable-static=PKGS only build shared libraries if the current package
283 appears as an element in the PKGS list],
284 [p=${PACKAGE-default}
286 yes) enable_static=yes ;;
287 no) enable_static=no ;;
290 # Look at the argument we got. We use all the common list separators.
291 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
292 for pkg in $enableval; do
293 if test "X$pkg" = "X$p"; then
300 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
304 # AM_PROG_LD - find the path to the GNU or non-GNU linker
307 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
308 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
309 AC_REQUIRE([AC_PROG_CC])
311 if test "$ac_cv_prog_gcc" = yes; then
312 # Check if gcc -print-prog-name=ld gives a path.
313 AC_MSG_CHECKING([for ld used by GCC])
314 ac_prog=`($CC -print-prog-name=ld) 2>&5`
316 # Accept absolute paths.
320 test -z "$LD" && LD="$ac_prog"
323 # If it fails, then pretend we aren't using GCC.
327 # If it is relative, then search for the first ld in PATH.
331 elif test "$with_gnu_ld" = yes; then
332 AC_MSG_CHECKING([for GNU ld])
334 AC_MSG_CHECKING([for non-GNU ld])
336 AC_CACHE_VAL(ac_cv_path_LD,
337 [if test -z "$LD"; then
338 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
339 for ac_dir in $PATH; do
340 test -z "$ac_dir" && ac_dir=.
341 if test -f "$ac_dir/$ac_prog"; then
342 ac_cv_path_LD="$ac_dir/$ac_prog"
343 # Check to see if the program is GNU ld. I'd rather use --version,
344 # but apparently some GNU ld's only accept -v.
345 # Break only if it was the GNU/non-GNU ld that we prefer.
346 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
347 test "$with_gnu_ld" != no && break
349 test "$with_gnu_ld" != yes && break
355 ac_cv_path_LD="$LD" # Let the user override the test with a path.
358 if test -n "$LD"; then
363 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
368 AC_DEFUN(AM_PROG_LD_GNU,
369 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
370 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
371 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
372 ac_cv_prog_gnu_ld=yes
378 # AM_PROG_NM - find the path to a BSD-compatible name lister
380 [AC_MSG_CHECKING([for BSD-compatible nm])
381 AC_CACHE_VAL(ac_cv_path_NM,
386 ac_cv_path_NM="$NM" # Let the user override the test with a path.
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
415 # Like AC_CONFIG_HEADER, but automatically create stamp file.
417 AC_DEFUN(AM_CONFIG_HEADER,
419 AC_CONFIG_HEADER([$1])
420 dnl When config.status generates a header, we must update the stamp-h file.
421 dnl This file resides in the same directory as the config header
422 dnl that is generated. We must strip everything past the first ":",
423 dnl and everything past the last "/".
424 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
425 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
426 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
428 for am_file in <<$1>>; do
429 case " <<$>>CONFIG_HEADERS " in
430 *" <<$>>am_file "*<<)>>
431 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
434 am_indx=`expr "<<$>>am_indx" + 1`
438 # Add --enable-maintainer-mode option to configure.
443 AC_DEFUN(AM_MAINTAINER_MODE,
444 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
445 dnl maintainer-mode is disabled by default
446 AC_ARG_ENABLE(maintainer-mode,
447 [ --enable-maintainer-mode enable make rules and dependencies not useful
448 (and sometimes confusing) to the casual installer],
449 USE_MAINTAINER_MODE=$enableval,
450 USE_MAINTAINER_MODE=no)
451 AC_MSG_RESULT($USE_MAINTAINER_MODE)
452 if test $USE_MAINTAINER_MODE = yes; then
461 # Check to see if we're running under Cygwin32, without using
462 # AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
463 # Otherwise set it to "no".
466 AC_DEFUN(AM_CYGWIN32,
467 [AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
468 [AC_TRY_COMPILE(,[return __CYGWIN32__;],
469 am_cv_cygwin32=yes, am_cv_cygwin32=no)
472 test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
474 # Check to see if we're running under Win32, without using
475 # AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
476 # Otherwise set it to "".
479 dnl This knows we add .exe if we're building in the Cygwin32
480 dnl environment. But if we're not, then it compiles a test program
481 dnl to see if there is a suffix for executables.
483 [AC_REQUIRE([AM_CYGWIN32])
484 AC_REQUIRE([AM_MINGW32])
485 AC_MSG_CHECKING([for executable suffix])
486 AC_CACHE_VAL(am_cv_exeext,
487 [if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
490 cat > am_c_test.c << 'EOF'
492 /* Nothing needed here */
495 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
496 am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
498 test x"${am_cv_exeext}" = x && am_cv_exeext=no
501 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
502 AC_MSG_RESULT(${am_cv_exeext})
505 # Check to see if we're running under Mingw, without using
506 # AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
507 # Otherwise set it to "no".
511 [AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
512 [AC_TRY_COMPILE(,[return __MINGW32__;],
513 am_cv_mingw32=yes, am_cv_mingw32=no)
516 test "$am_cv_mingw32" = yes && MINGW32=yes])