+cat > sphinx.config <<EOF
+# Generated by configure, run from doc/conf.py
+EOF
+if [ $WITH_EMACS = "1" ]; then
+ printf "tags.add('WITH_EMACS')\n" >> sphinx.config
+fi
+if [ $WITH_PYTHON_DOCS = "1" ]; then
+ printf "tags.add('WITH_PYTHON')\n" >> sphinx.config
+fi
+printf "rsti_dir = '%s'\n" $(realpath emacs) >> sphinx.config
+