Max Lv 10 years ago
parent
commit
25ba5cd0b6
3 changed files with 89 additions and 1 deletions
  1. 2
      .gitignore
  2. 18
      libcork/include/libcork/config.h
  3. 70
      libcork/include/libcork/config/config.h

2
.gitignore

@ -4,7 +4,7 @@ src/Makefile
libev/Makefile
libasyncns/Makefile
autom4te.cache/
config.h
/config.h
config.log
config.status
libtool

18
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 <libcork/config/config.h>
#endif /* LIBCORK_CONFIG_H */

70
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 <libcork/config/custom.h>
#else
/* Otherwise autodetect! */
/**** ARCHITECTURES ****/
#include <libcork/config/arch.h>
/**** 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 <sys/param.h>
#endif
#if defined(__linux)
/* Do some Linux-specific autodetection. */
#include <libcork/config/linux.h>
#elif defined(__APPLE__) && defined(__MACH__)
/* Do some Mac OS X-specific autodetection. */
#include <libcork/config/macosx.h>
#elif defined(BSD) && (BSD >= 199103)
/* Do some BSD (4.3 code base or newer)specific autodetection. */
#include <libcork/config/bsd.h>
#endif /* platforms */
/**** COMPILERS ****/
#if defined(__GNUC__)
/* Do some GCC-specific autodetection. */
#include <libcork/config/gcc.h>
#endif /* compilers */
#endif /* autodetect or not */
#endif /* LIBCORK_CONFIG_CONFIG_H */
Loading…
Cancel
Save