diff --git a/configure.ac b/configure.ac
index 2cc60101c88f6407be7ff5f361a3fa0b616616c2..8d489c7de97e1d8081ada509303b7868e6176583 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,7 +112,6 @@ AC_CONFIG_FILES([Makefile
                  VERSION
                  doc/Makefile
                  doc/manual/Makefile
-                 doc/manual/utils/version.py
                  doc/parallel/Makefile
                  doc/internals/Makefile
                  doc/gsa/Makefile
diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am
index ae0a5721441daf24e6775d274906c4b0d7178498..23439869c5a1a7cb2bf5e69bae0a9ad7c0fac22d 100644
--- a/doc/manual/Makefile.am
+++ b/doc/manual/Makefile.am
@@ -7,12 +7,15 @@ SRC = $(wildcard source/*.rst)
 html-local: build/html/index.html
 
 build/html/index.html: $(SRC) source/conf.py
-	$(SPHINXBUILD) -M html source build
+	$(SPHINXBUILD) -b html -D version=$(PACKAGE_VERSION) -D release=$(PACKAGE_VERSION) -d build/doctrees source build/html
 
 pdf-local: build/latex/dynare-manual.pdf
 
+# NB: we cannot use -M latexpdf because of this bug:
+#  https://bugs.debian.org/933347
 build/latex/dynare-manual.pdf: $(SRC) source/conf.py
-	$(SPHINXBUILD) -M latexpdf source build
+	$(SPHINXBUILD) -b latex -D version=$(PACKAGE_VERSION) -D release=$(PACKAGE_VERSION) -d build/doctrees source build/latex
+	make -C build/latex all-pdf
 
 clean-local:
 	rm -rf build
diff --git a/doc/manual/source/conf.py b/doc/manual/source/conf.py
index 57d79d92ff49410ffad51c08f580733e8b52b22c..dcb5f4da093ba07ba7c55757cdd0c3a0f5719862 100644
--- a/doc/manual/source/conf.py
+++ b/doc/manual/source/conf.py
@@ -41,10 +41,6 @@ author = u'Dynare Team'
 
 add_function_parentheses = False
 
-# See ../utils/version.py, which is generated by autoconf
-from version import version
-from version import release
-
 language = 'en'
 
 exclude_patterns = []
diff --git a/doc/manual/utils/version.py.in b/doc/manual/utils/version.py.in
deleted file mode 100644
index 2add40f5112831d5a7ea72dd32860384176748ff..0000000000000000000000000000000000000000
--- a/doc/manual/utils/version.py.in
+++ /dev/null
@@ -1,2 +0,0 @@
-version = u'@PACKAGE_VERSION@'
-release = u'@PACKAGE_VERSION@'