]> sourceware.org Git - systemtap.git/commitdiff
Added autoconf logic to search for python version 2 and 3.
authorDavid Smith <dsmith@redhat.com>
Thu, 15 Sep 2016 21:28:47 +0000 (16:28 -0500)
committerDavid Smith <dsmith@redhat.com>
Thu, 15 Sep 2016 21:28:47 +0000 (16:28 -0500)
* configure.ac: Add code to search for python version 2 and 3. Change the
  '--with-python3' option to check and make sure python version 3 is
  installed on the system.
* dtrace.in: Updated method to select preferred version of python.
* Makefile.in: Regenerated.
* configure: Ditto
* doc/Makefile.in: Ditto
* doc/SystemTap_Tapset_Reference/Makefile.in: Ditto
* doc/beginners/Makefile.in: Ditto
* java/Makefile.in: Ditto
* man/Makefile.in: Ditto
* man/cs/Makefile.in: Ditto
* python/Makefile.in: Ditto
* stapdyn/Makefile.in: Ditto
* staprun/Makefile.in: Ditto

13 files changed:
Makefile.in
configure
configure.ac
doc/Makefile.in
doc/SystemTap_Tapset_Reference/Makefile.in
doc/beginners/Makefile.in
dtrace.in
java/Makefile.in
man/Makefile.in
man/cs/Makefile.in
python/Makefile.in
stapdyn/Makefile.in
staprun/Makefile.in

index 24ea99df1c794609380ae684f4123f722b95d82b..dcb3a23e37ed39d0249647f0cf8913ee2e4679a1 100644 (file)
@@ -463,9 +463,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -543,11 +549,13 @@ oldincludedir = ${includedir}/sys
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
index f8bfebd23815f87f65a608010d9a8ef262e49179..b9babb8ced9f3be80ae43dd12a4962e359b4b105 100755 (executable)
--- a/configure
+++ b/configure
@@ -671,7 +671,7 @@ stap_LIBS
 elfutils_abs_srcdir
 BUILD_ELFUTILS_FALSE
 BUILD_ELFUTILS_TRUE
-python
+preferred_python
 HAVE_LIBREADLINE_FALSE
 HAVE_LIBREADLINE_TRUE
 READLINE_LIBS
@@ -716,6 +716,13 @@ PIECXXFLAGS
 PIECFLAGS
 PIELDFLAGS
 HAVE_CXX11
+py3execdir
+python3dir
+PYTHON3_PLATFORM
+PYTHON3_EXEC_PREFIX
+PYTHON3_PREFIX
+PYTHON3_VERSION
+PYTHON3
 pkgpyexecdir
 pyexecdir
 pkgpythondir
@@ -725,6 +732,7 @@ PYTHON_EXEC_PREFIX
 PYTHON_PREFIX
 PYTHON_VERSION
 PYTHON
+PYTHON_UNKNOWN
 POSUB
 LTLIBINTL
 LIBINTL
@@ -9400,17 +9408,153 @@ $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
 
 
 
+if test "x$GMSGFMT" = "x:"; then
+   as_fn_error $? "missing gnu /usr/bin/msgfmt" "$LINENO" 5
+fi
 
