OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [gas/] [acinclude.m4] - Diff between revs 156 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 156 Rev 816
dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
AC_DEFUN([GAS_CHECK_DECL_NEEDED],[
AC_DEFUN([GAS_CHECK_DECL_NEEDED],[
AC_MSG_CHECKING(whether declaration is required for $1)
AC_MSG_CHECKING(whether declaration is required for $1)
AC_CACHE_VAL(gas_cv_decl_needed_$1,
AC_CACHE_VAL(gas_cv_decl_needed_$1,
AC_TRY_LINK([$4],
AC_TRY_LINK([$4],
[
[
typedef $3;
typedef $3;
$2 x;
$2 x;
x = ($2) $1;
x = ($2) $1;
], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
AC_MSG_RESULT($gas_cv_decl_needed_$1)
AC_MSG_RESULT($gas_cv_decl_needed_$1)
if test $gas_cv_decl_needed_$1 = yes; then
if test $gas_cv_decl_needed_$1 = yes; then
 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
           [Define if $1 is not declared in system header files.])
           [Define if $1 is not declared in system header files.])
fi
fi
])dnl
])dnl
dnl
dnl
dnl Some non-ANSI preprocessors botch requoting inside strings.  That's bad
dnl Some non-ANSI preprocessors botch requoting inside strings.  That's bad
dnl enough, but on some of those systems, the assert macro relies on requoting
dnl enough, but on some of those systems, the assert macro relies on requoting
dnl working properly!
dnl working properly!
dnl GAS_WORKING_ASSERT
dnl GAS_WORKING_ASSERT
AC_DEFUN([GAS_WORKING_ASSERT],
AC_DEFUN([GAS_WORKING_ASSERT],
[AC_MSG_CHECKING([for working assert macro])
[AC_MSG_CHECKING([for working assert macro])
AC_CACHE_VAL(gas_cv_assert_ok,
AC_CACHE_VAL(gas_cv_assert_ok,
AC_TRY_LINK([#include <assert.h>
AC_TRY_LINK([#include <assert.h>
#include <stdio.h>], [
#include <stdio.h>], [
/* check for requoting problems */
/* check for requoting problems */
static int a, b, c, d;
static int a, b, c, d;
static char *s;
static char *s;
assert (!strcmp(s, "foo bar baz quux"));
assert (!strcmp(s, "foo bar baz quux"));
/* check for newline handling */
/* check for newline handling */
assert (a == b
assert (a == b
        || c == d);
        || c == d);
], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
AC_MSG_RESULT($gas_cv_assert_ok)
AC_MSG_RESULT($gas_cv_assert_ok)
test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?])
test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?])
])dnl
])dnl
dnl
dnl
dnl Since many Bourne shell implementations lack subroutines, use this
dnl Since many Bourne shell implementations lack subroutines, use this
dnl hack to simplify the code in configure.in.
dnl hack to simplify the code in configure.in.
dnl GAS_UNIQ(listvar)
dnl GAS_UNIQ(listvar)
AC_DEFUN([GAS_UNIQ],
AC_DEFUN([GAS_UNIQ],
[_gas_uniq_list="[$]$1"
[_gas_uniq_list="[$]$1"
_gas_uniq_newlist=""
_gas_uniq_newlist=""
dnl Protect against empty input list.
dnl Protect against empty input list.
for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
  case [$]_gas_uniq_i in
  case [$]_gas_uniq_i in
  _gas_uniq_dummy) ;;
  _gas_uniq_dummy) ;;
  *) case " [$]_gas_uniq_newlist " in
  *) case " [$]_gas_uniq_newlist " in
       *" [$]_gas_uniq_i "*) ;;
       *" [$]_gas_uniq_i "*) ;;
       *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
       *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
     esac ;;
     esac ;;
  esac
  esac
done
done
$1=[$]_gas_uniq_newlist
$1=[$]_gas_uniq_newlist
])dnl
])dnl
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.