[librsvg/238-build-failure-on-ubuntu-debian] Fix build failure on Ubuntu/Debian
- From: Tim Lunn <timl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/238-build-failure-on-ubuntu-debian] Fix build failure on Ubuntu/Debian
- Date: Sat, 31 Mar 2018 03:01:29 +0000 (UTC)
commit 3f4d143eb171afe9e62690c8965c9eb4b838a0eb
Author: Tim Lunn <tim feathertop org>
Date: Sat Mar 31 13:55:02 2018 +1100
Fix build failure on Ubuntu/Debian
This fixes unresolved symbols when linking with --as-needed
Closes #238
Makefile.am | 3 ++-
configure.ac | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/Makefile.am b/Makefile.am
index dcc15e53..94845600 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -172,7 +172,8 @@ librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS = \
librsvg_@RSVG_API_MAJOR_VERSION@_la_LIBADD = \
$(LIBRSVG_LIBS) \
$(LIBM) \
- $(RUST_LIB)
+ $(RUST_LIB) \
+ $(DLOPEN_LIBS)
librsvgincdir = $(includedir)/librsvg-$(RSVG_API_VERSION)/librsvg
librsvginc_HEADERS = \
diff --git a/configure.ac b/configure.ac
index 63b10627..c9666757 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,6 +67,11 @@ PKG_PROG_PKG_CONFIG
LT_INIT([win32-dll])
LT_LIB_M
+# Check if -ldl is needed to use dlopen()
+AC_CHECK_FUNC(dlopen, [],
+ [AC_CHECK_LIB(dl, dlopen, [DLOPEN_LIBS=-ldl])])
+AC_SUBST(DLOPEN_LIBS)
+
dnl ===========================================================================
AC_CHECK_PROG(CARGO, [cargo], [yes], [no])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]