mirror of
https://github.com/json-c/json-c.git
synced 2026-03-24 15:39:07 +08:00
Remove autoconf machinery, we're using cmake now. Update the release checklist to account for that, plus fill in other tasks and clean it up a bit.
This commit is contained in:
119
Makefile.am
119
Makefile.am
@@ -1,119 +0,0 @@
|
||||
ACLOCAL_AMFLAGS = -I autoconf-archive/m4
|
||||
|
||||
EXTRA_DIST = README.md README.html
|
||||
EXTRA_DIST += config.h.win32
|
||||
EXTRA_DIST += Doxyfile
|
||||
EXTRA_DIST += issues_closed_for_0.13.md
|
||||
|
||||
dist-hook:
|
||||
test -d "$(distdir)/doc" || mkdir "$(distdir)/doc"
|
||||
chmod -R u+w "$(distdir)/doc"
|
||||
cd "$(distdir)" && doxygen
|
||||
|
||||
SUBDIRS = . tests
|
||||
|
||||
lib_LTLIBRARIES = libjson-c.la
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = json-c.pc
|
||||
|
||||
libjson_cincludedir = $(includedir)/json-c
|
||||
libjson_cinclude_HEADERS = \
|
||||
arraylist.h \
|
||||
debug.h \
|
||||
json.h \
|
||||
json_c_version.h \
|
||||
json_config.h \
|
||||
json_inttypes.h \
|
||||
json_object.h \
|
||||
json_object_iterator.h \
|
||||
json_pointer.h \
|
||||
json_tokener.h \
|
||||
json_util.h \
|
||||
json_visit.h \
|
||||
linkhash.h \
|
||||
printbuf.h
|
||||
|
||||
noinst_HEADERS=\
|
||||
json_object_private.h \
|
||||
math_compat.h \
|
||||
strdup_compat.h \
|
||||
snprintf_compat.h \
|
||||
vasprintf_compat.h \
|
||||
random_seed.h \
|
||||
strerror_override.h
|
||||
|
||||
libjson_c_la_LDFLAGS = -version-info 4:0:0 -no-undefined @JSON_BSYMBOLIC_LDFLAGS@
|
||||
|
||||
libjson_c_la_SOURCES = \
|
||||
arraylist.c \
|
||||
debug.c \
|
||||
json_c_version.c \
|
||||
json_object.c \
|
||||
json_object_iterator.c \
|
||||
json_pointer.c \
|
||||
json_tokener.c \
|
||||
json_util.c \
|
||||
json_visit.c \
|
||||
linkhash.c \
|
||||
printbuf.c \
|
||||
random_seed.c \
|
||||
strerror_override.c \
|
||||
strerror_override_private.h
|
||||
|
||||
|
||||
DISTCLEANFILES=
|
||||
DISTCLEANFILES+= \
|
||||
config.h \
|
||||
json-c-uninstalled.pc \
|
||||
json-c.pc \
|
||||
json_config.h
|
||||
|
||||
distclean-local:
|
||||
-rm -rf $(testsubdir)
|
||||
|
||||
JSON_CLEANFILES=
|
||||
JSON_CLEANFILES+= \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
autom4te.cache/ \
|
||||
compile \
|
||||
config.guess \
|
||||
config.h.in \
|
||||
config.sub \
|
||||
configure \
|
||||
depcomp \
|
||||
install-sh \
|
||||
ltmain.sh \
|
||||
missing \
|
||||
test-driver \
|
||||
tests/Makefile.in
|
||||
JSON_CLEANFILES+= \
|
||||
libtool \
|
||||
stamp-h1 \
|
||||
stamp-h2
|
||||
|
||||
# There's no built-in way to remove these after all the other
|
||||
# maintainer-clean steps happen, so do it explicitly here.
|
||||
really-clean:
|
||||
$(MAKE) maintainer-clean
|
||||
rm -rf ${JSON_CLEANFILES}
|
||||
|
||||
uninstall-local:
|
||||
rm -rf "$(DESTDIR)@includedir@/json-c"
|
||||
rm -f "$(DESTDIR)@includedir@/json"
|
||||
|
||||
ANDROID_CFLAGS = -I$(top_srcdir) -DHAVE_CONFIG_H
|
||||
|
||||
Android.mk: Makefile.am
|
||||
androgenizer -:PROJECT json-c \
|
||||
-:SHARED libjson-c \
|
||||
-:TAGS eng debug \
|
||||
-:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
|
||||
-:SOURCES $(libjson_c_la_SOURCES) $(nodist_libjson_c_la_SOURCES) \
|
||||
-:CFLAGS $(DEFS) $(ANDROID_CFLAGS) $(libjson_c_la_CFLAGS) \
|
||||
-:LDFLAGS $(libjson_c_la_LDFLAGS) $(libjson_c_la_LIBADD) \
|
||||
-:HEADER_TARGET json-c \
|
||||
-:HEADERS $(libjson_cinclude_HEADERS) \
|
||||
-:PASSTHROUGH LOCAL_ARM_MODE:=arm \
|
||||
> $@
|
||||
@@ -1,74 +1,86 @@
|
||||
|
||||
Release checklist:
|
||||
|
||||
release=0.14
|
||||
git clone https://github.com/json-c/json-c json-c-${release}
|
||||
cd json-c-${release}
|
||||
Figure out whether a release is worthwhile to do.
|
||||
Analyze the previous release branch to see if anything should have beeni
|
||||
applied to master.
|
||||
Analyze APIs between previous release branch and master to produce list of
|
||||
changes (added/removed/updated funcs, etc...), and detect backwards compat
|
||||
issues.
|
||||
If the new release is not backwards compatible, then this is a MAJOR release.
|
||||
Collect changes and assemble tentative release notes.
|
||||
Identify previous release branch point
|
||||
Check commit logs between previous branch point and now
|
||||
Create a new issues_closed_for_X.Y.md file
|
||||
|
||||
Update ChangeLog with relevant notes before branching.
|
||||
|
||||
Check that the compile works on Linux
|
||||
Check that the compile works on NetBSD
|
||||
Check that the compile works on Windows
|
||||
Run "make distcheck" and fix any problems
|
||||
(e.g. adding new files to SOURCES variables in Makefile.am)
|
||||
Check ChangeLog to see if anything should be added.
|
||||
|
||||
Start creating the new release:
|
||||
release=0.14
|
||||
git clone https://github.com/json-c/json-c json-c-${release}
|
||||
|
||||
mkdir distcheck
|
||||
cd distcheck
|
||||
# Note, the build directory *must* be entirely separate from
|
||||
# the source tree for distcheck to work properly.
|
||||
cmake ../json-c-${release}
|
||||
make distcheck
|
||||
cd ..
|
||||
|
||||
Make any fixes/changes *before* branching.
|
||||
|
||||
git branch json-c-${release}
|
||||
git checkout json-c-${release}
|
||||
cd json-c-${release}
|
||||
git branch json-c-${release}
|
||||
git checkout json-c-${release}
|
||||
|
||||
------------
|
||||
|
||||
Update the version in json_c_version.h
|
||||
Update the version in Doxyfile
|
||||
Update the version in configure.ac
|
||||
Update the version in CMakeLists.txt
|
||||
Update the version in config.h.win32
|
||||
Use ${release}.
|
||||
Using ${release}:
|
||||
Update the version in json_c_version.h
|
||||
Update the version in Doxyfile (PROJECT_NUMBER)
|
||||
Update the version in CMakeLists.txt (VERSION in the project(...) line)
|
||||
Update the version in config.h.win32 (several places)
|
||||
|
||||
Update the libjson_la_LDFLAGS line in Makefile.am to the new version.
|
||||
Generally, unless we're doing a major release, change:
|
||||
-version-info x:y:z
|
||||
to
|
||||
-version-info x:y+1:z
|
||||
Update the set_target_properties() line in CmakeLists.txt to set the shared
|
||||
library version. Generally, unless we're doing a major release, change:
|
||||
VERSION x.y.z
|
||||
to
|
||||
VERSION x.y+1.z
|
||||
|
||||
------------
|
||||
|
||||
Generate the configure script and other files:
|
||||
sh autogen.sh
|
||||
git add -f Makefile.in aclocal.m4 config.guess config.h.in \
|
||||
config.sub configure depcomp install-sh \
|
||||
ltmain.sh missing tests/Makefile.in \
|
||||
INSTALL compile test-driver
|
||||
|
||||
# check for anything else to be added:
|
||||
git status --ignored
|
||||
git commit
|
||||
git commit -a -m "Bump version to ${release}"
|
||||
|
||||
------------
|
||||
|
||||
Generate the doxygen documentation:
|
||||
doxygen
|
||||
git add -f doc
|
||||
git commit doc
|
||||
|
||||
doxygen
|
||||
git add -f doc
|
||||
git commit doc
|
||||
|
||||
------------
|
||||
|
||||
cd ..
|
||||
echo .git > excludes
|
||||
echo autom4te.cache >> excludes
|
||||
tar -czf json-c-${release}.tar.gz -X excludes json-c-${release}
|
||||
Create the release tarballs:
|
||||
|
||||
echo doc >> excludes
|
||||
tar -czf json-c-${release}-nodoc.tar.gz -X excludes json-c-${release}
|
||||
cd ..
|
||||
echo .git > excludes
|
||||
tar -czf json-c-${release}.tar.gz -X excludes json-c-${release}
|
||||
|
||||
echo doc >> excludes
|
||||
tar -czf json-c-${release}-nodoc.tar.gz -X excludes json-c-${release}
|
||||
|
||||
------------
|
||||
|
||||
Tag the branch:
|
||||
cd json-c-${release}
|
||||
git tag -a json-c-${release}-$(date +%Y%m%d) -m "Release json-c-${release}"
|
||||
|
||||
git push origin json-c-${release}
|
||||
git push --tags
|
||||
cd json-c-${release}
|
||||
git tag -a json-c-${release}-$(date +%Y%m%d) -m "Release json-c-${release}"
|
||||
|
||||
git push origin json-c-${release}
|
||||
git push --tags
|
||||
|
||||
------------
|
||||
|
||||
@@ -85,48 +97,49 @@ Logout of Amazon S3, and verify that the files are visible.
|
||||
|
||||
Post-release checklist:
|
||||
|
||||
git checkout master
|
||||
Add new section to ChangeLog
|
||||
Update the version in json_c_version.h
|
||||
Update the version in Doxyfile
|
||||
Update the version in configure.ac
|
||||
Update the version in CMakeLists.txt
|
||||
Update the version in config.h.win32
|
||||
Use ${release}.99 to indicate a version "newer" than anything on the branch.
|
||||
git checkout master
|
||||
|
||||
Update the libjson_la_LDFLAGS line in Makefile.am to match the release branch.
|
||||
For more details see:
|
||||
http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||
Add new section to ChangeLog for ${release}+1
|
||||
|
||||
Use ${release}.99 to indicate a version "newer" than anything on the branch:
|
||||
Update the version in json_c_version.h
|
||||
Update the version in Doxyfile
|
||||
Update the version in CMakeLists.txt
|
||||
Update the version in config.h.win32
|
||||
|
||||
Update RELEASE_CHECKLIST.txt, set release=${release}+1
|
||||
|
||||
Update the set_target_properties() line in CmakeLists.txt to match the release branch.
|
||||
|
||||
------------
|
||||
|
||||
Update the gh-pages branch with new docs:
|
||||
|
||||
cd json-c-${release}
|
||||
git checkout json-c-${release}
|
||||
cd ..
|
||||
cd json-c-${release}
|
||||
git checkout json-c-${release}
|
||||
cd ..
|
||||
|
||||
git clone -b gh-pages https://github.com/json-c/json-c json-c-pages
|
||||
cd json-c-pages
|
||||
mkdir json-c-${release}
|
||||
cp -R ../json-c-${release}/doc json-c-${release}/.
|
||||
git add json-c-${release}
|
||||
git commit
|
||||
git clone -b gh-pages https://github.com/json-c/json-c json-c-pages
|
||||
cd json-c-pages
|
||||
mkdir json-c-${release}
|
||||
cp -R ../json-c-${release}/doc json-c-${release}/.
|
||||
git add json-c-${release}
|
||||
git commit
|
||||
|
||||
vi index.html
|
||||
Add/change links to current release.
|
||||
vi index.html
|
||||
# Add/change links to current release.
|
||||
|
||||
git commit index.html
|
||||
git commit index.html
|
||||
|
||||
git push
|
||||
git push
|
||||
|
||||
------------
|
||||
|
||||
Update checksums on wiki page.
|
||||
|
||||
cd ..
|
||||
openssl sha -sha256 json-c*gz
|
||||
openssl md5 json-c*gz
|
||||
cd ..
|
||||
openssl sha -sha256 json-c*gz
|
||||
openssl md5 json-c*gz
|
||||
|
||||
Copy and paste this output into the wiki page at:
|
||||
https://github.com/json-c/json-c/wiki
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
Autoconf Archive fetched from:
|
||||
|
||||
http://gnu.mirror.iweb.com/autoconf-archive/autoconf-archive-2015.09.25.tar.xz
|
||||
|
||||
Grabbed the minimum files needed for the AX_APPEND_COMPILE_FLAGS and
|
||||
AX_COMPILE_CHECK_SIZEOF macros.
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# For every FLAG1, FLAG2 it is checked whether the compiler works with the
|
||||
# flag. If it does, the flag is added FLAGS-VARIABLE
|
||||
#
|
||||
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
|
||||
# CFLAGS) is used. During the check the flag is always added to the
|
||||
# current language's flags.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# NOTE: This macro depends on the AX_APPEND_FLAG and
|
||||
# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
|
||||
# AX_APPEND_LINK_FLAGS.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# 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 3 of the License, 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
|
||||
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
|
||||
[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
|
||||
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
|
||||
for flag in $1; do
|
||||
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
|
||||
done
|
||||
])dnl AX_APPEND_COMPILE_FLAGS
|
||||
@@ -1,71 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
|
||||
# added in between.
|
||||
#
|
||||
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
|
||||
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
|
||||
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
|
||||
# FLAG.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# 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 3 of the License, 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 6
|
||||
|
||||
AC_DEFUN([AX_APPEND_FLAG],
|
||||
[dnl
|
||||
AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
|
||||
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
|
||||
AS_VAR_SET_IF(FLAGS,[
|
||||
AS_CASE([" AS_VAR_GET(FLAGS) "],
|
||||
[*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
|
||||
[
|
||||
AS_VAR_APPEND(FLAGS,[" $1"])
|
||||
AC_RUN_LOG([: FLAGS="$FLAGS"])
|
||||
])
|
||||
],
|
||||
[
|
||||
AS_VAR_SET(FLAGS,[$1])
|
||||
AC_RUN_LOG([: FLAGS="$FLAGS"])
|
||||
])
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])dnl AX_APPEND_FLAG
|
||||
@@ -1,74 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# 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 3 of the License, 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
||||
@@ -1,114 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_compile_check_sizeof.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro checks for the size of TYPE using compile checks, not run
|
||||
# checks. You can supply extra HEADERS to look into. the check will cycle
|
||||
# through 1 2 4 8 16 and any EXTRA_SIZES the user supplies. If a match is
|
||||
# found, it will #define SIZEOF_`TYPE' to that value. Otherwise it will
|
||||
# emit a configure time error indicating the size of the type could not be
|
||||
# determined.
|
||||
#
|
||||
# The trick is that C will not allow duplicate case labels. While this is
|
||||
# valid C code:
|
||||
#
|
||||
# switch (0) case 0: case 1:;
|
||||
#
|
||||
# The following is not:
|
||||
#
|
||||
# switch (0) case 0: case 0:;
|
||||
#
|
||||
# Thus, the AC_TRY_COMPILE will fail if the currently tried size does not
|
||||
# match.
|
||||
#
|
||||
# Here is an example skeleton configure.in script, demonstrating the
|
||||
# macro's usage:
|
||||
#
|
||||
# AC_PROG_CC
|
||||
# AC_CHECK_HEADERS(stddef.h unistd.h)
|
||||
# AC_TYPE_SIZE_T
|
||||
# AC_CHECK_TYPE(ssize_t, int)
|
||||
#
|
||||
# headers='#ifdef HAVE_STDDEF_H
|
||||
# #include <stddef.h>
|
||||
# #endif
|
||||
# #ifdef HAVE_UNISTD_H
|
||||
# #include <unistd.h>
|
||||
# #endif
|
||||
# '
|
||||
#
|
||||
# AX_COMPILE_CHECK_SIZEOF(char)
|
||||
# AX_COMPILE_CHECK_SIZEOF(short)
|
||||
# AX_COMPILE_CHECK_SIZEOF(int)
|
||||
# AX_COMPILE_CHECK_SIZEOF(long)
|
||||
# AX_COMPILE_CHECK_SIZEOF(unsigned char *)
|
||||
# AX_COMPILE_CHECK_SIZEOF(void *)
|
||||
# AX_COMPILE_CHECK_SIZEOF(size_t, $headers)
|
||||
# AX_COMPILE_CHECK_SIZEOF(ssize_t, $headers)
|
||||
# AX_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers)
|
||||
# AX_COMPILE_CHECK_SIZEOF(off_t, $headers)
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Kaveh Ghazi <ghazi@caip.rutgers.edu>
|
||||
#
|
||||
# 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 3 of the License, 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 5
|
||||
|
||||
AU_ALIAS([AC_COMPILE_CHECK_SIZEOF], [AX_COMPILE_CHECK_SIZEOF])
|
||||
AC_DEFUN([AX_COMPILE_CHECK_SIZEOF],
|
||||
[changequote(<<, >>)dnl
|
||||
dnl The name to #define.
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
||||
dnl The cache variable name.
|
||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
||||
changequote([, ])dnl
|
||||
AC_MSG_CHECKING(size of $1)
|
||||
AC_CACHE_VAL(AC_CV_NAME,
|
||||
[for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence.
|
||||
AC_TRY_COMPILE([#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
$2
|
||||
], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
||||
if test x$AC_CV_NAME != x ; then break; fi
|
||||
done
|
||||
])
|
||||
if test x$AC_CV_NAME = x ; then
|
||||
AC_MSG_ERROR([cannot determine a size for $1])
|
||||
fi
|
||||
AC_MSG_RESULT($AC_CV_NAME)
|
||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
||||
undefine([AC_TYPE_NAME])dnl
|
||||
undefine([AC_CV_NAME])dnl
|
||||
])
|
||||
@@ -1,37 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_REQUIRE_DEFINED(MACRO)
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
|
||||
# been defined and thus are available for use. This avoids random issues
|
||||
# where a macro isn't expanded. Instead the configure script emits a
|
||||
# non-fatal:
|
||||
#
|
||||
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
|
||||
#
|
||||
# It's like AC_REQUIRE except it doesn't expand the required macro.
|
||||
#
|
||||
# Here's an example:
|
||||
#
|
||||
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
|
||||
#
|
||||
# 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.
|
||||
|
||||
#serial 1
|
||||
|
||||
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
|
||||
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
|
||||
])dnl AX_REQUIRE_DEFINED
|
||||
13
autogen.sh
13
autogen.sh
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
autoreconf -v --install || exit 1
|
||||
|
||||
# If there are any options, assume the user wants to run configure.
|
||||
# To run configure w/o any options, use ./autogen.sh --configure
|
||||
if [ $# -gt 0 ] ; then
|
||||
case "$1" in
|
||||
--conf*)
|
||||
shift 1
|
||||
;;
|
||||
esac
|
||||
exec ./configure "$@"
|
||||
fi
|
||||
213
configure.ac
213
configure.ac
@@ -1,213 +0,0 @@
|
||||
AC_PREREQ(2.64)
|
||||
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_INIT([json-c], 0.13.99, [json-c@googlegroups.com])
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
AC_CONFIG_MACRO_DIRS([autoconf-archive/m4])
|
||||
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AC_ARG_ENABLE(threading,
|
||||
AS_HELP_STRING([--enable-threading],
|
||||
[Enable code to support partly multi-threaded use]),
|
||||
[if test x$enableval = xyes; then
|
||||
enable_threading=yes
|
||||
AC_DEFINE(ENABLE_THREADING, 1, [Enable partial threading support])
|
||||
fi])
|
||||
|
||||
if test "x$enable_threading" = "xyes"; then
|
||||
AC_MSG_RESULT([Partial multi-threaded support enabled.])
|
||||
else
|
||||
AC_MSG_RESULT([Multi-threaded support disabled. Use --enable-threading to enable.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(rdrand,
|
||||
AS_HELP_STRING([--enable-rdrand],
|
||||
[Enable RDRAND Hardware RNG Hash Seed generation on supported x86/x64 platforms.]),
|
||||
[if test x$enableval = xyes; then
|
||||
enable_rdrand=yes
|
||||
AC_DEFINE(ENABLE_RDRAND, 1, [Enable RDRAND Hardware RNG Hash Seed])
|
||||
fi])
|
||||
|
||||
if test "x$enable_rdrand" = "xyes"; then
|
||||
AC_MSG_RESULT([RDRAND Hardware RNG Hash Seed enabled on supported x86/x64 platforms])
|
||||
else
|
||||
AC_MSG_RESULT([RDRAND Hardware RNG Hash Seed disabled. Use --enable-rdrand to enable])
|
||||
fi
|
||||
|
||||
# enable silent build by default
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
# Checks for programs.
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
# Checks for header files.
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CC_C99
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_HEADER(json_config.h)
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h limits.h strings.h syslog.h unistd.h [sys/cdefs.h] [sys/param.h] stdarg.h locale.h xlocale.h endian.h)
|
||||
AC_CHECK_HEADER(inttypes.h,[AC_DEFINE([JSON_C_HAVE_INTTYPES_H],[1],[Public define for json_inttypes.h])])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
AC_CACHE_CHECK([for __thread support], ac_cv___thread, [dnl
|
||||
AC_LINK_IFELSE([dnl
|
||||
AC_LANG_PROGRAM([[#undef __thread
|
||||
static __thread int a; int foo (int b) { return a + b; }]],
|
||||
[[exit (foo (0));]])],
|
||||
ac_cv___thread=yes, ac_cv___thread=no)
|
||||
])
|
||||
AS_IF([test "x$ac_cv___thread" != xno],
|
||||
[AC_DEFINE(HAVE___THREAD, 1, [Have __thread])
|
||||
AC_DEFINE(SPEC___THREAD, [__thread], [Specifier for __thread])]
|
||||
)
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MEMCMP
|
||||
AC_CHECK_FUNCS([realloc])
|
||||
AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)
|
||||
AC_CHECK_DECLS([INFINITY], [], [], [[#include <math.h>]])
|
||||
AC_CHECK_DECLS([nan], [], [], [[#include <math.h>]])
|
||||
AC_CHECK_DECLS([isnan], [], [], [[#include <math.h>]])
|
||||
AC_CHECK_DECLS([isinf], [], [], [[#include <math.h>]])
|
||||
AC_CHECK_DECLS([_isnan], [], [], [[#include <float.h>]])
|
||||
AC_CHECK_DECLS([_finite], [], [], [[#include <float.h>]])
|
||||
AC_MSG_CHECKING(for GCC atomic builtins)
|
||||
AC_LINK_IFELSE(
|
||||
[
|
||||
AC_LANG_SOURCE([[
|
||||
int main() {
|
||||
volatile unsigned int val = 1;
|
||||
/* Note: __sync_val_compare_and_swap isn't checked here
|
||||
* because it's protected by __GCC_HAVE_SYNC_COMPARE_AND_SWAP_<n>,
|
||||
* which is automatically defined by gcc.
|
||||
*/
|
||||
__sync_add_and_fetch(&val, 1);
|
||||
__sync_sub_and_fetch(&val, 1);
|
||||
return 0;
|
||||
}
|
||||
]])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_ATOMIC_BUILTINS],[1],[Has atomic builtins])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([json-c will be built without atomic refcounts because atomic builtins are missing])
|
||||
])
|
||||
|
||||
case "${host_os}" in
|
||||
linux*)
|
||||
AC_CHECK_FUNCS([uselocale])
|
||||
;;
|
||||
*) # Nothing
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$ac_cv_have_decl_isnan" = "yes" ; then
|
||||
AC_TRY_LINK([#include <math.h>], [float f = 0.0; return isnan(f)], [], [LIBS="$LIBS -lm"])
|
||||
fi
|
||||
|
||||
#check if .section.gnu.warning accepts long strings (for __warn_references)
|
||||
AC_LANG_PUSH([C])
|
||||
|
||||
AC_MSG_CHECKING([if .gnu.warning accepts long strings])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||
extern void json_object_get();
|
||||
__asm__(".section .gnu.json_object_get,\n\t.ascii \"Please link against libjson-c instead of libjson\"\n\t.text");
|
||||
|
||||
int main(int c,char* v) {return 0;}
|
||||
]])], [
|
||||
AC_DEFINE(HAS_GNU_WARNING_LONG, 1, [Define if .gnu.warning accepts long strings.])
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_LANG_POP([C])
|
||||
|
||||
LT_INIT
|
||||
|
||||
# Check for the -Bsymbolic-functions linker flag
|
||||
AC_ARG_ENABLE([Bsymbolic],
|
||||
[AS_HELP_STRING([--disable-Bsymbolic], [Avoid linking with -Bsymbolic-function])],
|
||||
[],
|
||||
[enable_Bsymbolic=check])
|
||||
|
||||
AS_IF([test "x$enable_Bsymbolic" = "xcheck"],
|
||||
[
|
||||
saved_LDFLAGS="${LDFLAGS}"
|
||||
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
|
||||
LDFLAGS=-Wl,-Bsymbolic-functions
|
||||
AC_TRY_LINK([], [int main (void) { return 0; }],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
enable_Bsymbolic=yes
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
enable_Bsymbolic=no
|
||||
])
|
||||
LDFLAGS="${saved_LDFLAGS}"
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_Bsymbolic" = "xyes"], [JSON_BSYMBOLIC_LDFLAGS=-Wl[,]-Bsymbolic-functions])
|
||||
AC_SUBST(JSON_BSYMBOLIC_LDFLAGS)
|
||||
|
||||
AC_ARG_ENABLE([werror],
|
||||
AS_HELP_STRING([--disable-werror], [avoid treating compiler warnings as fatal errors]))
|
||||
|
||||
AS_IF([test "x$enable_werror" != "xno"], [AX_APPEND_COMPILE_FLAGS([-Werror])])
|
||||
|
||||
AX_APPEND_COMPILE_FLAGS([-Wall -Wcast-qual -Wno-error=deprecated-declarations])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wextra -Wwrite-strings -Wno-unused-parameter])
|
||||
AX_APPEND_COMPILE_FLAGS([-D_GNU_SOURCE])
|
||||
|
||||
AC_LANG_PUSH([C])
|
||||
AC_MSG_CHECKING([for compatibility with _REENTRANT and toolchain headers])
|
||||
AC_LINK_IFELSE(
|
||||
[
|
||||
AC_LANG_SOURCE([[
|
||||
/* uClibc toolchains without threading barf when _REENTRANT is defined */
|
||||
#define _REENTRANT 1
|
||||
#include <sys/types.h>
|
||||
int main ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
]])], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AX_APPEND_COMPILE_FLAGS([-D_REENTRANT])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
AC_LANG_POP([C])
|
||||
|
||||
|
||||
AX_COMPILE_CHECK_SIZEOF(int)
|
||||
AX_COMPILE_CHECK_SIZEOF(long)
|
||||
AX_COMPILE_CHECK_SIZEOF(long long)
|
||||
AX_COMPILE_CHECK_SIZEOF(size_t, [#include <stdint.h>])
|
||||
AX_COMPILE_CHECK_SIZEOF(int64_t, [#include <stdint.h>])
|
||||
AX_COMPILE_CHECK_SIZEOF(uint64_t, [#include <stdint.h>])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
json-c.pc
|
||||
tests/Makefile
|
||||
json-c-uninstalled.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -UNDEBUG
|
||||
|
||||
LDADD= $(LIBJSON_LA)
|
||||
|
||||
LIBJSON_LA=$(top_builddir)/libjson-c.la
|
||||
|
||||
TESTS=
|
||||
TESTS+= test_util_file.test
|
||||
TESTS+= test_float.test
|
||||
TESTS+= test1.test
|
||||
TESTS+= test2.test
|
||||
TESTS+= test4.test
|
||||
TESTS+= testReplaceExisting.test
|
||||
TESTS+= test_parse_int64.test
|
||||
TESTS+= test_deep_copy.test
|
||||
TESTS+= test_null.test
|
||||
TESTS+= test_cast.test
|
||||
TESTS+= test_double_serializer.test
|
||||
TESTS+= test_parse.test
|
||||
TESTS+= test_locale.test
|
||||
TESTS+= test_charcase.test
|
||||
TESTS+= test_printbuf.test
|
||||
TESTS+= test_set_serializer.test
|
||||
TESTS+= test_compare.test
|
||||
TESTS+= test_set_value.test
|
||||
TESTS+= test_visit.test
|
||||
TESTS+= test_json_pointer.test
|
||||
TESTS+= test_int_add.test
|
||||
|
||||
check_PROGRAMS=
|
||||
check_PROGRAMS += $(TESTS:.test=)
|
||||
|
||||
EXTRA_DIST=
|
||||
EXTRA_DIST += $(TESTS)
|
||||
EXTRA_DIST += $(TESTS:.test=.expected)
|
||||
EXTRA_DIST += test-defs.sh
|
||||
EXTRA_DIST += valid.json
|
||||
EXTRA_DIST += valid_nested.json
|
||||
|
||||
|
||||
# Note: handled by test1.test
|
||||
check_PROGRAMS += test1Formatted
|
||||
test1Formatted_SOURCES = test1.c parse_flags.c parse_flags.h
|
||||
test1Formatted_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_FORMATTED
|
||||
EXTRA_DIST+= test1Formatted_plain.expected
|
||||
EXTRA_DIST+= test1Formatted_pretty.expected
|
||||
EXTRA_DIST+= test1Formatted_spaced.expected
|
||||
EXTRA_DIST+= test1Formatted_spaced_pretty.expected
|
||||
EXTRA_DIST+= test1Formatted_spaced_pretty_pretty_tab.expected
|
||||
|
||||
# Note: handled by test2.test
|
||||
check_PROGRAMS += test2Formatted
|
||||
test2Formatted_SOURCES = test2.c parse_flags.c parse_flags.h
|
||||
test2Formatted_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_FORMATTED
|
||||
EXTRA_DIST+= test2Formatted_plain.expected
|
||||
EXTRA_DIST+= test2Formatted_pretty.expected
|
||||
EXTRA_DIST+= test2Formatted_spaced.expected
|
||||
EXTRA_DIST+= test2Formatted_spaced_pretty.expected
|
||||
EXTRA_DIST+= test2Formatted_spaced_pretty_pretty_tab.expected
|
||||
|
||||
test_util_file_SOURCES = test_util_file.c
|
||||
|
||||
testsubdir=testSubDir
|
||||
TESTS_ENVIRONMENT = top_builddir=$(top_builddir)
|
||||
|
||||
distclean-local:
|
||||
-rm -rf $(testsubdir)
|
||||
-rm -f *.vg.out
|
||||
Reference in New Issue
Block a user