+# We want the 'PYTHON' varible to be python version 2. We also want
+# our custom 'PYTHON3' varible to be python version 3.
+#
+# First, figure out what version of python is in the executable named
+# 'python'. On most systems that is python version 2, but on arch
+# linux that is python version 3.
+# Extract the first word of "python", so it can be a program name with args.
+set dummy python; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON_UNKNOWN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PYTHON_UNKNOWN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON_UNKNOWN="$PYTHON_UNKNOWN" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PYTHON_UNKNOWN="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_PYTHON_UNKNOWN" && ac_cv_path_PYTHON_UNKNOWN="no"
+  ;;
+esac
+fi
+PYTHON_UNKNOWN=$ac_cv_path_PYTHON_UNKNOWN
+if test -n "$PYTHON_UNKNOWN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_UNKNOWN" >&5
+$as_echo "$PYTHON_UNKNOWN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+if test "x$PYTHON_UNKNOWN" != "xno"; then
+   # OK, we found 'python'. What version is it?
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON_UNKNOWN is version 2 or 3" >&5
+$as_echo_n "checking whether $PYTHON_UNKNOWN is version 2 or 3... " >&6; }
+if ${ac_cv_python_unknown_version+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_python_unknown_version=`$PYTHON_UNKNOWN -c "import sys; sys.stdout.write(sys.version[:3][0])"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_unknown_version" >&5
+$as_echo "$ac_cv_python_unknown_version" >&6; }
+fi
 
+# Now we'll update the _AM_PYTHON_INTERPRETER_LIST variable (which
+# AM_PATH_PYTHON uses) to only be version 2 versions of python. Note
+# that the m4_define happens when autoconf is run, but the
+# FIRST_PYTHON_INTERPRETER variable expansion will happen when the
+# user runs configure.
+if test "x$PYTHON_UNKNOWN" != "xno" -a "x$ac_cv_python_unknown_version" = "x2"; then
+   FIRST_PYTHON_INTERPRETER=python
+else
+   FIRST_PYTHON_INTERPRETER=python2
+fi
 
-        # Find any Python interpreter.
-    if test -z "$PYTHON"; then
-      for ac_prog in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+
+# Now we can call AM_PATH_PYTHON to find python version 2.6+ (and
+# version 2 only).
+
+
+
+
+
+
+        if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.6" >&5
+$as_echo_n "checking whether $PYTHON version is >= 2.6... " >&6; }
+      prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+   ($PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; 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; }
+                              as_fn_error $? "Python interpreter is too old" "$LINENO" 5
+fi
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.6" >&5
+$as_echo_n "checking for a Python interpreter with version >= 2.6... " >&6; }
+if ${am_cv_pathless_PYTHON+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       for am_cv_pathless_PYTHON in $FIRST_PYTHON_INTERPRETER python2 python2.7 python2.6 none; do
+         test "$am_cv_pathless_PYTHON" = none && break
+         prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
+   ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then :
+  break
+fi
+       done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5
+$as_echo "$am_cv_pathless_PYTHON" >&6; }
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+       PYTHON=:
+      else
+        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
+set dummy $am_cv_pathless_PYTHON; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_PYTHON+:} false; then :
@@ -9449,16 +9593,13 @@ $as_echo "no" >&6; }
 fi
 
 
-  test -n "$PYTHON" && break
-done
-test -n "$PYTHON" || PYTHON=":"
-
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
     fi
-    am_display_PYTHON=python
 
 
   if test "$PYTHON" = :; then
-      as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5
+      :
   else
 
 
@@ -9607,8 +9748,149 @@ $as_echo "$am_cv_python_pyexecdir" >&6; }
 
 
 
-if test "x$GMSGFMT" = "x:"; then
-   as_fn_error $? "missing gnu /usr/bin/msgfmt" "$LINENO" 5
+# Now let's try to find python version 3.
+if test "x$PYTHON_UNKNOWN" != "xno" -a "x$python_unknown_version" = "x3"; then
+   # Extract the first word of "python", so it can be a program name with args.
+set dummy python; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PYTHON3 in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON3="$PYTHON3" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PYTHON3="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON3=$ac_cv_path_PYTHON3
+if test -n "$PYTHON3"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5
+$as_echo "$PYTHON3" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+else
+   for ac_prog in python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PYTHON3 in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON3="$PYTHON3" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PYTHON3="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON3=$ac_cv_path_PYTHON3
+if test -n "$PYTHON3"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5
+$as_echo "$PYTHON3" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$PYTHON3" && break
+done
+
+fi
+
+# If we found python version 3, set up the other variables for python
+# version 3 that AM_PATH_PYTHON sets up for python version 2.
+if test -n "$PYTHON3"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python3 version" >&5
+$as_echo_n "checking for python3 version... " >&6; }
+if ${ac_cv_python3_version+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_python3_version=`$PYTHON3 -c "import sys; sys.stdout.write(sys.version[:3])"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python3_version" >&5
+$as_echo "$ac_cv_python3_version" >&6; }
+   PYTHON3_VERSION=$python3_version
+
+   PYTHON3_PREFIX='${prefix}'
+
+   PYTHON3_EXEC_PREFIX='${exec_prefix}'
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python3 platform" >&5
+$as_echo_n "checking for python3 platform... " >&6; }
+if ${ac_cv_python3_platform+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_python3_platform=`$PYTHON3 -c "import sys; sys.stdout.write(sys.platform)"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python3_platform" >&5
+$as_echo "$ac_cv_python3_platform" >&6; }
+   PYTHON3_PLATFORM=$ac_cv_python3_platform
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python3 script directory" >&5
+$as_echo_n "checking for python3 script directory... " >&6; }
+if ${ac_cv_python3_dir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_python3_dir=`$PYTHON3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(0,0,prefix='$PYTHON3_PREFIX'))"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python3_dir" >&5
+$as_echo "$ac_cv_python3_dir" >&6; }
+   python3dir=$am_cv_python3_dir
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python3 extension module directory" >&5
+$as_echo_n "checking for python3 extension module directory... " >&6; }
+if ${ac_cv_py3execdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_py3execdir=`$PYTHON3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,prefix='$PYTHON3_EXEC_PREFIX'))"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_py3execdir" >&5
+$as_echo "$ac_cv_py3execdir" >&6; }
+   py3execdir=$am_cv_py3execdir
+
 fi
 
 if test "${enable_prologues+set}" != set; then
@@ -11459,12 +11741,20 @@ if test "${with_python3+set}" = set; then :
 fi
 
 if test "x$with_python3" = "xyes"; then :
-  python=python3
+  if test -z "$PYTHON3"; then :
+  as_fn_error $? "python version 3 is required" "$LINENO" 5
+else
+  preferred_python=$PYTHON3
 
+fi
 else
-  python=python
+  if test "x$PYTHON" = "x:"; then :
+  as_fn_error $? "python version 2 is required" "$LINENO" 5
+else
+  preferred_python=$PYTHON
 
 fi
+fi
 
 build_elfutils=no
 
index 1bf4ad024fe341bcbe096e888ed1d19d93dfeee1..90e0d313cf769067c239e53e131054b17f737276 100644 (file)
@@ -36,12 +36,72 @@ AC_CHECK_FUNCS(ppoll)
 AC_CHECK_FUNCS(openat)
 AM_GNU_GETTEXT(external)
 AM_GNU_GETTEXT_VERSION([0.19.4])
-AM_PATH_PYTHON
 
 if test "x$GMSGFMT" = "x:"; then
    AC_MSG_ERROR([missing gnu /usr/bin/msgfmt])
 fi
 
+# We want the 'PYTHON' varible to be python version 2. We also want
+# our custom 'PYTHON3' varible to be python version 3.
+#
+# First, figure out what version of python is in the executable named
+# 'python'. On most systems that is python version 2, but on arch
+# linux that is python version 3.
+AC_PATH_PROG([PYTHON_UNKNOWN], [python], [no])
+if test "x$PYTHON_UNKNOWN" != "xno"; then
+   # OK, we found 'python'. What version is it?
+   AC_CACHE_CHECK([whether $PYTHON_UNKNOWN is version 2 or 3],
+                [ac_cv_python_unknown_version],
+                [ac_cv_python_unknown_version=`$PYTHON_UNKNOWN -c "import sys; sys.stdout.write(sys.version[[:3]][[0]])"`])
+fi
+  
+# Now we'll update the _AM_PYTHON_INTERPRETER_LIST variable (which
+# AM_PATH_PYTHON uses) to only be version 2 versions of python. Note
+# that the m4_define happens when autoconf is run, but the
+# FIRST_PYTHON_INTERPRETER variable expansion will happen when the
+# user runs configure.
+if test "x$PYTHON_UNKNOWN" != "xno" -a "x$ac_cv_python_unknown_version" = "x2"; then
+   FIRST_PYTHON_INTERPRETER=python
+else
+   FIRST_PYTHON_INTERPRETER=python2
+fi
+m4_define([_AM_PYTHON_INTERPRETER_LIST],
+         [$FIRST_PYTHON_INTERPRETER python2 python2.7 python2.6])
+
+# Now we can call AM_PATH_PYTHON to find python version 2.6+ (and
+# version 2 only).
+AM_PATH_PYTHON([2.6], [], [:])
+
+# Now let's try to find python version 3.
+if test "x$PYTHON_UNKNOWN" != "xno" -a "x$python_unknown_version" = "x3"; then
+   AC_PATH_PROG([PYTHON3], [python])
+else
+   AC_PATH_PROGS([PYTHON3],
+                [python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0])
+fi
+
+# If we found python version 3, set up the other variables for python
+# version 3 that AM_PATH_PYTHON sets up for python version 2.
+if test -n "$PYTHON3"; then
+   AC_CACHE_CHECK([for python3 version], [ac_cv_python3_version],
+                 [ac_cv_python3_version=`$PYTHON3 -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
+   AC_SUBST([PYTHON3_VERSION], [$python3_version])
+   AC_SUBST([PYTHON3_PREFIX], ['${prefix}'])
+   AC_SUBST([PYTHON3_EXEC_PREFIX], ['${exec_prefix}'])
+   AC_CACHE_CHECK([for python3 platform], [ac_cv_python3_platform],
+                 [ac_cv_python3_platform=`$PYTHON3 -c "import sys; sys.stdout.write(sys.platform)"`])
+   AC_SUBST([PYTHON3_PLATFORM], [$ac_cv_python3_platform])
+
+   AC_CACHE_CHECK([for python3 script directory], [ac_cv_python3_dir],
+                 [ac_cv_python3_dir=`$PYTHON3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(0,0,prefix='$PYTHON3_PREFIX'))"`])
+   AC_SUBST([python3dir], [$am_cv_python3_dir])
+
+   AC_CACHE_CHECK([for python3 extension module directory],
+                 [ac_cv_py3execdir],
+                 [ac_cv_py3execdir=`$PYTHON3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,prefix='$PYTHON3_EXEC_PREFIX'))"`])
+   AC_SUBST([py3execdir], [$am_cv_py3execdir])
+fi
+
 dnl Handle the prologues option.
 dnl
 dnl If the user didn't specify --enable-prologues/--disable-prologues
@@ -436,8 +496,12 @@ dnl Allow user to choose python3 for /usr/bin/dtrace
 AC_ARG_WITH([python3],
   AS_HELP_STRING([--with-python3],[prefer /usr/bin/python3]))
 AS_IF([test "x$with_python3" = "xyes"],
-      [AC_SUBST(python,[python3])],
-      [AC_SUBST(python,[python])])
+      [AS_IF([test -z "$PYTHON3"],
+             [AC_MSG_ERROR([python version 3 is required])],
+            [AC_SUBST(preferred_python,[$PYTHON3])])],
+      [AS_IF([test "x$PYTHON" = "x:"],
+             [AC_MSG_ERROR([python version 2 is required])],
+            [AC_SUBST(preferred_python,[$PYTHON])])])
       
 dnl Handle elfutils.  If '--with-elfutils=DIR' wasn't specified, used
 dnl the system's elfutils.
