summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-08-02 14:42:41 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:13:50 +0200
commit6e6ce3cd915d8c92df815c728c08a2772ad54417 (patch)
tree9afbe9a0add4790ac2bc29ab6186e3de3f8f26f6 /autogen.sh
parent73c191af96353b0a13cc1f9748c10287961e165b (diff)
downloadgettext-6e6ce3cd915d8c92df815c728c08a2772ad54417.tar.gz
Checkout gnulib if GNULIB_TOOL is not set.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh23
1 files changed, 21 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index d2637b1ea..d17d4dd51 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,8 +3,10 @@
# configure files with new versions of autoconf or automake.
#
# This script requires autoconf-2.60 and automake-1.8.2..1.9 in the PATH.
-# It also requires the GNULIB_TOOL environment variable pointing to the
-# gnulib-tool script in a gnulib checkout.
+# It also requires either
+# - the GNULIB_TOOL environment variable pointing to the gnulib-tool script
+# in a gnulib checkout, or
+# - the cvs program in the PATH and an internet connection.
# Copyright (C) 2003-2006 Free Software Foundation, Inc.
#
@@ -30,6 +32,23 @@ else
quick=false
fi
+if test -z "$GNULIB_TOOL"; then
+ # Check out gnulib in a subdirectory 'gnulib'.
+ GNULIB_CVS_ROOT=':pserver:anonymous@cvs.savannah.gnu.org:/sources/gnulib'
+ GNULIB_CVS_REPOSITORY='gnulib'
+ if test -d gnulib; then
+ (cd gnulib && cvs update -d -P)
+ else
+ cvs -d "$GNULIB_CVS_ROOT" checkout $GNULIB_CVS_REPOSITORY
+ fi
+ # Now it should contain a gnulib-tool.
+ if test -f gnulib/gnulib-tool; then
+ GNULIB_TOOL=`pwd`/gnulib/gnulib-tool
+ else
+ echo "** warning: gnulib-tool not found" 1>&2
+ fi
+fi
+# Skip the gnulib-tool step if gnulib-tool was not found.
if test -n "$GNULIB_TOOL"; then
# In gettext-runtime:
# In gettext-tools: