Consistently allow enable/disable of -Werror, disable by default

Fixes: AXIS2C-1603
diff --git a/axiom/configure.ac b/axiom/configure.ac
index 8ffa13c..d41cd15 100644
--- a/axiom/configure.ac
+++ b/axiom/configure.ac
@@ -69,7 +69,7 @@
 AC_PATH_TOOL(PKGCONFIG, pkg-config)
 
 AC_MSG_CHECKING(whether to set -Werror)
-AC_ARG_ENABLE(werror, [  --disable-werror  do not treat warnings as errors during build],
+AC_ARG_ENABLE(werror, [  --enable-werror  treat warnings as errors during build],
 [ case "${enableval}" in
   no)
     AC_MSG_RESULT(no)
@@ -79,6 +79,7 @@
     CFLAGS="$CFLAGS -Werror"
     ;;
   esac ],
+  AC_MSG_RESULT(no)
 )
 
 
diff --git a/configure.ac b/configure.ac
index 0557d76..66667a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,6 +147,21 @@
   AC_MSG_RESULT(no)
 )
 
+AC_MSG_CHECKING(whether to set -Werror)
+AC_ARG_ENABLE(werror, [  --enable-werror  treat warnings as errors during build],
+[ case "${enableval}" in
+  no)
+    AC_MSG_RESULT(no)
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    CFLAGS="$CFLAGS -Werror"
+    ;;
+  esac ],
+  AC_MSG_RESULT(no)
+)
+
+
 AC_MSG_CHECKING(whether to build xpath)
 AC_ARG_ENABLE(xpath, [  --enable-xpath    build xpath. default=yes],
 [ case "${enableval}" in
diff --git a/guththila/configure.ac b/guththila/configure.ac
index 73ccb15..26569a7 100644
--- a/guththila/configure.ac
+++ b/guththila/configure.ac
@@ -68,6 +68,21 @@
     CFLAGS="$CFLAGS -ansi -ggdb3 -Wall -Wno-implicit-function-declaration "
 fi
 
+AC_MSG_CHECKING(whether to set -Werror)
+AC_ARG_ENABLE(werror, [  --enable-werror  treat warnings as errors during build],
+[ case "${enableval}" in
+  no)
+    AC_MSG_RESULT(no)
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    CFLAGS="$CFLAGS -Werror"
+    ;;
+  esac ],
+  AC_MSG_RESULT(no)
+)
+
+
 AC_MSG_CHECKING(whether to enable code coverage statistics)
 AC_ARG_ENABLE(coverage, [  --enable-coverage       enable code coverage statistics (default=no)],
 [ case "${enableval}" in
diff --git a/neethi/configure.ac b/neethi/configure.ac
index c093b7f..8b06d0d 100644
--- a/neethi/configure.ac
+++ b/neethi/configure.ac
@@ -53,7 +53,7 @@
 AC_PATH_TOOL(PKGCONFIG, pkg-config)
 
 AC_MSG_CHECKING(whether to set -Werror)
-AC_ARG_ENABLE(werror, [  --disable-werror        do not treat warnings as errors during build],
+AC_ARG_ENABLE(werror, [  --enable-werror  treat warnings as errors during build],
 [ case "${enableval}" in
   no)
     AC_MSG_RESULT(no)
@@ -63,6 +63,7 @@
     CFLAGS="$CFLAGS -Werror"
     ;;
   esac ],
+  AC_MSG_RESULT(no)
 )
 
 AC_MSG_CHECKING(whether to build guththila xml parser library)
diff --git a/samples/configure.ac b/samples/configure.ac
index d61144c..0048c3a 100644
--- a/samples/configure.ac
+++ b/samples/configure.ac
@@ -66,7 +66,7 @@
 fi
 
 AC_MSG_CHECKING(whether to set -Werror)
-AC_ARG_ENABLE(werror, [  --disable-werror     do not treat warnings as errors during build],
+AC_ARG_ENABLE(werror, [  --enable-werror  treat warnings as errors during build],
 [ case "${enableval}" in
   no)
     AC_MSG_RESULT(no)
@@ -76,6 +76,7 @@
     CFLAGS="$CFLAGS -Werror"
     ;;
   esac ],
+  AC_MSG_RESULT(no)
 )
 
 dnl Checks for header files.
diff --git a/tools/md5/configure.ac b/tools/md5/configure.ac
index cca3083..c997c02 100644
--- a/tools/md5/configure.ac
+++ b/tools/md5/configure.ac
@@ -52,6 +52,21 @@
 AC_CHECK_LIB(z, inflate)
 dnl AC_CHECK_LIB(cutest, CuTestInit)
 
+AC_MSG_CHECKING(whether to set -Werror)
+AC_ARG_ENABLE(werror, [  --enable-werror  treat warnings as errors during build],
+[ case "${enableval}" in
+  no)
+    AC_MSG_RESULT(no)
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    CFLAGS="$CFLAGS -Werror"
+    ;;
+  esac ],
+  AC_MSG_RESULT(no)
+)
+
+
 
 AC_MSG_CHECKING(whether to build tests)
 AC_ARG_ENABLE(tests,
diff --git a/tools/tcpmon/configure.ac b/tools/tcpmon/configure.ac
index 151f1c9..f77cd09 100644
--- a/tools/tcpmon/configure.ac
+++ b/tools/tcpmon/configure.ac
@@ -54,6 +54,21 @@
 
 AC_PATH_TOOL(PKGCONFIG, pkg-config)
 
+AC_MSG_CHECKING(whether to set -Werror)
+AC_ARG_ENABLE(werror, [  --enable-werror  treat warnings as errors during build],
+[ case "${enableval}" in
+  no)
+    AC_MSG_RESULT(no)
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    CFLAGS="$CFLAGS -Werror"
+    ;;
+  esac ],
+  AC_MSG_RESULT(no)
+)
+
+
 AC_MSG_CHECKING(whether to build tests)
 AC_ARG_ENABLE(tests,
 [  --enable-tests    build tests. default=no],
diff --git a/util/configure.ac b/util/configure.ac
index 453d1c6..d40737e 100644
--- a/util/configure.ac
+++ b/util/configure.ac
@@ -73,7 +73,7 @@
 fi
 
 AC_MSG_CHECKING(whether to set -Werror)
-AC_ARG_ENABLE(werror, [  --disable-werror      do not treat warnings as errors during build],
+AC_ARG_ENABLE(werror, [  --enable-werror  treat warnings as errors during build],
 [ case "${enableval}" in
   no)
     AC_MSG_RESULT(no)
@@ -83,8 +83,10 @@
     CFLAGS="$CFLAGS -Werror"
     ;;
   esac ],
+  AC_MSG_RESULT(no)
 )
 
+
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([stdio.h stdlib.h string.h])