58 lines
2.3 KiB
Diff
58 lines
2.3 KiB
Diff
--- pygtksourceview-2.10.1/acinclude.m4.orig 2014-02-23 23:32:22.479400000 +0400
|
|
+++ pygtksourceview-2.10.1/acinclude.m4 2014-02-23 23:33:04.880200000 +0400
|
|
@@ -23,6 +23,31 @@
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
])
|
|
|
|
+dnl a macro to check for ability to embed python
|
|
+dnl AM_CHECK_PYTHON_LIBS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
|
|
+dnl function also defines PYTHON_LIBS
|
|
+AC_DEFUN([AM_CHECK_PYTHON_LIBS],
|
|
+[AC_REQUIRE([AM_PATH_PYTHON])
|
|
+AC_MSG_CHECKING(for libraries required to embed python)
|
|
+dnl deduce PYTHON_LIBS
|
|
+py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
|
|
+if test "x$PYTHON_LIBS" = x; then
|
|
+ PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
|
|
+fi
|
|
+if test "x$PYTHON_LIB_LOC" = x; then
|
|
+ PYTHON_LIB_LOC="${py_prefix}/lib"
|
|
+fi
|
|
+AC_SUBST(PYTHON_LIBS)
|
|
+AC_SUBST(PYTHON_LIB_LOC)
|
|
+dnl check if the headers exist:
|
|
+save_LIBS="$LIBS"
|
|
+LIBS="$LIBS $PYTHON_LIBS"
|
|
+AC_TRY_LINK_FUNC(Py_Initialize, dnl
|
|
+ [LIBS="$save_LIBS"; AC_MSG_RESULT(yes); $1], dnl
|
|
+ [LIBS="$save_LIBS"; AC_MSG_RESULT(no); $2])
|
|
+
|
|
+])
|
|
+
|
|
dnl
|
|
dnl JH_ADD_CFLAG(FLAG)
|
|
dnl checks whether the C compiler supports the given flag, and if so, adds
|
|
--- pygtksourceview-2.10.1/Makefile.am.orig 2014-02-23 23:34:27.643600000 +0400
|
|
+++ pygtksourceview-2.10.1/Makefile.am 2014-02-23 23:34:58.110400000 +0400
|
|
@@ -32,7 +32,7 @@
|
|
|
|
# pygtksourceview2 module
|
|
pyexec_LTLIBRARIES = gtksourceview2.la
|
|
-gtksourceview2_la_LDFLAGS = -module -avoid-version -export-symbols-regex initgtksourceview2 $(no_undefined) $(pyd_ext)
|
|
+gtksourceview2_la_LDFLAGS = -module -avoid-version -export-symbols-regex initgtksourceview2 $(no_undefined) $(PYTHON_LIBS) $(pyd_ext)
|
|
gtksourceview2_la_CFLAGS = $(PYGTKSOURCEVIEW_CFLAGS)
|
|
gtksourceview2_la_LIBADD = $(PYGTKSOURCEVIEW_LIBS) $(PYTHON_LIBS)
|
|
gtksourceview2_la_SOURCES = gtksourceview2module.c pygtksourceview-private.h
|
|
--- pygtksourceview-2.10.1/configure.ac.orig 2014-02-23 23:41:34.813400000 +0400
|
|
+++ pygtksourceview-2.10.1/configure.ac 2014-02-23 23:43:00.847400000 +0400
|
|
@@ -63,6 +63,9 @@
|
|
else
|
|
AM_PATH_PYTHON(2.2)
|
|
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
|
|
+if test "x$os_win32" = "xyes"; then
|
|
+ AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.]))
|
|
+fi
|
|
fi
|
|
|
|
dnl check pygobject path for docs xsl
|