source: rtems/c/src/aclocal/prog-cc.m4 @ ea3f559

4.104.114.84.95
Last change on this file since ea3f559 was ea3f559, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jan 5, 2005 at 5:52:33 PM

2005-01-05 Ralf Corsepius <ralf.corsepius@…>

  • configure.ac: Pass CFLAGS to cpukit configure.
  • aclocal/rtems-flags.m4: Remove (Unused).
  • aclocal/prog-ccas.m4: Remove $(GCCSPECS).
  • aclocal/env-rtemsbsp.m4: Comment out CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V, CPU_CFLAGS.
  • aclocal/prog-cc.m4: Don't invoke _RTEMS_FLAGS to set up RTEMS_CFLAGS.
  • automake/compile.am: AM_CFLAGS = RTEMS_CFLAGS. Add AM_CXXFLAGS. Remove CPPFLAGS, CFLAGS, CPU_CFLAGS, CFLAGS_OPTIMIZE, ASFLAGS. Cleanup comments.
  • Property mode set to 100644
File size: 1.0 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
12
13CFLAGS=${CFLAGS-${CPU_CFLAGS} ${CFLAGS_OPTIMIZE_V}}
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 -isystem
29RTEMS_GCC_ISYSTEM
30dnl check if the target compiler may use --pipe
31RTEMS_GCC_PIPE
32test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
33
34dnl check if the compiler supports --specs
35RTEMS_GCC_SPECS
36
37if test "$GCC" = yes; then
38RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall"
39m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"])
40fi
41AC_SUBST(RTEMS_CFLAGS)
42
43AS_IF([test x"$rtems_cv_gcc_isystem" = x"yes"],[
44  RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"],[
45  RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)"
46])
47AC_SUBST(RTEMS_CPPFLAGS)
48])
Note: See TracBrowser for help on using the repository browser.