From d3865a9bf991f5641d0b979f39276a99a5172753 Mon Sep 17 00:00:00 2001 From: ehofman Date: Tue, 27 Jan 2004 09:31:27 +0000 Subject: [PATCH] Check for the precense of truncf rather than hard-wire it in --- configure.ac | 8 ++++++-- src/Cockpit/panel.cxx | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 10892754a..a7e4d2d57 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/src/Cockpit/panel.cxx b/src/Cockpit/panel.cxx index 53a9bde58..16d7b7792 100644 --- a/src/Cockpit/panel.cxx +++ b/src/Cockpit/panel.cxx @@ -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); } -- 2.39.5