]> git.mxchange.org Git - flightgear.git/commitdiff
Check for the precense of truncf rather than hard-wire it in
authorehofman <ehofman>
Tue, 27 Jan 2004 09:31:27 +0000 (09:31 +0000)
committerehofman <ehofman>
Tue, 27 Jan 2004 09:31:27 +0000 (09:31 +0000)
configure.ac
src/Cockpit/panel.cxx

index 10892754a73084af1e1d56965842fc9604e3ab6e..a7e4d2d5779388ba6e5c0421b3c5f5ec7f81175f 100644 (file)
@@ -458,11 +458,15 @@ AC_HEADER_TIME
 AC_STRUCT_TM
 
 dnl Checks for library functions.
+old_LIBS=$LIBS
+LIBS="$base_LIBS $network_LIBS $opengl_LIBS"
 AC_TYPE_SIGNAL
 AC_FUNC_VPRINTF
-AC_CHECK_FUNCS( \
+AC_CHECK_FUNCS( \
         ftime gettimeofday timegm memcpy bcopy mktime strstr rand mkfifo \
-       random drand48 setitimer getitimer signal GetLocalTime rint getrusage )
+       random drand48 setitimer getitimer signal GetLocalTime rint getrusage \
+       truncf ] )
+LIBS=$old_LIBS
 
 AM_CONFIG_HEADER(src/Include/config.h)
 
index 53a9bde58a4c546387d384958e1bb021e8d3c0d7..16d7b77923462b1094cee530ff13ed4d76098919 100644 (file)
@@ -53,7 +53,7 @@
 // my hardware/driver requires many more.
 #define POFF_UNITS 4
 
-#if defined( __FreeBSD__ ) || defined( _MSC_VER )      // no truncf on FreeBSD nor in MSVC
+#ifndef HAVE_TRUNCF
 inline float truncf (float d) {
     return (d < 0) ? -floorf(-d) : floorf(d);
 }