From 31b0dc1f204d8f7520145f21e8ea46d1466412a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= Date: Fri, 25 May 2018 14:24:21 +0200 Subject: [PATCH] Require python with dnspython module --- configure | 30 +++++++++++++++++++++++++++++- configure.in | 13 +++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 304065bd16..4e2ef04084 100755 --- a/configure +++ b/configure @@ -936,6 +936,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1094,6 +1095,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1346,6 +1348,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1483,7 +1494,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1636,6 +1647,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -12208,6 +12220,9 @@ except: exit(1)' testply='try: from ply import * except: exit(1)' +testdnspython='try: import dns.message +except: exit(1)' + testminvers='import sys if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): exit(1)' @@ -12301,6 +12316,19 @@ $as_echo "not found" >&6; } $as_echo_n "checking python module 'ply'... " >&6; } if ${PYTHON:-false} -c "$testply"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + unset ac_cv_path_PYTHON + unset PYTHON + continue + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python module 'dnspython'" >&5 +$as_echo_n "checking python module 'dnspython'... " >&6; } + if ${PYTHON:-false} -c "$testdnspython"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } break else diff --git a/configure.in b/configure.in index 15db7a1e32..23c7a3124c 100644 --- a/configure.in +++ b/configure.in @@ -185,6 +185,9 @@ except: exit(1)' testply='try: from ply import * except: exit(1)' +testdnspython='try: import dns.message +except: exit(1)' + testminvers='import sys if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): exit(1)' @@ -225,6 +228,16 @@ case "$use_python" in AC_MSG_CHECKING([python module 'ply']) if ${PYTHON:-false} -c "$testply"; then AC_MSG_RESULT([found]) + else + AC_MSG_RESULT([not found]) + unset ac_cv_path_PYTHON + unset PYTHON + continue + fi + + AC_MSG_CHECKING([python module 'dnspython']) + if ${PYTHON:-false} -c "$testdnspython"; then + AC_MSG_RESULT([found]) break else AC_MSG_RESULT([not found])