index 6d7422241148f584e27bf1857f0b4499d1134486..0be68feaa3146eab34cc4d41a4734fa14e6bf038 100644 (file)
@@ -234,9 +234,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -314,11 +320,13 @@ oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
@@ -513,8 +521,8 @@ distclean-generic:
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
-@BUILD_DOCS_FALSE@uninstall-local:
 @BUILD_DOCS_FALSE@clean-local:
+@BUILD_DOCS_FALSE@uninstall-local:
 @BUILD_DOCS_FALSE@install-data-hook:
 clean: clean-recursive
 
index fb2f539b0be73e828612098213ddaa757c878093..a598c588a1325d3a0bb0b5e93c391c6b3867ad47 100644 (file)
@@ -241,9 +241,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -321,11 +327,13 @@ oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
index d8c495cf60c2debdcc09830cc0b0534f3a1509c8..2d54bc66ad368500b0d7c4a042713679c40f1288 100644 (file)
@@ -200,9 +200,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -280,11 +286,13 @@ oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
@@ -381,8 +389,8 @@ distclean-generic:
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
-@BUILD_DOCS_FALSE@clean-local:
 @BUILD_DOCS_FALSE@uninstall-local:
+@BUILD_DOCS_FALSE@clean-local:
 @BUILD_DOCS_FALSE@install-data-hook:
 clean: clean-am
 
