autoconf: Add gcc search patch to MKDEP_OPTIONS to eliminate warnings.
authorKristian Høgsberg <krh@redhat.com>
Mon, 25 Feb 2008 23:50:26 +0000 (18:50 -0500)
committerKristian Høgsberg <krh@redhat.com>
Tue, 26 Feb 2008 00:02:07 +0000 (19:02 -0500)
Also, use -include to avoid error message when make initially fails to
include the non-existent depend file.

configs/autoconf.in
configure.ac
src/glx/x11/Makefile
src/mesa/Makefile
src/mesa/drivers/dri/Makefile.template

index a851bf0c57a03ff7ffbf20c12a2bca9be20073b3..33d72d6e1c0d8124979798e89639e4ccbf536d86 100644 (file)
@@ -34,7 +34,7 @@ ASM_API = @ASM_API@
 MAKE = @MAKE@
 MKLIB_OPTIONS = @MKLIB_OPTIONS@
 MKDEP = @MKDEP@
-MKDEP_OPTIONS = -fdepend
+MKDEP_OPTIONS = @MKDEP_OPTIONS@
 INSTALL = $(TOP)/bin/minstall
 
 # Python and flags (generally only needed by the developers)
index a7707f8a8e4567483990777189853ed3efe84418..ec1bb8288efc1731f829fc439b28fe57be865de3 100644 (file)
@@ -30,6 +30,15 @@ AC_PATH_PROG(MAKE, make)
 AC_PATH_PROG(MKDEP, makedepend)
 AC_PATH_PROG(SED, sed)
 
+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
+fi
+AC_SUBST(MKDEP_OPTIONS)
+
 dnl Make sure the pkg-config macros are defined
 m4_ifdef([PKG_PROG_PKG_CONFIG],,[
     AC_MSG_ERROR([The pkg-config autoconf macros are not defined.
index 00a568cdbcb85350be8311a13cd9a82eaf85583a..3366f005eb55e495df6a6d0d1d74de8e5a4b5c35 100644 (file)
@@ -89,4 +89,4 @@ clean:
        -rm -f *.o *~
        -rm -f depend
 
-include depend
+-include depend
index 02e0054479812864aed327a264d1636f778fed74..d0c78b71eed6646561246601fc772da227f122e4 100644 (file)
@@ -197,4 +197,4 @@ clean:
        (cd x86-64 && $(MAKE) clean)
 
 
-include depend
+-include depend
index ad0a9c33f8624baa7031d77db5409a0e21f8ef0b..53f9d80689e0883a9779254bab102c602556035b 100644 (file)
@@ -80,7 +80,7 @@ $(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
 depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
        touch depend
        $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
-               $(ASM_SOURCES) 2>&1 /dev/null
+               $(ASM_SOURCES)
 
 
 # Emacs tags
@@ -99,4 +99,4 @@ install: $(LIBNAME)
        $(INSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
 
 
-include depend
+-include depend