X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=bbed6da35c940ded82375f051af5c9e6242e4e18;hb=5ef54f1d335624d9a30306a3105b84fe21255fa1;hp=9c9fe258818ef1f9d539b35125f180d0672c1c64;hpb=07a13ae6af039060f346a651ef3f97ad8f183459;p=rrdtool.git diff --git a/configure.ac b/configure.ac index 9c9fe25..bbed6da 100644 --- a/configure.ac +++ b/configure.ac @@ -167,7 +167,7 @@ else SO_EXT=`$PERL -e 'use Config; if (defined $Config{so} and $Config{so} ne 'a') {print "$Config{so}\n"} else {print "so\n"};'` AC_MSG_RESULT($SO_EXT) AC_MSG_CHECKING(for the C compiler perl wants to use to build its modules) - PROBLEMCC=`$PERL -e 'use Config; map {if (-x "$_/$Config{cc}"){exit 0}} split /:/, $ENV{PATH};print $Config{cc}'` + PROBLEMCC=`$PERL -e 'use Config; ($cc = $Config{cc}) =~ s/\s.*//; exit 0 if -x $cc; map {if (-x "$_/$cc"){exit 0}} split /:/, $ENV{PATH};print $Config{cc}'` if test x$PROBLEMCC != x; then AC_MSG_RESULT(no) echo Could not find the Compiler: '"'$PROBLEMCC'"' @@ -248,7 +248,7 @@ AC_PATH_PROGS(TROFF, groff troff) dnl Does the compiler like -Wall and -pedantic? if test "x$GCC" = "xyes"; then oCFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline" + CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -W" AC_CACHE_CHECK(if we can use GCC-specific compiler options, rd_cv_gcc_opt, [AC_TRY_COMPILE( , return 0 , rd_cv_gcc_opt=yes, @@ -261,7 +261,7 @@ if test "x$GCC" = "xyes"; then fi dnl add pic flag in any case this makes sure all our code is relocatable -CFLAGS="$CFLAGS "`grep pic_flag= libtool | sed -e 's/.*pic_flag=//' -e 's/"//g'` +CFLAGS="$CFLAGS "`grep pic_flag= libtool | head -1|sed -e 's/.*pic_flag=//' -e 's/"//g'` ZLIB_CFLAGS=$CFLAGS dnl it seems that hpux chockes on -fPIC for some reason @@ -279,7 +279,7 @@ AC_FUNC_VPRINTF dnl for each function found we get a definition in config.h dnl of the form HAVE_FUNCTION -AC_CHECK_FUNCS(tzset setlocale strerror snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) +AC_CHECK_FUNCS(tzset opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) dnl HP-UX 11.00 does not have finite but does have isfinite as a macro AC_CHECK_FUNCS(fpclassify, , @@ -416,22 +416,24 @@ AC_IEEE([out of the box], works, , , , AC_IEEE([with the -mieee switch], mswitch, , , , [CFLAGS="$_cflags -q float=rndsngl" AC_IEEE([with the -q float=rndsngl switch], qswitch, , , , - [CFLAGS="$_cflags -OPT:IEEE_comparisons=ON" - AC_IEEE([with the -OPT:IEEE_comparisons=ON switch], ieeecmpswitch, , , , - [CFLAGS=$_cflags - AC_IEEE([with fpsetmask(0)], mask, - [#include ], [fpsetmask(0)], - [AC_DEFINE(MUST_DISABLE_FPMASK) - PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"], - [AC_IEEE([with signal(SIGFPE,SIG_IGN)], sigfpe, - [#include ], [signal(SIGFPE,SIG_IGN)], - [AC_DEFINE(MUST_DISABLE_SIGFPE) - PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE"], - AC_MSG_ERROR([ + [CFLAGS="$_cflags -OPT:IEEE_NaN_inf=ON" + AC_IEEE([with the -OPT:IEEE_NaN_inf=ON switch], ieeenaninfswitch, , , , + [CFLAGS="$_cflags -OPT:IEEE_comparisons=ON" + AC_IEEE([with the -OPT:IEEE_comparisons=ON switch], ieeecmpswitch, , , , + [CFLAGS=$_cflags + AC_IEEE([with fpsetmask(0)], mask, + [#include ], [fpsetmask(0)], + [AC_DEFINE(MUST_DISABLE_FPMASK) + PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"], + [AC_IEEE([with signal(SIGFPE,SIG_IGN)], sigfpe, + [#include ], [signal(SIGFPE,SIG_IGN)], + [AC_DEFINE(MUST_DISABLE_SIGFPE) + PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE"], + AC_MSG_ERROR([ Your Compiler does not do propper IEEE math ... Please find out how to make IEEE math work with your compiler and let me know (oetiker@ee.ethz.ch). Check config.log to see what went wrong ... -]))])])])])])])])]) +]))])])])])])])])])]) AC_CONFIG_FILES([examples/shared-demo.pl \