Add to git.
[makeplus.git] / check_gnu_tar.sh
1 #!/bin/sh
2 #
3 # This is make+. Make+ is a set of scripts which enhance GNU make and
4 # let ou build RPMs, and other packages types with just one control
5 # file. Read more at http://www.annexia.org/freeware/makeplus/
6 #
7 # The original author is Richard W.M. Jones <rich@annexia.org>.
8 #
9 # This software has been explicitly placed in the PUBLIC DOMAIN.  You
10 # do not need any sort of license or agreement to use or copy this
11 # software. You may also copyright this software yourself, and/or
12 # relicense it under any terms you want, at any time and at no cost.
13 # This allows you (among other things) to include this software with
14 # other packages so that the user does not need to download and
15 # install make+ separately.
16
17 # XXX More thought required here. Much of dist.mk makes assumptions
18 # that we have a non-losing tar. This is why you can't build distributions
19 # on Solaris yet.
20
21 tar --help > mp-check_gnu_tar 2>&1
22 if head -1 mp-check_gnu_tar | grep -q GNU >/dev/null 2>&1; then
23     echo 'HAVE_GNU_TAR := 1' >> config.mk
24     echo '#define HAVE_GNU_TAR 1' >> config.h
25 else
26     echo '# HAVE_GNU_TAR := 1' >> config.mk
27     echo '/* #define HAVE_GNU_TAR 1 */' >> config.h
28 fi
29 rm -f mp-check_gnu_tar