[gobject-introspection] configure.ac: Add --with-python configure flag
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] configure.ac: Add --with-python configure flag
- Date: Wed, 30 Sep 2015 03:36:01 +0000 (UTC)
commit 899f5d553c65d7097c4137f528e71459a1036d4d
Author: Simon Feltman <sfeltman src gnome org>
Date: Thu May 1 20:59:59 2014 -0700
configure.ac: Add --with-python configure flag
Add --with-python flag which overrides the $PYTHON environment
variable when used.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
configure.ac | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 38bb285..f6e6661 100644
--- a/configure.ac
+++ b/configure.ac
@@ -251,6 +251,19 @@ AC_CHECK_FUNCS([memchr strchr strspn strstr strtol strtoull getauxval])
AC_CHECK_FUNCS([backtrace backtrace_symbols])
# Python
+# option to specify python interpreter to use; this just sets $PYTHON, so that
+# we will fallback to reading $PYTHON if --with-python is not given, and
+# python.m4 will get the expected input
+AC_ARG_WITH(python,
+ AS_HELP_STRING([--with-python=PATH],[Path to Python interpreter; searches $PATH if only a program name is
given; if not given, searches for a few standard names such as "python3" or "python2"]),
+ [PYTHON="$withval"], [])
+if test x"$PYTHON" = xyes; then
+ AC_MSG_ERROR([--with-python option requires a path or program argument])
+fi
+if test -n "$PYTHON" && ! which "$PYTHON"; then
+ AC_MSG_ERROR([Python interpreter $PYTHON does not exist])
+fi
+
AM_PATH_PYTHON([2.7])
case "$host" in
*-*-mingw*)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]