Something was already done to fake gtk-doc.make, it just needed to be extended
to work with current master.
Then, you need to be able to only expand the GTK_DOC m4 macro when it exists.
* Use the AS_COMPILER_FLAGS macro for the maintainer compiler flags
* Remove the devil's spawn AM_MAINTAINER_MODE which is thoroughly broken
and should not be used by anyone ever again
* Use AS_IF and AS_CASE which guarantee proper escaping