From b38e504287a07e713de6facb001b2b9e069e5f74 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Sat, 3 Jul 2021 09:34:29 +0200
Subject: [PATCH 107/N] [squash] fix srcdir!=builddir

merge into "Fixup .rc handling"
---
 configure.ac | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index bf21222..14e4c8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5944,9 +5944,12 @@ case $host in
   *-*-mingw*)
     LIBS="$LIBS -lversion -lshlwapi"
 
+    AC_MSG_CHECKING([FIELD3])
+    SAVE_CFLAGS=$CFLAGS
+    CFLAGS="-I $srcdir/Include"
     AC_RUN_IFELSE([AC_LANG_SOURCE([[
       #include <stdio.h>
-      #include "Include/patchlevel.h"
+      #include "patchlevel.h"
       int main() {
         fprintf (
           fopen ("conftest.out","w"),
@@ -5955,7 +5958,8 @@ case $host in
         return 0;
       }
     ]])], [FIELD3=`cat conftest.out`])
-
+    CFLAGS=$SAVE_CFLAGS
+    AC_MSG_RESULT([${FIELD3}])
     RCFLAGS="$RCFLAGS -DFIELD3=$FIELD3 -O COFF"
 
     case $host in
-- 
2.32.0

