Fix configure inserting absolute paths for Python and Perl (#5504) (#5505)

* Migrate all tools to AC_CHECK_PROG
This commit is contained in:
Nathan Graybeal 2024-10-04 02:08:44 -07:00 committed by GitHub
parent ff1d20d50c
commit 3572bd2f1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -190,26 +190,26 @@ if test "x$AR" = "x" ; then
AC_MSG_ERROR([Cannot find "ar" in your PATH, please install it]) AC_MSG_ERROR([Cannot find "ar" in your PATH, please install it])
fi fi
AC_PATH_PROG(PERL,perl) AC_CHECK_PROG(PERL,perl,perl)
if test "x$PERL" = "x" ; then if test "x$PERL" = "x" ; then
AC_MSG_ERROR([Cannot find "perl" in your PATH, please install it]) AC_MSG_ERROR([Cannot find "perl" in your PATH, please install it])
fi fi
AC_PATH_PROG(PYTHON3,python3) AC_CHECK_PROG(PYTHON3,python3,python3)
if test "x$PYTHON3" = "x" ; then if test "x$PYTHON3" = "x" ; then
AC_MSG_ERROR([Cannot find "python3" in your PATH, please install it]) AC_MSG_ERROR([Cannot find "python3" in your PATH, please install it])
fi fi
python3_version=$($PYTHON3 --version | head -1) python3_version=$($PYTHON3 --version | head -1)
AC_MSG_RESULT([$PYTHON3 --version = $python3_version]) AC_MSG_RESULT([$PYTHON3 --version = $python3_version])
AC_PATH_PROG(LEX,flex) AC_CHECK_PROG(LEX,flex,flex)
if test "x$LEX" = "x" ; then if test "x$LEX" = "x" ; then
AC_MSG_ERROR([Cannot find "flex" in your PATH, please install it]) AC_MSG_ERROR([Cannot find "flex" in your PATH, please install it])
fi fi
flex_version=$($LEX --version | head -1) flex_version=$($LEX --version | head -1)
AC_MSG_RESULT([$LEX --version = $flex_version]) AC_MSG_RESULT([$LEX --version = $flex_version])
AC_PATH_PROG(YACC,bison) AC_CHECK_PROG(YACC,bison,bison)
if test "x$YACC" = "x" ; then if test "x$YACC" = "x" ; then
AC_MSG_ERROR([Cannot find "bison" in your PATH, please install it]) AC_MSG_ERROR([Cannot find "bison" in your PATH, please install it])
fi fi

View File

@ -150,6 +150,7 @@ Mladen Slijepcevic
Morten Borup Petersen Morten Borup Petersen
Mostafa Gamal Mostafa Gamal
Nandu Raj Nandu Raj
Nathan Graybeal
Nathan Kohagen Nathan Kohagen
Nathan Myers Nathan Myers
Nolan Poe Nolan Poe