diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2003-02-18 14:35:03 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2003-02-18 14:35:03 +0000 |
commit | 6738c9dc6ec99ab86e6a67e694ee5d0837fbf34a (patch) | |
tree | b8715ad16ce13c464ad3ced78f84ecffee8beda7 /cpukit/aclocal | |
parent | 2003-02-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-6738c9dc6ec99ab86e6a67e694ee5d0837fbf34a.tar.bz2 |
2003-02-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* 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.
Diffstat (limited to 'cpukit/aclocal')
-rw-r--r-- | cpukit/aclocal/gcc-isystem.m4 | 25 | ||||
-rw-r--r-- | cpukit/aclocal/gcc-specs.m4 | 20 | ||||
-rw-r--r-- | cpukit/aclocal/prog-cc.m4 | 13 |
3 files changed, 33 insertions, 25 deletions
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 <conftest.h> +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 + +AS_IF([test x"$rtems_cv_gcc_isystem" = x"yes"],[ + RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"],[ + RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)" +]) AC_SUBST(RTEMS_CPPFLAGS) + ]) |