* config/tc-mips.c (append_insn): Correctly handle mips16 case
[binutils.git] / gas / acinclude.m4
blob0946e724f126405a9ace328cb5cdabc4fe5e45f6
1 sinclude(../bfd/warning.m4)
3 dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
4 AC_DEFUN([GAS_CHECK_DECL_NEEDED],[
5 AC_MSG_CHECKING(whether declaration is required for $1)
6 AC_CACHE_VAL(gas_cv_decl_needed_$1,
7 AC_TRY_LINK([$4],
9 typedef $3;
10 $2 x;
11 x = ($2) $1;
12 ], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
13 AC_MSG_RESULT($gas_cv_decl_needed_$1)
14 if test $gas_cv_decl_needed_$1 = yes; then
15  AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
16            [Define if $1 is not declared in system header files.])
18 ])dnl
19 dnl
20 dnl Some non-ANSI preprocessors botch requoting inside strings.  That's bad
21 dnl enough, but on some of those systems, the assert macro relies on requoting
22 dnl working properly!
23 dnl GAS_WORKING_ASSERT
24 AC_DEFUN([GAS_WORKING_ASSERT],
25 [AC_MSG_CHECKING([for working assert macro])
26 AC_CACHE_VAL(gas_cv_assert_ok,
27 AC_TRY_LINK([#include <assert.h>
28 #include <stdio.h>], [
29 /* check for requoting problems */
30 static int a, b, c, d;
31 static char *s;
32 assert (!strcmp(s, "foo bar baz quux"));
33 /* check for newline handling */
34 assert (a == b
35         || c == d);
36 ], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
37 AC_MSG_RESULT($gas_cv_assert_ok)
38 test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?])
39 ])dnl
40 dnl
41 dnl Since many Bourne shell implementations lack subroutines, use this
42 dnl hack to simplify the code in configure.in.
43 dnl GAS_UNIQ(listvar)
44 AC_DEFUN([GAS_UNIQ],
45 [_gas_uniq_list="[$]$1"
46 _gas_uniq_newlist=""
47 dnl Protect against empty input list.
48 for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
49   case [$]_gas_uniq_i in
50   _gas_uniq_dummy) ;;
51   *) case " [$]_gas_uniq_newlist " in
52        *" [$]_gas_uniq_i "*) ;;
53        *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
54      esac ;;
55   esac
56 done
57 $1=[$]_gas_uniq_newlist
58 ])dnl
60 sinclude(../libtool.m4)
61 dnl The lines below arrange for aclocal not to bring libtool.m4
62 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
63 dnl to add a definition of LIBTOOL to Makefile.in.
64 ifelse(yes,no,[
65 AC_DEFUN([AM_PROG_LIBTOOL],)
66 AC_DEFUN([AC_CHECK_LIBM],)
67 AC_SUBST(LIBTOOL)
70 sinclude(../gettext.m4)
71 ifelse(yes,no,[
72 AC_DEFUN([CY_WITH_NLS],)
73 AC_SUBST(INTLLIBS)