summaryrefslogtreecommitdiff
path: root/bootstrap.sh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@felicia.(none)>2009-11-05 13:42:31 +0100
committerJoel Klinghed <the_jk@felicia.(none)>2009-11-05 13:42:31 +0100
commit8d2da88d9dc9a8337b1a406c75f04bf16fac9589 (patch)
treee4fc1b1248b31e89f4bdf194497e03f58ffddc5d /bootstrap.sh
Initial commit.
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh58
1 files changed, 58 insertions, 0 deletions
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 <the_jk AT yahoo.com>' > 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