[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r3595: Detect whether we can build with cmath, or if we should fall (in vidalia/trunk: . src/vidalia/network)
Author: edmanm
Date: 2009-02-25 19:41:47 -0500 (Wed, 25 Feb 2009)
New Revision: 3595
Modified:
vidalia/trunk/CMakeLists.txt
vidalia/trunk/config.h.in
vidalia/trunk/src/vidalia/network/tormapimageview.cpp
Log:
Detect whether we can build with cmath, or if we should fall back to
math.h. Should fix the MIPSPro build.
Modified: vidalia/trunk/CMakeLists.txt
===================================================================
--- vidalia/trunk/CMakeLists.txt 2009-02-25 12:08:30 UTC (rev 3594)
+++ vidalia/trunk/CMakeLists.txt 2009-02-26 00:41:47 UTC (rev 3595)
@@ -101,6 +101,8 @@
## Check for system header files
check_include_file("limits.h" HAVE_LIMITS_H)
check_include_file("sys/limits.h" HAVE_SYS_LIMITS_H)
+check_include_file("math.h" HAVE_MATH_H)
+check_include_file_cxx("cmath" HAVE_CMATH)
## Check for the sizes of various data types
check_type_size(int SIZEOF_INT)
Modified: vidalia/trunk/config.h.in
===================================================================
--- vidalia/trunk/config.h.in 2009-02-25 12:08:30 UTC (rev 3594)
+++ vidalia/trunk/config.h.in 2009-02-26 00:41:47 UTC (rev 3595)
@@ -24,6 +24,10 @@
#cmakedefine HAVE_SYS_LIMITS_H
+#cmakedefine HAVE_MATH_H
+
+#cmakedefine HAVE_CMATH
+
#cmakedefine SIZEOF_INT @SIZEOF_INT@
#cmakedefine USE_MINIUPNPC
Modified: vidalia/trunk/src/vidalia/network/tormapimageview.cpp
===================================================================
--- vidalia/trunk/src/vidalia/network/tormapimageview.cpp 2009-02-25 12:08:30 UTC (rev 3594)
+++ vidalia/trunk/src/vidalia/network/tormapimageview.cpp 2009-02-26 00:41:47 UTC (rev 3595)
@@ -15,7 +15,14 @@
*/
#include <QStringList>
+#include <config.h>
+
+#if defined(HAVE_CMATH)
#include <cmath>
+#elif defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
#include "tormapimageview.h"
#define IMG_WORLD_MAP ":/images/map/world-map.png"