Commit 9d630901 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Add check for cython and substitute python and cython in Makefile.am

parent ff2eb0de
...@@ -73,6 +73,9 @@ AC_ARG_WITH([libxml2], ...@@ -73,6 +73,9 @@ AC_ARG_WITH([libxml2],
[disable support for libxml2])], [disable support for libxml2])],
[], [with_libxml2=yes]) [], [with_libxml2=yes])
dnl Define variables
AC_ARG_VAR([CYTHON], [the Cython executable])
dnl Checks for programs dnl Checks for programs
AC_PROG_CC AC_PROG_CC
AC_PROG_CXX AC_PROG_CXX
...@@ -82,6 +85,7 @@ AC_PROG_MAKE_SET ...@@ -82,6 +85,7 @@ AC_PROG_MAKE_SET
AM_PROG_CC_C_O AM_PROG_CC_C_O
PKG_PROG_PKG_CONFIG([0.20]) PKG_PROG_PKG_CONFIG([0.20])
AM_PATH_PYTHON([2.6],, [:]) AM_PATH_PYTHON([2.6],, [:])
AC_CHECK_PROGS([CYTHON], [cython.py cython])
AX_CXX_COMPILE_STDCXX_11([noext], [optional]) AX_CXX_COMPILE_STDCXX_11([noext], [optional])
...@@ -354,4 +358,6 @@ AC_MSG_NOTICE([summary of build options: ...@@ -354,4 +358,6 @@ AC_MSG_NOTICE([summary of build options:
Examples: ${enable_examples} Examples: ${enable_examples}
Hdtest: ${enable_hdtest} Hdtest: ${enable_hdtest}
Failmalloc: ${request_failmalloc} Failmalloc: ${request_failmalloc}
Python: ${PYTHON} ${PYTHON_VERSION}
Cython: ${CYTHON}
]) ])
...@@ -25,12 +25,18 @@ EXTRA_DIST = README.rst cnghttp2.pxd nghttp2.pyx setup.py ...@@ -25,12 +25,18 @@ EXTRA_DIST = README.rst cnghttp2.pxd nghttp2.pyx setup.py
PYSETUP_INCLUDE_DIRS=$(top_srcdir)/lib/includes:$(top_srcdir)/lib PYSETUP_INCLUDE_DIRS=$(top_srcdir)/lib/includes:$(top_srcdir)/lib
PYSETUP_LIBDIRS=$(top_builddir)/lib/.libs PYSETUP_LIBDIRS=$(top_builddir)/lib/.libs
CYTHON = @CYTHON@
PYTHON = @PYTHON@
nghttp2.c: nghttp2.pyx cnghttp2.pxd .PHONY: help build_ext
cython nghttp2.pyx
help:
@echo "Please use \`make <target>\` where <target> is one of"
@echo " build_ext to build Python @PYTHON_VERSION@ nghttp2 extension"
.PHONY: build_ext nghttp2.c: nghttp2.pyx cnghttp2.pxd
$(CYTHON) nghttp2.pyx
build_ext: nghttp2.c build_ext: nghttp2.c
python setup.py build_ext --include-dirs=$(PYSETUP_INCLUDE_DIRS) \ $(PYTHON) setup.py build_ext --include-dirs=$(PYSETUP_INCLUDE_DIRS) \
--library-dirs=$(PYSETUP_LIBDIRS) --library-dirs=$(PYSETUP_LIBDIRS)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment