maint: fix "make syntax-check": remove useless HAVE_UTIME_H definitions
[debian/gzip] / bootstrap
index 294c0bce447935103ab493ca7c3ee2d30a48d44a..85b85c530f97cc80ed62265a514c8470e9b5537e 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2014-12-08.12; # UTC
+scriptversion=2017-09-19.08; # UTC
 
 # Bootstrap this package from checked-out sources.
 
-# Copyright (C) 2003-2016 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ scriptversion=2014-12-08.12; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # Originally written by Paul Eggert.  The canonical version of this
 # script is maintained as build-aux/bootstrap in gnulib, however, to
@@ -42,7 +42,7 @@ export LC_ALL
 
 local_gl_dir=gl
 
-# Honour $PERL, but work even if there is none
+# Honor $PERL, but work even if there is none.
 PERL="${PERL-perl}"
 
 me=$0
@@ -141,7 +141,7 @@ po_download_command_format=\
 # Fallback for downloading .po files (if rsync fails).
 po_download_command_format2=\
 "wget --mirror -nd -q -np -A.po -P '%s' \
- http://translationproject.org/latest/%s/"
+ https://translationproject.org/latest/%s/"
 
 # Prefer a non-empty tarname (4th argument of AC_INIT if given), else
 # fall back to the package name (1st argument with munging)
@@ -418,28 +418,30 @@ sort_ver() { # sort -V is not generally available
   done
 }
 
-get_version() {
-  app=$1
+get_version_sed='
+# Move version to start of line.
+s/.*[v ]\([0-9]\)/\1/
 
-  $app --version >/dev/null 2>&1 || { $app --version; return 1; }
+# Skip lines that do not start with version.
+/^[0-9]/!d
 
-  $app --version 2>&1 |
-  sed -n '# Move version to start of line.
-          s/.*[v ]\([0-9]\)/\1/
+# Remove characters after the version.
+s/[^.a-z0-9-].*//
 
-          # Skip lines that do not start with version.
-          /^[0-9]/!d
+# The first component must be digits only.
+s/^\([0-9]*\)[a-z-].*/\1/
 
-          # Remove characters after the version.
-          s/[^.a-z0-9-].*//
+#the following essentially does s/5.005/5.5/
+s/\.0*\([1-9]\)/.\1/g
+p
+q'
 
-          # The first component must be digits only.
-          s/^\([0-9]*\)[a-z-].*/\1/
+get_version() {
+  app=$1
+
+  $app --version >/dev/null 2>&1 || { $app --version; return 1; }
 
-          #the following essentially does s/5.005/5.5/
-          s/\.0*\([1-9]\)/.\1/g
-          p
-          q'
+  $app --version 2>&1 | sed -n "$get_version_sed"
 }
 
 check_versions() {
@@ -697,7 +699,7 @@ download_po_files() {
   echo "$me: getting translations into $subdir for $domain..."
   cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
   eval "$cmd" && return
-  # Fallback to HTTP.
+  # Fallback to HTTPS.
   cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
   eval "$cmd"
 }
@@ -788,9 +790,9 @@ symlink_to_dir()
       # Leave any existing symlink alone, if it already points to the source,
       # so that broken build tools that care about symlink times
       # aren't confused into doing unnecessary builds.  Conversely, if the
-      # existing symlink's time stamp is older than the source, make it afresh,
+      # existing symlink's timestamp is older than the source, make it afresh,
       # so that broken tools aren't confused into skipping needed builds.  See
-      # <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
+      # <https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
       test -h "$dst" &&
       src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
       dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
@@ -1021,6 +1023,6 @@ echo "$0: done.  Now you can run './configure'."
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End: