summarylogtreecommitdiffstats
path: root/0114-build-Disable-checks-for-dlopen-dlfcn.patch
blob: 232c85aec8a3b67908d0854b471d76ed38854cd6 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 22537ffc1a86b3f483bd6ff0af9bd89880160f0c Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Sun, 25 Jul 2021 13:54:12 +0200
Subject: [PATCH 114/N] build: Disable checks for dlopen/dlfcn

While it is (potentially) available with mingw we don't want to use it, so skip any
checks for it.
---
 configure.ac | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index bab62ad..d1b8acb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2423,7 +2423,7 @@ dnl AC_MSG_RESULT($cpp_type)
 
 # checks for header files
 AC_HEADER_STDC
-AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
+AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h errno.h \
 fcntl.h grp.h \
 ieeefp.h io.h langinfo.h libintl.h process.h \
 shadow.h signal.h stropts.h termios.h \
@@ -2437,6 +2437,12 @@ sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
 libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
 linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
 sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h)
+
+case $host in
+  *-*-mingw*) ;;
+  *) AC_CHECK_HEADERS([dlfcn.h]);;
+esac
+
 AC_HEADER_DIRENT
 AC_HEADER_MAJOR
 
@@ -3108,7 +3114,12 @@ AC_MSG_RESULT($SHLIBS)
 
 # checks for libraries
 AC_CHECK_LIB(sendfile, sendfile)
-AC_CHECK_LIB(dl, dlopen)	# Dynamic linking for SunOS/Solaris and SYSV
+
+case $host in
+  *-*-mingw*) ;;
+  *) AC_CHECK_LIB(dl, dlopen) ;;	# Dynamic linking for SunOS/Solaris and SYSV
+esac
+
 AC_CHECK_LIB(dld, shl_load)	# Dynamic linking for HP-UX
 
 # checks for uuid.h location
@@ -5014,7 +5025,10 @@ then
   [define to 1 if your sem_getvalue is broken.])
 fi
 
-AC_CHECK_DECLS([RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND, RTLD_MEMBER], [], [], [[#include <dlfcn.h>]])
+case $host in
+  *-*-mingw*) ;;
+  *) AC_CHECK_DECLS([RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND, RTLD_MEMBER], [], [], [[#include <dlfcn.h>]]);;
+esac
 
 # determine what size digit to use for Python's longs
 AC_MSG_CHECKING([digit size for Python's longs])
-- 
2.32.0