fix generation of cgi-demo.cgi -- Peter Breitenlohner peb mppmu.mpg.de
[rrdtool.git] / configure.ac
index b64d480..2d4a242 100644 (file)
@@ -8,17 +8,17 @@ dnl Inspiration from http://autoconf-archive.cryp.to
 dnl tell automake the this script is for rrdtool
 dnl the official version number is
 dnl a.b.c
 dnl tell automake the this script is for rrdtool
 dnl the official version number is
 dnl a.b.c
-AC_INIT([rrdtool],[1.2.12])
+AC_INIT([rrdtool],[1.2.15])
 dnl for testing a numberical version number comes handy
 dnl the released version are
 dnl a.bccc
 dnl the devl versions will be something like
 dnl a.b999yymmddhh 
 dnl for testing a numberical version number comes handy
 dnl the released version are
 dnl a.bccc
 dnl the devl versions will be something like
 dnl a.b999yymmddhh 
-NUMVERS=1.2012
+NUMVERS=1.2015
 AC_SUBST(NUMVERS)
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE
 AC_SUBST(NUMVERS)
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE
-AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([rrd_config.h])
 
 dnl all our local stuff like install scripts and include files
 dnl is in there
 
 dnl all our local stuff like install scripts and include files
 dnl is in there
@@ -37,8 +37,8 @@ dnl At the TOP of the HEADER
 
 AH_TOP([
 
 
 AH_TOP([
 
-#ifndef CONFIG_H
-#define CONFIG_H
+#ifndef RRD_CONFIG_H
+#define RRD_CONFIG_H
 /* IEEE can be prevented from raising signals with fpsetmask(0) */
 #undef MUST_DISABLE_FPMASK
 
 /* IEEE can be prevented from raising signals with fpsetmask(0) */
 #undef MUST_DISABLE_FPMASK
 
@@ -103,6 +103,12 @@ char *strchr (), *strrchr ();
 #  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
 #endif
 
 #  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
 #endif
 
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
+
 /* for OSF1 Digital Unix */
 #if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
 #  define HAVE_ISINF 1
 /* for OSF1 Digital Unix */
 #if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
 #  define HAVE_ISINF 1
@@ -143,7 +149,7 @@ char *strchr (), *strrchr ();
 #error "Can't compile without isinf function"
 #endif
 
 #error "Can't compile without isinf function"
 #endif
 
-#endif /* CONFIG_H */
+#endif /* RRD_CONFIG_H */
 ])
 
 dnl Process Special Options
 ])
 
 dnl Process Special Options
@@ -189,6 +195,21 @@ AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_LIBTOOL
 
 AC_PROG_CPP
 AC_PROG_LIBTOOL
 
+dnl which flags does the compile support?
+if test "$GCC" = "yes"; then
+  for flag in -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -W; do
+    oCFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS $flag"
+    cachename=rd_cv_gcc_flag_`echo $flag|sed 's/[[^A-Za-z]]/_/g'`
+    AC_CACHE_CHECK([if gcc likes the $flag flag], $cachename,
+       [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0 ]])],[eval $cachename=yes],[eval $cachename=no])])
+    if eval test \$$cachename = no; then
+         CFLAGS=$oCFLAGS
+    fi
+  done
+fi
+
+
 
 AC_SUBST(RRD_DEFAULT_FONT)
 
 
 AC_SUBST(RRD_DEFAULT_FONT)
 
@@ -527,19 +548,6 @@ AC_ARG_VAR(RRDDOCDIR, [[DATADIR/doc/PACKAGE-VERSION] Documentation directory])
 if test -z "$RRDDOCDIR"; then
    RRDDOCDIR='${datadir}/doc/${PACKAGE}-${VERSION}'; fi
 
 if test -z "$RRDDOCDIR"; then
    RRDDOCDIR='${datadir}/doc/${PACKAGE}-${VERSION}'; fi
 
-dnl Does the compiler like -Wall and -pedantic?
-if test "$GCC" = "yes"; then
-  oCFLAGS=$CFLAGS
-  CFLAGS="$CFLAGS -fno-strict-aliasing -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_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0 ]])],[rd_cv_gcc_opt=yes],[rd_cv_gcc_opt=no ])
-               ]
-        )
-  if test $rd_cv_gcc_opt = no; then
-         CFLAGS=$oCFLAGS
-  fi
-fi
-
 
 CONFIGURE_PART(Apply Configuration Information)
  
 
 CONFIGURE_PART(Apply Configuration Information)
  
@@ -548,7 +556,6 @@ AC_CONFIG_FILES([examples/piped-demo.pl])
 AC_CONFIG_FILES([examples/stripes.pl])
 AC_CONFIG_FILES([examples/bigtops.pl])
 AC_CONFIG_FILES([examples/minmax.pl])
 AC_CONFIG_FILES([examples/stripes.pl])
 AC_CONFIG_FILES([examples/bigtops.pl])
 AC_CONFIG_FILES([examples/minmax.pl])
-AC_CONFIG_FILES([examples/cgi-demo.cgi])
 AC_CONFIG_FILES([examples/4charts.pl])
 AC_CONFIG_FILES([examples/Makefile])
 AC_CONFIG_FILES([doc/Makefile])
 AC_CONFIG_FILES([examples/4charts.pl])
 AC_CONFIG_FILES([examples/Makefile])
 AC_CONFIG_FILES([doc/Makefile])
@@ -559,13 +566,13 @@ AC_CONFIG_FILES([bindings/tcl/ifOctets.tcl])
 AC_CONFIG_FILES([bindings/python/Makefile])
 AC_CONFIG_FILES([Makefile])          
 
 AC_CONFIG_FILES([bindings/python/Makefile])
 AC_CONFIG_FILES([Makefile])          
 
-AC_CONFIG_COMMANDS([default],[[ chmod +x examples/*.cgi examples/*.pl]],[[]])
+AC_CONFIG_COMMANDS([default],[[ chmod +x examples/*.pl]],[[]])
 AC_OUTPUT
 
 AC_MSG_CHECKING(in)
 AC_MSG_RESULT(and out again)
 
 AC_OUTPUT
 
 AC_MSG_CHECKING(in)
 AC_MSG_RESULT(and out again)
 
-echo $ECHO_N "ordering CD from http://people.ee.ethz.ch/oetiker/wish $ECHO_C" 1>&6
+echo $ECHO_N "ordering CD from http://tobi.oetiker.ch/wish $ECHO_C" 1>&6
 sleep 1
 echo $ECHO_N ".$ECHO_C" 1>&6
 sleep 1
 sleep 1
 echo $ECHO_N ".$ECHO_C" 1>&6
 sleep 1