changeset 24719:9af783c01c7f

Fix cross-building for win32 target (bug #50463). * configure.ac: Check for existence of header file instead of exported function in library because the autoconf macro can't check for functions with __stdcall calling convention (win32).
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 03 Feb 2018 16:48:01 +0100
parents ea1c88bd4430
children 48f22c5b22aa
files configure.ac
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Fri Feb 09 16:14:26 2018 -0500
+++ b/configure.ac	Sat Feb 03 16:48:01 2018 +0100
@@ -1530,7 +1530,10 @@
 ## Windows-specific module used for winqueryreg function
 case $host_os in
   msdosmsvc | mingw*)
-    AC_CHECK_LIB([psapi], [EnumProcessModules])
+    AC_CHECK_HEADERS([psapi.h],
+      [LIBS="-lpsapi $LIBS"],
+      [AC_MSG_ERROR([Missing PSAPI required to build for Windows target.])],
+      [#include <windows.h>])
   ;;
 esac