summaryrefslogtreecommitdiff
path: root/support/chktex/autogen.sh
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/chktex/autogen.sh
Initial commit
Diffstat (limited to 'support/chktex/autogen.sh')
-rwxr-xr-xsupport/chktex/autogen.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/support/chktex/autogen.sh b/support/chktex/autogen.sh
new file mode 100755
index 0000000000..0982233b12
--- /dev/null
+++ b/support/chktex/autogen.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+ACLOCAL="aclocal -I m4"
+AUTOHEADER="autoheader"
+AUTOMAKE="automake --add-missing --copy --foreign"
+AUTOCONF="autoconf"
+
+# Delete old cache directories.
+# automake will stop if their contents was created by an earlier version.
+rm -rf autom4te.cache
+
+# Generate the Makefiles and configure files
+echo "Building macros..."
+if ( $ACLOCAL --version ) < /dev/null > /dev/null 2>&1; then
+ $ACLOCAL
+else
+ echo "aclocal not found -- aborting"
+ exit 1
+fi
+
+echo "Building config header template..."
+if ( $AUTOHEADER --version ) < /dev/null > /dev/null 2>&1; then
+ $AUTOHEADER
+ echo timestamp > stamp-h.in
+else
+ echo "autoheader not found -- aborting"
+ exit 1
+fi
+
+# We do not really need automake, but want to install programs like install-sh.
+echo "Installing some useful programs..."
+if ( $AUTOMAKE --version ) < /dev/null > /dev/null 2>&1; then
+ $AUTOMAKE 2>/dev/null
+else
+ echo "automake not found -- aborting"
+ exit 1
+fi
+
+echo "Building configure..."
+if ( $AUTOCONF --version ) < /dev/null > /dev/null 2>&1; then
+ $AUTOCONF
+else
+ echo "autoconf not found -- aborting"
+ exit 1
+fi
+
+echo
+echo 'run "./configure ; make"'
+echo