gas/
[deliverable/binutils-gdb.git] / gas / acinclude.m4
CommitLineData
9e9b66a9
AM
1sinclude(../bfd/warning.m4)
2
252b5132 3dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
f8b73030 4AC_DEFUN([GAS_CHECK_DECL_NEEDED],[
252b5132
RH
5AC_MSG_CHECKING(whether declaration is required for $1)
6AC_CACHE_VAL(gas_cv_decl_needed_$1,
7AC_TRY_LINK([$4],
8[
9typedef $3;
10$2 x;
11x = ($2) $1;
12], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
13AC_MSG_RESULT($gas_cv_decl_needed_$1)
14if 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.])
17fi
18])dnl
19dnl
20dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
21dnl enough, but on some of those systems, the assert macro relies on requoting
22dnl working properly!
23dnl GAS_WORKING_ASSERT
f8b73030 24AC_DEFUN([GAS_WORKING_ASSERT],
252b5132
RH
25[AC_MSG_CHECKING([for working assert macro])
26AC_CACHE_VAL(gas_cv_assert_ok,
27AC_TRY_LINK([#include <assert.h>
28#include <stdio.h>], [
29/* check for requoting problems */
30static int a, b, c, d;
31static char *s;
32assert (!strcmp(s, "foo bar baz quux"));
33/* check for newline handling */
34assert (a == b
35 || c == d);
36], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
37AC_MSG_RESULT($gas_cv_assert_ok)
38test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?])
39])dnl
40dnl
41dnl Since many Bourne shell implementations lack subroutines, use this
42dnl hack to simplify the code in configure.in.
43dnl GAS_UNIQ(listvar)
f8b73030 44AC_DEFUN([GAS_UNIQ],
252b5132
RH
45[_gas_uniq_list="[$]$1"
46_gas_uniq_newlist=""
47dnl Protect against empty input list.
48for _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
56done
57$1=[$]_gas_uniq_newlist
58])dnl
ac48eca1
AO
59
60sinclude(../libtool.m4)
61dnl The lines below arrange for aclocal not to bring libtool.m4
62dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
63dnl to add a definition of LIBTOOL to Makefile.in.
64ifelse(yes,no,[
65AC_DEFUN([AM_PROG_LIBTOOL],)
66AC_DEFUN([AC_CHECK_LIBM],)
67AC_SUBST(LIBTOOL)
68])
69
70sinclude(../gettext.m4)
71ifelse(yes,no,[
72AC_DEFUN([CY_WITH_NLS],)
73AC_SUBST(INTLLIBS)
74])
This page took 0.262717 seconds and 4 git commands to generate.