* dvp/dvp.exp: New file.
[deliverable/binutils-gdb.git] / gas / aclocal.m4
CommitLineData
bf111c9f
KR
1dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
2AC_DEFUN(GAS_CHECK_DECL_NEEDED,[
3AC_MSG_CHECKING(whether declaration is required for $1)
4AC_CACHE_VAL(gas_cv_decl_needed_$1,
5AC_TRY_LINK([$4],
6[
7typedef $3;
8$2 x;
9x = ($2) $1;
10], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
11AC_MSG_RESULT($gas_cv_decl_needed_$1)
12test $gas_cv_decl_needed_$1 = no || {
13 ifelse(index($1,[$]),-1,
14 [AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]))],
15 [gas_decl_name_upcase=`echo $1 | tr '[a-z]' '[A-Z]'`
16 AC_DEFINE_UNQUOTED(NEED_DECLARATION_$gas_decl_name_upcase)])
17}
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
24AC_DEFUN(GAS_WORKING_ASSERT,
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)
39])dnl
e23b25ec 40dnl
293bc1d5
RS
41dnl Since many Bourne shell implementations lack subroutines, use this
42dnl hack to simplify the code in configure.in.
43dnl GAS_UNIQ(listvar)
44AC_DEFUN(GAS_UNIQ,
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
59
60# Check to see if we're running under Cygwin32, without using
61# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
62# Otherwise set it to "no".
63
64AC_DEFUN(CY_CYGWIN32,
65[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
66[AC_TRY_COMPILE(,[int main () { return __CYGWIN32__; }],
67am_cv_cygwin32=yes, am_cv_cygwin32=no)
68rm -f conftest*])
69CYGWIN32=
70test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
71# Check to see if we're running under Win32, without using
72# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
73# Otherwise set it to "".
74
75dnl This knows we add .exe if we're building in the Cygwin32
76dnl environment. But if we're not, then it compiles a test program
77dnl to see if there is a suffix for executables.
78AC_DEFUN(CY_EXEEXT,
79dnl AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([CY_CYGWIN32])
80AC_MSG_CHECKING([for executable suffix])
81[AC_CACHE_VAL(am_cv_exeext,
82[if test "$CYGWIN32" = yes; then
83am_cv_exeext=.exe
84else
85cat > am_c_test.c << 'EOF'
86int main() {
87/* Nothing needed here */
88}
e23b25ec 89EOF
293bc1d5
RS
90${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
91am_cv_exeext=`ls am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
92rm -f am_c_test*])
93test x"${am_cv_exeext}" = x && am_cv_exeext=no
e23b25ec 94fi
293bc1d5
RS
95EXEEXT=""
96test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
97AC_MSG_RESULT(${am_cv_exeext})
98AC_SUBST(EXEEXT)])
This page took 0.12064 seconds and 4 git commands to generate.