[bijiben] build: Check for libm at configure time



commit 0989cbe04912ab0764c9e5f484b104e8a5243f1d
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Tue Apr 18 21:41:18 2017 +0800

    build: Check for libm at configure time
    
    You cannot rely on -lm being the correct way to link the maths library,
    as it might be provided by libc on some systems.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762648

 configure.ac    |    2 ++
 src/Makefile.am |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cdec9bf..b170d37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,6 +80,8 @@ PKG_CHECK_MODULES([BIJIBEN],
                    uuid
                    webkit2gtk-4.0 >= $WEBKITGTK_REQUIRED_VERSION])
 
+AC_CHECK_LIBM
+AC_SUBST([LIBM])
 
 # check for zeitgeist
 AC_ARG_ENABLE([zeitgeist],
diff --git a/src/Makefile.am b/src/Makefile.am
index 8fc2ee4..e4139bf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,7 +26,7 @@ AM_CFLAGS =\
 
 
 LDADD = libbiji/libbiji.la \
-       -lm \
+       $(LIBM) \
        $(top_builddir)/libgd/libgd.la \
        $(BIJIBEN_LIBS)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]