Index: trunk/psLib/.cvsignore
===================================================================
--- trunk/psLib/.cvsignore	(revision 3201)
+++ trunk/psLib/.cvsignore	(revision 3218)
@@ -2,4 +2,5 @@
 bin
 lib
+include
 man
 include
Index: trunk/psLib/Makefile.am
===================================================================
--- trunk/psLib/Makefile.am	(revision 3201)
+++ trunk/psLib/Makefile.am	(revision 3218)
@@ -1,3 +1,3 @@
-SUBDIRS = etc src test swig
+SUBDIRS = $(SUBDIR) 
 
 bin_SCRIPTS = pslib-config
Index: trunk/psLib/configure.ac
===================================================================
--- trunk/psLib/configure.ac	(revision 3218)
+++ trunk/psLib/configure.ac	(revision 3218)
@@ -0,0 +1,193 @@
+AC_INIT([pslib],[1.4])
+AM_CONFIG_HEADER(src/config.h)
+AM_INIT_AUTOMAKE(pslib, 1.4)
+
+PSLIB_LT_VERSION="0:0:0"
+AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION)
+
+dnl Setup CFLAGS with project-particulars
+CFLAGS="${CFLAGS=} -std=c99"
+SUBDIR="etc src test" dnl don't include 'swig', as it is optional
+AH_VERBATIM([_GNU_SOURCE], 
+[/* Enable GNU extensions on systems that have them. */ 
+#ifndef _GNU_SOURCE 
+# define _GNU_SOURCE 
+#endif
+])
+
+AC_DISABLE_STATIC
+AC_PROG_MAKE_SET
+
+dnl handle debug building
+AC_ARG_ENABLE(debug,
+  [AC_HELP_STRING([--enable-debug],[enable debug information])],
+  [AC_MSG_RESULT(debug information enabled)
+   AC_DEFINE(DEBUG,[], [debug information requested])
+   CFLAGS="${CFLAGS=} -O0 -g"],
+  [AC_MSG_RESULT(debug information disabled)
+   CFLAGS="${CFLAGS=} -O "]
+)
+
+AC_LANG(C)
+AC_PROG_CC
+AC_PROG_F77
+AC_F77_WRAPPERS
+AC_F77_LIBRARY_LDFLAGS
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+AC_CHECK_FUNC(strtoll)
+AC_CHECK_FUNC(strtoull)
+
+AC_PREFIX_DEFAULT([`pwd`])
+test "$prefix" = NONE && prefix=`pwd`
+
+dnl Setup the info for psLib for pkg-config
+PSLIB_CFLAGS="-I${includedir}"
+PSLIB_LIBS="-L${libdir} -lpslib"
+
+dnl ----------------- CFITSIO options --------------------
+AC_ARG_WITH(cfitsio,
+[AC_HELP_STRING([--with-cfitsio=DIR],[Specify location of CFITSIO.])],
+[CFITSIO_CFLAGS="-I$withval/include"
+ CFITSIO_LDFLAGS="-L$withval/lib"])
+AC_ARG_WITH(cfitsio-include,
+[AC_HELP_STRING([--with-cfitsio-include=DIR],[Specify CFITSIO include directory.])],
+[CFITSIO_CFLAGS="-I$withval"])
+AC_ARG_WITH(cfitsio-lib,
+[AC_HELP_STRING([--with-cfitsio-lib=DIR],[Specify CFITSIO library directory.])],
+[CFITSIO_LDFLAGS="-L$withval"])
+CFLAGS="${CFLAGS=} $CFITSIO_CFLAGS"
+PSLIB_LIBS="${PSLIB_LIBS=} $CFITSIO_LDFLAGS -lcfitsio"
+AC_CHECK_HEADERS([fitsio.h],[],
+   [AC_MSG_ERROR([CFITSIO is required.  Obtain it at  http://heasarc.gsfc.nasa.gov/docs/software/fitsio or use --with-cfitsio to specify location.])])
+
+dnl ------------------ FFTW3 options ---------------------
+AC_ARG_WITH(fftw3,
+[AC_HELP_STRING([--with-fftw3=DIR],[Specify location of FFTW version 3.])],
+[FFTW3_CFLAGS="-I$withval/include"
+ FFTW3_LDFLAGS="-L$withval/lib"])
+AC_ARG_WITH(fftw3-include,
+[AC_HELP_STRING([--with-fftw3-include=DIR],[Specify FFTW version 3 include directory.])],
+[FFTW3_CFLAGS="-I$withval"])
+AC_ARG_WITH(fftw3-lib,
+[AC_HELP_STRING([--with-fftw3-lib=DIR],[Specify FFTW version 3 library directory.])],
+[FFTW3_LDFLAGS="-L$withval"])
+CFLAGS="${CFLAGS=} $FFTW3_CFLAGS"
+PSLIB_LIBS="${PSLIB_LIBS=} $FFTW3_LDFLAGS -lfftw3f"
+AC_MSG_CHECKING([FFTW header files])
+AC_CHECK_HEADERS([fftw3.h],[],
+   [AC_MSG_ERROR([FFTW version 3 with float support is required.  Obtain it at http://www.fftw.org/or use --with-fftw3 to specify location.])])
+
+dnl -------------------- GSL options ---------------------
+AC_ARG_WITH(gsl-config,
+[AC_HELP_STRING([--with-gsl-config=FILE],[Specify location of gsl-config.])],
+[GSL_CONFIG=$withval],
+[GSL_CONFIG=`which gsl-config`])
+AC_CHECK_FILE($GSL_CONFIG,[],
+    [AC_MSG_ERROR([GSL is required.  Obtain it at http://www.gnu.org/software/gsl or use --with-gsl-config to specify location.])])
+AC_MSG_CHECKING([GSL cflags])
+GSL_CFLAGS="`${GSL_CONFIG} --cflags`"
+AC_MSG_RESULT([${GSL_CFLAGS}])
+CFLAGS="${CFLAGS=} ${GSL_CFLAGS}"
+PSLIB_LIBS="${PSLIB_LIBS=} `${GSL_CONFIG} --libs`"
+   
+dnl ------------------- XML2 options ---------------------
+AC_ARG_WITH(xml2-config,
+[AC_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 cflags])
+XML_CFLAGS="`${XML_CONFIG} --cflags`"
+AC_MSG_RESULT([${XML_CFLAGS}])
+CFLAGS="${CFLAGS=} ${XML_CFLAGS}"
+PSLIB_LIBS="${PSLIB_LIBS=} `${XML_CONFIG} --libs`"
+
+dnl ------------------- SWIG options ---------------------
+AC_ARG_ENABLE(perlmodule, 
+ [AC_HELP_STRING([--enable-perlmodule],[Create a perl module to allow use of psLib in perl])],
+ [SWIG_REQ="yes"
+  AC_MSG_RESULT([enable building perl module])],
+ [
+  AC_MSG_RESULT([disable building perl module])])
+
+if test "$SWIG_REQ" == "yes"
+then
+  AC_ARG_WITH(swig,
+  [AC_HELP_STRING([--with-swig=FILE],[Specify location of SWIG executable.])],
+  [SWIG=$withval],
+  [SWIG=`which swig`])
+  AC_SUBST(SWIG,$SWIG)
+
+  AC_CHECK_FILE($SWIG,[],
+     [AC_MSG_ERROR([SWIG is required.  Obtain it at www.swig.org or use --with-swig to specify its install location.])])
+  SUBDIR="${SUBDIR=} swig"
+
+dnl ------------------- PERL options ---------------------
+  AC_ARG_WITH(perl,
+    [AC_HELP_STRING([--with-perl=FILE],[Specify location of PERL executable.])],
+    [AC_CHECK_PROG(PERL, $withval, $withval)],
+    [AC_CHECK_PROG(PERL, perl, `which perl`)])
+    if test "$PERL" == ""
+    then
+      AC_MSG_ERROR([PERL is required.  Use --with-perl to specify its install location.])
+    fi
+    AC_SUBST(PERL,$PERL)
+
+dnl ---------------- PERLPREFIX option -------------------
+  AC_ARG_WITH(perlprefix,
+    [AC_HELP_STRING([--with-perlprefix=DIR],[Specify prefix of Perl Module's installation.])],
+    [PERL_PREFIX="$withval"],
+    [PERL_PREFIX=""])
+    AC_SUBST(PERL_PREFIX,$PERL_PREFIX)
+fi
+
+dnl for MacOSX, check if sqrtf is in mx library.
+AC_CHECK_LIB(mx,sqrtf,
+  [PSLIB_LIBS="${PSLIB_LIBS=} -lmx"])
+
+DOXYGEN="doxygen Doxyfile"
+AC_CHECK_PROG(DOXYGEN,doxygen,[echo Doxygen not detected in configure stage.])
+AC_SUBST(DOXYGEN,$DOXYGEN)
+
+CFLAGS="${CFLAGS=} -Wall -Werror"
+CFLAGS="${CFLAGS=}  -DCONFIG_FILE=\\"$sysconfdir/pslib/psTime.config\\""
+CFLAGS="${CFLAGS=}  -DXML_CONFIG_FILE=\\"$sysconfdir/pslib/psTime.xml\\""
+CFLAGS="${CFLAGS=}  -DUTC_DAT_FILE=\\"$datadir/pslib/tai_utc.dat\\""
+
+
+dnl ---------------- export variables --------------------
+
+AC_SUBST(SUBDIR,[$SUBDIR])
+AC_SUBST(PSLIB_LIBS,[$PSLIB_LIBS])
+AC_SUBST(PSLIB_CFLAGS,[$PSLIB_CFLAGS])
+
+AC_CONFIG_FILES([ Makefile ])
+AC_CONFIG_FILES([ src/Makefile ])
+AC_CONFIG_FILES([ src/astronomy/Makefile ])
+AC_CONFIG_FILES([ src/collections/Makefile ])
+AC_CONFIG_FILES([ src/dataManip/Makefile ])
+AC_CONFIG_FILES([ src/fileUtils/Makefile ])
+AC_CONFIG_FILES([ src/image/Makefile ])
+AC_CONFIG_FILES([ src/sysUtils/Makefile ])
+
+if test "$SWIG_REQ" == "yes" 
+then
+  AC_CONFIG_FILES([ swig/Makefile ])
+fi
+
+AC_CONFIG_FILES([ test/Makefile ])
+AC_CONFIG_FILES([ test/astronomy/Makefile ])
+AC_CONFIG_FILES([ test/collections/Makefile ])
+AC_CONFIG_FILES([ test/dataManip/Makefile ])
+AC_CONFIG_FILES([ test/fileUtils/Makefile ])
+AC_CONFIG_FILES([ test/image/Makefile ])
+AC_CONFIG_FILES([ test/sysUtils/Makefile ])
+AC_CONFIG_FILES([ etc/pslib/Makefile ])
+AC_CONFIG_FILES([ etc/Makefile ])
+AC_CONFIG_FILES([ pslib-config ])
+AC_CONFIG_FILES([ pslib.pc ])
+
+AC_OUTPUT
+
Index: trunk/psLib/configure.in
===================================================================
--- trunk/psLib/configure.in	(revision 3201)
+++ 	(revision )
@@ -1,177 +1,0 @@
-AC_INIT([pslib],[1.4])
-AM_CONFIG_HEADER(src/config.h)
-AM_INIT_AUTOMAKE(pslib, 1.4)
-
-PSLIB_LT_VERSION="0:0:0"
-AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION)
-
-dnl Setup CFLAGS with project-particulars
-CFLAGS="${CFLAGS=} -std=c99"
-
-AH_VERBATIM([_GNU_SOURCE], 
-[/* Enable GNU extensions on systems that have them. */ 
-#ifndef _GNU_SOURCE 
-# define _GNU_SOURCE 
-#endif
-])
-
-AC_DISABLE_STATIC
-AC_PROG_MAKE_SET
-
-dnl handle debug building
-AC_ARG_ENABLE(debug,
-  [AC_HELP_STRING([--enable-debug],[Enable debug information in compilation])],
-  [AC_MSG_RESULT(debug information enabled)
-   AC_DEFINE(DEBUG,[], [debug information requested])
-   CFLAGS="${CFLAGS=} -O0 -g2"],
-  [AC_MSG_RESULT(debug information disabled)]
-)
-
-AC_LANG(C)
-AC_PROG_CC
-AC_PROG_F77
-AC_F77_WRAPPERS
-AC_F77_LIBRARY_LDFLAGS
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-AC_CHECK_FUNC(strtoll)
-AC_CHECK_FUNC(strtoull)
-
-AC_PREFIX_DEFAULT([`pwd`])
-test "$prefix" = NONE && prefix=`pwd`
-
-dnl Setup the info for psLib for pkg-config
-PSLIB_CFLAGS="-I${includedir}"
-PSLIB_LIBS="-L${libdir} -lpslib"
-
-dnl ----------------- CFITSIO options --------------------
-AC_ARG_WITH(cfitsio,
-[AC_HELP_STRING([--with-cfitsio=DIR],[Specify location of CFITSIO.])],
-[CFITSIO_CFLAGS="-I$withval/include"
- CFITSIO_LDFLAGS="-L$withval/lib"])
-AC_ARG_WITH(cfitsio-include,
-[AC_HELP_STRING([--with-cfitsio-include=DIR],[Specify CFITSIO include directory.])],
-[CFITSIO_CFLAGS="-I$withval"])
-AC_ARG_WITH(cfitsio-lib,
-[AC_HELP_STRING([--with-cfitsio-lib=DIR],[Specify CFITSIO library directory.])],
-[CFITSIO_LDFLAGS="-L$withval"])
-CFLAGS="${CFLAGS=} $CFITSIO_CFLAGS"
-PSLIB_LIBS="${PSLIB_LIBS=} $CFITSIO_LDFLAGS -lcfitsio"
-AC_CHECK_HEADERS([fitsio.h],[],
-   [AC_MSG_ERROR([CFITSIO is required.  Obtain it at  http://heasarc.gsfc.nasa.gov/docs/software/fitsio or use --with-cfitsio to specify location.])])
-
-dnl ------------------ FFTW3 options ---------------------
-AC_ARG_WITH(fftw3,
-[AC_HELP_STRING([--with-fftw3=DIR],[Specify location of FFTW version 3.])],
-[FFTW3_CFLAGS="-I$withval/include"
- FFTW3_LDFLAGS="-L$withval/lib"])
-AC_ARG_WITH(fftw3-include,
-[AC_HELP_STRING([--with-fftw3-include=DIR],[Specify FFTW version 3 include directory.])],
-[FFTW3_CFLAGS="-I$withval"])
-AC_ARG_WITH(fftw3-lib,
-[AC_HELP_STRING([--with-fftw3-lib=DIR],[Specify FFTW version 3 library directory.])],
-[FFTW3_LDFLAGS="-L$withval"])
-CFLAGS="${CFLAGS=} $FFTW3_CFLAGS"
-PSLIB_LIBS="${PSLIB_LIBS=} $FFTW3_LDFLAGS -lfftw3f"
-AC_CHECK_HEADERS([fftw3.h],[],
-   [AC_MSG_ERROR([FFTW version 3 with float support is required.  Obtain it at http://www.fftw.org/or use --with-fftw3 to specify location.])])
-
-dnl -------------------- GSL options ---------------------
-AC_ARG_WITH(gsl-config,
-[AC_HELP_STRING([--with-gsl-config=FILE],[Specify location of gsl-config.])],
-[GSL_CONFIG=$withval],
-[GSL_CONFIG=`which gsl-config`])
-AC_CHECK_FILE($GSL_CONFIG,[AC_MSG_RESULT([yes])],
-    [AC_MSG_ERROR([GSL is required.  Obtain it at http://www.gnu.org/software/gsl or use --with-gsl-config to specify location.])])
-AC_MSG_CHECKING([GSL cflags])
-GSL_CFLAGS="`${GSL_CONFIG} --cflags`"
-AC_MSG_RESULT([${GSL_CFLAGS}])
-CFLAGS="${CFLAGS=} ${GSL_CFLAGS}"
-PSLIB_LIBS="${PSLIB_LIBS=} `${GSL_CONFIG} --libs`"
-   
-dnl ------------------- XML2 options ---------------------
-AC_ARG_WITH(xml2-config,
-[AC_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_RESULT([yes])],
-    [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 cflags])
-XML_CFLAGS="`${XML_CONFIG} --cflags`"
-AC_MSG_RESULT([${XML_CFLAGS}])
-CFLAGS="${CFLAGS=} ${XML_CFLAGS}"
-PSLIB_LIBS="${PSLIB_LIBS=} `${XML_CONFIG} --libs`"
-
-dnl ------------------- SWIG options ---------------------
-AC_ARG_WITH(swig,
-[AC_HELP_STRING([--with-swig=FILE],[Specify location of SWIG executable.])],
-[SWIG=$withval],
-[SWIG=`which swig`])
-AC_CHECK_FILE($SWIG,[],
-     [AC_MSG_ERROR([SWIG is required.  Obtain it at www.swig.org or use --with-swig to specify its install location.])])
-AC_SUBST(SWIG,$SWIG)
-
-dnl ------------------- PERL options ---------------------
-AC_ARG_WITH(perl,
-[AC_HELP_STRING([--with-perl=FILE],[Specify location of PERL executable.])],
-[AC_CHECK_PROG(PERL, $withval, $withval)],
-[AC_CHECK_PROG(PERL, perl, `which perl`)])
-if test "$PERL" == ""
-then
-     AC_MSG_ERROR([PERL is required.  Use --with-perl to specify its install location.])
-fi
-AC_SUBST(PERL,$PERL)
-
-dnl ---------------- PERLPREFIX option -------------------
-AC_ARG_WITH(perlprefix,
-[AC_HELP_STRING([--with-perlprefix=DIR],[Specify prefix of Perl Module's installation.])],
-[PERL_PREFIX="$withval"],
-[PERL_PREFIX=""])
-AC_SUBST(PERL_PREFIX,$PERL_PREFIX)
-
-dnl for MacOSX, check if sqrtf is in mx library.
-AC_CHECK_LIB(mx,sqrtf,
-  [PSLIB_LIBS="${PSLIB_LIBS=} -lmx"])
-
-dnl --------- set config/data file location --------------
-SYSCONFDIR=`cd $sysconfdir; pwd`
-DATADIR=`cd $datadir; pwd`
-AC_DEFINE_UNQUOTED(CONFIG_FILE, "$SYSCONFDIR/pslib/psTime.config", [Location of the psTime.config file])
-AC_DEFINE_UNQUOTED(XML_CONFIG_FILE, "$SYSCONFDIR/pslib/psTime.xml", [Location of the psTime.xml file])
-AC_DEFINE_UNQUOTED(UTC_DAT_FILE, "$DATADIR/pslib/tai_utc.dat", [Location of the tai_utc.dat file])
-
-DOXYGEN="doxygen Doxyfile"
-AC_CHECK_PROG(DOXYGEN,doxygen,[echo Doxygen not detected in configure stage.])
-AC_SUBST(DOXYGEN,$DOXYGEN)
-
-CFLAGS="${CFLAGS=} -Wall -Werror"
-
-dnl ---------------- export variables --------------------
-
-AC_SUBST(PSLIB_LIBS,[$PSLIB_LIBS])
-AC_SUBST(PSLIB_CFLAGS,[$PSLIB_CFLAGS])
-AC_SUBST(CONFIG_FILE,[$CONFIG_FILE])
-
-AC_CONFIG_FILES([ Makefile ])
-AC_CONFIG_FILES([ src/Makefile ])
-AC_CONFIG_FILES([ src/astronomy/Makefile ])
-AC_CONFIG_FILES([ src/collections/Makefile ])
-AC_CONFIG_FILES([ src/dataManip/Makefile ])
-AC_CONFIG_FILES([ src/fileUtils/Makefile ])
-AC_CONFIG_FILES([ src/image/Makefile ])
-AC_CONFIG_FILES([ src/sysUtils/Makefile ])
-AC_CONFIG_FILES([ swig/Makefile ])
-AC_CONFIG_FILES([ test/Makefile ])
-AC_CONFIG_FILES([ test/astronomy/Makefile ])
-AC_CONFIG_FILES([ test/collections/Makefile ])
-AC_CONFIG_FILES([ test/dataManip/Makefile ])
-AC_CONFIG_FILES([ test/fileUtils/Makefile ])
-AC_CONFIG_FILES([ test/image/Makefile ])
-AC_CONFIG_FILES([ test/sysUtils/Makefile ])
-AC_CONFIG_FILES([ etc/pslib/Makefile ])
-AC_CONFIG_FILES([ etc/Makefile ])
-AC_CONFIG_FILES([ pslib-config ])
-AC_CONFIG_FILES([ pslib.pc ])
-
-AC_OUTPUT
-
Index: trunk/psLib/etc/pslib/Makefile.am
===================================================================
--- trunk/psLib/etc/pslib/Makefile.am	(revision 3201)
+++ trunk/psLib/etc/pslib/Makefile.am	(revision 3218)
@@ -10,4 +10,4 @@
 	sed 's|PREFIX|$(prefix)|' $? > $@
 
-install-data-hook:
-	$(INSTALL) $(srcdir)/psTime.xml $(srcdir)/psTime.config $(datadir)/pslib
+install-data-hook: psTime.config
+	$(INSTALL) $(srcdir)/psTime.xml psTime.config $(datadir)/pslib
