Index: trunk/psLib/configure.ac
===================================================================
--- trunk/psLib/configure.ac	(revision 8789)
+++ trunk/psLib/configure.ac	(revision 8841)
@@ -29,5 +29,5 @@
 
 SRCPATH='${top_srcdir}/src'
-SRCDIRS="sys astro db fft fits imageops jpeg math mathtypes types xml"
+SRCDIRS="sys astro db fft fits imageops jpeg math mathtypes types"   dnl xml
 # escape two escapes at this level so \\ gets passed to the shell and \ to perl
 SRCINC=`echo "${SRCDIRS=}" | ${PERL} -pe "s|(\w+)|-I\\\\${SRCPATH=}/\1|g"`
@@ -39,9 +39,10 @@
 AC_PROG_MAKE_SET
 
-dnl handle debug building
+dnl handle optimized building
 AC_ARG_ENABLE(optimize,
   [AS_HELP_STRING(--enable-optimize,enable compiler optimization)],
   [AC_MSG_RESULT(compile optimization enabled)
-   CFLAGS="${CFLAGS=} -O2"],
+   CFLAGS="${CFLAGS=} -O2"
+   PSLIB_CFLAGS="${PSLIB_CFLAGS=} -DPS_NO_TRACE"],
   [AC_MSG_RESULT([compile optimization disabled])
    CFLAGS="${CFLAGS=} -O0 -g"]
@@ -69,4 +70,12 @@
    PSLIB_CFLAGS="${PSLIB_CFLAGS=} -DPS_NO_TRACE"]
 )
+
+dnl build tests at the same time as the source code
+AC_ARG_ENABLE(tests,
+  [AS_HELP_STRING(--enable-tests,build tests at same time as source)],
+  [AC_MSG_RESULT(test building enabled)
+   tests=true],
+   [tests=false])
+AM_CONDITIONAL(BUILD_TESTS, test x$tests = xtrue)
 
 AC_LANG(C)
@@ -303,35 +312,35 @@
 
 dnl ------------------- XML2 options ---------------------
-AC_ARG_WITH(xml2-config,
-[AS_HELP_STRING(--with-xml2-config=FILE,Specify location of xml2-config.)],
-[XML_CONFIG=$withval],
-[XML_CONFIG=`which xml2-config`])
-AC_CHECK_FILE($XML_CONFIG,[],
-    [AC_MSG_ERROR([GNOME XML C parser is required.  Obtain it at http://www.xmlsoft.org or use --with-xml2-config to specify location.])])
-
-AC_MSG_CHECKING([xml2 version])
-XML_VERSION=`xml2-config --version`
-XML_VERSION_major=`echo $XML_VERSION | ${PERL} -pe 's|^(\d+).*|\1|'`
-XML_VERSION_minor=`echo $XML_VERSION | ${PERL} -pe 's|^(\d+)\.(\d+).*|\2|'`
-dnl First test the minimum version of 2.6
-if test $XML_VERSION_major -lt 2 || ( test $XML_VERSION_major -eq 2 && test $XML_VERSION_minor -lt 6 )
-then
-	AC_MSG_ERROR([requires libxml2 2.6.0 or greater, found $XML_VERSION.  Install newer version or use --with-xml2-config to specify another location.])
-else
-    AC_MSG_RESULT([$XML_VERSION... yes])
-fi
-
-AC_MSG_CHECKING([xml2 cflags])
-XML_CFLAGS="`${XML_CONFIG} --cflags`"
-AC_MSG_RESULT([${XML_CFLAGS}])
-
-AC_MSG_CHECKING([xml2 ldflags])
-XML_LDFLAGS="`${XML_CONFIG} --libs`"
-AC_MSG_RESULT([${XML_LDFLAGS}])
-
-PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${XML_CFLAGS}"
-PSLIB_LIBS="${PSLIB_LIBS=} ${XML_LDFLAGS}"
-
-AC_SUBST([XML_CFLAGS])
+dnl AC_ARG_WITH(xml2-config,
+dnl [AS_HELP_STRING(--with-xml2-config=FILE,Specify location of xml2-config.)],
+dnl [XML_CONFIG=$withval],
+dnl [XML_CONFIG=`which xml2-config`])
+dnl AC_CHECK_FILE($XML_CONFIG,[],
+dnl     [AC_MSG_ERROR([GNOME XML C parser is required.  Obtain it at http://www.xmlsoft.org or use --with-xml2-config to specify location.])])
+dnl 
+dnl AC_MSG_CHECKING([xml2 version])
+dnl XML_VERSION=`xml2-config --version`
+dnl XML_VERSION_major=`echo $XML_VERSION | ${PERL} -pe 's|^(\d+).*|\1|'`
+dnl XML_VERSION_minor=`echo $XML_VERSION | ${PERL} -pe 's|^(\d+)\.(\d+).*|\2|'`
+dnl dnl First test the minimum version of 2.6
+dnl if test $XML_VERSION_major -lt 2 || ( test $XML_VERSION_major -eq 2 && test $XML_VERSION_minor -lt 6 )
+dnl then
+dnl 	AC_MSG_ERROR([requires libxml2 2.6.0 or greater, found $XML_VERSION.  Install newer version or use --with-xml2-config to specify another location.])
+dnl else
+dnl     AC_MSG_RESULT([$XML_VERSION... yes])
+dnl fi
+dnl 
+dnl AC_MSG_CHECKING([xml2 cflags])
+dnl XML_CFLAGS="`${XML_CONFIG} --cflags`"
+dnl AC_MSG_RESULT([${XML_CFLAGS}])
+dnl 
+dnl AC_MSG_CHECKING([xml2 ldflags])
+dnl XML_LDFLAGS="`${XML_CONFIG} --libs`"
+dnl AC_MSG_RESULT([${XML_LDFLAGS}])
+dnl 
+dnl PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${XML_CFLAGS}"
+dnl PSLIB_LIBS="${PSLIB_LIBS=} ${XML_LDFLAGS}"
+dnl 
+dnl AC_SUBST([XML_CFLAGS])
 
 dnl ------------------- SWIG options ---------------------
@@ -376,4 +385,5 @@
 AC_CHECK_PROG(doxygen,[doxygen],[true],[false])
 AM_CONDITIONAL(DOXYGEN, test x$doxygen = xtrue)
+
 
 dnl ------- restore CFLAGS / LDFLAGS (tests done) --------
@@ -402,5 +412,4 @@
   src/mathtypes/Makefile
   src/types/Makefile
-  src/xml/Makefile
   test/Makefile
   test/sys/Makefile
@@ -414,5 +423,4 @@
   test/mathtypes/Makefile
   test/types/Makefile
-  test/xml/Makefile
   test/FullUnitTest
   test/pstap/Makefile
@@ -424,4 +432,7 @@
   Doxyfile
 ])
+dnl src/xml/Makefile
+dnl test/xml/Makefile
+
 
 #if test "$SWIG_REQ" == "yes"
