Mercurial > nxg > jason
changeset 12:a9a41fa6fa73
Fix missing declarations and libraries; builds on FreeBSD
author | Norman Gray <norman@astro.gla.ac.uk> |
---|---|
date | Fri, 03 Jan 2014 16:52:58 +0000 |
parents | 3fce44ee023b |
children | a593eddaf0a3 |
files | bootstrap src/Makefile.am src/json_lex.lex src/test/Makefile.am |
diffstat | 4 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/bootstrap Fri Jan 03 16:29:47 2014 +0000 +++ b/bootstrap Fri Jan 03 16:52:58 2014 +0000 @@ -1,5 +1,11 @@ #! /bin/sh - +# Check automake is installed +automake --version >/dev/null || { + echo "Automake is missing, but is required" + exit 1 +} + # test -L install.sh || automake --foreign --add-missing AUTOMAKE='automake --foreign --add-missing' export AUTOMAKE
--- a/src/Makefile.am Fri Jan 03 16:29:47 2014 +0000 +++ b/src/Makefile.am Fri Jan 03 16:52:58 2014 +0000 @@ -13,10 +13,11 @@ util.c util.h \ json_lex.c \ json-parse.tab.c json-parse.tab.h +libjason_la_LIBADD = -lm json_lex.c: json-parse.tab.h json_lex.c: json_lex.lex - $(LEX) -o $@ json_lex.lex + $(LEX) -o$@ json_lex.lex json-parse.tab.h json-parse.tab.c: json-parse.y $(BISON) -d json-parse.y
--- a/src/json_lex.lex Fri Jan 03 16:29:47 2014 +0000 +++ b/src/json_lex.lex Fri Jan 03 16:52:58 2014 +0000 @@ -1,6 +1,7 @@ %{ /* need this for the call to atof() below */ #include <math.h> +#include <string.h> #include <assert.h> #include <ctype.h> #define JASON_IMPLEMENTATION 1
--- a/src/test/Makefile.am Fri Jan 03 16:29:47 2014 +0000 +++ b/src/test/Makefile.am Fri Jan 03 16:52:58 2014 +0000 @@ -3,7 +3,7 @@ bin_PROGRAMS = unit_tests unit_tests_SOURCES = unit_tests.c unit_tests.$(OBJEXT): ../jason.h -unit_tests_LDADD = ../libjason.la lcut.o +unit_tests_LDADD = ../libjason.la lcut.o -lm EXTRA_DIST=lcut/README lcut/apr_ring.h lcut/lcut.c lcut/lcut.h