Commit 6c6be75c authored by Vagrant Cascadian's avatar Vagrant Cascadian

Update upstream source from tag 'upstream/3.1.0'

Update to upstream version '3.1.0'
with Debian dir 0377b8c4d95142b1080288e300fb9543bb2161e9
parents 5cff67d4 a5d0d855
......@@ -4,6 +4,7 @@ maintainer of guile-json.
List of contributors (in alphabetical order):
Ludovic Courtès <ludo@gnu.org>
Jason Douglas Earl <jearl@notengoamigos.org>
Christopher Lam <christopher.lck@gmail.com>
Jan Nieuwenhuizen <janneke@gnu.org>
Ian Price <ianprice90@googlemail.com>
......
This diff is collapsed.
......@@ -19,7 +19,7 @@
# along with guile-json. If not, see https://www.gnu.org/licenses/.
#
SUBDIRS = json
SUBDIRS = json tests
ACLOCAL_AMFLAGS = -I build-aux
......@@ -31,20 +31,21 @@ dist-hook:
# '' is to make OS X happy
sed -i '' "s/%VERSION%/$(PKG_LIST_VERSION)/g" $(top_distdir)/pkg-list.scm
moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@
objdir = $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache
SOURCES = json.scm
GOBJECTS = $(SOURCES:%.scm=%.go)
moddir=$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)
objdir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
nobase_mod_DATA = $(SOURCES) $(NOCOMP_SOURCES)
nobase_nodist_obj_DATA = $(GOBJECTS)
EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
CLEANFILES = $(GOBJECTS)
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
SUFFIXES = .scm .go
.scm.go:
$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<"
$(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<"
SOURCES = json.scm
CLEANFILES = $(GOBJECTS)
EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
......@@ -109,7 +109,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/m4/guile.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
......@@ -265,12 +266,18 @@ GUILD = @GUILD@
GUILE = @GUILE@
GUILE_CONFIG = @GUILE_CONFIG@
GUILE_EFFECTIVE_VERSION = @GUILE_EFFECTIVE_VERSION@
GUILE_EXTENSION = @GUILE_EXTENSION@
GUILE_LIBDIR = @GUILE_LIBDIR@
GUILE_PREFIX = @GUILE_PREFIX@
GUILE_SITE = @GUILE_SITE@
GUILE_SITE_CCACHE = @GUILE_SITE_CCACHE@
GUILE_TOOLS = @GUILE_TOOLS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
......@@ -330,19 +337,19 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = json
SUBDIRS = json tests
ACLOCAL_AMFLAGS = -I build-aux
PKG_LIST_VERSION = $(shell echo $(PACKAGE_VERSION) | sed "s/\./ /g")
moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@
objdir = $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache
SOURCES = json.scm
GOBJECTS = $(SOURCES:%.scm=%.go)
moddir = $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)
objdir = $(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
nobase_mod_DATA = $(SOURCES) $(NOCOMP_SOURCES)
nobase_nodist_obj_DATA = $(GOBJECTS)
EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
CLEANFILES = $(GOBJECTS)
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
SUFFIXES = .scm .go
SOURCES = json.scm
CLEANFILES = $(GOBJECTS)
EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
all: all-recursive
.SUFFIXES:
......@@ -867,7 +874,7 @@ dist-hook:
# '' is to make OS X happy
sed -i '' "s/%VERSION%/$(PKG_LIST_VERSION)/g" $(top_distdir)/pkg-list.scm
.scm.go:
$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<"
$(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<"
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
......
* Version 3.1.0 (Dec 31, 2018)
- scm->json and scm->json-string now support an additional key argument
#:unicode. If #:unicode is set to true unicode characters will be escaped
when needed, otherwise characters won't be escaped (which now becomes the
default).
* Version 3.0.0 (Dec 29, 2018)
- This is another breaking change release.
- JSON objects are now defined as alists (instead of hash tables) and JSON
arrays are now defined as vectors (instead of lists). Both of these
changes are mainly to use types that have read syntax. This will simplify
things for the user when defining JSON objects which is probably the most
common case.
- Fixed and issue when parsing only JSON numbers.
- Added unit tests.
* Version 2.0.0 (Dec 12, 2018)
- This is a breaking change release. It is not possible anymore to specify a
JSON object using alists. Instead alist->hash-table needs to be explicitly
used. This makes the bidirectional mapping between Guile hash-tables and
JSON objects consistent.
* Version 1.3.2 (Dec 2, 2018)
- Don't use GUILE_SITE and GUILE_SITE_CCACHE, build them as before. Print a
helper message at the end of configure output to help users to install in
Guile system's directory.
* Version 1.3.1 (Dec 1, 2018)
- Fix guile.m4 to allow multiple candidates for guild, guile-config and
guile-tools.
- Use GUILE_SITE as the variable instead of GUILE_SITE_DIR.
(Fixes #20)
* Version 1.3.0 (Nov 28, 2018)
- Properly use guile.m4 macros to install to the right paths.
(thanks to Jason Douglas Earl)
* Version 1.2.0 (Aug 22, 2018)
- Switch to GPLv3.
......
......@@ -16,7 +16,7 @@ specification.
Download the latest tarball and untar it:
- [[http://download.savannah.gnu.org/releases/guile-json/guile-json-1.2.0.tar.gz][guile-json-1.2.0.tar.gz]]
- [[http://download.savannah.gnu.org/releases/guile-json/guile-json-3.1.0.tar.gz][guile-json-3.1.0.tar.gz]]
If you are cloning the repository make sure you run this first:
......@@ -35,8 +35,8 @@ If everything installed successfully you should be up and running:
: $ guile
: scheme@(guile-user)> (use-modules (json))
: scheme@(guile-user)> (scm->json '(1 2 3))
: [1, 2, 3]
: scheme@(guile-user)> (scm->json #(1 2 3))
: [1,2,3]
It might be that you installed guile-json somewhere differently than
your system's Guile. If so, you need to indicate Guile where to find
......@@ -54,18 +54,15 @@ guile-json provides a few procedures to parse and build a JSON
document. A JSON document is transformed into or from native Guile
values according to the following table:
| JSON | Guile |
|--------+-------------|
| string | string |
| number | number |
| object | hash-table* |
| array | list |
| true | #t |
| false | #f |
| null | #nil |
*Note* (*): Association lists are also tranformed to JSON objects, in
this case ordered will be preserved.
| JSON | Guile |
|--------+--------|
| string | string |
| number | number |
| object | alist |
| array | vector |
| true | #t |
| false | #f |
| null | #nil |
To start using guile-json procedures and macros you first need to load
the module:
......@@ -83,19 +80,21 @@ the module:
- (*json-string->scm* str) : Reads a JSON document from the given
string.
- (*scm->json* native #:optional port #:key escape pretty) : Creates a
- (*scm->json* native #:optional port #:key escape unicode pretty) : Creates a
JSON document from the given native Guile value. The JSON document is
written into the given port, or to the current output port if non is
given.
- /port/ : it defaults to the current output port.
- /escape/ : if true, the slash (/ solidus) character will be escaped.
- /unicode/ : if true, unicode characters will be escaped when needed.
- /pretty/ : if true, the JSON document will be pretty printed.
- (*scm->json-string* native #:key escape pretty) : Creates a JSON
- (*scm->json-string* native #:key escape unicode pretty) : Creates a JSON
document from the given native Guile value into a string.
- /escape/ : if true, the slash (/ solidus) character will be escaped.
- /unicode/ : if true, unicode characters will be escaped when needed.
- /pretty/ : if true, the JSON document will be pretty printed.
......@@ -118,53 +117,46 @@ port (calling /port-line/ or /port-column/ on the port).
- Build the string "hello world":
: scheme@(guile-user)> (scm->json "hello world ")
: > (scm->json "hello world ")
: "hello world"
- Build the [1, 2, 3] array:
: scheme@(guile-user)> (scm->json '(1 2 3))
: [1, 2, 3]
- Build the [1, 2, 3, 4] array using unquote-splicing:
: scheme@(guile-user)> (define values '(2 3))
: scheme@(guile-user)> (scm->json `(1 ,@values 4))
: [1, 2, 3, 4]
- Build the object { "project" : "foo", "author" : "bar" } using an
association list (see how symbols can also be used):
: > (scm->json #(1 2 3))
: [1,2,3]
: scheme@(guile-user)> (scm->json '(("project" . "foo") (author . bar)))
: {"project" : "foo","author" : "bar"}
- Build the object { "project" : "foo", "author" : "bar" } using an alist. See
how symbols can also be used:
- Build again the same object { "project" : "foo", "author" : "bar" }
using a hash table:
: scheme@(guile-user)> (scm->json (alist->hash-table '((project . foo) (author . bar))))
: {"project" : "foo","author" : "bar"}
: > (scm->json '((project . foo) (author . bar)))
: {"project":"foo","author":"bar"}
- Build the object { "values" : [ 234, 98.56 ] }:
: scheme@(guile-user)> (scm->json '(("values" 234 98.56)))
: {"values" : [234, 98.56]}
: > (scm->json '(("values" . #(234 98.56))))
: {"values":[234,98.56]}
- Build the object { "values" : [ 234, 98.56 ] } again, this time using
a variable:
: scheme@(guile-user)> (define values '(234 98.56))
: scheme@(guile-user)> (scm->json `(("values" ,@values)))
: {"values" : [234, 98.56]}
: > (define values #(234 98.56))
: > (scm->json `(("values" . ,values)))
: {"values":[234,98.56]}
* License
guile-json is freely available for download under the terms of the GNU General
Public License version 3 (GPLv3).
Copyright (C) 2013-2018 Aleix Conchillo Flaque <aconchillo@gmail.com>
guile-json is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.
guile-json is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
Copyright (C) 2013-2018 Aleix Conchillo Flaque <aconchillo@gmail.com>
You should have received a copy of the GNU General Public License
along with guile-json. If not, see https://www.gnu.org/licenses/.
This diff is collapsed.
#! /bin/sh
# test-driver - basic testsuite driver script.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 2011-2018 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# Make unconditional expansion of undefined variables an error. This
# helps a lot in preventing typo-related bugs.
set -u
usage_error ()
{
echo "$0: $*" >&2
print_usage >&2
exit 2
}
print_usage ()
{
cat <<END
Usage:
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
[--expect-failure={yes|no}] [--color-tests={yes|no}]
[--enable-hard-errors={yes|no}] [--]
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
END
}
test_name= # Used for reporting.
log_file= # Where to save the output of the test script.
trs_file= # Where to save the metadata of the test run.
expect_failure=no
color_tests=no
enable_hard_errors=yes
while test $# -gt 0; do
case $1 in
--help) print_usage; exit $?;;
--version) echo "test-driver $scriptversion"; exit $?;;
--test-name) test_name=$2; shift;;
--log-file) log_file=$2; shift;;
--trs-file) trs_file=$2; shift;;
--color-tests) color_tests=$2; shift;;
--expect-failure) expect_failure=$2; shift;;
--enable-hard-errors) enable_hard_errors=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
*) break;;
esac
shift
done
missing_opts=
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
if test x"$missing_opts" != x; then
usage_error "the following mandatory options are missing:$missing_opts"
fi
if test $# -eq 0; then
usage_error "missing argument"
fi
if test $color_tests = yes; then
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
red='' # Red.
grn='' # Green.
lgn='' # Light green.
blu='' # Blue.
mgn='' # Magenta.
std='' # No color.
else
red= grn= lgn= blu= mgn= std=
fi
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
trap "st=129; $do_exit" 1
trap "st=130; $do_exit" 2
trap "st=141; $do_exit" 13
trap "st=143; $do_exit" 15
# Test script is run here.
"$@" >$log_file 2>&1
estatus=$?
if test $enable_hard_errors = no && test $estatus -eq 99; then
tweaked_estatus=1
else
tweaked_estatus=$estatus
fi
case $tweaked_estatus:$expect_failure in
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
0:*) col=$grn res=PASS recheck=no gcopy=no;;
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
esac
# Report the test outcome and exit status in the logs, so that one can
# know whether the test passed or failed simply by looking at the '.log'
# file, without the need of also peaking into the corresponding '.trs'
# file (automake bug#11814).
echo "$res $test_name (exit status: $estatus)" >>$log_file
# Report outcome to console.
echo "${col}${res}${std}: $test_name"
# Register the test result, and other relevant metadata.
echo ":test-result: $res" > $trs_file
echo ":global-test-result: $res" >> $trs_file
echo ":recheck: $recheck" >> $trs_file
echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for guile-json 1.2.0.
# Generated by GNU Autoconf 2.69 for guile-json 3.1.0.
#
# Report bugs to <aconchillo@gmail.com>.
#
......@@ -579,14 +579,20 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='guile-json'
PACKAGE_TARNAME='guile-json'
PACKAGE_VERSION='1.2.0'
PACKAGE_STRING='guile-json 1.2.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='guile-json 3.1.0'
PACKAGE_BUGREPORT='aconchillo@gmail.com'
PACKAGE_URL=''
ac_unique_file="json.scm"
ac_subst_vars='LTLIBOBJS
ac_subst_vars='LIBDIR
LTLIBOBJS
LIBOBJS
GUILE_LIBDIR
GUILE_PREFIX
GUILE_EXTENSION
GUILE_SITE_CCACHE
GUILE_SITE
GUILE_TOOLS
GUILE_CONFIG
GUILD
......@@ -1211,7 +1217,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures guile-json 1.2.0 to adapt to many kinds of systems.
\`configure' configures guile-json 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1277,7 +1283,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of guile-json 1.2.0:";;
short | recursive ) echo "Configuration of guile-json 3.1.0:";;
esac
cat <<\_ACEOF
......@@ -1361,7 +1367,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
guile-json configure 1.2.0
guile-json configure 3.1.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1378,7 +1384,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by guile-json $as_me 1.2.0, which was
It was created by guile-json $as_me 3.1.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -1727,6 +1733,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
for ac_dir in build-aux "$srcdir"/build-aux; do
if test -f "$ac_dir/install-sh"; then
......@@ -2242,7 +2249,7 @@ fi
# Define the identity of the package.
PACKAGE='guile-json'
VERSION='1.2.0'
VERSION='3.1.0'
cat >>confdefs.h <<_ACEOF
......@@ -2498,7 +2505,7 @@ $as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
_guile_versions_to_search="2.2 2.0"
_guile_versions_to_search="3.0 2.2 2.0"
if test -n "$GUILE_EFFECTIVE_VERSION"; then
_guile_tmp=""
for v in $_guile_versions_to_search; do
......@@ -2651,8 +2658,10 @@ $as_echo_n "checking for Guile version >= $_guile_required_version... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_guile_prog_version" >&5
$as_echo "$_guile_prog_version" >&6; }
# Extract the first word of "guild$_guile_suffix", so it can be a program name with args.
set dummy guild$_guile_suffix; ac_word=$2
for ac_prog in guild$_guile_suffix guild
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GUILD+:} false; then :
......@@ -2691,10 +2700,15 @@ $as_echo "no" >&6; }
fi
test -n "$GUILD" && break
done
# Extract the first word of "guile-config$_guile_suffix", so it can be a program name with args.
set dummy guile-config$_guile_suffix; ac_word=$2
for ac_prog in guile-config$_guile_suffix guile-config
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GUILE_CONFIG+:} false; then :
......@@ -2733,12 +2747,17 @@ $as_echo "no" >&6; }
fi
test -n "$GUILE_CONFIG" && break
done
if test -n "$GUILD"; then
GUILE_TOOLS=$GUILD
else
# Extract the first word of "guile-tools$_guile_suffix", so it can be a program name with args.
set dummy guile-tools$_guile_suffix; ac_word=$2
for ac_prog in guile-tools$_guile_suffix guile-tools
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GUILE_TOOLS+:} false; then :
......@@ -2777,11 +2796,65 @@ $as_echo "no" >&6; }
fi
test -n "$GUILE_TOOLS" && break
done
fi
ac_config_files="$ac_config_files Makefile json/Makefile"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Guile site directory" >&5
$as_echo_n "checking for Guile site directory... " >&6; }
GUILE_SITE=`$PKG_CONFIG --print-errors --variable=sitedir guile-$GUILE_EFFECTIVE_VERSION`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUILE_SITE" >&5
$as_echo "$GUILE_SITE" >&6; }
if test "$GUILE_SITE" = ""; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "sitedir not found
See \`config.log' for more details" "$LINENO" 5; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Guile site-ccache directory using pkgconfig" >&5
$as_echo_n "checking for Guile site-ccache directory using pkgconfig... " >&6; }
GUILE_SITE_CCACHE=`$PKG_CONFIG --variable=siteccachedir guile-$GUILE_EFFECTIVE_VERSION`
if test "$GUILE_SITE_CCACHE" = ""; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Guile site-ccache directory using interpreter" >&5
$as_echo_n "checking for Guile site-ccache directory using interpreter... " >&6; }
GUILE_SITE_CCACHE=`$GUILE -c "(display (if (defined? '%site-ccache-dir) (%site-ccache-dir) \"\"))"`
if test $? != "0" -o "$GUILE_SITE_CCACHE" = ""; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
GUILE_SITE_CCACHE=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: siteccachedir not found" >&5
$as_echo "$as_me: WARNING: siteccachedir not found" >&2;}
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUILE_SITE_CCACHE" >&5
$as_echo "$GUILE_SITE_CCACHE" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Guile extensions directory" >&5
$as_echo_n "checking for Guile extensions directory... " >&6; }
GUILE_EXTENSION=`$PKG_CONFIG --print-errors --variable=extensiondir guile-$GUILE_EFFECTIVE_VERSION`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUILE_EXTENSION" >&5
$as_echo "$GUILE_EXTENSION" >&6; }
if test "$GUILE_EXTENSION" = ""; then
GUILE_EXTENSION=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: extensiondir not found" >&5
$as_echo "$as_me: WARNING: extensiondir not found" >&2;}
fi
GUILE_PREFIX=`$PKG_CONFIG --print-errors --variable=prefix guile-$GUILE_EFFECTIVE_VERSION`
GUILE_LIBDIR=`$PKG_CONFIG --print-errors --variable=libdir guile-$GUILE_EFFECTIVE_VERSION`
ac_config_files="$ac_config_files Makefile json/Makefile tests/Makefile"
ac_config_files="$ac_config_files env"
......@@ -3337,7 +3410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by guile-json $as_me 1.2.0, which was
This file was extended by guile-json $as_me 3.1.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -3390,7 +3463,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
guile-json config.status 1.2.0
guile-json config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......@@ -3505,6 +3578,7 @@ do
case $ac_config_target in
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"json/Makefile") CONFIG_FILES="$CONFIG_FILES json/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"env") CONFIG_FILES="$CONFIG_FILES env" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
......@@ -3972,4 +4046,20 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
LIBDIR=`eval echo $libdir`
LIBDIR=`eval echo $LIBDIR`
echo
echo "*** $PACKAGE $VERSION has been successfully configured ***"
echo
echo "$PACKAGE is using:"
echo
echo " --prefix=$prefix --libdir=$LIBDIR"
echo
echo "If you want to install in Guile system's directory re-run with:"
echo
echo " --prefix=$GUILE_PREFIX --libdir=$GUILE_LIBDIR"
echo
# configure.ac ends here
......@@ -19,24 +19,49 @@
# along with guile-json. If not, see https://www.gnu.org/licenses/.
#
AC_INIT([guile-json], [1.2.0], [aconchillo@gmail.com])
AC_INIT([guile-json], [3.1.0], [aconchillo@gmail.com])
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_SRCDIR(json.scm)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability])
AM_SILENT_RULES([yes])
dnl We require pkg.m4 (from pkg-config) and guile.m4 (from Guile.)
dnl We require pkg.m4 (from pkg-config) and guile.m4.
dnl Make sure they are available.
m4_pattern_forbid([PKG_CHECK_MODULES])
m4_pattern_forbid([^GUILE_PKG])
dnl Check for Guile 2.x, and substitute 'GUILE_EFFECTIVE_VERSION'.
GUILE_PKG([2.2 2.0])
dnl Check for Guile 2.x.
GUILE_PKG([3.0 2.2 2.0])
GUILE_PROGS
GUILE_SITE_DIR
AC_CONFIG_FILES([Makefile json/Makefile])
dnl Guile prefix and libdir.
GUILE_PREFIX=`$PKG_CONFIG --print-errors --variable=prefix guile-$GUILE_EFFECTIVE_VERSION`
GUILE_LIBDIR=`$PKG_CONFIG --print-errors --variable=libdir guile-$GUILE_EFFECTIVE_VERSION`
AC_SUBST(GUILE_PREFIX)
AC_SUBST(GUILE_LIBDIR)
AC_CONFIG_FILES([Makefile json/Makefile tests/Makefile])
AC_CONFIG_FILES([env], [chmod +x env])
AC_OUTPUT
dnl This is just for printing $libdir below.
LIBDIR=`eval echo $libdir`
LIBDIR=`eval echo $LIBDIR`
AC_SUBST([LIBDIR])
echo
echo "*** $PACKAGE $VERSION has been successfully configured ***"
echo
echo "$PACKAGE is using:"
echo
echo " --prefix=$prefix --libdir=$LIBDIR"
echo
echo "If you want to install in Guile system's directory re-run with:"
echo