From fb589130a864058ea2202886f752945234fabba2 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 31 Aug 1994 21:50:38 +0000 Subject: * Makefile.in (prefix, exec_prefix): Use @-subtitutions. * aclocal.m4 (AC_OUTPUT_LINKS): Deleted redefinition, since autoconf 1.109 has this fixed. * configure.in: Don't change quote characters around AC_MSG_ERROR invocation. Don't use AC_HEADER_STDC, since it requires running a program. Cache NEED_*_DECLARATION values. * configure, conf.in: Regenerated with a modified autoconf 1.109. --- gas/configure.in | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'gas/configure.in') diff --git a/gas/configure.in b/gas/configure.in index 57e809e..914e8d1 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -196,18 +196,14 @@ dnl dnl Make sure the desired support files exist. dnl -changequote(<<<,>>>)dnl - -if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then +if test ! -r ${srcdir}/config/tc-${cpu_type}.c; then AC_MSG_ERROR(GAS does not support target CPU ${cpu_type}) fi -if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then +if test ! -r ${srcdir}/config/obj-${obj_format}.c; then AC_MSG_ERROR(GAS does not have support for object file format ${obj_format}) fi -changequote([,])dnl - # and target makefile frag target_frag=${srcdir}/config/${gas_target}.mt @@ -295,7 +291,6 @@ esac AC_PROG_CC AC_PROG_INSTALL -AC_HEADER_STDC AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h) dnl ansidecl.h will deal with const @@ -306,7 +301,8 @@ AC_C_INLINE # Some non-ANSI preprocessors botch requoting inside strings. That's bad # enough, but on some of those systems, the assert macro relies on requoting # working properly! -AC_CHECKING([for working assert macro]) +AC_MSG_CHECKING([for working assert macro]) +AC_CACHE_VAL(gas_cv_assert_ok, AC_TRY_LINK([#include #include ], [ /* check for requoting problems */ @@ -316,12 +312,15 @@ assert (!strcmp(s, "foo bar baz quux")); /* check for newline handling */ assert (a == b || c == d); -], , AC_DEFINE(BROKEN_ASSERT)) +], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl +AC_MSG_RESULT($gas_cv_assert_ok) +test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT) # On some systems, the system header files may not declare malloc, realloc, # and free. There are places where gas needs these functions to have been # declared -- such as when taking their addresses. -AC_CHECKING([whether malloc declaration is required]) +AC_MSG_CHECKING([whether a malloc declaration is required]) +AC_CACHE_VAL(gas_cv_malloc_decl_needed, AC_TRY_LINK([ #ifdef HAVE_MEMORY_H #include @@ -338,8 +337,12 @@ AC_TRY_LINK([ ], [ char *(*f) (); f = (char *(*)()) malloc; -], , AC_DEFINE(NEED_MALLOC_DECLARATION)) -AC_CHECKING([free declaration required]) +], gas_cv_malloc_decl_needed=no, gas_cv_malloc_decl_needed=yes))dnl +AC_MSG_RESULT($gas_cv_malloc_decl_needed) +test $gas_cv_malloc_decl_needed = no || AC_DEFINE(NEED_MALLOC_DECLARATION) + +AC_MSG_CHECKING([whether a free declaration is required]) +AC_CACHE_VAL(gas_cv_free_decl_needed, AC_TRY_LINK([ #ifdef HAVE_MEMORY_H #include @@ -356,11 +359,14 @@ AC_TRY_LINK([ ], [ int (*f) (); f = (int (*)()) free; -], , AC_DEFINE(NEED_FREE_DECLARATION)) +], gas_cv_free_decl_needed=no, gas_cv_free_decl_needed=yes)) +AC_MSG_RESULT($gas_cv_free_decl_needed) +test $gas_cv_free_decl_needed = no || AC_DEFINE(NEED_FREE_DECLARATION) # Does errno.h declare errno, or do we have to add a separate declaration # for it? -AC_CHECKING([errno declaration required]) +AC_MSG_CHECKING([whether an errno declaration is required]) +AC_CACHE_VAL(gas_cv_errno_decl_needed, AC_TRY_LINK([ #ifdef HAVE_ERRNO_H #include @@ -368,7 +374,9 @@ AC_TRY_LINK([ ], [ int x; x = errno; -], , AC_DEFINE(NEED_ERRNO_DECLARATION)) +], gas_cv_errno_decl_needed=no, gas_cv_errno_decl_needed=yes)) +AC_MSG_RESULT($gas_cv_errno_decl_needed) +test $gas_cv_errno_decl_needed = no || AC_DEFINE(NEED_ERRNO_DECLARATION) AC_CONFIG_SUBDIRS(testsuite) -- cgit v1.1