source: rtems/aclocal/prog-cc.m4 @ f1d08c98

4.104.114.84.95
Last change on this file since f1d08c98 was f1d08c98, checked in by Joel Sherrill <joel.sherrill@…>, on 05/07/01 at 13:15:49

2001-04-27 Ralf Corsepius <corsepiu@…>

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