Index: branches/eam_branches/ipp-20120601/psLib/m4/ipp_stdopts.m4
===================================================================
--- branches/eam_branches/ipp-20120601/psLib/m4/ipp_stdopts.m4	(revision 34002)
+++ branches/eam_branches/ipp-20120601/psLib/m4/ipp_stdopts.m4	(revision 34003)
@@ -1,8 +1,8 @@
 
-    dnl this is currently written to override an user-defined CFLAGS, is that OK?
     dnl this is currently written to override an user-defined LDFLAGS, is that OK?
 
 AC_DEFUN([IPP_STDCFLAGS],
 [
+    dnl this section currently overrides a user-defined CFLAGS
     AC_ARG_ENABLE(optimize,
       [AS_HELP_STRING(--enable-optimize,enable compiler optimization)],
@@ -12,4 +12,21 @@
         if test x"${CFLAGS}" == x; then
           CFLAGS="-pipe -O0 -g"
+        fi
+      ]
+    )
+    AC_ARG_ENABLE(debug-build,
+      [AS_HELP_STRING(--enable-debug-build,enable debug build: ie disable Werror)],
+      [AC_MSG_RESULT(debug build enabled)
+        if test x"${CFLAGS}" == x; then
+          CFLAGS="-Wall"
+	else
+          CFLAGS="${CFLAGS=} -Wall"
+        fi
+      ],
+      [AC_MSG_RESULT([compile optimization disabled])
+        if test x"${CFLAGS}" == x; then
+          CFLAGS="-Wall -Werror"
+	else
+          CFLAGS="${CFLAGS=} -Wall -Werror"
         fi
       ]
