facebook/folly — pull request #109 by micahsaint (2014-12-18 03:35:26+00:00)
Title: Add python binary check to build configuration

#### Overview:
Currently when a user attempts to build folly without a python binary on their machine, the build will fail with a long and cryptic error message from the Makefile.

This commit will add the autoconf macro `m4/ax_python.m4` which will look for a python executable as well as the associated header files and libraries. If found, the macro will then set the binary path to `PYTHON_BIN`. That variable will then be used by the Makefile to execute the `build/generate*.py` files.

#### This commit rectifies the following use cases:

**Problem**
The user's python binary is followed by the python version number (i.e., `python2.7`). This happens in Linux distributions such as Arch Linux and possibly others.
**Solution**
This patch will recurse through several python versions looking for a possible executable followed by its version number and then execute python scripts using the found executable.

**Problem**
The user does not have a python version on their machine and is confused as to why make fails, presenting a cryptic and verbose error message.
**Solution**
This patch will cause the configuration stage of the build to fail while subsequently presenting a clear error message explaining that python is required for the build to complete.