X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=94ec225383bba79a3014a8803f9826cecc47ba2f;hb=36757af2243ffa0176b4896c77e0aa28c35cb0e7;hp=fca2c34c6167a61e7c54ba9b3aae29d7955a8951;hpb=e5e436c69a2dcf3d5fa3b87cf5716d52dab99bc3;p=rrdtool.git diff --git a/configure.ac b/configure.ac index fca2c34..94ec225 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.12]) +AC_INIT([rrdtool],[1.2.13]) 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.2013 AC_SUBST(NUMVERS) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE @@ -189,6 +189,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) @@ -363,9 +378,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.]) @@ -527,19 +542,6 @@ 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)