--- configure.orig	2012-10-12 02:16:35.000000000 +0200
+++ configure	2014-11-30 19:14:24.000000000 +0100
@@ -5496,7 +5496,11 @@ $as_echo "yes" >&6; }
 fi
 
 EFI_ARCH=$(uname -m)
-EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \
+if [ "$EFI_ARCH" = "amd64" ]; then
+	EFI_ARCH="x86_64"
+fi
+
+EFI_CPPFLAGS="-I$LOCALBASE/include/efi -I$LOCALBASE/include/efi/$EFI_ARCH \
  -DEFI_FUNCTION_WRAPPER"
 CPPFLAGS_save="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $EFI_CPPFLAGS"
