diff --git a/configure b/configure index 0383078b2..f10b94cdb 100755 --- a/configure +++ b/configure @@ -45,6 +45,37 @@ EOF rm -f testconf.c testconf } +lm_test() +{ + cat > testconf.c << EOF + int main() + { + sqrt( 42 ); + } +EOF + if ! $CC -o testconf testconf.c > /dev/null 2>&1 + then + if $CC -o testconf testconf.c -lm > /dev/null 2>&1 + then + LINKLIBS="$LINKLIBS -lm" + fi + fi +} + +lrintf_test() +{ + cat > testconf.c << EOF + int main() + { + return ( lrintf( 3.14 ) != 3 ); + } +EOF + if ( $CC -o testconf testconf.c $LINKLIBS && ./testconf ) > /dev/null 2>&1 + then + DEFINES="$DEFINES HAVE_LRINTF" + fi +} + gettext_test() { cat > testconf.c < #include "transmission.h" -#if defined(SYS_BEOS) || defined(SYS_FREEBSD_4) -#define lrintf(a) ((int)(0.5+(a))) +#ifndef HAVE_LRINTF +# define lrintf(a) ((int)(0.5+(a))) #endif /* We may try to allocate and free tables of size 0. Quick and dirty