configure: Do a real check for -idirafter anyhow.

(The CMake project cheats around this by asking "are we GCC or Clang?" and I'm
inclined to leave it like that for now.)
This commit is contained in:
Ryan C. Gordon committed 2020-05-19 12:08:05 -04:00
1 parent 2f565b4469
commit 475afe2162
2 files changed
+47 -2

No files matched your search

+16 -1
View File
@@ -69,8 +69,23 @@ case "$host" in
;;
esac
dnl see if -idirafter is available.
save_CFLAGS="$CFLAGS"
have_idirafter="no"
idirafter="-I"
AC_MSG_CHECKING(for -idirafter option)
CFLAGS="$save_CFLAGS -idirafter src"
AC_TRY_COMPILE([
],[
],[
have_idirafter="yes"
idirafter="-idirafter"
])
AC_MSG_RESULT($have_idirafter)
CFLAGS="$save_CFLAGS"
dnl Set up the compiler and linker flags
INCLUDE="-I$srcdir/include -I$srcdir/src/video/khronos"
INCLUDE="-I$srcdir/include $idirafter $srcdir/src/video/khronos"
if test x$srcdir != x.; then
INCLUDE="-Iinclude $INCLUDE"
elif test -d .hg; then