File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -421,7 +421,8 @@ extern double hypot(double, double);
421421# define HAVE_DECLSPEC_DLL
422422#endif
423423
424- #if defined(Py_ENABLE_SHARED ) /* only get special linkage if built as shared */
424+ /* only get special linkage if built as shared or platform is Cygwin */
425+ #if defined(Py_ENABLE_SHARED ) || defined(__CYGWIN__ )
425426# if defined(HAVE_DECLSPEC_DLL )
426427# ifdef Py_BUILD_CORE
427428# define PyAPI_FUNC (RTYPE ) __declspec(dllexport) RTYPE
Original file line number Diff line number Diff line change @@ -379,10 +379,14 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
379379 $(LN) -fsn Versions/Current/Headers $(PYTHONFRAMEWORKDIR)/Headers
380380 $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
381381
382- # This rule builds the Cygwin Python DLL
383- libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
384- $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
385- $(LIBS) $(MODLIBS) $(SYSLIBS)
382+ # This rule builds the Cygwin Python DLL and import library if configured
383+ # for a shared core library; otherwise, this rule is a noop.
384+ $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
385+ if test -n "$(DLLLIBRARY)"; then \
386+ $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
387+ $(LIBS) $(MODLIBS) $(SYSLIBS); \
388+ else true; \
389+ fi
386390
387391
388392oldsharedmods: $(SHAREDMODS)
Original file line number Diff line number Diff line change 11#! /bin/sh
2- # From configure.in Revision: 1.428 .
2+ # From configure.in Revision: 1.429 .
33# Guess values for system-dependent variables and create Makefiles.
44# Generated by GNU Autoconf 2.57 for python 2.4.
55#
@@ -3619,6 +3619,13 @@ _ACEOF
36193619 BASECFLAGS="$BASECFLAGS -pic"
36203620 ;;
36213621 esac
3622+ else # shared is disabled
3623+ case $ac_sys_system in
3624+ CYGWIN*)
3625+ BLDLIBRARY='$(LIBRARY)'
3626+ LDLIBRARY='libpython$(VERSION).dll.a'
3627+ ;;
3628+ esac
36223629fi
36233630
36243631echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
@@ -10192,6 +10199,11 @@ then
1019210199 LINKFORSHARED="-Xlinker --export-dynamic"
1019310200 fi;;
1019410201 esac;;
10202+ CYGWIN*)
10203+ if test $enable_shared = "no"
10204+ then
10205+ LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10206+ fi;;
1019510207 esac
1019610208fi
1019710209echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
Original file line number Diff line number Diff line change @@ -539,6 +539,13 @@ if test $enable_shared = "yes"; then
539539 BASECFLAGS="$BASECFLAGS -pic"
540540 ;;
541541 esac
542+ else # shared is disabled
543+ case $ac_sys_system in
544+ CYGWIN*)
545+ BLDLIBRARY='$(LIBRARY)'
546+ LDLIBRARY='libpython$(VERSION).dll.a'
547+ ;;
548+ esac
542549fi
543550
544551AC_MSG_RESULT($LDLIBRARY)
@@ -1371,6 +1378,11 @@ then
13711378 LINKFORSHARED="-Xlinker --export-dynamic"
13721379 fi;;
13731380 esac;;
1381+ CYGWIN*)
1382+ if test $enable_shared = "no"
1383+ then
1384+ LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
1385+ fi;;
13741386 esac
13751387fi
13761388AC_MSG_RESULT($LINKFORSHARED)
You can’t perform that action at this time.
0 commit comments