Skip to content

Commit 930a5ec

Browse files
Alexpuxnaveen521kk
authored andcommitted
configure: add options so that shared build is possible on MINGW
Co-authored-by: Naveen M K <[email protected]>
1 parent 901a082 commit 930a5ec

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

configure.ac

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,11 @@ if test $enable_shared = "yes"; then
15201520
LDLIBRARY='libpython$(LDVERSION).dll.a'
15211521
DLLLIBRARY='libpython$(LDVERSION).dll'
15221522
;;
1523+
MINGW*)
1524+
LDLIBRARY='libpython$(LDVERSION).dll.a'
1525+
DLLLIBRARY='libpython$(LDVERSION).dll'
1526+
BLDLIBRARY='-L. -lpython$(LDVERSION)'
1527+
;;
15231528
SunOS*)
15241529
LDLIBRARY='libpython$(LDVERSION).so'
15251530
BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
@@ -1570,6 +1575,9 @@ else # shared is disabled
15701575
BLDLIBRARY='$(LIBRARY)'
15711576
LDLIBRARY='libpython$(LDVERSION).dll.a'
15721577
;;
1578+
MINGW*)
1579+
LDLIBRARY='libpython$(LDVERSION).a'
1580+
;;
15731581
esac
15741582
fi
15751583

@@ -3336,6 +3344,10 @@ then
33363344
CYGWIN*)
33373345
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
33383346
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
3347+
MINGW*)
3348+
LDSHARED='$(CC) -shared -Wl,--enable-auto-image-base'
3349+
LDCXXSHARED='$(CXX) -shared -Wl,--enable-auto-image-base'
3350+
;;
33393351
*) LDSHARED="ld";;
33403352
esac
33413353
fi
@@ -6495,7 +6507,8 @@ case $host in
64956507
dnl "errmap.h" from $srcdir/PC.
64966508
dnl Note we cannot use BASECPPFLAGS as autogenerated pyconfig.h
64976509
dnl has to be before customized located in ../PC.
6498-
CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS"
6510+
dnl (-I. at end is workaround for setup.py logic)
6511+
CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS -I."
64996512
;;
65006513
esac
65016514

0 commit comments

Comments
 (0)