Skip to content

Commit

Permalink
configure: add options so that shared build is possible on MINGW
Browse files Browse the repository at this point in the history
Co-authored-by: Naveen M K <[email protected]>
  • Loading branch information
2 people authored and lazka committed Jul 19, 2023
1 parent dcb42c9 commit b738276
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,11 @@ if test $enable_shared = "yes"; then
LDLIBRARY='libpython$(LDVERSION).dll.a'
DLLLIBRARY='libpython$(LDVERSION).dll'
;;
MINGW*)
LDLIBRARY='libpython$(LDVERSION).dll.a'
DLLLIBRARY='libpython$(LDVERSION).dll'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
;;
SunOS*)
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Expand Down Expand Up @@ -1570,6 +1575,9 @@ else # shared is disabled
BLDLIBRARY='$(LIBRARY)'
LDLIBRARY='libpython$(LDVERSION).dll.a'
;;
MINGW*)
LDLIBRARY='libpython$(LDVERSION).a'
;;
esac
fi

Expand Down Expand Up @@ -3332,6 +3340,10 @@ then
CYGWIN*)
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
MINGW*)
LDSHARED='$(CC) -shared -Wl,--enable-auto-image-base'
LDCXXSHARED='$(CXX) -shared -Wl,--enable-auto-image-base'
;;
*) LDSHARED="ld";;
esac
fi
Expand Down Expand Up @@ -6491,7 +6503,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

Expand Down

0 comments on commit b738276

Please sign in to comment.