diff options
author | Karel Zak | 2017-03-04 17:01:56 +0100 |
---|---|---|
committer | J William Piggott | 2017-03-04 17:01:56 +0100 |
commit | 30d7f61f4fc1967190a734e2d62696d546fb6378 (patch) | |
tree | 8ad79444b545699900730b2da267e8a587fb2d4d /autogen.sh | |
parent | lib: add parse-date.y (diff) | |
download | kernel-qcow2-util-linux-30d7f61f4fc1967190a734e2d62696d546fb6378.tar.gz kernel-qcow2-util-linux-30d7f61f4fc1967190a734e2d62696d546fb6378.tar.xz kernel-qcow2-util-linux-30d7f61f4fc1967190a734e2d62696d546fb6378.zip |
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 <elseifthen@gmx.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 20 |
1 files changed, 20 insertions, 0 deletions
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 |