summarylogtreecommitdiffstats
path: root/0107-squash-fix-srcdir-builddir.patch
blob: 5494f6db5502491cf27e2262e6b65d5aaac57787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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