summaryrefslogtreecommitdiff
path: root/bootstrap.sh
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-05-17 23:01:28 -0400
committerMike Frysinger <vapier@gentoo.org>2016-05-17 23:01:28 -0400
commit32c5072fd65f4692a728c802adb403ccf5c8d7e9 (patch)
tree6a4d6748dfa039ac20ecf21015a26ab96f509dfb /bootstrap.sh
parentf7471f250f6d35c575d97797ad182dafcf2cfad5 (diff)
downloadlibgd-32c5072fd65f4692a728c802adb403ccf5c8d7e9.tar.gz
bootstrap: switch to autoreconf
This is simpler and handles all the right subtools for us.
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh45
1 files changed, 9 insertions, 36 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index dac639e..b814ae7 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -6,48 +6,21 @@
# dists should include the docs so that end users don't need to
# install naturaldocs. At the same time, we tolerate it being missing
# so that random hackers don't need it just to build the code.
-if which naturaldocs > /dev/null; then
- echo "Generation user docs:"
- (cd docs/naturaldocs; bash run_docs.sh)
+if which naturaldocs >/dev/null 2>&1 ; then
+ echo "Generation user docs:"
+ (cd docs/naturaldocs; bash run_docs.sh)
else
- echo "Can't find naturaldocs; not generating user manual."
+ echo "Can't find naturaldocs; not generating user manual."
fi
-# allow importing from the environment, e.g.
-# "AUTOCONF=autoconf259 ... ./bootstrap.sh"
-if echo $OSTYPE | grep -q '^darwin' ; then
- echo Having trouble on OS X? Try brew install autoconf libtool automake gettext apple-gcc42 pkg-config cmake
- LIBTOOLIZE=${LIBTOOLIZE:-glibtoolize}
+if echo "${OSTYPE:-$(uname)}" | grep -q '^darwin' ; then
+ echo "Having trouble on OS X? Try: brew install autoconf libtool automake gettext apple-gcc42 pkg-config cmake"
fi
-ACLOCAL=${ACLOCAL:-aclocal}
-AUTOCONF=${AUTOCONF:-autoconf}
-AUTOHEADER=${AUTOHEADER:-autoheader}
-AUTOMAKE=${AUTOMAKE:-automake}
-LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
-# might handle this differently
-AUTOMAKE_FLAGS="--add-missing --copy"
-
-#
-CLEANFILES="Makefile.in aclocal.m4 autom4te.cache configure libtool config/Makefile.in \
-tests/Makefile.in src/Makefile.in"
-
-#
-rm -rf ${CLEANFILES}
-
-#
-if ${ACLOCAL} -I m4 \
- && ${LIBTOOLIZE} --automake --copy --force \
- && ${ACLOCAL} -I m4 \
- && ${AUTOHEADER} \
- && ${AUTOMAKE} ${AUTOMAKE_FLAGS} \
- && ${AUTOCONF} --force && [ -f configure ]
-then
- echo Now run configure and make
-else
- echo Failed
- exit 1
+echo "autoreconf -f -i"
+if ! autoreconf -f -i ; then
+ exit 1
fi
exit 0