summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac8
-rw-r--r--src/Makefile.am5
2 files changed, 9 insertions, 4 deletions
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
diff --git a/src/Makefile.am b/src/Makefile.am
index e3d7c3f..dd37d15 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,12 +16,13 @@ libcaja_python_la_CPPFLAGS = \
-DLIBDIR=\"$(libdir)\" \
-DPYTHON_VERSION=\"$(PYTHON_VERSION)\" \
-DPY_LIB_LOC="\"$(PYTHON_LIB_LOC)\"" \
- $(PYTHON_INCLUDES) \
+ $(CAJA_PYTHON_CFLAGS) \
$(AM_CPPFLAGS)
libcaja_python_la_CFLAGS = \
+ $(PYTHON_CFLAGS)
$(CAJA_PYTHON_CFLAGS) \
$(AM_CFLAGS)
libcaja_python_la_LDFLAGS = -module -avoid-version
-libcaja_python_la_LIBADD = $(CAJA_PYTHON_LIBS) $(PYTHON_LIBS)
+libcaja_python_la_LIBADD = $(PYTHON_LIBS) $(CAJA_PYTHON_LIBS)