summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-05 13:15:50 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-05 13:19:38 -0500
commitb86d11da802b8ff70784b611aacdaa2d148271b4 (patch)
treef590f41c4d4e1a368cff6ce521dc62a90f37b220
parentd66ee73a3dd7b5433fc0da3125bbdff740de7745 (diff)
downloadsystemd-b86d11da802b8ff70784b611aacdaa2d148271b4.tar.gz
systemd-b86d11da802b8ff70784b611aacdaa2d148271b4.tar.bz2
systemd-b86d11da802b8ff70784b611aacdaa2d148271b4.zip
build-sys: use full path to python in scripts
Commit c4eb236a2c didn't take into account the situation when the user sets e.g. PYTHON=python3 (without the full path). This value would then be used verbatim for PYTHON_BINARY and in she-bang lines in scripts, which is incorrect. To fix this, $PYTHON is passed through which, which expands the path. If $PYTHON_BINARY is desired which is not installed on the build system, then PYTHON_BINARY must be set separately.
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 535b71f662..a8d48871da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,7 +107,7 @@ AS_IF([test "x$with_python" != "xno"], [
AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
AS_IF([test "x$PYTHON_BINARY" = "x"],
[AS_IF([test "x$have_python" = "xyes"],
- [PYTHON_BINARY="$PYTHON"],
+ [PYTHON_BINARY="`which "$PYTHON"`"],
[PYTHON_BINARY=/usr/bin/python])])
AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])