From 25ba5cd0b6810be4729e6f68283c889cd8534439 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Fri, 9 May 2014 09:35:30 +0800 Subject: [PATCH] fix build --- .gitignore | 2 +- libcork/include/libcork/config.h | 18 +++++++ libcork/include/libcork/config/config.h | 70 +++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 libcork/include/libcork/config.h create mode 100644 libcork/include/libcork/config/config.h diff --git a/.gitignore b/.gitignore index 33eba780..d4e433f8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ src/Makefile libev/Makefile libasyncns/Makefile autom4te.cache/ -config.h +/config.h config.log config.status libtool diff --git a/libcork/include/libcork/config.h b/libcork/include/libcork/config.h new file mode 100644 index 00000000..72eb4fb8 --- /dev/null +++ b/libcork/include/libcork/config.h @@ -0,0 +1,18 @@ +/* -*- coding: utf-8 -*- + * ---------------------------------------------------------------------- + * Copyright © 2011, RedJack, LLC. + * All rights reserved. + * + * Please see the COPYING file in this distribution for license + * details. + * ---------------------------------------------------------------------- + */ + +#ifndef LIBCORK_CONFIG_H +#define LIBCORK_CONFIG_H + +/*** include all of the parts ***/ + +#include + +#endif /* LIBCORK_CONFIG_H */ diff --git a/libcork/include/libcork/config/config.h b/libcork/include/libcork/config/config.h new file mode 100644 index 00000000..5fa36f7d --- /dev/null +++ b/libcork/include/libcork/config/config.h @@ -0,0 +1,70 @@ +/* -*- coding: utf-8 -*- + * ---------------------------------------------------------------------- + * Copyright © 2011-2013, RedJack, LLC. + * All rights reserved. + * + * Please see the COPYING file in this distribution for license + * details. + * ---------------------------------------------------------------------- + */ + +#ifndef LIBCORK_CONFIG_CONFIG_H +#define LIBCORK_CONFIG_CONFIG_H + + +/* If you want to skip autodetection, define this to 1, and provide a + * libcork/config/custom.h header file. */ + +#if !defined(CORK_CONFIG_SKIP_AUTODETECT) +#define CORK_CONFIG_SKIP_AUTODETECT 0 +#endif + + +#if CORK_CONFIG_SKIP_AUTODETECT +/* The user has promised that they'll define everything themselves. */ +#include + +#else +/* Otherwise autodetect! */ + + +/**** ARCHITECTURES ****/ + +#include + + +/**** PLATFORMS ****/ +#if (defined(__unix__) || defined(unix)) && !defined(USG) +/* We need this to test for BSD, but it's a good idea to have for + * any brand of Unix.*/ +#include +#endif + +#if defined(__linux) +/* Do some Linux-specific autodetection. */ +#include + +#elif defined(__APPLE__) && defined(__MACH__) +/* Do some Mac OS X-specific autodetection. */ +#include + +#elif defined(BSD) && (BSD >= 199103) +/* Do some BSD (4.3 code base or newer)specific autodetection. */ +#include + +#endif /* platforms */ + + +/**** COMPILERS ****/ + +#if defined(__GNUC__) +/* Do some GCC-specific autodetection. */ +#include + +#endif /* compilers */ + + +#endif /* autodetect or not */ + + +#endif /* LIBCORK_CONFIG_CONFIG_H */