autoconf: Use include-fixed directory with makedepend on newer GCC
authorDan Nicholson <dbn.lists@gmail.com>
Fri, 30 Jan 2009 18:52:09 +0000 (10:52 -0800)
committerDan Nicholson <dbn.lists@gmail.com>
Fri, 30 Jan 2009 20:03:16 +0000 (12:03 -0800)
On newer GCC releases, the compiler's headers have been split between
the include and include-fixed directories. Add both if the directories
exist.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
configure.ac

index 33c107266a2fffe90b4c7bc85dd9e2801f8e955c..ba48e9d132a1094eb0117f163340409b37fc326d 100644 (file)
@@ -46,10 +46,14 @@ esac
 MKDEP_OPTIONS=-fdepend
 dnl Ask gcc where it's keeping its secret headers
 if test "x$GCC" = xyes; then
-    GCC_INCLUDES=`$CC -print-file-name=include`
-    if test "x$GCC_INCLUDES" != x; then
-        MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
-    fi
+    for dir in include include-fixed; do
+        GCC_INCLUDES=`$CC -print-file-name=$dir`
+        if test "x$GCC_INCLUDES" != x && \
+           test "$GCC_INCLUDES" != "$dir" && \
+           test -d "$GCC_INCLUDES"; then
+            MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
+        fi
+    done
 fi
 AC_SUBST([MKDEP_OPTIONS])