From 6d5096312e946b68c84d839a5a51cd65ada6db0e Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Fri, 24 Jun 2005 23:13:49 +0000 Subject: [PATCH] define PYLINK_LIBS on Win32, since DLLs need to have all their symbols 2005-06-24 Manish Singh * configure.in: define PYLINK_LIBS on Win32, since DLLs need to have all their symbols fully resolved at link time. * plug-ins/pygimp/Makefile.am: link python modules with PYLINK_LIBS. --- ChangeLog | 7 +++++++ configure.in | 11 +++++++++++ plug-ins/pygimp/Makefile.am | 6 +++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index efcf1ec59e..7b13d61c8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-06-24 Manish Singh + + * configure.in: define PYLINK_LIBS on Win32, since DLLs need to have + all their symbols fully resolved at link time. + + * plug-ins/pygimp/Makefile.am: link python modules with PYLINK_LIBS. + 2005-06-25 Sven Neumann * app/dialogs/preferences-dialog.c: relabel the profile used for diff --git a/configure.in b/configure.in index 3c41bd1b59..dfdb1209d7 100644 --- a/configure.in +++ b/configure.in @@ -1348,6 +1348,17 @@ if test "x$enable_python" != xno; then AM_CHECK_PYTHON_HEADERS(, [AC_MSG_ERROR([pycheck_error([Python headers], [them])])]) + dnl Win32 needs all symbols resolved for linking, even for DLLs + dnl Assume the link library is in $exec_prefix/libs + dnl This might be able to be figured out from distutils, but it's + dnl not documented so we won't rely on internal implementation + PYLINK_LIBS= + if test "x$platform_win32" = "xyes"; then + py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` + PYLINK_LIBS="-L${py_exec_prefix}/libs -lpython${PYTHON_VERSION}" + fi + AC_SUBST(PYLINK_LIBS) + dnl check for PyGTK PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= pygtk_required_version,, [AC_MSG_ERROR([pycheck_error([PyGTK], [it])])]) diff --git a/plug-ins/pygimp/Makefile.am b/plug-ins/pygimp/Makefile.am index 2f8222b889..d015e70257 100644 --- a/plug-ins/pygimp/Makefile.am +++ b/plug-ins/pygimp/Makefile.am @@ -43,6 +43,7 @@ gimpmodule_la_LIBADD = \ $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ + $(PYLINK_LIBS) \ $(RT_LIBS) _gimpenumsmodule_la_SOURCES = \ @@ -56,6 +57,7 @@ _gimpenumsmodule_la_LIBADD = \ $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ + $(PYLINK_LIBS) \ $(RT_LIBS) gimpcolormodule_la_SOURCES = \ @@ -68,7 +70,8 @@ gimpcolormodule_la_LDFLAGS = -module -avoid-version $(no_undefined) \ gimpcolormodule_la_LIBADD = \ $(libgimpcolor) \ - $(GLIB_LIBS) + $(GLIB_LIBS) \ + $(PYLINK_LIBS) gimpprocbrowsermodule_la_SOURCES = \ procbrowser.c @@ -86,6 +89,7 @@ gimpprocbrowsermodule_la_LIBADD = \ $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ + $(PYLINK_LIBS) \ $(RT_LIBS) \ $(INTLLIBS)