diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index e748a680d6..f8e38b9d09 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,11 @@ +2003-02-18 Ralf Corsepius + + * aclocal/gcc-isystem.m4: New. + * aclocal/gcc-specs.m4: Remove. + * aclocal/prog-cc.m4: Remove RTEMS_GCC_SPECS. + Add RTEMS_GCC_ISYSTEM. + Reformat setting up RTEMS_CPPFLAGS. + 2003-02-18 Ralf Corsepius * automake/local.am: Introduce depend-gcc. diff --git a/cpukit/aclocal/gcc-isystem.m4 b/cpukit/aclocal/gcc-isystem.m4 new file mode 100644 index 0000000000..c230508208 --- /dev/null +++ b/cpukit/aclocal/gcc-isystem.m4 @@ -0,0 +1,25 @@ +dnl +dnl $Id$ +dnl +dnl Check whether the gcc accepts -isystem +dnl + +AC_DEFUN(RTEMS_GCC_ISYSTEM, +[AC_REQUIRE([RTEMS_PROG_CC]) +AC_CACHE_CHECK(whether $CC accepts -isystem,rtems_cv_gcc_isystem, +[ +rtems_cv_gcc_isystem=no +if test x"$GCC" = x"yes"; then +cat << EOF > conftest.h +int conftest123(); +EOF +cat << EOF > conftest.c +#include +int conftest123() {} +EOF + if test -z "`${CC} -isystem./ -c conftest.c 2>&1`";then + rtems_cv_gcc_isystem=yes + fi +fi +rm -f conftest* +])]) diff --git a/cpukit/aclocal/gcc-specs.m4 b/cpukit/aclocal/gcc-specs.m4 deleted file mode 100644 index ca0271424f..0000000000 --- a/cpukit/aclocal/gcc-specs.m4 +++ /dev/null @@ -1,20 +0,0 @@ -dnl -dnl $Id$ -dnl -dnl Check whether the target compiler accepts -specs -dnl - -AC_DEFUN(RTEMS_GCC_SPECS, -[AC_REQUIRE([RTEMS_PROG_CC]) -AC_CACHE_CHECK(whether $CC accepts -specs,rtems_cv_gcc_specs, -[ -rtems_cv_gcc_specs=no -if test x"$GCC" = x"yes"; then - touch confspec - echo 'void f(){}' >conftest.c - if test -z "`${CC} -specs confspec -c conftest.c 2>&1`";then - rtems_cv_gcc_specs=yes - fi -fi -rm -f confspec conftest* -])]) diff --git a/cpukit/aclocal/prog-cc.m4 b/cpukit/aclocal/prog-cc.m4 index 92bd7749ce..117229bbe4 100644 --- a/cpukit/aclocal/prog-cc.m4 +++ b/cpukit/aclocal/prog-cc.m4 @@ -26,8 +26,8 @@ AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET, [ dnl check target cc RTEMS_PROG_CC -dnl check if the compiler supports --specs -RTEMS_GCC_SPECS +dnl check if the compiler supports -isystem +RTEMS_GCC_ISYSTEM dnl check if the target compiler may use --pipe RTEMS_GCC_PIPE test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe" @@ -35,9 +35,12 @@ 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"]) -RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)" -else -RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)" fi -AC_SUBST(RTEMS_CPPFLAGS) + +AS_IF([test x"$rtems_cv_gcc_isystem" = x"yes"],[ + RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"],[ + RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)" +]) +AC_SUBST(RTEMS_CPPFLAGS) + ])