Move site configuration to jansson_config.h
authorPetri Lehtinen <petri@digip.org>
Tue, 10 Aug 2010 19:14:37 +0000 (22:14 +0300)
committerPetri Lehtinen <petri@digip.org>
Tue, 10 Aug 2010 19:16:55 +0000 (22:16 +0300)
This way, more site configuration can be more easily added later.

.gitignore
configure.ac
src/Makefile.am
src/jansson.h [moved from src/jansson.h.in with 98% similarity]
src/jansson_config.h.in [new file with mode: 0644]

index db44e75..3b4bffe 100644 (file)
@@ -24,4 +24,4 @@ missing
 stamp-h1
 *.pyc
 *.pc
-/src/jansson.h
+/src/jansson_config.h
index 4a199e4..0b7e79d 100644 (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
index cb9180e..c7a3927 100644 (file)
@@ -1,4 +1,4 @@
-include_HEADERS = jansson.h
+include_HEADERS = jansson.h jansson_config.h
 
 lib_LTLIBRARIES = libjansson.la
 libjansson_la_SOURCES = \
similarity index 98%
rename from src/jansson.h.in
rename to src/jansson.h
index 975edd6..81235ff 100644 (file)
 
 #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
 
diff --git a/src/jansson_config.h.in b/src/jansson_config.h.in
new file mode 100644 (file)
index 0000000..1a9d859
--- /dev/null
@@ -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