Index: /trunk/psModules/configure.ac
===================================================================
--- /trunk/psModules/configure.ac	(revision 11504)
+++ /trunk/psModules/configure.ac	(revision 11505)
@@ -11,9 +11,5 @@
 AM_MAINTAINER_MODE
 
-dnl otherise AC_PROG_CC will default CFLAGS to "-g -02"
-if test -z ${CFLAGS} ; then
-  CFLAGS=""
-fi
-AC_SUBST([CFLAGS])
+IPP_STDOPTS
 
 AC_LANG(C)
@@ -29,18 +25,4 @@
 
 AC_PREFIX_DEFAULT([`pwd`])
-
-dnl cflags --------------------------------------------------------------------
-dnl FIXME document why -std=gnu99 is being set
-
-AC_MSG_CHECKING([C99 flag])
-if test "$GCC" = "yes" ; then
-  AM_CFLAGS="-std=gnu99"
-  AC_MSG_RESULT([-std=gnu99])
-else
-  AM_CFLAGS="-std=c99"
-  AC_MSG_RESULT([-std=c99])
-fi
-AM_CFLAGS="${AM_CFLAGS=} -Wall -Werror"
-AC_SUBST([AM_CFLAGS])
 
 dnl ------------------- PERL options ---------------------
@@ -64,34 +46,4 @@
 AC_SUBST(SRCINC,${SRCINC=})
 AC_SUBST([SRCDIRS],${SRCDIRS=})
-
-dnl handle optimized building
-AC_ARG_ENABLE(optimize,
-  [AS_HELP_STRING(--enable-optimize,enable compiler optimization)],
-  [AC_MSG_RESULT(compile optimization enabled)
-   CFLAGS="${CFLAGS=} -pipe -O2 -g"
-   PSLIB_CFLAGS="${PSLIB_CFLAGS=} -DPS_NO_TRACE"],
-  [AC_MSG_RESULT([compile optimization disabled])
-    if test x"${CFLAGS}" == x; then
-      CFLAGS="-pipe -O0 -g"
-    fi
-  ]
-)
-
-dnl handle profiler building
-AC_ARG_ENABLE(profile,
-  [AS_HELP_STRING(--enable-profile,enable compiler profiler information inclusion)],
-  [AC_MSG_RESULT(compile optimization enabled)
-   CFLAGS="${CFLAGS=} -pg -g"
-   LDFLAGS="${LDFLAGS=} -pg"]
-)
-
-dnl handle path coverage checking
-AC_ARG_ENABLE(coverage,
-  [AS_HELP_STRING(--enable-coverage,enable path coverage checking)],
-  [AC_MSG_RESULT(path coverage enabled)
-   CFLAGS="${CFLAGS=} -fprofile-arcs -ftest-coverage -pg"]
-)
-
-dnl CFLAGS="${CFLAGS=} -fprofile-arcs -ftest-coverage -pg"]
 
 dnl doxygen -------------------------------------------------------------------
@@ -344,5 +296,11 @@
 echo "PSMODULE_LIBS: $PSMODULES_LIBS"
 
-dnl ---------------------------------------------------------------------------
+dnl ------- enable -Werror after all of the probes have run ---------
+CFLAGS="${CFLAGS} -Wall -Werror"
+dnl enable POSIX/XSI and C99 compliance
+CFLAGS="${CFLAGS=} -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L -std=c99"
+
+dnl ---------------- export variables --------------------
+
 
 AC_SUBST([PSMODULES_CFLAGS])
