1 | dnl |
---|
2 | dnl $Id$ |
---|
3 | dnl |
---|
4 | dnl Check for target gcc |
---|
5 | dnl |
---|
6 | |
---|
7 | AC_DEFUN(RTEMS_PROG_CC, |
---|
8 | [ |
---|
9 | AC_BEFORE([$0], [AC_PROG_CPP])dnl |
---|
10 | AC_BEFORE([$0], [AC_PROG_CC])dnl |
---|
11 | AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl |
---|
12 | AC_REQUIRE([RTEMS_ENABLE_LIBCDIR])dnl |
---|
13 | AC_REQUIRE([RTEMS_ENABLE_GCC28])dnl |
---|
14 | |
---|
15 | RTEMS_CHECK_TOOL(CC,gcc) |
---|
16 | test -z "$CC" && \ |
---|
17 | AC_MSG_ERROR([no acceptable cc found in \$PATH]) |
---|
18 | AC_PROG_CC |
---|
19 | AC_PROG_CPP |
---|
20 | |
---|
21 | AM_CONDITIONAL(RTEMS_USE_GCC,test x"$GCC" = x"yes") |
---|
22 | ]) |
---|
23 | |
---|
24 | AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET, |
---|
25 | [ |
---|
26 | dnl check target cc |
---|
27 | RTEMS_PROG_CC |
---|
28 | dnl check if the compiler supports --specs |
---|
29 | RTEMS_GCC_SPECS |
---|
30 | dnl check if the target compiler may use --pipe |
---|
31 | RTEMS_GCC_PIPE |
---|
32 | dnl check if the compiler supports --specs if gcc28 is requested |
---|
33 | if test "$RTEMS_USE_GCC272" != "yes" ; then |
---|
34 | if test "$rtems_cv_gcc_specs" = "no"; then |
---|
35 | AC_MSG_WARN([*** disabling --enable-gcc28]) |
---|
36 | RTEMS_USE_GCC272=yes |
---|
37 | fi |
---|
38 | fi |
---|
39 | test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe" |
---|
40 | |
---|
41 | if test "$GCC" = yes; then |
---|
42 | ] |
---|
43 | ifelse([$1],,[],[CPPFLAGS="$CPPFLAGS $1"]) |
---|
44 | [ |
---|
45 | CFLAGS="-g -Wall" |
---|
46 | fi |
---|
47 | ## Conditional for automake files |
---|
48 | AM_CONDITIONAL(RTEMS_USE_GCC272, test x"$RTEMS_USE_GCC272" = x"yes") |
---|
49 | ## Make variable for autoconf fragments (*.cfg) |
---|
50 | AC_SUBST(RTEMS_USE_GCC272) |
---|
51 | |
---|
52 | dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-* |
---|
53 | case $build_os in |
---|
54 | *cygwin*) GCCSED="| sed 's%\\\\%/%g'" ;; |
---|
55 | *) ;; |
---|
56 | esac |
---|
57 | AC_SUBST(GCCSED) |
---|
58 | ]) |
---|