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

4.104.114.84.95
Last change on this file since ea68ed5 was ea68ed5, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 8, 2005 at 2:54:07 AM

2005-02-08 Ralf Corsepius <ralf.corsepius@…>

  • aclocal/prog-cc.m4: Quote CFLAGS's RHS to accomodate Solaris broken sh.
  • 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.