From fcd4ba602b398d64a23a1cf46ba4c56b466b51e2 Mon Sep 17 00:00:00 2001 From: JINMEI Tatuya Date: Sun, 14 Mar 2010 20:45:07 +0000 Subject: [PATCH] allowed manually specififying a path to python (when only older versions of automake is available) git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1399 e5f2f494-b856-4b98-b285-d166d9295462 --- README | 4 ++++ configure.ac | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README b/README index 207967fd9a..be5ab8f84c 100644 --- a/README +++ b/README @@ -11,6 +11,10 @@ Simple build instructions: Requires autoconf 2.59 or newer. Use automake-1.11 or better for working Python 3.1 tests. +Alternatively, you could manually specify an absolute path to python +executable by the --with-pythonpath option of the configure script, +e.g., +% ./configure --with-pythonpath=/usr/local/bin/python3.1 Operating-System specific tips: diff --git a/configure.ac b/configure.ac index 7f270960ca..da2d52281a 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,16 @@ AC_LANG_CPLUSPLUS AX_COMPILER_VENDOR m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3 python3.1]) -AM_PATH_PYTHON([3.1]) +AC_ARG_WITH([pythonpath], +AC_HELP_STRING([--with-pythonpath=PATH], + [specify an absolute path to python executable when automatic version check (incorreclty) fails]), + [python_path="$withval"], [python_path="auto"]) +if test "$python_path" = auto; then + AM_PATH_PYTHON([3.1]) +else + PYTHON=$python_path + AC_SUBST(PYTHON) +fi # TODO: check for _sqlite3.py module