From 8d2da88d9dc9a8337b1a406c75f04bf16fac9589 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Thu, 5 Nov 2009 13:42:31 +0100 Subject: Initial commit. --- bootstrap.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 bootstrap.sh (limited to 'bootstrap.sh') diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..e82f2c9 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +if [ "x$1" = "x--force" ]; then +# remove cached files + rm -f aclocal.m4 + rm -rf autom4te.cache + FORCE_ARG=--force +else + FORCE_ARG= +fi + +CFGFILE=configure.ac +if [ -f configure.ac ]; then + CFGFILE=configure.ac +elif [ -f configure.in ]; then + CFGFILE=configure.in +fi + +echo "*** Aclocal" +if [ -d m4 ]; then + aclocal -I m4 $ACLOCAL_FLAGS $FORCE_ARG || exit 1 +else + aclocal $ACLOCAL_FLAGS $FORCE_ARG || exit 1 +fi + +echo "*** Autoconf" +autoconf $FORCE_ARG || exit 1 + +if grep -q '^AC_CONFIG_HEADERS' "$CFGFILE"; then + echo "*** Autoheader" + autoheader $FORCE_ARG || exit 1 +fi + +if grep -q '^AC_PROG_LIBTOOL' "$CFGFILE"; then + echo "*** Libtoolize" + libtoolize --automake --copy $FORCE_ARG || exit 1 +fi + +if [ ! -f NEWS ]; then + touch NEWS +fi +if [ ! -f README ]; then + touch README +fi +if [ ! -f AUTHORS ]; then + echo 'Joel Klinghed ' > AUTHORS +fi +if [ ! -f ChangeLog ]; then + touch ChangeLog +fi +echo "*** Automake" +if [ -z "$FORCE_ARG" ]; then + automake --gnu --copy --add-missing || exit 1 +else + automake --gnu --copy --add-missing --force-missing || exit 1 +fi + +echo "*** Done" \ No newline at end of file -- cgit v1.3.1