summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2008-02-25 18:50:26 -0500
committerKristian Høgsberg <[email protected]>2008-02-25 19:02:07 -0500
commitbcecea6ea6c2727e4071f5a43fab49673573e905 (patch)
treeccee9ba7972f3a260976e967a9f15cedb76846e1
parent7381ccab449c65d843580f76426f87ab6b1649ce (diff)
autoconf: Add gcc search patch to MKDEP_OPTIONS to eliminate warnings.
Also, use -include to avoid error message when make initially fails to include the non-existent depend file.
-rw-r--r--configs/autoconf.in2
-rw-r--r--configure.ac9
-rw-r--r--src/glx/x11/Makefile2
-rw-r--r--src/mesa/Makefile2
-rw-r--r--src/mesa/drivers/dri/Makefile.template4
5 files changed, 14 insertions, 5 deletions
diff --git a/configs/autoconf.in b/configs/autoconf.in
index a851bf0c57a..33d72d6e1c0 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -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)
diff --git a/configure.ac b/configure.ac
index a7707f8a8e4..ec1bb8288ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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.
diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile
index 00a568cdbcb..3366f005eb5 100644
--- a/src/glx/x11/Makefile
+++ b/src/glx/x11/Makefile
@@ -89,4 +89,4 @@ clean:
-rm -f *.o *~
-rm -f depend
-include depend
+-include depend
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 02e00544798..d0c78b71eed 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -197,4 +197,4 @@ clean:
(cd x86-64 && $(MAKE) clean)
-include depend
+-include depend
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index ad0a9c33f86..53f9d80689e 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -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