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/libpng | |
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/libpng')
-rw-r--r-- | Build/source/libs/libpng/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/libs/libpng/Makefile.am | 1 | ||||
-rw-r--r-- | Build/source/libs/libpng/Makefile.in | 3 | ||||
-rw-r--r-- | Build/source/libs/libpng/aclocal.m4 | 1 | ||||
-rwxr-xr-x | Build/source/libs/libpng/configure | 61 | ||||
-rw-r--r-- | Build/source/libs/libpng/configure.ac | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-1.2.37/png.c | 2 |
7 files changed, 75 insertions, 1 deletions
diff --git a/Build/source/libs/libpng/ChangeLog b/Build/source/libs/libpng/ChangeLog index 02a805b6739..54db9853d4a 100644 --- a/Build/source/libs/libpng/ChangeLog +++ b/Build/source/libs/libpng/ChangeLog @@ -1,3 +1,9 @@ +2009-06-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * configure.ac: enable compiler warnings. + * Makefile.am (AM_CFLAGS): enable compiler warnings. + * libpng-1.2.37/png.c (png_64bit_product): declare as static. + 2009-06-04 Martin Schröder <martin@oneiros.de> Import libpng-1.2.37. diff --git a/Build/source/libs/libpng/Makefile.am b/Build/source/libs/libpng/Makefile.am index 71d0c14c8af..6a249f92b5f 100644 --- a/Build/source/libs/libpng/Makefile.am +++ b/Build/source/libs/libpng/Makefile.am @@ -27,6 +27,7 @@ dist-hook: INCLUDES = -I$(top_srcdir)/$(LIBPNG_TREE) $(ZLIB_INCLUDES) AM_CPPFLAGS = $(LIBPNG_DEFINES) +AM_CFLAGS = $(WARNING_CFLAGS) noinst_LIBRARIES=libpng.a diff --git a/Build/source/libs/libpng/Makefile.in b/Build/source/libs/libpng/Makefile.in index 23ae04a5dc5..cf94b428574 100644 --- a/Build/source/libs/libpng/Makefile.in +++ b/Build/source/libs/libpng/Makefile.in @@ -48,6 +48,7 @@ DIST_COMMON = README $(am__configure_deps) \ ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog 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) \ @@ -151,6 +152,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ ZLIB_DEPEND = @ZLIB_DEPEND@ ZLIB_INCLUDES = @ZLIB_INCLUDES@ ZLIB_LIBS = @ZLIB_LIBS@ @@ -200,6 +202,7 @@ ACLOCAL_AMFLAGS = -I ../../m4 EXTRA_DIST = $(LIBPNG_TREE) INCLUDES = -I$(top_srcdir)/$(LIBPNG_TREE) $(ZLIB_INCLUDES) AM_CPPFLAGS = $(LIBPNG_DEFINES) +AM_CFLAGS = $(WARNING_CFLAGS) noinst_LIBRARIES = libpng.a nodist_libpng_a_SOURCES = \ $(LIBPNG_TREE)/png.c \ diff --git a/Build/source/libs/libpng/aclocal.m4 b/Build/source/libs/libpng/aclocal.m4 index 9543c90a2a9..fcf3b484aeb 100644 --- a/Build/source/libs/libpng/aclocal.m4 +++ b/Build/source/libs/libpng/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/libpng/configure b/Build/source/libs/libpng/configure index 65a65f59edc..6378893daa1 100755 --- a/Build/source/libs/libpng/configure +++ b/Build/source/libs/libpng/configure @@ -653,6 +653,7 @@ POW_LIB EGREP GREP CPP +WARNING_CFLAGS RANLIB am__fastdepCC_FALSE am__fastdepCC_TRUE @@ -741,6 +742,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 @@ -1385,6 +1387,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] @@ -3623,6 +3628,62 @@ else 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 + + + + + ac_config_headers="$ac_config_headers config.h" diff --git a/Build/source/libs/libpng/configure.ac b/Build/source/libs/libpng/configure.ac index 5b7171cb161..c0368b4a28d 100644 --- a/Build/source/libs/libpng/configure.ac +++ b/Build/source/libs/libpng/configure.ac @@ -29,6 +29,8 @@ AC_SUBST([PNGLIB_RELEASE]) AC_PROG_CC AC_PROG_RANLIB +KPSE_COMPILER_WARNINGS + AC_CONFIG_HEADERS([config.h]) # Checks for header files. diff --git a/Build/source/libs/libpng/libpng-1.2.37/png.c b/Build/source/libs/libpng/libpng-1.2.37/png.c index 62b86e1d026..9a0fef5a50d 100644 --- a/Build/source/libs/libpng/libpng-1.2.37/png.c +++ b/Build/source/libs/libpng/libpng-1.2.37/png.c @@ -825,7 +825,7 @@ png_convert_size(size_t size) * A and D, and X || Y is (X << 16) + Y. */ -void png_64bit_product (long v1, long v2, unsigned long *hi_product, +static void png_64bit_product (long v1, long v2, unsigned long *hi_product, unsigned long *lo_product) { int a, b, c, d; |