Subject: bug#62896: closed (Re: bug#62896: [Configure] Bug with check for PERL when path has spaces (i.e. Windows))

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 03 Dec 2023 05:57:02 +0000

Your bug report

#62896: [Configure] Bug with check for PERL when path has spaces (i.e. Windows)

which was filed against the automake package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
62896: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62896
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#62896: [Configure] Bug with check for PERL when path has spaces (i.e. Windows)
From: Paul Eggert <[email-masked]>
To: Zack Weinberg <[email-masked]>, Mike Frysinger <[email-masked]>, Karl Berry <[email-masked]>
Cc: [email-masked]
Date: Sat, 2 Dec 2023 21:55:52 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On 2023-12-02 19:29, Zack Weinberg wrote:
> `grep -q` *is*  in POSIX, but I seem to recall tripping over a
> system that didn't have it (probably either a Solaris successor, or AIX)
> during the run-up to Autoconf 2.71.

Solaris 10 /usr/bin/grep does not support -e, -E, -f, -F, -q, or -x.

Solaris 10 is supported by its supplier through January 2025; that's the 
usual guideline we use for how long to support a sorta-POSIX OS.

However, the script shouldn't use 'grep'. Instead, it should just use 
the shell's builtin pattern matching. That's faster and more portable. I 
installed the attached into Automake.

The original bug was fixed before I got to this, so I'm boldly closing 
the bug report.

From 668e8a20e3561063ee7478e91c9f81bb40cfed7a Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Sat, 2 Dec 2023 21:50:45 -0800
Subject: [PATCH] Simplify recent $PERL check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* configure.ac: Don’t spin off subprocesses to check $PERL.
---
 configure.ac | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 946fecb67..5cda80a18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,13 +68,16 @@ AUTOMAKE="\"`pwd`/pre-inst-env\" automake-$APIVERSION"
 AC_PROG_LN_S
 
 AC_PATH_PROG([PERL], [perl])
-if test -z "$PERL"; then
+case $PERL in
+ '')
    AC_MSG_ERROR([perl not found])
-elif echo "$PERL" | grep '[ 	]' >/dev/null; then
+   ;;
+ *' '* | *'	'*)
   AC_MSG_ERROR([The path to your Perl contains spaces or tabs.
 This would cause build failures later or unusable programs.
 Please use a path without spaces and try again.])
-fi
+  ;;
+esac
 
 # Save details about the selected perl interpreter in config.log.
 AM_RUN_LOG([$PERL --version])
-- 
2.40.1

Subject: [Configure] Bug with check for PERL when path has spaces (i.e. Windows)
From: Dan Rosser <[email-masked]>
To: [email-masked]
Date: Mon, 17 Apr 2023 13:57:30 +1000
List-Id: <debbugs-submit.debbugs.gnu.org>

VER=1.16.4

Building "automake"

checking whether make supports nested variables... no
checking build system type... x86_64-pc-mingw64
checking host system type... x86_64-pc-mingw64
checking for a BSD-compatible install... ./lib/install-sh -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /c/Program Files/Git/usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether ln -s works... no, using cp -pR
checking for perl... /c/Program Files/Git/usr/bin/perl
./configure: line 3475: /c/Program: No such file or directory
configure: error: perl 5.6 or better is required; perl 5.8.2 or better
is recommended.  If you have several perl versions
installed, select the one Automake should use using
  ./configure PERL=/path/to/perl