summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Lunn <tim@feathertop.org>2018-03-31 13:55:02 +1100
committerTim Lunn <tim@feathertop.org>2018-03-31 13:57:50 +1100
commit3f4d143eb171afe9e62690c8965c9eb4b838a0eb (patch)
tree6b3dabebfd14a2075eaf884f2be06fbdad81e43b
parent105ecdf46c34b6ee69674c7ddc0129654d811f9d (diff)
downloadlibrsvg-238-build-failure-on-ubuntu-debian.tar.gz
Fix build failure on Ubuntu/Debian238-build-failure-on-ubuntu-debian
This fixes unresolved symbols when linking with --as-needed Closes #238
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac5
2 files changed, 7 insertions, 1 deletions
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])