]> sourceware.org Git - systemtap.git/commitdiff
configure.ac :: default --with-python3=auto to handle Python3-only systems
authorSerhei Makarov <smakarov@redhat.com>
Tue, 15 Oct 2019 19:48:30 +0000 (15:48 -0400)
committerSerhei Makarov <smakarov@redhat.com>
Tue, 15 Oct 2019 19:48:30 +0000 (15:48 -0400)
configure
configure.ac

index 5cfeae6c6bcfe17337510d8b2373294c8f2c1cb5..4290f6627f663f1244f7f64327d9f6f90bd8b70d 100755 (executable)
--- a/configure
+++ b/configure
@@ -11393,6 +11393,8 @@ LIBS=$LIBS_no_readline
 # Check whether --with-python3 was given.
 if test "${with_python3+set}" = set; then :
   withval=$with_python3;
+else
+  with_python3="auto"
 fi
 
 if test "x$with_python3" = "xyes"; then :
@@ -11402,13 +11404,21 @@ else
   preferred_python=$PYTHON3
 
 fi
-else
+elif test "x$with_python3" = "xno"; then :
   if test "x$PYTHON" = "x:"; then :
   as_fn_error $? "python version 2 is required" "$LINENO" 5
 else
   preferred_python=$PYTHON
 
 fi
+elif test "x$PYTHON3" != "x:"; then :
+  preferred_python=$PYTHON3
+
+elif test "x$PYTHON" != "x:"; then :
+  preferred_python=$PYTHON
+
+else
+  as_fn_error $? "neither python version 2 nor 3 found" "$LINENO" 5
 fi
 
 build_elfutils=no
index 96c5c9db73c793cb1c4bc36984c898c4967fa557..932d40445206c5935c9591b458c3f6006e6e31c3 100644 (file)
@@ -557,14 +557,20 @@ LIBS=$LIBS_no_readline
 
 dnl Allow user to choose python3 for /usr/bin/dtrace
 AC_ARG_WITH([python3],
-  AS_HELP_STRING([--with-python3],[prefer python version 3]))
+  AS_HELP_STRING([--with-python3],[prefer python version 3]), [], [with_python3="auto"])
 AS_IF([test "x$with_python3" = "xyes"],
       [AS_IF([test "x$PYTHON3" = "x:"],
              [AC_MSG_ERROR([python version 3 is required])],
             [AC_SUBST(preferred_python,[$PYTHON3])])],
+      [test "x$with_python3" = "xno"],
       [AS_IF([test "x$PYTHON" = "x:"],
              [AC_MSG_ERROR([python version 2 is required])],
-            [AC_SUBST(preferred_python,[$PYTHON])])])
+            [AC_SUBST(preferred_python,[$PYTHON])])],
+      [test "x$PYTHON3" != "x:"],
+      [AC_SUBST(preferred_python,[$PYTHON3])],
+      [test "x$PYTHON" != "x:"],
+      [AC_SUBST(preferred_python,[$PYTHON])],
+      [AC_MSG_ERROR([neither python version 2 nor 3 found])])
       
 dnl Handle elfutils.  If '--with-elfutils=DIR' wasn't specified, used
 dnl the system's elfutils.
This page took 0.040737 seconds and 5 git commands to generate.