X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=e50796edaa116d13ecec02c53c134ee5bb39e487;hb=b09b29ef706af9d9de446c30cf3a89f46b8741d0;hp=8f163d34fe4daaf7b0410321b51e350022f90244;hpb=cf7270234325c623c6d6a88e6ba7e673a9a50333;p=rrdtool.git diff --git a/configure.ac b/configure.ac index 8f163d3..e50796e 100644 --- a/configure.ac +++ b/configure.ac @@ -8,13 +8,13 @@ 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 -AC_INIT([rrdtool],[1.2.11]) +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 -NUMVERS=1.2011 +NUMVERS=1.2015 AC_SUBST(NUMVERS) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE @@ -26,7 +26,6 @@ dnl is in there dnl determine the type of system we are running on - AC_SUBST(VERSION) AC_PREFIX_DEFAULT( /usr/local/rrdtool-$PACKAGE_VERSION ) @@ -104,6 +103,12 @@ char *strchr (), *strrchr (); # 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 @@ -190,6 +195,21 @@ AC_PROG_CC 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) @@ -364,9 +384,9 @@ CONFIGURE_PART(Findr 3rd-Party Libraries) AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no]) EX_CHECK_ALL(art_lgpl_2, art_vpath_add_point, libart_lgpl/libart.h, libart-2.0, 2.3.17, ftp://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/, /usr/include/libart-2.0) -EX_CHECK_ALL(z, zlibVersion, zlib.h, zlib, 1.2.2, http://www.gzip.org/zlib/, "") -EX_CHECK_ALL(png, png_access_version_number, png.h, libpng, 1.2.8, http://prdownloads.sourceforge.net/libpng/, "") -EX_CHECK_ALL(freetype, FT_Init_FreeType, ft2build.h, freetype2, 2.1.9, http://prdownloads.sourceforge.net/freetype/, /usr/include/freetype2) +EX_CHECK_ALL(z, zlibVersion, zlib.h, zlib, 1.2.3, http://www.gzip.org/zlib/, "") +EX_CHECK_ALL(png, png_access_version_number, png.h, libpng, 1.2.10, http://prdownloads.sourceforge.net/libpng/, "") +EX_CHECK_ALL(freetype, FT_Init_FreeType, ft2build.h, freetype2, 2.1.10, http://prdownloads.sourceforge.net/freetype/, /usr/include/freetype2) if test "$EX_CHECK_ALL_ERR" = "YES"; then AC_MSG_ERROR([Please fix the library issues listed above and try again.]) @@ -463,6 +483,8 @@ AC_SUBST(PERL) AC_SUBST(COMP_PERL) AC_SUBST(PERL_VERSION) +enable_tcl_site=no + AC_ARG_ENABLE(tcl,[ --disable-tcl do not build the tcl modules], [],[enable_tcl=yes]) @@ -489,9 +511,13 @@ if test "$enable_tcl" = "yes"; then . $tcl_config TCL_PACKAGE_DIR="$TCL_PACKAGE_PATH/tclrrd$VERSION" fi + AC_ARG_ENABLE(tcl,[ --enable-tcl-site install the tcl extension in the tcl tree], + [],[enable_tcl_site=yes]) + fi AM_CONDITIONAL(BUILD_TCL, test "$enable_tcl" = "yes" ) +AM_CONDITIONAL(BUILD_TCL_SITE, test "$enable_tcl_site" = "yes" ) AC_SUBST(TCL_PREFIX) AC_SUBST(TCL_SHLIB_CFLAGS) @@ -522,37 +548,24 @@ AC_ARG_VAR(RRDDOCDIR, [[DATADIR/doc/PACKAGE-VERSION] Documentation directory]) 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) -AC_CONFIG_FILES([examples/shared-demo.pl - examples/piped-demo.pl - examples/stripes.pl - examples/bigtops.pl - examples/minmax.pl - examples/cgi-demo.cgi - examples/4charts.pl - examples/Makefile - doc/Makefile - src/Makefile - bindings/Makefile - bindings/tcl/Makefile - bindings/tcl/ifOctets.tcl - bindings/python/Makefile - Makefile]) +AC_CONFIG_FILES([examples/shared-demo.pl]) +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/cgi-demo.cgi]) +AC_CONFIG_FILES([examples/4charts.pl]) +AC_CONFIG_FILES([examples/Makefile]) +AC_CONFIG_FILES([doc/Makefile]) +AC_CONFIG_FILES([src/Makefile]) +AC_CONFIG_FILES([bindings/Makefile]) +AC_CONFIG_FILES([bindings/tcl/Makefile]) +AC_CONFIG_FILES([bindings/tcl/ifOctets.tcl]) +AC_CONFIG_FILES([bindings/python/Makefile]) +AC_CONFIG_FILES([Makefile]) AC_CONFIG_COMMANDS([default],[[ chmod +x examples/*.cgi examples/*.pl]],[[]]) AC_OUTPUT @@ -560,7 +573,7 @@ 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://people.ee.ethz.ch/oetiker/wish $ECHO_C" 1>&6 sleep 1 echo $ECHO_N ".$ECHO_C" 1>&6 sleep 1