aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure
diff options
context:
space:
mode:
authorGravatar David Bremner <david@tethera.net>2014-03-13 00:21:16 -0300
committerGravatar David Bremner <david@tethera.net>2014-03-18 07:39:32 -0300
commitbeef0a8f5593eee0f84b2b0fa01017c1c9621659 (patch)
tree51e1cc5de06caf1612e19d2618d5dc9ace13e724 /configure
parent533639b143202d333eb964aa0c6a860db0809344 (diff)
doc: configure detection of sphinx and rst2man
Because sphinx-build does not provide a convenient way of listing which builders exist, and some people actually have pre 1.0 sphinx, we try loading a relevant python module. Currently the assumption is that no python in path -> no sphinx-build in path.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure b/configure
index 2eaed4a1..fb276f1b 100755
--- a/configure
+++ b/configure
@@ -393,6 +393,25 @@ else
have_emacs=0
fi
+printf "Checking if sphinx is available and supports nroff output... "
+if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > /dev/null 2>&1 ; then
+ printf "Yes.\n"
+ have_sphinx=1
+ have_rst2man=0
+else
+ printf "No (falling back to rst2man).\n"
+ have_sphinx=0
+
+ printf "Checking if rst2man is available... "
+ if rst2man -V > /dev/null 2>&1; then
+ printf "Yes.\n"
+ have_rst2man=1
+ else
+ printf "No (so will not install man pages).\n"
+ have_rst2man=0
+ fi
+fi
+
libdir_in_ldconfig=0
printf "Checking which platform we are on... "
@@ -759,6 +778,12 @@ emacsetcdir=${EMACSETCDIR}
# Whether there's an emacs binary available for byte-compiling
HAVE_EMACS = ${have_emacs}
+# Whether there's a sphinx-build binary available for building documentation
+HAVE_SPHINX=${have_sphinx}
+
+# Whether there's a rst2man binary available for building documentation
+HAVE_RST2MAN=${have_rst2man}
+
# The directory to which desktop files should be installed
desktop_dir = \$(prefix)/share/applications