[gtk+] Update configure.ac to check for rint()/round()



commit 323d24db8c3f75c7ae8da4058dd13aa4fd03b995
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Aug 19 15:38:47 2011 +0800

    Update configure.ac to check for rint()/round()
    
    Added check in configure.ac to check for the rint() and
    round() functions as they are normally only available in C99
    compilers.

 configure.ac |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9f3cc54..15ceab3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -753,6 +753,18 @@ if test $gtk_uxtheme_h = yes; then
 fi
 AC_MSG_RESULT($gtk_uxtheme_h)
 
+# Check for round()
+AC_CHECK_LIB(m,round,have_round=yes,have_round=no)
+if test $have_round = yes; then
+    AC_DEFINE(HAVE_ROUND, 1, [Define to 1 if round() is available])
+fi
+
+# Check for rint()
+AC_CHECK_LIB(m,rint,have_rint=yes,have_rint=no)
+if test $have_rint = yes; then
+    AC_DEFINE(HAVE_RINT, 1, [Define to 1 if rint() is available])
+fi
+
 # Checks for gdkspawn
 AC_CHECK_HEADERS(crt_externs.h)
 AC_CHECK_FUNCS(_NSGetEnviron)



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