Index: /trunk/psLib/configure.ac
===================================================================
--- /trunk/psLib/configure.ac	(revision 9803)
+++ /trunk/psLib/configure.ac	(revision 9804)
@@ -98,27 +98,26 @@
 test "$prefix" = NONE && prefix=/usr/local
 
+dnl ----------------- pthread support --------------------
+
 dnl Check for how to link against pthreads
 dnl RHEL 4.0 was upset about the first arg to ACX_PTHREAD being NULL ([]) so
 dnl we've added in a worthless message to keep it happy
-ACX_PTHREAD(
-  [AC_MSG_RESULT([pthread support is available])],
-  [AC_MSG_ERROR([pthread support is required to build psLib])]
-)
-
-PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${PTHREAD_CFLAGS}"
 dnl PTHREAD_CFLAGS /must/ also be used in the linking of an exe.  Without
 dnl adding PTHREAD_CFLAGS into PSLIB_LIBS we can't link exes on Linux.
 dnl Basically this means the entire method of only linking psLib's deps in the
 dnl final exe or library is flawed.
-PSLIB_LIBS="${PSLIB_LIBS=} ${PTHREAD_CFLAGS} ${PTHREAD_LIBS}"
+
+ACX_PTHREAD(
+  [PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${PTHREAD_CFLAGS}"
+    PSLIB_LIBS="${PSLIB_LIBS=} ${PTHREAD_CFLAGS} ${PTHREAD_LIBS}"],
+  [AC_MSG_ERROR([pthread support is required to build psLib])]
+)
 
 dnl ----------------- MYSQL options --------------------
 
-AX_LIB_MYSQL([4.1.2], [
-    PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${MYSQL_CFLAGS}"
-    PSLIB_LIBS="${PSLIB_LIBS=} ${MYSQL_LIBS}"
-  ], [
-    PSLIB_CFLAGS="${PSLIB_CFLAGS=} -DOMIT_PSDB"
-  ]
+AX_LIB_MYSQL([4.1.2],
+  [PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${MYSQL_CFLAGS}"
+    PSLIB_LIBS="${PSLIB_LIBS=} ${MYSQL_LIBS}"],
+  [PSLIB_CFLAGS="${PSLIB_CFLAGS=} -DOMIT_PSDB"]
 )
 
