diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-06-19 14:29:23 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-06-19 14:29:23 +0000 |
commit | e4add5c328fd8ff92767526464ce3643ec402a01 (patch) | |
tree | 703ace29946f0a32854808d81e8e6c16f653d366 /Build/source/libs/teckit | |
parent | 3140bf500118573f645f3804cc743ce269945e5b (diff) |
compiler warnings:
do not warn for unknown pragmas
enable in libs/libpng/
enable in libs/teckit/
enable in libs/graphite/
in libs/freetype/: add -fno-strict-aliasing to CFLAGS
regenerate
git-svn-id: svn://tug.org/texlive/trunk@13833 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/teckit')
-rw-r--r-- | Build/source/libs/teckit/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/libs/teckit/Makefile.am | 2 | ||||
-rw-r--r-- | Build/source/libs/teckit/Makefile.in | 5 | ||||
-rw-r--r-- | Build/source/libs/teckit/aclocal.m4 | 1 | ||||
-rwxr-xr-x | Build/source/libs/teckit/configure | 90 | ||||
-rw-r--r-- | Build/source/libs/teckit/configure.ac | 2 |
6 files changed, 105 insertions, 0 deletions
diff --git a/Build/source/libs/teckit/ChangeLog b/Build/source/libs/teckit/ChangeLog index 9cc14b044f6..1074a70374b 100644 --- a/Build/source/libs/teckit/ChangeLog +++ b/Build/source/libs/teckit/ChangeLog @@ -1,3 +1,8 @@ +2009-06-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * configure.ac: enable compiler warnings. + * Makefile.am (AM_CFLAGS, AM_CXXFLAGS): enable compiler warnings. + 2009-05-07 Peter Breitenlohner <peb@mppmu.mpg.de> Adapt to TL2009 build system. diff --git a/Build/source/libs/teckit/Makefile.am b/Build/source/libs/teckit/Makefile.am index 37261ca1ea7..19e895098fe 100644 --- a/Build/source/libs/teckit/Makefile.am +++ b/Build/source/libs/teckit/Makefile.am @@ -7,6 +7,8 @@ ACLOCAL_AMFLAGS = -I ../../m4 INCLUDES = -I$(top_srcdir)/source/Public-headers $(ZLIB_INCLUDES) AM_CPPFLAGS = -DNDEBUG +AM_CFLAGS = $(WARNING_CFLAGS) +AM_CXXFLAGS = $(WARNING_CXXFLAGS) noinst_LIBRARIES = libTECkit.a EXTRA_LIBRARIES = libTECkit_Compiler.a diff --git a/Build/source/libs/teckit/Makefile.in b/Build/source/libs/teckit/Makefile.in index 85d40883b4b..8d11161a605 100644 --- a/Build/source/libs/teckit/Makefile.in +++ b/Build/source/libs/teckit/Makefile.in @@ -48,6 +48,7 @@ DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \ COPYING ChangeLog INSTALL NEWS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ + $(top_srcdir)/../../m4/kpse-warnings.m4 \ $(top_srcdir)/../../m4/kpse-zlib-flags.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -144,6 +145,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ ZLIB_DEPEND = @ZLIB_DEPEND@ ZLIB_INCLUDES = @ZLIB_INCLUDES@ ZLIB_LIBS = @ZLIB_LIBS@ @@ -193,6 +196,8 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 INCLUDES = -I$(top_srcdir)/source/Public-headers $(ZLIB_INCLUDES) AM_CPPFLAGS = -DNDEBUG +AM_CFLAGS = $(WARNING_CFLAGS) +AM_CXXFLAGS = $(WARNING_CXXFLAGS) noinst_LIBRARIES = libTECkit.a EXTRA_LIBRARIES = libTECkit_Compiler.a libTECkit_Compiler_a_SOURCES = \ diff --git a/Build/source/libs/teckit/aclocal.m4 b/Build/source/libs/teckit/aclocal.m4 index 9543c90a2a9..fcf3b484aeb 100644 --- a/Build/source/libs/teckit/aclocal.m4 +++ b/Build/source/libs/teckit/aclocal.m4 @@ -990,4 +990,5 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([../../m4/kpse-common.m4]) +m4_include([../../m4/kpse-warnings.m4]) m4_include([../../m4/kpse-zlib-flags.m4]) diff --git a/Build/source/libs/teckit/configure b/Build/source/libs/teckit/configure index 0b152a978f8..4371700f17a 100755 --- a/Build/source/libs/teckit/configure +++ b/Build/source/libs/teckit/configure @@ -650,6 +650,8 @@ ZLIB_INCLUDES EGREP GREP CPP +WARNING_CXXFLAGS +WARNING_CFLAGS LN_S RANLIB am__fastdepCC_FALSE @@ -742,6 +744,7 @@ ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking +enable_compiler_warnings with_system_zlib with_zlib_includes with_zlib_libdir @@ -1389,6 +1392,9 @@ Optional Features: (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --enable-compiler-warnings=[no|min|yes|max] + Turn on compiler warnings [default: yes if + maintainer-mode, min otherwise] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -4133,6 +4139,90 @@ $as_echo "no, using $LN_S" >&6; } fi +# Check whether --enable-compiler-warnings was given. +if test "${enable_compiler_warnings+set}" = set; then + enableval=$enable_compiler_warnings; +fi +case $enable_compiler_warnings in + no | min | yes | max) : ;; + *) if test "x$enable_maintainer_mode" = xyes; then + enable_compiler_warnings=yes +else + enable_compiler_warnings=min +fi + ;; +esac + + +{ $as_echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } +if test "${kpse_cv_warning_cflags+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cflags= +elif test "x$GCC" = xyes; then + kpse_cv_warning_cflags="-Wall -Wunused" + case `$CC -dumpversion` in + 3.4.* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; +esac + + case `$CC -dumpversion` in + 3.[234].* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; +esac + + if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wimplicit -Wparentheses -Wreturn-type" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" + case `$CC -dumpversion` in + 3.4.* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; +esac + + fi + fi +else + : # FIXME: warning flags for non-gcc compilers +fi +fi +{ $as_echo "$as_me:$LINENO: result: $kpse_cv_warning_cflags" >&5 +$as_echo "$kpse_cv_warning_cflags" >&6; } +WARNING_CFLAGS=$kpse_cv_warning_cflags + + +{ $as_echo "$as_me:$LINENO: checking what warning flags to pass to the C++ compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C++ compiler... " >&6; } +if test "${kpse_cv_warning_cxxflags+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cxxflags= +elif test "x$GXX" = xyes; then + kpse_cv_warning_cxxflags="-Wall -Wunused" + case `$CXX -dumpversion` in + 3.[234].* | 4.*) kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wno-unknown-pragmas" ;; +esac + + if test "x$enable_compiler_warnings" != xmin; then + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wimplicit -Wparentheses -Wreturn-type" + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith" + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wcast-qual -Wcast-align -Wwrite-strings" + fi + fi +else + : # FIXME: warning flags for non-g++ compilers +fi +fi +{ $as_echo "$as_me:$LINENO: result: $kpse_cv_warning_cxxflags" >&5 +$as_echo "$kpse_cv_warning_cxxflags" >&6; } +WARNING_CXXFLAGS=$kpse_cv_warning_cxxflags + + + + # Checks for header files. ac_ext=c diff --git a/Build/source/libs/teckit/configure.ac b/Build/source/libs/teckit/configure.ac index fa377cd3d89..9d429875cce 100644 --- a/Build/source/libs/teckit/configure.ac +++ b/Build/source/libs/teckit/configure.ac @@ -21,6 +21,8 @@ AC_PROG_CC AC_PROG_RANLIB AC_PROG_LN_S +KPSE_COMPILER_WARNINGS + # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h]) |