]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
configure: detect python major version
authorJason Ish <jason.ish@oisf.net>
Wed, 9 Oct 2019 04:56:35 +0000 (22:56 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 10 Oct 2019 05:47:15 +0000 (07:47 +0200)
For informational purposes only when notifying what Python
modules are required during ./configure.

configure.ac

index 2405fed4976fad56eebb5707947a83f580a67c1c..188c928875cca92c101ae81d3f85f73720d0e590 100644 (file)
     fi
     AM_CONDITIONAL([HAVE_PYTHON], [test "x$enable_python" = "xyes"])
 
+    # Get the Python major version. This is only for information
+    # messages displayed during configure.
+    if test "x$HAVE_PYTHON" != "xno"; then
+       pymv="$($HAVE_PYTHON -c 'import sys; print(sys.version_info.major);')"
+    fi
+
     # Check for python-distutils (setup).
     have_python_distutils="no"
     if test "x$enable_python" = "xyes"; then
        echo "    Warning: Python distutils not found. Python tools will"
        echo "        not be installed."
        echo ""
-       echo "    Ubuntu/Debian: apt install `basename ${HAVE_PYTHON}`-distutils"
+       echo "    Please install the distutils module for Python ${pymv}."
        echo ""
     fi