gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog configure.ac libbase/utility.h


From: Markus Gothe
Subject: [Gnash-commit] gnash ChangeLog configure.ac libbase/utility.h
Date: Mon, 27 Aug 2007 21:15:11 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  07/08/27 21:15:11

Modified files:
        .              : ChangeLog configure.ac 
        libbase        : utility.h 

Log message:
        Check for exp2() and log2()

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4127&r2=1.4128
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.407&r2=1.408
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/utility.h?cvsroot=gnash&r1=1.28&r2=1.29

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4127
retrieving revision 1.4128
diff -u -b -r1.4127 -r1.4128
--- ChangeLog   27 Aug 2007 18:52:57 -0000      1.4127
+++ ChangeLog   27 Aug 2007 21:15:10 -0000      1.4128
@@ -92,6 +92,7 @@
 2007-08-27 Markus Gothe <address@hidden>
 
        * libbase/utility.h: defined exp2() as it's missing on some BSDen.
+       * configure.ac check for exp2() and log2().
 
 2007-08-27 Zou Lunkai <address@hidden>
        

Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.407
retrieving revision 1.408
diff -u -b -r1.407 -r1.408
--- configure.ac        26 Aug 2007 10:23:48 -0000      1.407
+++ configure.ac        27 Aug 2007 21:15:10 -0000      1.408
@@ -15,7 +15,7 @@
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 dnl  
 
-dnl $Id: configure.ac,v 1.407 2007/08/26 10:23:48 strk Exp $
+dnl $Id: configure.ac,v 1.408 2007/08/27 21:15:10 nihilus Exp $
 
 AC_PREREQ(2.50)
 AC_INIT(gnash, cvs)
@@ -777,6 +777,9 @@
 AC_CHECK_LIB(m, sqrt)
 AC_CHECK_LIB(c, getpwnam,AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] ))
 
+AC_CHECK_LIB(m, exp2, AC_DEFINE(HAVE_EXP2, 1, [Has exp2()]))
+AC_CHECK_LIB(m, log2, AC_DEFINE(HAVE_LOG2, 1, [Has log2()]))
+
 dnl don't look for X11 when using a raw framebuffer for the GUI
 if test x$build_gtk = xyes -o x$build_kde = xyes -o x$build_fltk = xyes -o 
x$build_sdl = xyes; then
 dnl AC_PATH_XTRA

Index: libbase/utility.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/utility.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- libbase/utility.h   27 Aug 2007 18:12:30 -0000      1.28
+++ libbase/utility.h   27 Aug 2007 21:15:11 -0000      1.29
@@ -113,10 +113,13 @@
 //This is from C99.
 const float LN_2 = 0.693147180559945f;
 // the overridden log(f) will use logf IFF f is a float
+#ifndef HAVE_LOG2
 inline float   log2(float f) { return std::log(f) / LN_2; }
+#endif
 //exp2 might be missing on Net-/OpenBSD.
-// TODO: check availability with a configure macro 
-//inline float exp2(double x) { return std::pow((double)2, double(x)); }
+#ifndef HAVE_EXP2
+inline float   exp2(double x) { return std::pow((double)2, double(x)); }
+#endif
 inline int     fchop( float f ) { return (int) f; }    // replace w/ inline 
asm if desired
 inline int     frnd(float f) { return fchop(f + 0.5f); }       // replace with 
inline asm if desired
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]