diff src/configure.ac @ 13694:7152032191d7 v8.0.1719

patch 8.0.1719: cannot specify which Python executable configure should use commit https://github.com/vim/vim/commit/e1a32310d5e9684608b893ab8295191d63178b4e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 15 16:03:25 2018 +0200 patch 8.0.1719: cannot specify which Python executable configure should use Problem: Cannot specify which Python executable configure should use. Solution: Add --with-python-command and --with-python3-command.
author Christian Brabandt <cb@256bit.org>
date Sun, 15 Apr 2018 16:15:06 +0200
parents 4034ddb84f01
children 30f9ebe3e602
line wrap: on
line diff
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1117,7 +1117,15 @@ if test "$enable_pythoninterp" = "yes" -
   fi
 
   dnl -- find the python executable
-  AC_PATH_PROGS(vi_cv_path_python, python2 python)
+  AC_MSG_CHECKING(--with-python-command argument)
+  AC_SUBST(vi_cv_path_python)
+  AC_ARG_WITH(python-command, [  --with-python-command=NAME  name of the Python 2 command (default: python2 or python)],
+	vi_cv_path_python="$withval"; AC_MSG_RESULT($vi_cv_path_python),
+	AC_MSG_RESULT(no))
+
+  if test "X$vi_cv_path_python" = "X"; then
+    AC_PATH_PROGS(vi_cv_path_python, python2 python)
+  fi
   if test "X$vi_cv_path_python" != "X"; then
 
     dnl -- get its version number
@@ -1156,7 +1164,7 @@ if test "$enable_pythoninterp" = "yes" -
       dnl -- where the Python implementation library archives are
 
       AC_ARG_WITH(python-config-dir,
-	[  --with-python-config-dir=PATH  Python's config directory],
+	[  --with-python-config-dir=PATH  Python's config directory (deprecated)],
 	[ vi_cv_path_python_conf="${withval}"; have_python_config_dir=1 ] )
 
       AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python_conf,
@@ -1343,7 +1351,15 @@ if test "$enable_python3interp" = "yes" 
   fi
 
   dnl -- find the python3 executable
-  AC_PATH_PROGS(vi_cv_path_python3, python3 python)
+  AC_MSG_CHECKING(--with-python3-command argument)
+  AC_SUBST(vi_cv_path_python3)
+  AC_ARG_WITH(python3-command, [  --with-python3-command=NAME  name of the Python 3 command (default: python3 or python)],
+	vi_cv_path_python3="$withval"; AC_MSG_RESULT($vi_cv_path_python3),
+	AC_MSG_RESULT(no))
+
+  if test "X$vi_cv_path_python3" = "X"; then
+    AC_PATH_PROGS(vi_cv_path_python3, python3 python)
+  fi
   if test "X$vi_cv_path_python3" != "X"; then
 
     dnl -- get its version number
@@ -1393,7 +1409,7 @@ if test "$enable_python3interp" = "yes" 
       dnl -- where the Python implementation library archives are
   
       AC_ARG_WITH(python3-config-dir,
-       [  --with-python3-config-dir=PATH  Python's config directory],
+       [  --with-python3-config-dir=PATH  Python's config directory (deprecated)],
        [ vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1 ] )
   
       AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python3_conf,