Commit c2b87007 authored by Alex Henrie's avatar Alex Henrie

Call cairo.get_include() to find py3cairo.h

If pycairo was installed from source, py3cairo.h may not have been
copied to /usr/include/pycairo. It's better to ask the pycairo module
itself where py3cairo.h is by calling cairo.get_include().
parent d04f8187
......@@ -233,11 +233,13 @@ if test "$USING_CAIRO" = "yes"; then
AC_SUBST(CAIROMM_CFLAGS)
AC_SUBST(CAIROMM_LIBS)
AX_PYTHON_MODULE(cairo)
PYCAIRO_INCLUDE=-I`${PYTHON} -c 'import cairo; print(cairo.get_include())'`
PYTHON_CPPFLAGS="${PYCAIRO_INCLUDE} ${PYTHON_CPPFLAGS}"
PYTHON_VERSION_MAJOR=$(echo $PYTHON_VERSION | cut -d'.' -f1)
if test "$PYTHON_VERSION_MAJOR" = "3"; then
[PYCAIRO_HEADER=pycairo/py3cairo.h]
[PYCAIRO_HEADER=py3cairo.h]
else
[PYCAIRO_HEADER=pycairo/pycairo.h]
[PYCAIRO_HEADER=pycairo.h]
fi
[CPPFLAGS_TEMP="${CPPFLAGS}"]
[CPPFLAGS="${CAIROMM_CPPFLAGS} ${CAIROMM_CFLAGS} ${PYTHON_CPPFLAGS} ${CPPFLAGS}"]
......
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