diff --git a/doc/doxygen/Makefile.am b/doc/doxygen/Makefile.am
index c6abbec8cda273d7cc1089ac62394ec8a23f12f7..46978be649dfe70519bf0eba6f75cbcff0aef168 100644
--- a/doc/doxygen/Makefile.am
+++ b/doc/doxygen/Makefile.am
@@ -41,7 +41,7 @@ maintainer-clean-local: clean-local
 %.cfg : %.cfg.in
 	rm -f $@.tmp
 	sed < $< > $@.tmp \
-            -e 's:@-top_srcdir-@:${top_srcdir}:g'
+            -e 's:@-top_srcdir-@:${top_srcdir}/src:g'
 	sed < $@.tmp > $@.tmp2 \
             -e 's:@-html_dir-@:${html_parent_dir}/$*:g'
 	rm $@.tmp
@@ -51,6 +51,12 @@ maintainer-clean-local: clean-local
 	sed < $@.tmp3 > $@.tmp4 \
             -e 's:@-html_footer-@:${HTML_FOOTER}:g'
 	rm $@.tmp3
-	mv $@.tmp4 $@
+	sed < $@.tmp4 > $@.tmp5 \
+            -e 's:@PROJECT_NAME@:${PACKAGE_NAME}:g'
+	rm $@.tmp4
+	sed < $@.tmp5 > $@.tmp6 \
+            -e 's:@PACKAGE_VERSION@:${PACKAGE_VERSION}:g'
+	rm $@.tmp5
+	mv $@.tmp6 $@
 
 endif # ENABLE_DOXYGEN
diff --git a/doc/doxygen/core-doc.cfg.in b/doc/doxygen/core-doc.cfg.in
index aed88e0fe766c237740f355c83846d598fa5abbf..6250a48da88a73ca6f29fc5c18f391e034dba26e 100644
--- a/doc/doxygen/core-doc.cfg.in
+++ b/doc/doxygen/core-doc.cfg.in
@@ -771,7 +771,7 @@ WARN_LOGFILE           =
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = @top_srcdir@
+INPUT                  = @-top_srcdir-@
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses