[cogl] build: Use LT_LIB_M to find the math library in a portable way



commit a7b4930e14add7d955c22f396178b71083dfb52f
Author: Emanuele Aina <emanuele aina collabora com>
Date:   Fri Apr 5 11:04:08 2013 +0000

    build: Use LT_LIB_M to find the math library in a portable way
    
    https://bugzilla.gnome.org/show_bug.cgi?id=697330
    
    Reviewed-by: Robert Bragg <robert linux intel com>
    Reviewed-by: Neil Roberts <neil linux intel com>

 .gitignore       |    1 +
 cogl/Makefile.am |    2 +-
 configure.ac     |    6 ++++++
 3 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d7842f8..1cc2994 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,7 @@ config.h
 config.h.in
 config.h.win32
 config.log
+config.lt
 config.status
 configure
 depcomp
diff --git a/cogl/Makefile.am b/cogl/Makefile.am
index 4e3a268..897f899 100644
--- a/cogl/Makefile.am
+++ b/cogl/Makefile.am
@@ -527,7 +527,7 @@ endif
 #E.g. libdir=$(libdir)/
 lib_LTLIBRARIES += libcogl2.la
 
-libcogl2_la_LIBADD = -lm $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
+libcogl2_la_LIBADD = $(LIBM) $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
 if !USE_GLIB
 libcogl2_la_LIBADD += $(top_builddir)/deps/glib/libglib.la
 libcogl2_la_LIBADD += $(top_builddir)/deps/gmodule/libgmodule.la
diff --git a/configure.ac b/configure.ac
index 0d10ff1..8c188e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,6 +168,12 @@ dnl internal glib configure (as-glibconfig.m4)
 m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
 
 dnl ================================================================
+dnl Find an appropriate libm, for sin() etc.
+dnl ================================================================
+LT_LIB_M
+AC_SUBST(LIBM)
+
+dnl ================================================================
 dnl See what platform we are building for
 dnl ================================================================
 AC_CANONICAL_HOST


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