summaryrefslogtreecommitdiffstats
path: root/testsuites/aclocal/gcc-isystem.m4
blob: 94098cf33c556fa3b2e2ad092b512db6c3f6e95f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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*
])])