Commits

Yevgen Muntyan  committed 8547756

Force build with mingw

  • Participants
  • Parent commits d17e786

Comments (0)

Files changed (3)

File acinclude.m4

 dnl a macro to check for ability to create python extensions
 dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
 dnl function also defines PYTHON_INCLUDES
-AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS__DISABLED__],
 [AC_REQUIRE([AM_PATH_PYTHON])
 AC_MSG_CHECKING(for headers required to compile python extensions)
 dnl deduce PYTHON_INCLUDES
 CPPFLAGS="$save_CPPFLAGS"
 ])
 
+ 
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],[
+  AC_SUBST([PYTHON_INCLUDES],[-I$prefix/include/python])
+  AC_SUBST([PYTHON_LIBS],[-lpython27])
+])

File configure.ac

 
 # Checks for programs ---
 AC_DISABLE_STATIC
+AC_LIBTOOL_WIN32_DLL
 AC_PROG_LIBTOOL dnl required version (1.4) DON'T REMOVE - used by autogen.sh
 dnl when using libtool 2.x create libtool early, because it's used in configure
 m4_ifdef([LT_OUTPUT], [LT_OUTPUT])

File src/Makefile.am

 pycairoexec_PYTHON = __init__.py
 
 pycairoexec_LTLIBRARIES = _cairo.la
-_cairo_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_cairo
-_cairo_la_LIBADD = $(CAIRO_LIBS)
+_cairo_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_cairo -no-undefined -shrext .pyd
+_cairo_la_LIBADD = $(CAIRO_LIBS) $(PYTHON_LIBS)
 _cairo_la_CPPFLAGS = $(PYTHON_INCLUDES) $(CAIRO_CFLAGS)
 _cairo_la_SOURCES = \
   cairomodule.c \