From bcecea6ea6c2727e4071f5a43fab49673573e905 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Mon, 25 Feb 2008 18:50:26 -0500 Subject: 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. --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a7707f8a8e..ec1bb8288e 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. -- cgit v1.2.3