[librsvg: 1/2] Link to necessary libraries on Windows.
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/2] Link to necessary libraries on Windows.
- Date: Tue, 7 Dec 2021 00:42:16 +0000 (UTC)
commit 612afb16efafcc3aaf1c78481c72325da2d21a11
Author: Markus Mützel <markus muetzel gmx de>
Date: Sat Dec 4 20:39:24 2021 +0100
Link to necessary libraries on Windows.
Add flags for linking to necessary libraries on Windows automatically.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/638>
configure.ac | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index b9ea342c..b243e503 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,6 +159,18 @@ PKG_CHECK_MODULES([RSVG_CONVERT],[gio-2.0 "gio-${gio_backend}-2.0" gdk-pixbuf-2.
GLIB_TESTS
+AS_IF([test x"$platform" = xWindows], [
+ ## Cannot use AC_CHECK_LIB to check for function with __stdcall
+ ## calling convention. Instead just check for the header and add the
+ ## corresponding library to the linker flags.
+ AC_CHECK_HEADER([winsock2.h], [WS2_32_LIBS=-lws2_32], [], [#include <windows.h>])
+ LIBS="$LIBS $WS2_32_LIBS"
+ AC_CHECK_HEADER([userenv.h], [USERENV_LIBS=-luserenv], [], [#include <windows.h>])
+ LIBS="$LIBS $USERENV_LIBS"
+ AC_CHECK_HEADER([bcrypt.h], [BCRYPT_LIBS=-lbcrypt], [], [#include <windows.h>])
+ LIBS="$LIBS $BCRYPT_LIBS"
+])
+
dnl ===========================================================================
dnl GDK-Pixbuf SVG loader
dnl ===========================================================================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]