Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate a ./configure bashism #8813

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/always-python.m4
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PYTHON], [

AM_PATH_PYTHON([2.6], [], [:])
AM_CONDITIONAL([USING_PYTHON], [test "$PYTHON" != :])
AM_CONDITIONAL([USING_PYTHON_2], [test "${PYTHON_VERSION:0:2}" = "2."])
AM_CONDITIONAL([USING_PYTHON_3], [test "${PYTHON_VERSION:0:2}" = "3."])
AM_CONDITIONAL([USING_PYTHON_2], [echo "${PYTHON_VERSION}" | grep -q "^2\\."])
AM_CONDITIONAL([USING_PYTHON_3], [echo "${PYTHON_VERSION}" | grep -q "^3\\."])

dnl #
dnl # Minimum supported Python versions for utilities:
dnl # Python 2.6.x, or Python 3.4.x
dnl #
AS_IF([test "${PYTHON_VERSION:0:2}" = "2."], [
AS_IF([echo "${PYTHON_VERSION}" | grep -q "^2\\."], [
ZFS_AC_PYTHON_VERSION([>= '2.6'], [ /bin/true ],
[AC_MSG_ERROR("Python >= 2.6.x is not available")])
])

AS_IF([test "${PYTHON_VERSION:0:2}" = "3."], [
AS_IF([echo "${PYTHON_VERSION}" | grep -q "^3\\."], [
ZFS_AC_PYTHON_VERSION([>= '3.4'], [ /bin/true ],
[AC_MSG_ERROR("Python >= 3.4.x is not available")])
])
Expand Down
4 changes: 2 additions & 2 deletions config/always-pyzfs.m4
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PYZFS], [
dnl # Require python-devel libraries
dnl #
AS_IF([test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes], [
AS_IF([test "${PYTHON_VERSION:0:2}" = "2."], [
AS_IF([echo "${PYTHON_VERSION}" | grep -q "^2\\."], [
PYTHON_REQUIRED_VERSION=">= '2.7.0'"
], [
AS_IF([test "${PYTHON_VERSION:0:2}" = "3."], [
AS_IF([echo "${PYTHON_VERSION}" | grep -q "^3\\."], [
PYTHON_REQUIRED_VERSION=">= '3.4.0'"
], [
AC_MSG_ERROR("Python $PYTHON_VERSION unknown")
Expand Down