]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Simplify recent $PERL check
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Dec 2023 05:50:45 +0000 (21:50 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Dec 2023 05:52:18 +0000 (21:52 -0800)
* configure.ac: Don’t spin off subprocesses to check $PERL.

configure.ac

index 946fecb675a22016cdf79d5b78f5a58b3ecfdce2..5cda80a18aa649de0f4c7c9f0cdf457c50ec3d43 100644 (file)
@@ -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])