add cJSON library
add json-output option
update autoconf files