[Python-checkins] CVS: python/dist/src Makefile.in,1.106,1.107 acconfig.h,1.41,1.42 config.h.in,2.83,2.84 configure,1.177,1.178 configure.in,1.185,1.186
Guido van Rossum
python-dev@python.org
Wed, 10 Jan 2001 13:09:14 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Modules shamodule.c,2.12,2.13 mmapmodule.c,2.25,2.26 readline.c,2.33,2.34 rotormodule.c,2.29,2.30
- Next message: [Python-checkins] CVS: python/dist/src/Modules makesetup,1.29,1.30 Makefile.pre.in,1.71,1.72
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv2426
Modified Files:
Makefile.in acconfig.h config.h.in configure configure.in
Log Message:
Part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Extension Patch.
Note: this could use some testing on NeXT, DG/UX, or BeOS, because of
the changes in the Makefile regarding $(LDLIBRARY).
Index: Makefile.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/Makefile.in,v
retrieving revision 1.106
retrieving revision 1.107
diff -C2 -r1.106 -r1.107
*** Makefile.in 2000/10/09 19:31:40 1.106
--- Makefile.in 2001/01/10 21:09:12 1.107
***************
*** 132,135 ****
--- 132,136 ----
LIBRARY= libpython$(VERSION).a
LDLIBRARY= @LDLIBRARY@
+ @SET_DLLLIBRARY@
# Default target
***************
*** 248,251 ****
--- 249,256 ----
else true; \
fi
+ if test -f "$(DLLLIBRARY)"; then \
+ $(INSTALL_DATA) $(DLLLIBRARY) $(BINDIR); \
+ else true; \
+ fi
# Install the manual page
***************
*** 372,378 ****
fi; \
done
! @if test -d $(LIBRARY); then :; else \
! $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \
! $(RANLIB) $(LIBPL)/$(LIBRARY) ; \
fi
$(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c
--- 377,383 ----
fi; \
done
! @if test -d $(LDLIBRARY); then :; else \
! $(INSTALL_DATA) $(LDLIBRARY) $(LIBPL)/$(LDLIBRARY) ; \
! $(RANLIB) $(LIBPL)/$(LDLIBRARY) ; \
fi
$(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c
Index: acconfig.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/acconfig.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** acconfig.h 2001/01/10 20:40:46 1.41
--- acconfig.h 2001/01/10 21:09:12 1.42
***************
*** 186,187 ****
--- 186,199 ----
/* Leave that blank line there-- autoheader needs it! */
+
+ @BOTTOM@
+
+ #ifdef __CYGWIN__
+ #ifdef USE_DL_IMPORT
+ #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
+ #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
+ #else
+ #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
+ #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
+ #endif
+ #endif
Index: config.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/config.h.in,v
retrieving revision 2.83
retrieving revision 2.84
diff -C2 -r2.83 -r2.84
*** config.h.in 2001/01/10 20:40:46 2.83
--- config.h.in 2001/01/10 21:09:12 2.84
***************
*** 635,636 ****
--- 635,646 ----
/* Define if you have the ieee library (-lieee). */
#undef HAVE_LIBIEEE
+
+ #ifdef __CYGWIN__
+ #ifdef USE_DL_IMPORT
+ #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
+ #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
+ #else
+ #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
+ #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
+ #endif
+ #endif
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.177
retrieving revision 1.178
diff -C2 -r1.177 -r1.178
*** configure 2001/01/10 20:40:46 1.177
--- configure 2001/01/10 21:09:12 1.178
***************
*** 1136,1143 ****
# name of the library into which to insert object files). On systems
# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
! # the Makefiles).
LDLIBRARY=''
# LINKCC is the command that links the python executable -- default is $(CC).
--- 1136,1146 ----
# name of the library into which to insert object files). On systems
[...3959 lines suppressed...]
*** 6143,6147 ****
echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
! echo "configure:6146: checking for Modules/Setup" >&5
if test ! -f Modules/Setup ; then
if test ! -d Modules ; then
--- 6162,6166 ----
echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
! echo "configure:6165: checking for Modules/Setup" >&5
if test ! -f Modules/Setup ; then
if test ! -d Modules ; then
***************
*** 6303,6306 ****
--- 6322,6326 ----
s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
s%@LDLIBRARY@%$LDLIBRARY%g
+ s%@SET_DLLLIBRARY@%$SET_DLLLIBRARY%g
s%@LINKCC@%$LINKCC%g
s%@RANLIB@%$RANLIB%g
Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.185
retrieving revision 1.186
diff -C2 -r1.185 -r1.186
*** configure.in 2001/01/10 20:40:46 1.185
--- configure.in 2001/01/10 21:09:12 1.186
***************
*** 238,245 ****
# name of the library into which to insert object files). On systems
# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
! # the Makefiles).
AC_SUBST(MAKE_LDLIBRARY)
AC_SUBST(LDLIBRARY)
LDLIBRARY=''
# LINKCC is the command that links the python executable -- default is $(CC).
--- 238,248 ----
# name of the library into which to insert object files). On systems
# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
! # the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
! # shared (i.e., DLL) library.
AC_SUBST(MAKE_LDLIBRARY)
AC_SUBST(LDLIBRARY)
+ AC_SUBST(SET_DLLLIBRARY)
LDLIBRARY=''
+ SET_DLLLIBRARY=''
# LINKCC is the command that links the python executable -- default is $(CC).
***************
*** 284,287 ****
--- 287,294 ----
LDLIBRARY='libpython$(VERSION).so'
;;
+ cygwin*)
+ LDLIBRARY='libpython$(VERSION).dll.a'
+ SET_DLLLIBRARY='DLLLIBRARY= $(basename $(LDLIBRARY))'
+ ;;
esac
AC_MSG_RESULT($LDLIBRARY)
***************
*** 293,297 ****
MAKE_LDLIBRARY="true"
else
! MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
fi
--- 300,307 ----
MAKE_LDLIBRARY="true"
else
! case $MACHDEP in
! cygwin*) MAKE_LDLIBRARY='$(MAKE) -C Modules ../$(DLLLIBRARY)';;
! *) MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)';;
! esac
fi
***************
*** 318,321 ****
--- 328,332 ----
case $ac_sys_system in
BeOS*) LN="ln -s";;
+ CYGWIN*) LN="ln -s";;
*) LN=ln;;
esac
***************
*** 342,345 ****
--- 353,361 ----
esac
+ # Cygwin does not need PIC compiler option so remove it to prevent warnings
+ case $ac_sys_system in
+ CYGWIN*) OPT="`echo $OPT | sed 's/ *-fPIC//'`";;
+ esac
+
if test "$ac_arch_flags"
then
***************
*** 560,564 ****
AC_SUBST(LINKFORSHARED)
# SO is the extension of shared libraries `(including the dot!)
! # -- usually .so, .sl on HP-UX
AC_MSG_CHECKING(SO)
if test -z "$SO"
--- 576,580 ----
AC_SUBST(LINKFORSHARED)
# SO is the extension of shared libraries `(including the dot!)
! # -- usually .so, .sl on HP-UX, .dll on Cygwin
AC_MSG_CHECKING(SO)
if test -z "$SO"
***************
*** 566,569 ****
--- 582,586 ----
case $ac_sys_system in
hp*|HP*) SO=.sl;;
+ CYGWIN*) SO=.dll;;
*) SO=.so;;
esac
***************
*** 623,626 ****
--- 640,644 ----
SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
+ CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
*) LDSHARED="ld";;
esac
***************
*** 647,650 ****
--- 665,669 ----
*) CCSHARED="";;
esac;;
+ CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
esac
fi
- Previous message: [Python-checkins] CVS: python/dist/src/Modules shamodule.c,2.12,2.13 mmapmodule.c,2.25,2.26 readline.c,2.33,2.34 rotormodule.c,2.29,2.30
- Next message: [Python-checkins] CVS: python/dist/src/Modules makesetup,1.29,1.30 Makefile.pre.in,1.71,1.72
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]