bc7455deb921e94949f749f602b4bcfdf4e9328c
[deliverable/binutils-gdb.git] / gas / aclocal.m4
1 dnl
2 dnl This ugly hack is needed because the Cygnus configure script won't
3 dnl tell us what CC is going to be, and "cc" isn't always right. (The
4 dnl top-level Makefile will always override anything we choose here, so
5 dnl the usual gcc/cc selection is useless.)
6 dnl
7 dnl It knows where it is in the tree; don't try using it elsewhere.
8 dnl
9 undefine([AC_PROG_CC])dnl
10 define(AC_PROG_CC,
11 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
12 AC_PROVIDE([$0])dnl
13 dnl
14 dnl The ugly bit...
15 dnl
16 AC_MSG_CHECKING([for CC])
17 dnl Don't bother with cache.
18 test -z "$CC" && CC=`egrep '^CC *=' ../Makefile | tail -1 | sed 's/^CC *= *//'`
19 test -z "$CC" && CC=cc
20 AC_MSG_RESULT(setting CC to $CC)
21 AC_SUBST(CC)
22 dnl
23 dnl
24 # Find out if we are using GNU C, under whatever name.
25 cat > conftest.c <<EOF
26 #ifdef __GNUC__
27 yes
28 #endif
29 EOF
30 ${CC-cc} -E conftest.c > conftest.out 2>&1
31 if egrep yes conftest.out >/dev/null 2>&1; then
32 GCC=yes
33 else
34 GCC=
35 fi
36 rm -f conftest*
37 ])dnl
This page took 0.046102 seconds and 3 git commands to generate.