Index: trunk/psModules/configure.ac
===================================================================
--- trunk/psModules/configure.ac	(revision 5729)
+++ trunk/psModules/configure.ac	(revision 5760)
@@ -37,11 +37,24 @@
 AC_SUBST([AM_CFLAGS])
 
+dnl ------------------- PERL options ---------------------
+  AC_ARG_WITH(perl,
+    [AS_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)
+
 SRCPATH='${top_srcdir}/src'
-SRCDIRS="astrom camera config detrend imcombine imsubtract objects photom"
-SRCINC=`echo "${SRCDIRS=}" | ${SED} "s|\(\\w\+\)|-I\${SRCPATH=}/\1|g"`
-SRCSUBLIBS=`echo "${SRCDIRS=}" | ${SED} "s|\(\\w\+\)|\1/libpsmodule\1.la|g"`
-AC_SUBST([SRCSUBLIBS],${SRCSUBLIBS=})
+SRCDIRS="astrom config detrend imcombine imsubtract objects"
+# 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"`
+SRCINC="-I${SRCPATH=} ${SRCINC=}"
+SRCSUBLIBS=`echo "${SRCDIRS=}" | ${PERL} -pe "s|(\w+)|\1/libpsmodule\1.la|g"`
+AC_SUBST(SRCSUBLIBS,${SRCSUBLIBS=})
+AC_SUBST(SRCINC,${SRCINC=})
 AC_SUBST([SRCDIRS],${SRCDIRS=})
-AC_SUBST([SRCINC],${SRCINC=})
 
 dnl doxygen -------------------------------------------------------------------
@@ -79,5 +92,4 @@
   src/Makefile
   src/astrom/Makefile
-  src/camera/Makefile
   src/config/Makefile
   src/detrend/Makefile
@@ -85,8 +97,6 @@
   src/imsubtract/Makefile
   src/objects/Makefile
-  src/photom/Makefile
   test/Makefile
   test/astrom/Makefile
-  test/camera/Makefile
   test/config/Makefile
   test/detrend/Makefile
@@ -94,5 +104,4 @@
   test/imsubtract/Makefile
   test/objects/Makefile
-  test/photom/Makefile
   Doxyfile
   psmodule-config
