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); }