diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-06-22 07:24:20 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-06-22 07:24:20 +0000 |
commit | 852f4cab5e64bcdff885eec3d449f210ed5f5985 (patch) | |
tree | 5f661d9609f1243b44f28e215e5f0078402eabd0 /Build/source/texk/devnag | |
parent | 60b31fdb58e905c8f0e3b31d8100a6b6ba51b953 (diff) |
enable compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@13869 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/devnag')
-rw-r--r-- | Build/source/texk/devnag/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/devnag/Makefile.am | 9 | ||||
-rw-r--r-- | Build/source/texk/devnag/Makefile.in | 5 | ||||
-rw-r--r-- | Build/source/texk/devnag/aclocal.m4 | 1 | ||||
-rwxr-xr-x | Build/source/texk/devnag/configure | 62 | ||||
-rw-r--r-- | Build/source/texk/devnag/configure.ac | 3 | ||||
-rw-r--r-- | Build/source/texk/devnag/src/Makefile.am | 4 | ||||
-rw-r--r-- | Build/source/texk/devnag/src/Makefile.in | 5 |
8 files changed, 90 insertions, 4 deletions
diff --git a/Build/source/texk/devnag/ChangeLog b/Build/source/texk/devnag/ChangeLog index 722c18f256a..e74a6bef01f 100644 --- a/Build/source/texk/devnag/ChangeLog +++ b/Build/source/texk/devnag/ChangeLog @@ -1,3 +1,8 @@ +2009-06-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * configure.ac, Makefile.am, src/Makefile.am: enable compiler + warnings. + 2009-05-27 Peter Breitenlohner <peb@mppmu.mpg.de> Adapt to TL2009 build system. diff --git a/Build/source/texk/devnag/Makefile.am b/Build/source/texk/devnag/Makefile.am index f963effea22..b08f08b9d08 100644 --- a/Build/source/texk/devnag/Makefile.am +++ b/Build/source/texk/devnag/Makefile.am @@ -1 +1,8 @@ -SUBDIRS = src
\ No newline at end of file +## Makefile.am for the TeX Live subdirectory texk/devnag/ +## +## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. +## +ACLOCAL_AMFLAGS = -I ../../m4 + +SUBDIRS = src diff --git a/Build/source/texk/devnag/Makefile.in b/Build/source/texk/devnag/Makefile.in index 0f1f0bd82da..b5ca302b9ef 100644 --- a/Build/source/texk/devnag/Makefile.in +++ b/Build/source/texk/devnag/Makefile.in @@ -44,7 +44,8 @@ DIST_COMMON = README $(am__configure_deps) \ ../../build-aux/texinfo.tex ../../build-aux/ylwrap AUTHORS \ COPYING ChangeLog INSTALL NEWS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -150,6 +151,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -192,6 +194,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I ../../m4 SUBDIRS = src all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/Build/source/texk/devnag/aclocal.m4 b/Build/source/texk/devnag/aclocal.m4 index d360465f230..a6397fb2452 100644 --- a/Build/source/texk/devnag/aclocal.m4 +++ b/Build/source/texk/devnag/aclocal.m4 @@ -989,3 +989,4 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([../../m4/kpse-warnings.m4]) diff --git a/Build/source/texk/devnag/configure b/Build/source/texk/devnag/configure index aa126d449a1..1f88cf2498a 100755 --- a/Build/source/texk/devnag/configure +++ b/Build/source/texk/devnag/configure @@ -608,6 +608,7 @@ LIBOBJS EGREP GREP CPP +WARNING_CFLAGS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -692,6 +693,7 @@ ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking +enable_compiler_warnings ' ac_precious_vars='build_alias host_alias @@ -1333,6 +1335,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] Some influential environment variables: CC C compiler command @@ -1826,6 +1831,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + ac_config_headers="$ac_config_headers config.h" @@ -3559,6 +3565,62 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +# 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_ext=c diff --git a/Build/source/texk/devnag/configure.ac b/Build/source/texk/devnag/configure.ac index 785f0da76b1..cbb8f83a119 100644 --- a/Build/source/texk/devnag/configure.ac +++ b/Build/source/texk/devnag/configure.ac @@ -10,6 +10,7 @@ AC_INIT([devnag for TeX Live], [2.01], [tex-k@tug.org]) AC_PREREQ([2.63]) AC_CONFIG_SRCDIR([src/devnag.c]) AC_CONFIG_AUX_DIR([../../build-aux]) +AC_CONFIG_MACRO_DIR([../../m4]) AC_CONFIG_HEADERS([config.h]) @@ -20,6 +21,8 @@ dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL +KPSE_COMPILER_WARNINGS + dnl Checks for libraries. dnl Checks for header files. diff --git a/Build/source/texk/devnag/src/Makefile.am b/Build/source/texk/devnag/src/Makefile.am index 76d93cab973..3928c23ec96 100644 --- a/Build/source/texk/devnag/src/Makefile.am +++ b/Build/source/texk/devnag/src/Makefile.am @@ -1,2 +1,4 @@ bin_PROGRAMS = devnag -devnag_SOURCES = devnag.c
\ No newline at end of file +devnag_SOURCES = devnag.c + +AM_CFLAGS = $(WARNING_CFLAGS) diff --git a/Build/source/texk/devnag/src/Makefile.in b/Build/source/texk/devnag/src/Makefile.in index 12e55ec1844..9ca3e6517a7 100644 --- a/Build/source/texk/devnag/src/Makefile.in +++ b/Build/source/texk/devnag/src/Makefile.in @@ -36,7 +36,8 @@ bin_PROGRAMS = devnag$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/../../build-aux/mkinstalldirs @@ -105,6 +106,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -148,6 +150,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ devnag_SOURCES = devnag.c +AM_CFLAGS = $(WARNING_CFLAGS) all: all-am .SUFFIXES: |