Support more sphinx-build versions in configure script
authorBartosz Nitka <niteria@gmail.com>
Sat, 24 Oct 2015 00:12:16 +0000 (02:12 +0200)
committerBen Gamari <ben@smart-cactus.org>
Sat, 24 Oct 2015 00:12:16 +0000 (02:12 +0200)
commit4e40340318f8e35a81cc3281b188f2ebac1b531d
tree261a3f763259c166955565286c8d50eaba8e2bbc
parent2866dfbb5a0eae677f57180cf8fbdb1265e195b8
Support more sphinx-build versions in configure script

`sphinx-build` on CentOS
(`python-sphinx10-doc-1.0.8-1.el6.centos.noarch`) responds with this on
`stderr`:
```
$ sphinx-1.0-build --version
Sphinx v1.0.8
Usage: /usr/bin/sphinx-1.0-build [options] sourcedir outdir
[filenames...]
Options: -b <builder> -- builder to use; default is html
         -a        -- write all files; default is to only write new and
changed files
...
Modi:
* without -a and without filenames, write new and changed files.
* with -a, write all files.
* with filenames, write these.
```

This should make it work for the old and the new format.

Test Plan:
```
$ echo "Sphinx (sphinx-build) 1.0.1" | sed 's/Sphinx\(
(sphinx-build)\)\? v\?\([0-9]\.[0-9]\.[0-9]\)/\2/'
1.0.1
$ echo "Sphinx v1.0.1" | sed 's/Sphinx\( (sphinx-build)\)\?
v\?\([0-9]\.[0-9]\.[0-9]\)/\2/'
1.0.1
```

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie, erikd

Differential Revision: https://phabricator.haskell.org/D1361
configure.ac