Merge branch 'additional-configure-tests' into next

* additional-configure-tests: (36 commits)
  Add .gitignore so that in source build doesn't drive crazy "git status"
  Cleaner organization of the build directory
  Create test programs into a sub-directory to avoid clutter at the top level.
  Ensure HAVE_PTHREAD_INIT is set similarly with Autoconf and CMake
  Append _REENTRANT to list of required definitions.
  Append __EXTENSIONS__ to list of required definitions.
  Append _ALL_SOURCE, _POSIX_PTHREAD_SEMANTICS to list of required definitions.
  Completely backport XOPEN_SOURCE test from autoconf to CMake
  Add Large File support related flags to the list required definitions.
  Add macro allowing to set variable and update list of required definition.
  Display system name and version.
  Fix indentation in Unicode configure checks
  Add HAVE_BROKEN_PIPE_BUF configure check
  Fix implementation of configure check related to TM_IN_SYS_TIME
  Remove extra statement setting CMAKE_REQUIRED_INCLUDES
  Properly check if {SYS_SELECT, TIME}_WITH_SYS_TIME should be set
  Fix syntax of HAVE_STAT_TV_NSEC2 and HAVE_SOCKADDR_SA_LEN checks
  Update configure checks to consider MINIX
  Use TestBigEndian CMake module to test for endianness and set WORDS_BIGENDIAN
  Implement FLOCK_NEEDS_LIBBSD test
  ...