Create an additional libjson.so library that simply links against libjson-c, but emits a warning encouraging the use of the new library.
This commit is contained in:
@@ -3,7 +3,7 @@ include Makefile.am.inc
|
|||||||
EXTRA_DIST = README.html README-WIN32.html config.h.win32 doc json-c.vcproj
|
EXTRA_DIST = README.html README-WIN32.html config.h.win32 doc json-c.vcproj
|
||||||
SUBDIRS = . tests
|
SUBDIRS = . tests
|
||||||
|
|
||||||
lib_LTLIBRARIES = libjson-c.la
|
lib_LTLIBRARIES = libjson-c.la libjson.la
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = json-c.pc
|
pkgconfig_DATA = json-c.pc
|
||||||
@@ -30,6 +30,10 @@ libjsoninclude_HEADERS = \
|
|||||||
# json_config.h
|
# json_config.h
|
||||||
|
|
||||||
libjson_c_la_LDFLAGS = -version-info 1:0:1 -no-undefined
|
libjson_c_la_LDFLAGS = -version-info 1:0:1 -no-undefined
|
||||||
|
libjson_la_LDFLAGS = -version-info 1:0:1 -no-undefined -ljson-c
|
||||||
|
|
||||||
|
# Temporary libjson library. This will be removed after one release.
|
||||||
|
libjson_la_LIBADD = -ljson-c
|
||||||
|
|
||||||
libjson_c_la_SOURCES = \
|
libjson_c_la_SOURCES = \
|
||||||
arraylist.c \
|
arraylist.c \
|
||||||
|
|||||||
27
libjson.c
Normal file
27
libjson.c
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
/* dummy source file for compatibility purposes */
|
||||||
|
|
||||||
|
#if defined(HAVE_CDEFS_H)
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __warn_references
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define __warn_references(sym,msg) \
|
||||||
|
__asm(".pushsection .gnu.warning." #sym "\n" \
|
||||||
|
".ascii \"" msg "\"\n" \
|
||||||
|
".popsection");
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define __warn_references(sym,msg) /* nothing */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "json_object.h"
|
||||||
|
|
||||||
|
__warn_references(json_object_get, "Warning: please link against libjson-c instead of libjson");
|
||||||
|
|
||||||
|
/* __asm__(".section .gnu.warning." __STRING(sym) \
|
||||||
|
" ; .ascii \"" msg "\" ; .text") */
|
||||||
Reference in New Issue
Block a user