Index: trunk/psLib/configure.ac
===================================================================
--- trunk/psLib/configure.ac	(revision 3779)
+++ trunk/psLib/configure.ac	(revision 3785)
@@ -1,6 +1,11 @@
-AC_INIT([pslib],[0.6.0],[http://www.pan-starrs.org/bugzilla])
+AC_PREREQ(2.59)
+
+AC_INIT([pslib],[0.6.0],[http://pan-starrs.ifa.hawaii.edu/bugzilla])
+AC_CONFIG_SRCDIR([pslib.pc.in])
 AC_CANONICAL_TARGET
-AM_CONFIG_HEADER(src/config.h)
-AM_INIT_AUTOMAKE(1.6)
+
+AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2])
+AC_CONFIG_HEADERS([src/config.h])
+AM_MAINTAINER_MODE
 
 PSLIB_LT_VERSION="0:5:0"
@@ -14,5 +19,5 @@
 dnl handle debug building
 AC_ARG_ENABLE(optimize,
-  [AC_HELP_STRING([--enable-optimize],[enable compiler optimization])],
+  [AS_HELP_STRING(--enable-optimize,enable compiler optimization)],
   [AC_MSG_RESULT(compile optimization enabled)
    CFLAGS="${CFLAGS=} -O2"],
@@ -57,9 +62,33 @@
 PSLIB_LIBS="${FLIBS=}"
 
+dnl check for standard language functionality
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([float.h limits.h stdint.h stdlib.h string.h sys/time.h unistd.h])
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_PID_T
+AC_C_RESTRICT
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+
+dnl Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+AC_FUNC_REALLOC
+AC_FUNC_STRFTIME
+AC_FUNC_STRTOD
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([floor gethostname gettimeofday memmove memset mkdir pow regcomp sqrt strchr strcspn strerror strrchr strstr strtol strtoul strtoull])
+
 dnl ----------------- MYSQL options --------------------
 dnl MYSQL_LDFLAGS="-L${libdir}/mysql"
 dnl MYSQL_CFLAGS="-I${includedir}/mysql"
 AC_ARG_ENABLE(mysql,
- [AC_HELP_STRING([--disable-mysql],[Disable MySQL functionality])],
+ [AS_HELP_STRING(--disable-mysql,Disable MySQL functionality)],
  [MYSQL_REQ=$enableval],
  [MYSQL_REQ="yes"])
@@ -69,5 +98,5 @@
   AC_MSG_RESULT([enable building MySQL functionality])
   AC_ARG_WITH(mysql_config,
-    [AC_HELP_STRING([--with-mysql_config=FILE],[Specify location of MYSQL configuration script.])],
+    [AS_HELP_STRING(--with-mysql_config=FILE,Specify location of MYSQL configuration script.)],
     [MYSQL_CONFIG=$withval],
     [MYSQL_CONFIG=`which mysql_config`])
@@ -106,12 +135,12 @@
 dnl ----------------- CFITSIO options --------------------
 AC_ARG_WITH(cfitsio,
-[AC_HELP_STRING([--with-cfitsio=DIR],[Specify location of CFITSIO.])],
+[AS_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.])],
+[AS_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.])],
+[AS_HELP_STRING(--with-cfitsio-lib=DIR,Specify CFITSIO library directory.)],
 [CFITSIO_LDFLAGS="-L$withval"])
 CFLAGS="${CFLAGS=} $CFITSIO_CFLAGS"
@@ -123,12 +152,12 @@
 dnl ------------------ FFTW3 options ---------------------
 AC_ARG_WITH(fftw3,
-[AC_HELP_STRING([--with-fftw3=DIR],[Specify location of FFTW version 3.])],
+[AS_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.])],
+[AS_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.])],
+[AS_HELP_STRING(--with-fftw3-lib=DIR,Specify FFTW version 3 library directory.)],
 [FFTW3_LDFLAGS="-L$withval"])
 CFLAGS="${CFLAGS=} $FFTW3_CFLAGS"
@@ -141,5 +170,5 @@
 dnl -------------------- GSL options ---------------------
 AC_ARG_WITH(gsl-config,
-[AC_HELP_STRING([--with-gsl-config=FILE],[Specify location of gsl-config.])],
+[AS_HELP_STRING(--with-gsl-config=FILE,Specify location of gsl-config.)],
 [GSL_CONFIG=$withval],
 [GSL_CONFIG=`which gsl-config`])
@@ -155,5 +184,5 @@
 dnl ------------------- XML2 options ---------------------
 AC_ARG_WITH(xml2-config,
-[AC_HELP_STRING([--with-xml2-config=FILE],[Specify location of xml2-config.])],
+[AS_HELP_STRING(--with-xml2-config=FILE,Specify location of xml2-config.)],
 [XML_CONFIG=$withval],
 [XML_CONFIG=`which xml2-config`])
@@ -169,5 +198,5 @@
 dnl ------------------- SWIG options ---------------------
 AC_ARG_ENABLE(perlmodule,
- [AC_HELP_STRING([--disable-perlmodule],[Disable creation of perl module])],
+ [AS_HELP_STRING(--disable-perlmodule,Disable creation of perl module)],
  [SWIG_REQ="$enableval"],
  [SWIG_REQ="yes"])
@@ -177,5 +206,5 @@
   AC_MSG_RESULT([enable building perl module])
   AC_ARG_WITH(swig,
-  [AC_HELP_STRING([--with-swig=FILE],[Specify location of SWIG executable.])],
+  [AS_HELP_STRING(--with-swig=FILE,Specify location of SWIG executable.)],
   [SWIG=$withval],
   [SWIG=`which swig`])
@@ -188,5 +217,5 @@
 dnl ------------------- PERL options ---------------------
   AC_ARG_WITH(perl,
-    [AC_HELP_STRING([--with-perl=FILE],[Specify location of PERL executable.])],
+    [AS_HELP_STRING(--with-perl=FILE,Specify location of PERL executable.)],
     [AC_CHECK_PROG(PERL, $withval, $withval)],
     [AC_CHECK_PROG(PERL, perl, `which perl`)])
@@ -199,5 +228,5 @@
 dnl ---------------- PERLPREFIX option -------------------
   AC_ARG_WITH(perlprefix,
-    [AC_HELP_STRING([--with-perlprefix=DIR],[Specify prefix of Perl Module's installation. (default=PREFIX)])],
+    [AS_HELP_STRING(--with-perlprefix=DIR,Specify prefix of Perl Module's installation. (default=PREFIX))],
     [PERL_PREFIX="$withval"],
     [PERL_PREFIX="$prefix"])
@@ -227,12 +256,26 @@
 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/dataIO/Makefile ])
-AC_CONFIG_FILES([ src/image/Makefile ])
-AC_CONFIG_FILES([ src/sysUtils/Makefile ])
+AC_CONFIG_FILES([
+  Makefile
+  src/Makefile
+  src/astronomy/Makefile
+  src/collections/Makefile
+  src/dataManip/Makefile
+  src/dataIO/Makefile
+  src/image/Makefile
+  src/sysUtils/Makefile
+  test/Makefile
+  test/astronomy/Makefile
+  test/collections/Makefile
+  test/dataManip/Makefile
+  test/dataIO/Makefile
+  test/image/Makefile
+  test/sysUtils/Makefile
+  etc/pslib/Makefile
+  etc/Makefile
+  pslib-config
+  pslib.pc
+  Doxyfile
+])
 
 if test "$SWIG_REQ" == "yes"
@@ -241,17 +284,3 @@
 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/dataIO/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_CONFIG_FILES([ Doxyfile ])
-
 AC_OUTPUT
-
