Reference source files using SRC_DIR variable
Add mechanism to detect or set SRC_DIR

The build system will check for the following cases:

 1) CMake build system + source at the same location

 2) CMake build system and source at different location
      a) If SRC_DIR variable is passed, it will use this location
      b) If no SRC_DIR variable is passed, will default to ../cpython-2.7.3
Rename option ENABLE_{STATIC,SHARED} into BUILD_{STATIC,SHARED}

Thanks to Pat Marion for suggesting the change.

Doing so will prevent the option from falling into the long list of
ENABLE_<module> variables.

The options is now displayed at the beginning of the list.
Add "#cmakedefine" to pyconfig.h.in erroneously omitted.

In 9baa8f2fc, the #cmakedefine associated with "acosh", "isfinite", "isinf",
"isnan", "tgamma" and "tanh_preserves_zero_sign" have been omitted.
This commit fixes it.
Ensure HAVE_SETRES{GID,UID} are set and remove hack for undefined symbols

This commit remove the hack previously added by commit bfbc54993e.

Thanks to @patmarion for reporting the issue.
Merge branch 'set-python-source-dir' into configure-config-c-like-python

* set-python-source-dir:
  Add mechanism to detect or set SRC_DIR
  Reference source files using SRC_DIR variable
Configure "config.c" instead of including generated ".c" file.

This is consistent with how regular python build system does it
using makesetup.
Merge branch 'configure-config-c-like-python' into additional-configure-tests

* configure-config-c-like-python:
  Configure "config.c" instead of including generated ".c" file.
  Add mechanism to detect or set SRC_DIR
  Reference source files using SRC_DIR variable
Add missing semaphore related configure checks to set HAVE_SEM_* variables.

Thanks for @patmarion for reporting the issue.
Add "pid_t" and "long double" configure type checks
Add setitimer and getitimer configure symbol checks
Add "spawn.h" configure include check
Add "initgroups" configure symbol check

Note that on linux, header "sys/types.h" and "grp.h" are needed [1] whereas
on macosx, only "unistd.h" [2] is needed.

[1] http://linux.die.net/man/3/initgroups
[2] https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/initgroups.3.html
For consistency - configure "_DARWIN_C_SOURCE" instead of defining directly
Implement HAVE_GETHOSTBYNAME__R_* platform compile tests

Todo: These generic compile tests could probably be contributed
back to CMake.
Ensure ENABLE_IPV6 option is considered

The option has been introduced in commit 9baa8f2 but the value was
always set to 1 at the end of the configure checks.
Implement HAVE_DECL_TZNAME declaration check

"If struct tm has a tm_zone member, define HAVE_STRUCT_TM_TM_ZONE
(and the obsoleted HAVE_TM_ZONE). Otherwise, if the external
array tzname is found, define HAVE_TZNAME; if it is declared,
define HAVE_DECL_TZNAME."
Source: http://www.gnu.org/software/autoconf/manual/autoconf.html#Particular-Structures
Implement HAVE_WORKING_TZSET run platform test
Implement HAVE_PROTOTYPES compile platform test
Implement PY_FORMAT_LONG_LONG platform run test