Blob Blame History Raw
From 456e98b7b2ff18a899c8a889fdded2b5459120aa Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@redhat.com>
Date: Thu, 16 Jul 2015 14:53:52 +0200
Subject: [PATCH] patch: link-z-now

Squashed commit of the following:

commit be9ae5ca9e251d19cbdb2b7ca2130fd05757b669
Author: Nils Philippsen <nils@redhat.com>
Date:   Thu Jul 16 14:18:55 2015 +0200

    tests: link against -lm

    (see commit 4c7338c0974096dca8566a1d570ed51fbe721ae6)

    (cherry picked from commit 9171de3b80735cd608b5ac099c67deb5b9ccaf1f)

commit c510e223f37a6557643b8c472f0e0e0e6b5d25ba
Author: Michael Natterer <mitch@gimp.org>
Date:   Thu May 21 18:41:35 2015 +0200

    Bug 749675 - gimp-2.8-doc job fails for undefined reference...

    ...to symbol 'fmod@@GLIBC_2.2.5'

    Add -lm to GTKDOC_LIBS.

    (cherry picked from commit a349f33d1f753c29523b673c1511e999f6f2ba45)

commit 4483698c0444e01afce89fcf7610d29e7670a326
Author: Michael Natterer <mitch@gimp.org>
Date:   Mon Feb 16 19:35:00 2015 +0100

    app: link against -lm, whatever new linker version seems to need is

    (cherry picked from commit 4c7338c0974096dca8566a1d570ed51fbe721ae6)
---
 app/Makefile.am            | 5 ++++-
 app/config/Makefile.am     | 8 +++++++-
 app/tests/Makefile.am      | 8 +++++++-
 devel-docs/app/Makefile.am | 8 +++++++-
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/app/Makefile.am b/app/Makefile.am
index 243f08a..f3f5ba5 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -95,6 +95,8 @@ endif
 
 if OS_WIN32
 win32_ldflags = -mwindows -Wl,--tsaware $(WIN32_LARGE_ADDRESS_AWARE)
+else
+libm = -lm
 endif
 
 if USE_BINRELOC
@@ -181,7 +183,8 @@ gimpconsoleldadd = \
 	$(GEGL_LIBS)			\
 	$(GLIB_LIBS)			\
 	$(INTLLIBS)			\
-	$(RT_LIBS)
+	$(RT_LIBS)			\
+	$(libm)
 
 gimp_2_8_LDFLAGS = \
 	$(AM_LDFLAGS)		\
diff --git a/app/config/Makefile.am b/app/config/Makefile.am
index 8012c01..5ba7704 100644
--- a/app/config/Makefile.am
+++ b/app/config/Makefile.am
@@ -7,6 +7,11 @@ libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
 libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
 libgimpthumb = $(top_builddir)/libgimpthumb/libgimpthumb-$(GIMP_API_VERSION).la
 
+if OS_WIN32
+else
+libm = -lm
+endif
+
 AM_CPPFLAGS = \
 	-DG_LOG_DOMAIN=\"Gimp-Config\"	\
 	-DGIMP_APP_VERSION_STRING=\"$(GIMP_APP_VERSION)\"
@@ -111,7 +116,8 @@ test_config_LDADD = \
 	$(PANGOCAIRO_LIBS)			\
 	$(GDK_PIXBUF_LIBS)			\
 	$(GEGL_LIBS)				\
-	$(GLIB_LIBS)
+	$(GLIB_LIBS)				\
+	$(libm)
 
 CLEANFILES = $(EXTRA_PROGRAMS) foorc
 
diff --git a/app/tests/Makefile.am b/app/tests/Makefile.am
index 821b76c..96b9550 100644
--- a/app/tests/Makefile.am
+++ b/app/tests/Makefile.am
@@ -51,6 +51,11 @@ libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).
 libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
 libgimpthumb = $(top_builddir)/libgimpthumb/libgimpthumb-$(GIMP_API_VERSION).la
 
+if OS_WIN32
+else
+libm = -lm
+endif
+
 AM_CPPFLAGS = \
 	-I$(top_srcdir)		\
 	-I$(top_srcdir)/app	\
@@ -127,7 +132,8 @@ LDADD = \
 	$(GEGL_LIBS)						\
 	$(GLIB_LIBS)						\
 	$(INTLLIBS)						\
-	$(RT_LIBS)
+	$(RT_LIBS)							\
+	$(libm)
 
 gimpdir-output:
 	mkdir -p gimpdir-output
diff --git a/devel-docs/app/Makefile.am b/devel-docs/app/Makefile.am
index 9ebb9fc..4e96e36 100644
--- a/devel-docs/app/Makefile.am
+++ b/devel-docs/app/Makefile.am
@@ -61,6 +61,11 @@ GTKDOC_CFLAGS = \
 	-I$(includedir)	\
 	-UGTK_DISABLE_SINGLE_INCLUDES
 
+if OS_WIN32
+else
+libm = -lm
+endif
+
 GTKDOC_LIBS = \
 	-u $(SYMPREFIX)xcf_init		   				     \
 	-u $(SYMPREFIX)internal_procs_init 				     \
@@ -110,7 +115,8 @@ GTKDOC_LIBS = \
 	$(DBUS_GLIB_LIBS)						     \
 	$(GEGL_LIBS)							     \
 	$(RT_LIBS)							     \
-        $(INTLLIBS)
+        $(INTLLIBS)							     \
+	$(libm)
 
 
 if ENABLE_GTK_DOC_APP
-- 
2.4.3