summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorStephen Sinclair <radarsat1@gmail.com>2016-02-05 12:16:18 -0300
committerStephen Sinclair <radarsat1@gmail.com>2016-02-05 12:18:16 -0300
commit7bb026ca74f3c9a4308bdb3756a67d2d6a958d99 (patch)
tree293c384e1708a16426b7fb9027330ab79f7108f7 /autogen.sh
parentf8dac33707c68284be2e1750f08fb11f97e5c4af (diff)
Run autoreconf instead of running the autotools manually, if possible.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh26
1 files changed, 19 insertions, 7 deletions
diff --git a/autogen.sh b/autogen.sh
index a8a3046..bf28ad9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,12 +6,24 @@ test -z "$srcdir" && srcdir=.
DIE=0
+if test -z "$*"; then
+ echo "**Warning**: I am going to run \`configure' with arguments for"
+ echo "developer/maintainer mode. If you wish to pass extra arguments,"
+ echo "(such as --prefix), please specify them on the \`$0'"
+ echo "command line."
+ echo "If you wish to run configure yourself, please specify --no-configure."
+ echo
+fi
+
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level package directory"
exit 1
}
+if ! autoreconf --version </dev/null >/dev/null 2>&1
+then
+
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed."
@@ -55,13 +67,6 @@ if test "$DIE" -eq 1; then
exit 1
fi
-if test -z "$*"; then
- echo "**Warning**: I am going to run \`configure' with no arguments."
- echo "If you wish to pass any to it, please specify them on the"
- echo \`$0\'" command line."
- echo
-fi
-
# Make some directories required by automake, if they don't exist
if ! [ -d config ]; then mkdir -v config; fi
if ! [ -d m4 ]; then mkdir -v m4; fi
@@ -80,6 +85,13 @@ automake --add-missing --gnu $am_opt || exit 1
echo "Running autoconf ..."
autoconf || exit 1
+else # autoreconf instead
+
+ echo "Running autoreconf --verbose --install ..."
+ autoreconf --verbose --install || exit 1
+
+fi
+
if ( echo "$@" | grep -q -e "--no-configure" ); then
NOCONFIGURE=1
fi