]> 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 23:02:06 +0000 (10:02 +1100)
(cherry picked from commit 50e1bf38004bf6a60d8599e59109c2aee5e599fe)

configure
configure.ac

index 814d76d32e7b00d7359fc2e0a2ca1d8fde9fa705..add341a1d02c6cbc98821fb04f7e8ee6918ba02b 100755 (executable)
--- a/configure
+++ b/configure
@@ -12199,6 +12199,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"
 
 
@@ -12317,6 +12320,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 63bba0966a68a6e94a7d069a2071f76f51e7aeb4..d2d27404b36ada48c794ecf1e9ec24554b565695 100644 (file)
@@ -199,6 +199,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],
@@ -252,6 +255,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