diff options
| author | Yamashita, Yuu <peek824545201@gmail.com> | 2015-09-22 23:42:38 +0900 |
|---|---|---|
| committer | Simon McVittie <smcv@debian.org> | 2015-12-04 15:34:58 +0000 |
| commit | 6ebbb5bc7abaf3caaa88cc11f6d3969e3f665544 (patch) | |
| tree | feff8543f8d8aeb80a060f592e4a45190b236f1e /m4/am-check-python-headers.m4 | |
| parent | 998c10b8ec9058f213752818fa20d8362c15c02d (diff) | |
| download | dbus-python-6ebbb5bc7abaf3caaa88cc11f6d3969e3f665544.tar.gz | |
Find `python-config` from PATH properly
Expecting `python-config` at the same directory as `python` executable
would not be suitable if user is using virtualenv.
Diffstat (limited to 'm4/am-check-python-headers.m4')
| -rw-r--r-- | m4/am-check-python-headers.m4 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/m4/am-check-python-headers.m4 b/m4/am-check-python-headers.m4 index b1aaf5a..509a9c2 100644 --- a/m4/am-check-python-headers.m4 +++ b/m4/am-check-python-headers.m4 @@ -4,14 +4,19 @@ dnl function also defines PYTHON_INCLUDES AC_DEFUN([AM_CHECK_PYTHON_HEADERS], [AC_REQUIRE([AM_PATH_PYTHON]) +AC_PATH_PROGS([PYTHON_CONFIG], [python${PYTHON_VERSION}-config python-config], [no]) +if test "${PYTHON_CONFIG}" = "no"; then + AC_MSG_ERROR([cannot find python${PYTHON_VERSION}-config or python-config in PATH]) +fi + AC_ARG_VAR([PYTHON_INCLUDES], [CPPFLAGS for Python, overriding output of python2.x-config --includes, e.g. "-I/opt/misc/include/python2.7"]) if test "${PYTHON_INCLUDES+set}" = set; then AC_MSG_NOTICE([PYTHON_INCLUDES overridden to: $PYTHON_INCLUDES]) else dnl deduce PYTHON_INCLUDES - AC_MSG_CHECKING(for Python headers using $PYTHON-config --includes) - PYTHON_INCLUDES=`$PYTHON-config --includes` + AC_MSG_CHECKING(for Python headers using $PYTHON_CONFIG --includes) + PYTHON_INCLUDES=`$PYTHON_CONFIG --includes` if test $? = 0; then AC_MSG_RESULT($PYTHON_INCLUDES) else |
