From 66cd27e6f0abf607bc5f6f108b28bab94c851b79 Mon Sep 17 00:00:00 2001 From: Roumen Petrov Date: Tue, 26 Feb 2013 23:53:32 +0200 Subject: [PATCH 04/24] MINGW: configure for shared build --- configure.ac | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d061b55..23d83d1 100644 --- a/configure.ac +++ b/configure.ac @@ -1023,6 +1023,13 @@ if test $enable_shared = "yes"; then ;; esac + case $host in + *-*-mingw*) + LDLIBRARY='libpython$(LDVERSION).dll.a' + DLLLIBRARY='libpython$(LDVERSION).dll' + BLDLIBRARY='-L. -lpython$(LDVERSION)' + ;; + esac else # shared is disabled PY_ENABLE_SHARED=0 case $ac_sys_system in @@ -1031,6 +1038,10 @@ else # shared is disabled LDLIBRARY='libpython$(LDVERSION).dll.a' ;; esac + case $host in + *-*-mingw*) + LDLIBRARY='libpython$(LDVERSION).a';; + esac fi if test "$cross_compiling" = yes; then @@ -2168,6 +2179,12 @@ then LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; *) LDSHARED="ld";; esac + case $host in + *-*-mingw*) + LDSHARED='$(CC) -shared -Wl,--enable-auto-image-base' + LDCXXSHARED='$(CXX) -shared -Wl,--enable-auto-image-base' + ;; + esac fi AC_MSG_RESULT($LDSHARED) LDCXXSHARED=${LDCXXSHARED-$LDSHARED} @@ -4740,7 +4757,8 @@ case $host in dnl "errmap.h" from $srcdir/PC. dnl Note we cannot use BASECPPFLAGS as autogenerated pyconfig.h dnl has to be before customized located in ../PC. - CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS" + dnl (-I. at end is workaround for setup.py logic) + CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS -I." ;; esac -- 1.7.12.1