From 30d7f61f4fc1967190a734e2d62696d546fb6378 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Sat, 4 Mar 2017 11:01:56 -0500 Subject: build-sys: add parse-date.y * add lib/parse-date.y to build system * add necessary autotools stuff to generate .c on the fly (autotools are smart enough to add generated file to tarball) * check for bison version by ./autogen.sh * add non-wanted junk to .gitignore With some modification by J William Piggott with regard to moving the parse-date API into timeutils.h Signed-off-by: J William Piggott --- autogen.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'autogen.sh') diff --git a/autogen.sh b/autogen.sh index 116885bc7..04b6cb459 100755 --- a/autogen.sh +++ b/autogen.sh @@ -67,6 +67,25 @@ test -f sys-utils/mount.c || { DIE=1 } +if ! (bison --version) < /dev/null > /dev/null 2>&1; then + echo + echo "You must have bison installed to build the util-linux." + echo + DIE=1 +else + lexver=$(bison --version | awk '/bison \(GNU Bison\)/ { print $4 }') + case "$lexver" in + [2-9].*) + ;; + *) + echo + echo "You must have bison version >= 2.x, but you have $lexver." + echo + DIE=1 + ;; + esac +fi + LIBTOOLIZE=libtoolize case `uname` in Darwin*) LIBTOOLIZE=glibtoolize ;; esac if ! ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1; then @@ -104,6 +123,7 @@ echo " autoconf: $(autoconf --version | head -1)" echo " autoheader: $(autoheader --version | head -1)" echo " automake: $(automake --version | head -1)" echo " libtoolize: $($LIBTOOLIZE --version | head -1)" +echo " bison: $(bison --version | head -1)" rm -rf autom4te.cache -- cgit v1.2.3-55-g7522