build: Replace Autotools with Meson

Quick rundown of benefits:

- Much faster:
  - Autotools (with autogen): 22 seconds
  - Meson: 7 seconds
  - Meson (with ccache): 2 seconds

- Simpler:
  - ~1000 lines smaller
  - Single simple language

- Potentially better Windows (Visual Studio) support

What is not done:

- Complete Windows support
- OSX support (easy)

Closes #2013
Closes #1937
Closes #1803
This commit is contained in:
Patrick Griffis
2016-12-13 16:12:03 -05:00
parent 2edf50d4dd
commit 628100c19f
71 changed files with 979 additions and 2097 deletions

View File

@@ -48,7 +48,7 @@
#include <ctype.h>
#include "util.h"
#if defined (USING_FREEBSD) || defined (__APPLE__)
#if defined (__FreeBSD__) || defined (__APPLE__)
#include <sys/sysctl.h>
#endif
@@ -360,13 +360,13 @@ strip_hidden_attribute (char *src, char *dst)
return len;
}
#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__) || defined (__CYGWIN__)
#if defined (__linux__) || defined (__FreeBSD__) || defined (__APPLE__) || defined (__CYGWIN__)
static void
get_cpu_info (double *mhz, int *cpus)
{
#if defined(USING_LINUX) || defined (__CYGWIN__)
#if defined(__linux__) || defined (__CYGWIN__)
char buf[256];
int fh;
@@ -404,7 +404,7 @@ get_cpu_info (double *mhz, int *cpus)
*cpus = 1;
#endif
#ifdef USING_FREEBSD
#ifdef __FreeBSD__
int mib[2], ncpu;
u_long freq;
@@ -495,7 +495,7 @@ get_sys_str (int with_cpu)
char *
get_sys_str (int with_cpu)
{
#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__) || defined (__CYGWIN__)
#if defined (__linux__) || defined (__FreeBSD__) || defined (__APPLE__) || defined (__CYGWIN__)
double mhz;
#endif
int cpus = 1;
@@ -507,7 +507,7 @@ get_sys_str (int with_cpu)
uname (&un);
#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__) || defined (__CYGWIN__)
#if defined (__linux__) || defined (__FreeBSD__) || defined (__APPLE__) || defined (__CYGWIN__)
get_cpu_info (&mhz, &cpus);
if (mhz && with_cpu)
{