Move site configuration to jansson_config.h

This way, more site configuration can be more easily added later.
This commit is contained in:
Petri Lehtinen 2010-08-10 22:14:37 +03:00
parent 014c49c285
commit 7ce70533c9
5 changed files with 22 additions and 7 deletions

2
.gitignore vendored
View File

@ -24,4 +24,4 @@ missing
stamp-h1
*.pyc
*.pc
/src/jansson.h
/src/jansson_config.h

View File

@ -33,7 +33,7 @@ AC_CONFIG_FILES([
Makefile
doc/Makefile
src/Makefile
src/jansson.h
src/jansson_config.h
test/Makefile
test/bin/Makefile
test/suites/Makefile

View File

@ -1,4 +1,4 @@
include_HEADERS = jansson.h
include_HEADERS = jansson.h jansson_config.h
lib_LTLIBRARIES = libjansson.la
libjansson_la_SOURCES = \

View File

@ -10,11 +10,9 @@
#include <stdio.h>
#include <stdlib.h> /* for size_t */
#include <jansson_config.h>
#ifndef __cplusplus
#define JSON_INLINE @json_inline@
#else
#define JSON_INLINE inline
#ifdef __cplusplus
extern "C" {
#endif

17
src/jansson_config.h.in Normal file
View File

@ -0,0 +1,17 @@
/*
* Copyright (c) 2010 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
#ifndef JANSSON_CONFIG_H
#define JANSSON_CONFIG_H
#ifdef __cplusplus
#define JSON_INLINE inline
#else
#define JSON_INLINE @json_inline@
#endif
#endif