Let configure fail if Perl is not in $PATH
This commit is contained in:
		
							
								
								
									
										31
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								configure
									
									
									
									
										vendored
									
									
								
							| @@ -4118,28 +4118,24 @@ else | |||||||
|   RANLIB="$ac_cv_prog_RANLIB" |   RANLIB="$ac_cv_prog_RANLIB" | ||||||
| fi | fi | ||||||
|  |  | ||||||
| for ac_prog in perl | # Extract the first word of "perl", so it can be a program name with args. | ||||||
| do | set dummy perl; ac_word=$2 | ||||||
|   # Extract the first word of "$ac_prog", so it can be a program name with args. |  | ||||||
| set dummy $ac_prog; ac_word=$2 |  | ||||||
| { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||||||
| $as_echo_n "checking for $ac_word... " >&6; } | $as_echo_n "checking for $ac_word... " >&6; } | ||||||
| if ${ac_cv_path_PERL+:} false; then : | if ${ac_cv_prog_PERL+:} false; then : | ||||||
|   $as_echo_n "(cached) " >&6 |   $as_echo_n "(cached) " >&6 | ||||||
| else | else | ||||||
|   case $PERL in |   if test -n "$PERL"; then | ||||||
|   [\\/]* | ?:[\\/]*) |   ac_cv_prog_PERL="$PERL" # Let the user override the test. | ||||||
|   ac_cv_path_PERL="$PERL" # Let the user override the test with a path. | else | ||||||
|   ;; | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||||||
|   *) |  | ||||||
|   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |  | ||||||
| for as_dir in $PATH | for as_dir in $PATH | ||||||
| do | do | ||||||
|   IFS=$as_save_IFS |   IFS=$as_save_IFS | ||||||
|   test -z "$as_dir" && as_dir=. |   test -z "$as_dir" && as_dir=. | ||||||
|     for ac_exec_ext in '' $ac_executable_extensions; do |     for ac_exec_ext in '' $ac_executable_extensions; do | ||||||
|   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||||||
|     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" |     ac_cv_prog_PERL="$(command -v perl)" | ||||||
|     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||||||
|     break 2 |     break 2 | ||||||
|   fi |   fi | ||||||
| @@ -4147,10 +4143,10 @@ done | |||||||
|   done |   done | ||||||
| IFS=$as_save_IFS | IFS=$as_save_IFS | ||||||
|  |  | ||||||
|   ;; |   test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="no" | ||||||
| esac |  | ||||||
| fi | fi | ||||||
| PERL=$ac_cv_path_PERL | fi | ||||||
|  | PERL=$ac_cv_prog_PERL | ||||||
| if test -n "$PERL"; then | if test -n "$PERL"; then | ||||||
|   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 |   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 | ||||||
| $as_echo "$PERL" >&6; } | $as_echo "$PERL" >&6; } | ||||||
| @@ -4160,10 +4156,7 @@ $as_echo "no" >&6; } | |||||||
| fi | fi | ||||||
|  |  | ||||||
|  |  | ||||||
|   test -n "$PERL" && break | test "$PERL" == "no" && as_fn_error $? "Required program 'perl' not found." "$LINENO" 5 | ||||||
| done |  | ||||||
| test -n "$PERL" || PERL="/usr/local/bin/perl" |  | ||||||
|  |  | ||||||
| for ac_prog in nkf | for ac_prog in nkf | ||||||
| do | do | ||||||
|   # Extract the first word of "$ac_prog", so it can be a program name with args. |   # Extract the first word of "$ac_prog", so it can be a program name with args. | ||||||
|   | |||||||
| @@ -25,7 +25,8 @@ AC_PROG_INSTALL | |||||||
| AC_PROG_LN_S | AC_PROG_LN_S | ||||||
| AC_PROG_MAKE_SET | AC_PROG_MAKE_SET | ||||||
| AC_PROG_RANLIB | AC_PROG_RANLIB | ||||||
| AC_PATH_PROGS(PERL, perl, /usr/local/bin/perl) | AC_CHECK_PROG(PERL,[perl],[$(command -v perl)],[no]) | ||||||
|  | test "$PERL" == "no" && AC_MSG_ERROR([Required program 'perl' not found.]) | ||||||
| AC_PATH_PROGS(NKF, nkf, /usr/local/bin/nkf) | AC_PATH_PROGS(NKF, nkf, /usr/local/bin/nkf) | ||||||
| AC_PATH_PROGS(MAN, man, /usr/bin/man) | AC_PATH_PROGS(MAN, man, /usr/bin/man) | ||||||
| AC_PATH_XTRA | AC_PATH_XTRA | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user