export APXS2 = @APXS2@
export APACHE2_HEADERS = @APACHE2_HEADERS@
export DEF_CFLAGS = -D_LARGEFILE64_SOURCE $(MAYBE_DEBUG) -pipe -g -Wall -O2 -fPIC -I@abs_top_srcdir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) @INCLUDES@
-export DEF_LDLIBS = -lobjson -lopensrf
+export DEF_LDLIBS = -lopensrf
export VAR = @localstatedir@
export PID = @localstatedir@/run/opensrf
export SOCK = @localstatedir@/lock/opensrf
EXTRA_DIST = $(DOC_FILES) $(EXAMPLES_FILES) $(libosrf_FILES) $(strn_compat_FILES) $(python_FILES) $(java_FILES) autogen.sh src/extras src/gateway/fieldmapper-c-xml-out.pl DCO-1.1.txt LICENSE.txt src/perlmods src/javascript
-objsonincludedir = @includedir@/objson
opensrfincludedir = @includedir@/opensrf
-OBJINC=@srcdir@/include/objson
OSRFINC=@srcdir@/include/opensrf
opensrfinclude_HEADERS = $(OSRFINC)/log.h \
$(OSRFINC)/utils.h \
$(OSRFINC)/xml_utils.h
-objsoninclude_HEADERS = $(OBJINC)/json2xml.h $(OBJINC)/json_parser.h $(OBJINC)/object.h $(OBJINC)/xml2json.h
SUBDIRS = src
+++ /dev/null
-/*
- * Header to support legacy objson library
- */
-#ifndef OBJSON_JSON2XML_H
-#define OBJSON_JSON2XML_H
-#include <opensrf/osrf_json.h>
-#include <opensrf/osrf_json_xml.h>
-#include <opensrf/osrf_legacy_json.h>
-#endif
-
+++ /dev/null
-/*
- * Header to support legacy objson library
- */
-#ifndef OBJSON_XML2JSON_H
-#define OBJSON_XML2JSON_H
-#include <opensrf/osrf_json.h>
-#include <opensrf/osrf_json_xml.h>
-#include <opensrf/osrf_legacy_json.h>
-#endif
+++ /dev/null
-/*
- * Header to support legacy objson library
- */
-#ifndef OBJSON_OBJECT_H
-#define OBJSON_OBJECT_H
-#include <opensrf/osrf_json.h>
-#include <opensrf/osrf_legacy_json.h>
-#endif
+++ /dev/null
-/*
- * Header to support legacy objson library
- */
-#ifndef OBJSON_XML2JSON_H
-#define OBJSON_XML2JSON_H
-#include <opensrf/osrf_json.h>
-#include <opensrf/osrf_json_xml.h>
-#include <opensrf/osrf_legacy_json.h>
-#endif
-
-
int osrfConfigHasDefaultConfig();
/**
- Replaces the config object's objson object. This is useful
+ Replaces the config object's json object. This is useful
if you have an ojbson object already and not an XML config
file to parse.
@param cfg The config object to alter
- @param obj The objson objet to use when searching values
+ @param obj The json objet to use when searching values
*/
void osrfConfigReplaceConfig(osrfConfig* cfg, const jsonObject* obj);
AM_LDFLAGS = $(DEF_LDFLAGS)
AM_CFLAGS = $(DEF_CFLAGS)
-if BUILDJSON
-LDADD = -lobjson
-BJSON=1
-endif
-
if BUILDPYTHON
MAYBE_PY = python
endif
lib_LTLIBRARIES = libosrf_dbmath.la libosrf_math.la libosrf_version.la
timejson_SOURCES = timejson.c
-timejson_LDADD = -lobjson -lopensrf
+timejson_LDADD = -lopensrf
libosrf_dbmath_la_SOURCES = osrf_dbmath.c
-libosrf_dbmath_la_LIBADD = -lobjson -lopensrf
+libosrf_dbmath_la_LIBADD = -lopensrf
libosrf_math_la_SOURCES = osrf_math.c
-libosrf_math_la_LIBADD = -lobjson -lopensrf
+libosrf_math_la_LIBADD = -lopensrf
libosrf_version_la_SOURCES = osrf_version.c
-libosrf_version_la_LIBADD = -lobjson -lopensrf
+libosrf_version_la_LIBADD = -lopensrf
cur_LTLIBRARIES = libosrf_json_gateway.la libosrf_http_translator.la
libosrf_json_gateway_la_SOURCES = apachetools.c apachetools.h osrf_json_gateway.c
-libosrf_json_gateway_la_LIBADD = -lobjson -lopensrf
+libosrf_json_gateway_la_LIBADD = -lopensrf
libosrf_http_translator_la_SOURCES = apachetools.c apachetools.h osrf_http_translator.c
-libosrf_http_translator_la_LIBADD = -lobjson -lopensrf
+libosrf_http_translator_la_LIBADD = -lopensrf
include_HEADERS = apachetools.h
#define DEFAULT_LOCALE "OSRFDefaultLocale"
#define CONFIG_CONTEXT "gateway"
#define JSON_PROTOCOL "OSRFGatewayLegacyJSON"
-#define GATEWAY_USE_LEGACY_JSON 1
-
-/* our config structure */
-typedef struct {
- char* configfile; /* our bootstrap config file */
-} osrf_json_gateway_config;
+#define GATEWAY_USE_LEGACY_JSON 0
typedef struct {
int legacyJSON;
}
static const char* osrf_json_gateway_set_config(cmd_parms *parms, void *config, const char *arg) {
- osrf_json_gateway_config *cfg;
- cfg = ap_get_module_config(parms->server->module_config, &osrf_json_gateway_module);
- cfg->configfile = (char*) arg;
osrf_json_gateway_config_file = (char*) arg;
return NULL;
}
static const char* osrf_json_gateway_set_json_proto(cmd_parms *parms, void *config, const char *arg) {
osrf_json_gateway_dir_config* cfg = (osrf_json_gateway_dir_config*) config;
- cfg->legacyJSON = (!strcasecmp((char*) arg, "false")) ? 0 : 1;
+ cfg->legacyJSON = (!strcasecmp((char*) arg, "true")) ? 1 : 0;
return NULL;
}
char* (*jsonToStringFunc) (const jsonObject*) = legacy_jsonObjectToJSON;
if(dir_conf->legacyJSON) {
- ap_log_rerror( APLOG_MARK, APLOG_INFO, 0, r, "Using legacy JSON");
+ ap_log_rerror( APLOG_MARK, APLOG_DEBUG, 0, r, "Using legacy JSON");
} else {
- ap_log_rerror( APLOG_MARK, APLOG_INFO, 0, r, "Not using legacy JSON");
parseJSONFunc = jsonParseString;
jsonToStringFunc = jsonObjectToJSON;
}
AM_CFLAGS = $(DEF_CFLAGS) -DASSUME_STATELESS -DOSRF_STRICT_PARAMS -rdynamic -fno-strict-aliasing -DOSRF_JSON_ENABLE_XML_UTILS
AM_LDFLAGS = $(DEF_LDFLAGS)
-LDADD = -lxml2 -ldl -lmemcache -lopensrf -lobjson
+LDADD = -lxml2 -ldl -lmemcache -lopensrf
OSRF_INC = @top_srcdir@/include/opensrf
osrf_json_test_SOURCES = osrf_json_test.c $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
noinst_LTLIBRARIES = libosrf_json.la
-lib_LTLIBRARIES = libobjson.la libopensrf.la
-
-if BUILDJSON
-libobjson_la_SOURCES = $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
-libobjson_la_CFLAGS = $(AM_CFLAGS)
-endif
+lib_LTLIBRARIES = libopensrf.la
libosrf_json_la_SOURCES = $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
libosrf_json_la_CFLAGS = $(AM_CFLAGS)
-if BUILDJSON
-libosrf_json_la_DEPENDENCIES = libobjson.la
-endif
-
libopensrf_la_CFLAGS = $(AM_CFLAGS)
libopensrf_la_DEPENDENCIES = libosrf_json.la
EXT_TARGETS = osrf_list.o osrf_hash.o utils.o log.o md5.o string_array.o
all: $(TARGETS)
- if [ ! -z "$(OSRF_LEGACY_JSON)" ]; then \
- $(CC) -shared -W1 $(LDFLAGS) $(TARGETS) -o $(TMPDIR)/libobjson.so;\
- fi;
standalone: $(TARGETS) $(EXT_TARGETS)
$(CC) -shared -W1 $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(TARGETS) $(EXT_TARGETS) -o libosrf_json.so