From 1c4cf93d166d146262afcf3df69a8f1b0a9c2ee2 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 21 Jan 2009 14:32:14 +0100 Subject: Only muck with CPPFLAGS when actually building with bundled elfutils. --- configure.ac | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7e705811..dd0e40eb 100644 --- a/configure.ac +++ b/configure.ac @@ -306,13 +306,14 @@ if test $build_elfutils = yes; then LDFLAGS="$LDFLAGS $elfutils_rpath" && make install-data # so that elfutils/version.h - if any - may be found. ) + save_CPPFLAGS=${CPPFLAGS} + CPPFLAGS="${CPPFLAGS} -Iinclude-elfutils" # in case bundled elfutils + AC_CHECK_HEADERS([elfutils/version.h]) + CPPFLAGS="$save_CPPFLAGS" +else + AC_CHECK_HEADERS([elfutils/version.h]) fi -save_CPPFLAGS=${CPPFLAGS} -CPPFLAGS="${CPPFLAGS} -Iinclude-elfutils" # in case bundled elfutils -AC_CHECK_HEADERS([elfutils/version.h]) -CPPFLAGS="$save_CPPFLAGS" - dnl This is here mainly to make sure that configure --prefix=... changes dnl the config.h files so files depending on it are recompiled dnl prefix is passed through indirectly in the Makefile.am AM_CPPFLAGS. -- cgit