]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check for 'distutils.core setup'
authorMark Andrews <marka@isc.org>
Mon, 25 Nov 2019 07:05:22 +0000 (18:05 +1100)
committerMark Andrews <marka@isc.org>
Mon, 25 Nov 2019 22:46:48 +0000 (22:46 +0000)
configure
configure.ac

index 86fc3270ee2d360df5ad44d3205bcaf1e652fa80..49f92ae55af4e90a6d4dba8fa496284b33ae4627 100755 (executable)
--- a/configure
+++ b/configure
@@ -12485,6 +12485,9 @@ except: exit(1)'
 testply='try: import ply
 except: exit(1)'
 
+testsetup='try: from distutils.core import setup
+except: exit(1)'
+
 default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7"
 
 
@@ -12603,6 +12606,18 @@ $as_echo_n "checking Python module 'ply'... " >&6; }
         if "$PYTHON" -c "$testply" 2>/dev/null; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               unset PYTHON
+               continue
+fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python module 'distutils.core setup'" >&5
+$as_echo_n "checking Python module 'distutils.core setup'... " >&6; }
+        if "$PYTHON" -c "$testsetup" 2>/dev/null; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
index 7132612ac44a2fca75e89a4c075f6e0b1929da83..031206ca219360328ab728842dcb94aa62e730a7 100644 (file)
@@ -202,6 +202,9 @@ except: exit(1)'
 testply='try: import ply
 except: exit(1)'
 
+testsetup='try: from distutils.core import setup
+except: exit(1)'
+
 default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7"
 
 AC_ARG_WITH([python],
@@ -255,6 +258,13 @@ AS_IF([test "$with_python" = "no"],
                unset PYTHON
                continue])
 
+        AC_MSG_CHECKING([Python module 'distutils.core setup'])
+        AS_IF(["$PYTHON" -c "$testsetup" 2>/dev/null],
+              [AC_MSG_RESULT([yes])],
+              [AC_MSG_RESULT([no])
+               unset PYTHON
+               continue])
+
         # Stop looking any further once we find a Python interpreter
         # satisfying all requirements.
         break