From 6ed4ebcf1af8eaead423de1aefe2642f2d75a979 Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 11 Jul 2014 12:43:27 +0200 Subject: Use pkg-config for python detection and variables --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f4059e3..a8345ae 100644 --- a/configure.ac +++ b/configure.ac @@ -30,8 +30,12 @@ GTK_DOC_CHECK(1.9) dnl ************************************************** dnl * Check for Python dnl ************************************************** -AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR([could not find Python headers])]) -AM_CHECK_PYTHON_LIBS(,[AC_MSG_ERROR([could not find Python lib])]) +AM_PATH_PYTHON([2.6]) +PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}]) +PYTHON_LIB_LOC="`pkg-config python-${PYTHON_VERSION} --variable=libdir`" +AC_SUBST(PYTHON_LIBS) +AC_SUBST(PYTHON_CFLAGS) +AC_SUBST(PYTHON_LIB_LOC) if test "`pkg-config --variable=datadir pygobject-3.0`" != "" ; then PYGOBJECT_VERSION=pygobject-3.0 -- cgit v1.2.1