From: Roger Pau Monne Date: Tue, 5 May 2020 09:24:53 +0000 (+0200) Subject: configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~299 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8a6b1665d987d043c12dc723d758a7d2ca765264;p=xen.git configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS The path provided by EXTRA_PREFIX should be added to the search path of the configure script, like it's done in Config.mk. Not doing so makes the search path for configure differ from the search path used by the build. Signed-off-by: Roger Pau Monné [ wei: run autogen.sh ] Acked-by: Wei Liu --- diff --git a/m4/set_cflags_ldflags.m4 b/m4/set_cflags_ldflags.m4 index cbad3c10b0..08f5c983cc 100644 --- a/m4/set_cflags_ldflags.m4 +++ b/m4/set_cflags_ldflags.m4 @@ -15,6 +15,10 @@ for ldflag in $APPEND_LIB do APPEND_LDFLAGS="$APPEND_LDFLAGS -L$ldflag" done +if [ ! -z $EXTRA_PREFIX ]; then + CPPFLAGS="$CPPFLAGS -I$EXTRA_PREFIX/include" + LDFLAGS="$LDFLAGS -L$EXTRA_PREFIX/lib" +fi CPPFLAGS="$PREPEND_CPPFLAGS $CPPFLAGS $APPEND_CPPFLAGS" LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS"]) diff --git a/tools/configure b/tools/configure index 375430df3f..36596389b8 100755 --- a/tools/configure +++ b/tools/configure @@ -4678,6 +4678,10 @@ for ldflag in $APPEND_LIB do APPEND_LDFLAGS="$APPEND_LDFLAGS -L$ldflag" done +if ! -z $EXTRA_PREFIX ; then + CPPFLAGS="$CPPFLAGS -I$EXTRA_PREFIX/include" + LDFLAGS="$LDFLAGS -L$EXTRA_PREFIX/lib" +fi CPPFLAGS="$PREPEND_CPPFLAGS $CPPFLAGS $APPEND_CPPFLAGS" LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS"