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