summaryrefslogtreecommitdiff
path: root/Build/source/texk/devnag/configure
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-22 07:24:20 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-22 07:24:20 +0000
commit852f4cab5e64bcdff885eec3d449f210ed5f5985 (patch)
tree5f661d9609f1243b44f28e215e5f0078402eabd0 /Build/source/texk/devnag/configure
parent60b31fdb58e905c8f0e3b31d8100a6b6ba51b953 (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/configure')
-rwxr-xr-xBuild/source/texk/devnag/configure62
1 files changed, 62 insertions, 0 deletions
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