Index: /trunk/psLib/Doxyfile.in
===================================================================
--- /trunk/psLib/Doxyfile.in	(revision 8963)
+++ /trunk/psLib/Doxyfile.in	(revision 8964)
@@ -18,5 +18,5 @@
 # by quotes) that should identify the project.
 
-PROJECT_NAME           = "Pan-STARRS Foundation Library"
+PROJECT_NAME           = @PACKAGE_NAME@
 
 # The PROJECT_NUMBER tag can be used to enter a project or revision number.
@@ -31,5 +31,6 @@
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = @prefix@/docs/pslib
+# @top_builddir@ doesn't work for some reason
+OUTPUT_DIRECTORY       = @builddir@/docs
 
 # The OUTPUT_LANGUAGE tag is used to specify the language in which all
@@ -362,5 +363,5 @@
 # with spaces.
 
-INPUT                  = src
+INPUT                  = @top_srcdir@/src
 
 # If the value of the INPUT tag contains directories, you can use the
@@ -934,5 +935,5 @@
 # interpreter (i.e. the result of `which perl').
 
-PERL_PATH              = /usr/bin/perl
+PERL_PATH              = @PERL@
 
 #---------------------------------------------------------------------------
Index: /trunk/psLib/Makefile.am
===================================================================
--- /trunk/psLib/Makefile.am	(revision 8963)
+++ /trunk/psLib/Makefile.am	(revision 8964)
@@ -9,26 +9,20 @@
     pslib-config.in \
     pslib.pc.in \
-    autogen.sh
+    autogen.sh 
 
 if DOXYGEN
-docs: Doxyfile $(prefix)/docs/pslib $(mandir)/man3
-	doxygen Doxyfile
-	mv -f $(prefix)/docs/pslib/man/man3/* $(mandir)/man3
-	rm -rf $(prefix)/docs/pslib/man
+install-data-hook: doxygen
+	-$(mkdir_p) $(mandir)/man3
+	chmod 0755 $(mandir)/man3
+	-cp $(top_builddir)/docs/man/man3/* $(mandir)/man3
+
+doxygen:
+	$(DOXYGEN)
 endif
 
-$(prefix)/docs/pslib:
-	mkdir -p -m 744 $(prefix)/docs/pslib
+CLEANFILES = *~ *.bb *.bbg *.da DoxygenLog
 
-$(mandir)/man3:
-	mkdir -p -m 744 $(mandir)/man3
-
-CLEANFILES = $(prefix)/docs/pslib/* *~ *.bb *.bbg *.da
+clean-local:
+	-rm -rf docs
 
 test: check
-
-distuninstallcheck_listfiles = \
-	`find . -name .packlist -or -name perllocal.pod -or -name pslib.bs -or -name pslib.so -or -name pslib.pm`
-
-distuninstallcheck:
-	@:
Index: /trunk/psLib/configure.ac
===================================================================
--- /trunk/psLib/configure.ac	(revision 8963)
+++ /trunk/psLib/configure.ac	(revision 8964)
@@ -373,7 +373,6 @@
   [AC_MSG_ERROR([The C99 function, atoll, is required; update your compiler version?])])
 
-AC_CHECK_PROG(doxygen,[doxygen],[true],[false])
-AM_CONDITIONAL(DOXYGEN, test x$doxygen = xtrue)
-
+AC_PATH_PROG([DOXYGEN], [doxygen], [missing])
+AM_CONDITIONAL([DOXYGEN], test "x$doxygen" != "xmissing")
 
 dnl ------- restore CFLAGS / LDFLAGS (tests done) --------
