lets just fal back to "stoopid" mode rounding for non-lround platforms
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 13 Oct 2011 06:15:28 +0000 (06:15 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 13 Oct 2011 06:15:28 +0000 (06:15 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@64033 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac
src/lib/include/evas_common.h

index 8a9b58b..4495d7a 100644 (file)
@@ -505,6 +505,12 @@ case "$host_os" in
 esac
 AC_SUBST(dlopen_libs)
 
+res=no
+AC_CHECK_LIB(m, lround, res=yes, res=no)
+if test "x$res" = "xyes"; then
+  AC_DEFINE(HAVE_LROUND, 1, C99 lround function exists)
+fi
+
 SHM_OPEN_LINK=""
 AC_MSG_CHECKING([whether shm_open() is present])
 LIBS_save=${LIBS}
index e00398c..821be55 100644 (file)
 #include <sys/stat.h>
 #include <unistd.h>
 
+#ifndef HAVE_LROUND
+// right now i dont care about rendering bugs on platforms without lround
+// (e.g. windows/vc++... yay!)
+#define lround(x) ((long int)(x + 0.5))
+#endif
+
 /* macros needed to log message through eina_log */
 extern EAPI int _evas_log_dom_global;
 #ifdef  _EVAS_DEFAULT_LOG_DOM