index 152c18ccfab73091b14cd5648432bef06a1ffe97..8885787f09ebf32262ee910717b39631ddd07996 100644 (file)
--- a/dtrace.in
+++ b/dtrace.in
@@ -1,4 +1,4 @@
-#!/usr/bin/@python@
+#!@preferred_python@
 # vim: et sta sts=4 sw=4 ts=8
 
 # This handles the systemtap equivalent of
index 5f2aeb7364497f289ce12a363426ff5cf3d850e2..fbcd151d585ef7110b7dad72a77f4c466ef97614 100644 (file)
@@ -288,9 +288,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -368,11 +374,13 @@ oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
@@ -652,8 +660,8 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
        -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 @HAVE_JAVA_FALSE@install-exec-local:
-@HAVE_JAVA_FALSE@install-data-local:
 @HAVE_JAVA_FALSE@uninstall-local:
+@HAVE_JAVA_FALSE@install-data-local:
 clean: clean-am
 
 clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \
index 31399641048e50bb46247860c8dbac1fd9725502..3b58a317e38806fbd1bfb17253d32def2d8af791 100644 (file)
@@ -272,9 +272,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -352,11 +358,13 @@ oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
index 1ab35f74b7470c30c496154f848bf109e4c34705..aaad2b78cdb1ebc8c89f334c75c37178ddaa6ca2 100644 (file)
@@ -236,9 +236,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -316,11 +322,13 @@ oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
index 6464589525619c26feaec081fb8035c484e4cb39..0a94ced1c85fed7f1262ad00eca8124326e8c05a 100644 (file)
@@ -230,9 +230,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -310,11 +316,13 @@ oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
index 4c4756da37cc9974a2e5a8cb87b22a2179923817..ae2f920f054d926ec089c2115a913bfc873404ad 100644 (file)
@@ -298,9 +298,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -378,11 +384,13 @@ oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
index afe153c76edd906100bb6a716feb11caa65827d3..067a542f633579555272d5a32f4abac9f99d7d83 100644 (file)
@@ -340,9 +340,15 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 PYTHON = @PYTHON@
+PYTHON3 = @PYTHON3@
+PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
+PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
+PYTHON3_PREFIX = @PYTHON3_PREFIX@
+PYTHON3_VERSION = @PYTHON3_VERSION@
 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_UNKNOWN = @PYTHON_UNKNOWN@
 PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 READLINE_LIBS = @READLINE_LIBS@
@@ -420,11 +426,13 @@ oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgpyexecdir = @pkgpyexecdir@
 pkgpythondir = @pkgpythondir@
+preferred_python = @preferred_python@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+py3execdir = @py3execdir@
 pyexecdir = @pyexecdir@
-python = @python@
+python3dir = @python3dir@
 pythondir = @pythondir@
 sbindir = @sbindir@
 selinux_CFLAGS = @selinux_CFLAGS@
This page took 0.070506 seconds and 5 git commands to generate.