PageRenderTime 27ms CodeModel.GetById 24ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/testbed/aclocal/prog-cc.m4

http://rtems-atapi.googlecode.com/
m4 | 37 lines | 32 code | 5 blank | 0 comment | 0 complexity | 007b1a4fcc9eec0c95f8c9c80c85f927 MD5 | raw file
 1dnl
 2dnl $Id: prog-cc.m4,v 1.11 2006/10/16 15:58:13 ralf Exp $
 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
13RTEMS_CHECK_TOOL(CC,gcc)
14test -z "$CC" && \
15  AC_MSG_ERROR([no acceptable cc found in \$PATH])
16AC_PROG_CC
17AC_PROG_CXX
18AC_PROG_CPP
19])
20
21AC_DEFUN([RTEMS_PROG_CC_FOR_TARGET],
22[
23dnl check target cc
24RTEMS_PROG_CC
25dnl check if the target compiler may use --pipe
26RTEMS_GCC_PIPE
27test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
28
29if test "$GCC" = yes; then
30RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall"
31m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"])
32fi
33AC_SUBST(RTEMS_CFLAGS)
34
35RTEMS_CPPFLAGS="-I\$(top_builddir) -I\$(PROJECT_INCLUDE)"
36AC_SUBST(RTEMS_CPPFLAGS)
37])