Some Sphinx variables used in the ARM are only set in Makefile.docs. This works fine when building the ARM using "make", but does not work with Read the Docs, which only looks at conf.py files.
Since Read the Docs does not run ./configure, renaming conf.py to conf.py.in and using Autoconf output variables is not a feasible solution.
Instead, extend doc/arm/conf.py with some Python code which processes configure.ac using regular expressions and sets the relevant Sphinx variables accordingly. As this solution also works fine when building the ARM using "make", drop the relevant -D options from the list of sphinx-build options used for building the ARM in Makefile.docs.
Note that the man_SPHINXOPTS counterparts of the removed -D switches are left intact because doc/man/conf.py is a separate Sphinx project which is only processed using "make" and duplicating the Python code added to doc/arm/conf.py by this commit would be inelegant.
Closes #2782 (closed)