summaryrefslogtreecommitdiff
blob: 727ed4a15f83dbecd8ad38a536b2fcbd9792cc0e (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
From 7ead1d4b000df6f5d31e0df93b8172839c06736d Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Fri, 23 Nov 2012 02:33:53 -0500
Subject: [PATCH] libdevhelp: explicitly link with libm for sqrt() in
 dh-window.c

Prevents linking failure when using GNU gold.

https://bugzilla.gnome.org/show_bug.cgi?id=688919
---
 configure.ac    | 3 +++
 src/Makefile.am | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e9c9e87..8849c70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,9 @@ else
 fi
 AM_CONDITIONAL(WITH_WEBKIT2, test "x$with_webkit2" != xno)
 
+AC_CHECK_LIBM
+AC_SUBST(LIBM)
+
 PKG_CHECK_MODULES(DEVHELP, [
   gthread-2.0 >= 2.10.0
   gtk+-3.0 >= 3.4
diff --git a/src/Makefile.am b/src/Makefile.am
index e6b1716..419c31c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -107,7 +107,8 @@ libdevhelp_3_la_CFLAGS =				\
 
 libdevhelp_3_la_LIBADD =				\
 	$(LIBDEVHELP_LIBS)				\
-	$(ZLIB_LIBS)
+	$(ZLIB_LIBS)					\
+	$(LIBM)
 
 libdevhelp_3_la_LDFLAGS =				\
 	-no-undefined					\
-- 
1.8.0