[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:11:35 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 4c6ba0e560a2b5c63af11e8106b6c0eeaf193ac4
Author: Török Edvin <edwin at clamav.net>
Date:   Fri Dec 11 11:05:25 2009 +0200

    Fix make distcheck failure.
    
    Disabled Wbad-function-cast as error (it warned about double to int conversion).
    Also run configure itself without Werror, and only set Werror at the end,
    because otherwise the check for -lm fails (resulting in link error for missing
    symbol of sqrt). Apparently the configure check for -lm uses a wrong prototype,
    which due to Werror makes configure think it doesn't need -lm (since it doesn't
    have any math symbols in it).

diff --git a/Makefile.am b/Makefile.am
index 89b16e2..230ad60 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,11 +29,7 @@ pkgconfig_DATA = libclamav.pc
 # don't complain that configuration files and databases are not removed, this is intended
 distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
 DISTCLEANFILES = target.h
-if DISTCHECK_ENABLE_FLAGS
-DISTCHECK_CONFIGURE_FLAGS=--enable-milter --disable-clamav CFLAGS="-Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=type-limits -Wno-error=unused-function -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=aggregate-return"
-else
-DISTCHECK_CONFIGURE_FLAGS=--enable-milter --disable-clamav
-endif
+DISTCHECK_CONFIGURE_FLAGS=--enable-milter --disable-clamav --enable-distcheck-werror
 lcov:
 	($(MAKE); cd unit_tests; $(MAKE) lcov)
 quick-check:
diff --git a/configure.in b/configure.in
index 0b732aa..5c7284e 100644
--- a/configure.in
+++ b/configure.in
@@ -132,7 +132,6 @@ if test "x$ac_compiler_gnu" = "xyes"; then
 			;;
 	esac
 fi
-AM_CONDITIONAL([DISTCHECK_ENABLE_FLAGS], test "x$distcheck_enable_flags" = "x1")
 
 dnl Checks if compiler produces valid code, regardless of compiler
 dnl we do these checks here to avoid receiving endless bugreports about
@@ -1514,6 +1513,23 @@ AC_SUBST([CURSES_LIBS])
 AM_CONDITIONAL([HAVE_CURSES],
 	       [test "X$HAVE_LIBNCURSES" = "Xyes" || test "X$HAVE_LIBPDCURSES" = "Xyes"])
 
+AC_ARG_ENABLE([distcheck-werror],
+	      AC_HELP_STRING([--enable-distcheck-werror],
+			     [enable warnings as error for distcheck
+			      @<:@default=no@:>@]),
+[enable_distcheckwerror=$enableval],[enable_distcheckwerror="no"])
+
+# Enable distcheck warnings and Werror only for gcc versions that support them,
+# and only after we've run the configure tests.
+# Some configure tests fail (like checking for cos in -lm) if we enable these
+# Werror flags for configure too (for example -Wstrict-prototypes makes
+# configure think that -lm doesn't have cos, hence its in libc).
+if test "x$enable_distcheckwerror" = "xyes"; then
+    if test "$distcheck_enable_flags" = "1"; then
+	CFLAGS="$CFLAGS -Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wno-error=bad-function-cast -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=type-limits -Wno-error=unused-function -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=aggregate-return"
+    fi
+fi
+
 AC_OUTPUT([
 libclamav/Makefile
 clamscan/Makefile

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list