/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
- dnl
- dnl $Id: prog-cc.m4,v 1.11 2006/10/16 15:58:13 ralf Exp $
- dnl
- dnl Check for target gcc
- dnl
- AC_DEFUN([RTEMS_PROG_CC],
- [
- AC_BEFORE([$0], [AC_PROG_CPP])dnl
- AC_BEFORE([$0], [AC_PROG_CC])dnl
- AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
- RTEMS_CHECK_TOOL(CC,gcc)
- test -z "$CC" && \
- AC_MSG_ERROR([no acceptable cc found in \$PATH])
- AC_PROG_CC
- AC_PROG_CXX
- AC_PROG_CPP
- ])
- AC_DEFUN([RTEMS_PROG_CC_FOR_TARGET],
- [
- dnl check target cc
- RTEMS_PROG_CC
- dnl check if the target compiler may use --pipe
- RTEMS_GCC_PIPE
- test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
- if test "$GCC" = yes; then
- RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall"
- m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"])
- fi
- AC_SUBST(RTEMS_CFLAGS)
- RTEMS_CPPFLAGS="-I\$(top_builddir) -I\$(PROJECT_INCLUDE)"
- AC_SUBST(RTEMS_CPPFLAGS)
- ])