summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 5 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index ec1bb8288e..ca3f917196 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,12 +30,13 @@ AC_PATH_PROG(MAKE, make)
AC_PATH_PROG(MKDEP, makedepend)
AC_PATH_PROG(SED, sed)
+MKDEP_OPTIONS=-fdepend
dnl Ask gcc where it's keeping its secret headers
if test "x$GCC" = xyes; then
- GCC_PATH=$(gcc -print-search-dirs | sed -ne 's/install: //p')
- MKDEP_OPTIONS="-fdepend -I${GCC_PATH}include"
-else
- MKDEP_OPTIONS=-fdepend
+ GCC_INCLUDES=`$CC -print-file-name=include`
+ if test "x$GCC_INCLUDES" != x; then
+ MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
+ fi
fi
AC_SUBST(MKDEP_OPTIONS)