New special value COUNT which allows calculations based on the position of a
[rrdtool.git] / configure.ac
index 9c9fe25..afe8e4d 100644 (file)
@@ -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,
@@ -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 <floatingpoint.h>], [fpsetmask(0)],
-               [AC_DEFINE(MUST_DISABLE_FPMASK)
-              PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"],
-               [AC_IEEE([with signal(SIGFPE,SIG_IGN)], sigfpe,
-                 [#include <signal.h>], [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 <floatingpoint.h>], [fpsetmask(0)],
+                 [AC_DEFINE(MUST_DISABLE_FPMASK)
+                PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"],
+                 [AC_IEEE([with signal(SIGFPE,SIG_IGN)], sigfpe,
+                   [#include <signal.h>], [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                       \