[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Updated Makefile and Configure for libjson-c support
From: |
Konstantinos Chasialis |
Subject: |
[PATCH] Updated Makefile and Configure for libjson-c support |
Date: |
Sat, 28 Mar 2020 18:09:40 +0200 |
User-agent: |
SquirrelMail/1.4.23 [email.uoa.gr] |
From: kostasch <address@hidden>
Date: Sat, 28 Mar 2020 17:59:56 +0200
Subject: Updated Makefile and Configure
---
configure.ac | 12 +++++++++++-
src/Makefile.am | 9 ++++++---
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3316b241..65bfd536 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,12 @@ dnl The Boehm-Weiser garbage collector
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(BDW_GC,[bdw-gc])
+
+dnl JSON-C API
+
+PKG_CHECK_MODULES([JSONC], [json-c], [AC_SUBST([JSONC_CFLAGS])],
[AC_SUBST([JSONC_LIBS])], [jsonc_enabled=yes], [jsonc_enabled=no])
+AM_CONDITIONAL([JSONC], [test "x$jsonc_enabled" = "xyes"])
+
dnl Jitter
AC_JITTER_SUBPACKAGE([jitter])
@@ -127,7 +133,7 @@ fi
dnl Generate output files
AC_CONFIG_FILES(Makefile
- gl/Makefile
+ lib/Makefile
src/Makefile
pickles/Makefile
doc/Makefile
@@ -157,6 +163,10 @@ fi
dnl Report errors
+if test "x$jsonc_enabled" = "xno"; then
+ AC_MSG_ERROR([can't find jsonc library. Please download libjson-c and
install it.])
+fi
+
if test "x$gl_cv_lib_readline" = "xno"; then
AC_MSG_ERROR([can't find an usable libreadline. Please install one.])
fi
diff --git a/src/Makefile.am b/src/Makefile.am
index 5dae140d..d926f663 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -63,7 +63,7 @@ endif
.pks.pkc:
srcdir=$(srcdir) $(AWK) -f $(srcdir)/ras $< > $@
-pkl-gen.pkc pkl-asm.pkc: $(srcdir)/ras $(srcdir)/pkl-insn.def
+pkl-gen.pkc pkl-asm.pkc: $(srcdir)/ras
# XXX this shouldn't be necessary?
EXTRA_DIST = pkl-lex.h ras
@@ -74,14 +74,14 @@ BUILT_SOURCES = pkl-tab.h pkl-lex.c \
AM_YFLAGS = -d -t --report=state
AM_LFLAGS = -d
-poke_CPPFLAGS = -I$(top_builddir)/gl -I$(top_srcdir)/gl \
+poke_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib \
-DPKL_DEBUG \
-DPKGDATADIR=\"$(pkgdatadir)\" \
-DPKGINFODIR=\"$(infodir)\" \
-DJITTER_VERSION=\"$(JITTER_VERSION)\" \
-DLOCALEDIR=\"$(localedir)\"
poke_CFLAGS = -Wall $(BDW_GC_CFLAGS) $(LIBNBD_CFLAGS)
-poke_LDADD = $(top_builddir)/gl/libgnu.la \
+poke_LDADD = $(top_builddir)/lib/libpoke.la \
libpvmjitter.a \
$(LIBNBD_LIBS) \
$(LTLIBREADLINE) $(BDW_GC_LIBS) $(LIBTEXTSTYLE)
@@ -107,4 +107,7 @@ BUILT_SOURCES += pvm-vm.h pvm-vm1.c pvm-vm2.c
pvm-vm.h pvm-vm1.c pvm-vm2.c: pvm.jitter
$(JITTER) $(srcdir)/pvm.jitter --output $(builddir)
+poke_LDADD += $(pkg-config --cflags json-c)
+poke_CFLAGS += $(pkg-config --libs json-c)
+
# End of Makefile.am
--
cgit v1.2.1
- [PATCH] Updated Makefile and Configure for libjson-c support,
Konstantinos Chasialis <=