Make Python detection optional and more portable

Previously, --without-python would cause ./configure to fail. Now it is
able to proceed, and the Python scripts will not be built.

Use portable parameter expansion matching instead of nonstandard
substring matching to detect the Python version.  This test is
duplicated in several places, so define a function for it.

Don't assume the full path to binaries, since different platforms do
install things in different places.  Use AC_CHECK_PROGS instead.

When building without Python, also build without pyzfs.

Sponsored by: iXsystems, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Ryan Moeller <ryan@freqlabs.com>
Closes #8809 
Closes #8731
This commit is contained in:
Ryan Moeller
2019-06-04 18:05:46 -07:00
committed by Brian Behlendorf
parent df24bcf00a
commit 1a132f0638
3 changed files with 39 additions and 24 deletions
+7 -2
View File
@@ -1,3 +1,8 @@
SUBDIRS = zfs zpool zdb zhack zinject zstreamdump ztest
SUBDIRS += mount_zfs fsck_zfs zvol_id vdev_id arcstat dbufstat zed
SUBDIRS += arc_summary raidz_test zgenhostid
SUBDIRS += fsck_zfs vdev_id raidz_test zgenhostid
if USING_PYTHON
SUBDIRS += arcstat arc_summary dbufstat
endif
SUBDIRS += mount_zfs zed zvol_id