Index: branches/eam_branches/ipp-20120601/psLib/configure.ac
===================================================================
--- branches/eam_branches/ipp-20120601/psLib/configure.ac	(revision 34074)
+++ branches/eam_branches/ipp-20120601/psLib/configure.ac	(revision 34076)
@@ -27,5 +27,5 @@
 AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION)
 
-dnl move ? IPP_STDCFLAGS
+IPP_STDLDFLAGS
 
 dnl ------------------- PERL options ---------------------
@@ -473,9 +473,5 @@
 dnl ------- enable -Werror after all of the probes have run ---------
 IPP_STDOPTS
-
 IPP_STDCFLAGS
-dnl CFLAGS="${CFLAGS} -Wall -Werror"
-dnl CFLAGS="${CFLAGS} -Wall"
-dnl enable POSIX/XSI and C99 compliance
 CFLAGS="${CFLAGS=} -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L"
 
Index: branches/eam_branches/ipp-20120601/psLib/m4/ipp_stdopts.m4
===================================================================
--- branches/eam_branches/ipp-20120601/psLib/m4/ipp_stdopts.m4	(revision 34074)
+++ branches/eam_branches/ipp-20120601/psLib/m4/ipp_stdopts.m4	(revision 34076)
@@ -1,5 +1,4 @@
 
-    dnl this is currently written to override an user-defined LDFLAGS, is that OK?
-
+dnl IPP_STDCFLAGS must go *after* external probes (to avoid Werror confusing things)
 AC_DEFUN([IPP_STDCFLAGS],
 [
@@ -15,4 +14,5 @@
       ]
     )
+    dnl this section accepts a user-defined CFLAGS, and sets CFLAGS to the empty string if not present
     AC_ARG_ENABLE(debug-build,
       [AS_HELP_STRING(--enable-debug-build,enable debug build: ie disable Werror)],
@@ -32,10 +32,22 @@
       ]
     )
-    AC_ARG_ENABLE(no-as-needed, [AS_HELP_STRING(--enable-no-as-needed, prevent as-needed option sometimes supplied to gcc such as Ubuntu after 11.11)],
-      [AC_MSG_RESULT(compile optimization enabled) 
+])
+
+dnl IPP_STDLDFLAGS must go *before* external probes (so linking is done with --no-as-needed if needed)
+AC_DEFUN([IPP_STDLDFLAGS],
+[
+    dnl this section accepts a user-defined LDFLAGS, and sets LDFLAGS to the empty string if not present
+    AC_ARG_ENABLE(no-as-needed, 
+      [AS_HELP_STRING(--enable-no-as-needed, prevent as-needed option sometimes supplied to gcc such as Ubuntu after 11.11)],
+      [AC_MSG_RESULT(no-as-needed passed to linker) 
       	if test x"${LDFLAGS}" == x; then
+          LDFLAGS="-Wl,--no-as-needed"
+	else
           LDFLAGS="${LDFLAGS=} -Wl,--no-as-needed"
-	else
-          LDFLAGS="-Wl,--no-as-needed"
+	fi
+      ],
+      [AC_MSG_RESULT(as-needed linker flags accepted) 
+      	if test x"${LDFLAGS}" == x; then
+          LDFLAGS=""
 	fi
       ]
