Commit d4c9b16b authored by Andrew MacIntyre's avatar Andrew MacIntyre

Makefile:

- add _csv module to the build list
- various cleanups

config.c:
- various cleanups

pyconfig.h:
- various cleanups
parent baf25b06
...@@ -27,37 +27,48 @@ ...@@ -27,37 +27,48 @@
MODE= optimize MODE= optimize
#MODE= debug #MODE= debug
# === Assert() enabled === # === Assert() enabled ===
#ASSERTIONS=no ASSERTIONS=no
ASSERTIONS=yes #ASSERTIONS=yes
# === Hard-wire installation location ===
FIXED_PYHOME=no
#FIXED_PYHOME=yes
# === Optional modules === # === Optional modules ===
# Do you have the InfoZip compression library installed? # Do you have the InfoZip compression library installed?
ZLIB= no HAVE_ZLIB= no
# Do you have the Ultra Fast Crypt (UFC) library installed? # Do you have the Ultra Fast Crypt (UFC) library installed?
UFC= no HAVE_UFC= no
# Do you have the Tcl/Tk library installed? # Do you have the Tcl/Tk library installed?
TCLTK= no HAVE_TCLTK= no
# Do you have the GNU multiprecision library installed? # Do you have the GNU multiprecision library installed?
GMPZ= no HAVE_GMPZ= no
# Do you have the GNU readline library installed? # Do you have the GNU readline library installed?
# NOTE: I'm using a modified version of Kai Uwe Rommel's port that # NOTE: I'm using a modified version of Kai Uwe Rommel's port that
# - is compiled with multithreading enabled # - is compiled with multithreading enabled
# - is linked statically # - is linked statically
# I have had no success trying to use a DLL version, even with # I have had no success trying to use a DLL version, even when
# the multithreading switch. # compiled with multithreading enabled.
GREADLINE= no HAVE_GREADLINE= no
# Do you have the BSD DB library (v1.85) as included in the EMXBSD package? # Do you have the BSD DB library (v1.85) as included in the EMXBSD package?
# NOTE: this library needs to be recompiled with a structure member # NOTE: this library needs to be recompiled with a structure member
# renamed to avoid problems with the multithreaded errno support # renamed to avoid problems with the multithreaded errno support
# (there is a structure member called errno, used for shadowing the # (there is a structure member called errno, used for shadowing the
# real errno, which conflicts with the errno redefinition of -Zmt) # real errno, which conflicts with the errno redefinition of -Zmt)
BSDDB= no HAVE_BSDDB= no
# Do you have the ncurses library installed? EMX's BSD curses aren't enough! # Do you have the ncurses library installed? EMX's BSD curses aren't enough!
CURSES= no HAVE_NCURSES= no
# Do you have the GDBM library installed? # Do you have the GDBM library installed?
GDBM= no HAVE_GDBM= no
# Do you have the BZ2 compression library installed? # Do you have the BZ2 compression library installed?
BZ2= no HAVE_BZ2= no
# === install locations ===
# default value of PYTHONHOME
LIB_DIR=C:/Python23
# default is to have everything in or under PYTHONHOME
EXE_DIR=$(LIB_DIR)
DLL_DIR=$(EXE_DIR)
# === The Tools === # === The Tools ===
CC= gcc CC= gcc
...@@ -85,6 +96,9 @@ endif ...@@ -85,6 +96,9 @@ endif
ifeq ($(ASSERTIONS),no) ifeq ($(ASSERTIONS),no)
CFLAGS+= -DNDEBUG CFLAGS+= -DNDEBUG
endif endif
ifeq ($(FIXED_PYHOME),yes)
CFLAGS+= -DPREFIX=$(DQUOTE)$(LIB_DIR)$(DQUOTE)
endif
# We're using the OMF format since EMX's ld has a obscure bug # We're using the OMF format since EMX's ld has a obscure bug
# because of which it sometimes fails to build relocations # because of which it sometimes fails to build relocations
...@@ -250,7 +264,7 @@ SRC.MODULES= $(addprefix $(TOP), \ ...@@ -250,7 +264,7 @@ SRC.MODULES= $(addprefix $(TOP), \
Modules/gcmodule.c \ Modules/gcmodule.c \
Modules/signalmodule.c \ Modules/signalmodule.c \
Modules/posixmodule.c \ Modules/posixmodule.c \
Modules/threadmodule.c) Modules/threadmodule.c
SRC.PARSE1= $(addprefix $(TOP), \ SRC.PARSE1= $(addprefix $(TOP), \
Parser/acceler.c \ Parser/acceler.c \
Parser/grammar1.c \ Parser/grammar1.c \
...@@ -391,6 +405,7 @@ EASYEXTMODULES= array \ ...@@ -391,6 +405,7 @@ EASYEXTMODULES= array \
HARDEXTMODULES= binascii \ HARDEXTMODULES= binascii \
cPickle \ cPickle \
cStringI \ cStringI \
_csv \
_hotshot \ _hotshot \
imageop \ imageop \
itertool \ itertool \
...@@ -410,33 +425,33 @@ HARDEXTMODULES= binascii \ ...@@ -410,33 +425,33 @@ HARDEXTMODULES= binascii \
zipimpor zipimpor
# Python external ($(MODULE.EXT)) modules - can be EASY or HARD # Python external ($(MODULE.EXT)) modules - can be EASY or HARD
ifeq ($(ZLIB),yes) ifeq ($(HAVE_ZLIB),yes)
HARDEXTMODULES+= zlib HARDEXTMODULES+= zlib
endif endif
ifeq ($(UFC),yes) ifeq ($(HAVE_UFC),yes)
HARDEXTMODULES+= crypt HARDEXTMODULES+= crypt
endif endif
ifeq ($(TCLTK),yes) ifeq ($(HAVE_TCLTK),yes)
HARDEXTMODULES+= _tkinter HARDEXTMODULES+= _tkinter
CFLAGS+= -DHAS_DIRENT -I/TclTk80/include CFLAGS+= -DHAS_DIRENT -I/TclTk80/include
TK_LIBS+= -L/TclTk80/lib -ltcl80 -ltk80 TK_LIBS+= -L/TclTk80/lib -ltcl80 -ltk80
endif endif
ifeq ($(GMPZ),yes) ifeq ($(HAVE_GMPZ),yes)
HARDEXTMODULES+= mpz HARDEXTMODULES+= mpz
endif endif
ifeq ($(GREADLINE),yes) ifeq ($(HAVE_GREADLINE),yes)
HARDEXTMODULES+= readline HARDEXTMODULES+= readline
endif endif
ifeq ($(BSDDB),yes) ifeq ($(HAVE_BSDDB),yes)
HARDEXTMODULES+= bsddb185 HARDEXTMODULES+= bsddb185
endif endif
ifeq ($(CURSES),yes) ifeq ($(HAVE_NCURSES),yes)
HARDEXTMODULES+= _curses _curses_ HARDEXTMODULES+= _curses _curses_
endif endif
ifeq ($(GDBM),yes) ifeq ($(HAVE_GDBM),yes)
HARDEXTMODULES+= gdbm dbm HARDEXTMODULES+= gdbm dbm
endif endif
ifeq ($(BZ2),yes) ifeq ($(HAVE_BZ2),yes)
HARDEXTMODULES+= bz2 HARDEXTMODULES+= bz2
endif endif
...@@ -526,6 +541,9 @@ cStringIO$(MODULE.EXT): $(OUT)cStringIO$O $(OUT)cStringIO_m.def $(PYTHON.IMPLIB) ...@@ -526,6 +541,9 @@ cStringIO$(MODULE.EXT): $(OUT)cStringIO$O $(OUT)cStringIO_m.def $(PYTHON.IMPLIB)
cStringI$(MODULE.EXT): cStringIO$(MODULE.EXT) cStringI$(MODULE.EXT): cStringIO$(MODULE.EXT)
cp $^ $@ cp $^ $@
_csv$(MODULE.EXT): $(OUT)_csv$O $(OUT)_csv_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
_hotshot$(MODULE.EXT): $(OUT)_hotshot$O $(OUT)_hotshot_m.def $(PYTHON.IMPLIB) _hotshot$(MODULE.EXT): $(OUT)_hotshot$O $(OUT)_hotshot_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS) $(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
......
...@@ -66,6 +66,7 @@ extern void initfcntl(); ...@@ -66,6 +66,7 @@ extern void initfcntl();
extern void initfpectl(); extern void initfpectl();
extern void initfpetest(); extern void initfpetest();
extern void initimageop(); extern void initimageop();
extern void inititertools();
extern void initmath(); extern void initmath();
extern void initmd5(); extern void initmd5();
extern void initoperator(); extern void initoperator();
...@@ -129,6 +130,7 @@ struct _inittab _PyImport_Inittab[] = { ...@@ -129,6 +130,7 @@ struct _inittab _PyImport_Inittab[] = {
{"fpectl", initfpectl}, {"fpectl", initfpectl},
{"fpetest", initfpetest}, {"fpetest", initfpetest},
{"imageop", initimageop}, {"imageop", initimageop},
{"itertools", inititertools},
{"math", initmath}, {"math", initmath},
{"md5", initmd5}, {"md5", initmd5},
{"operator", initoperator}, {"operator", initoperator},
......
#ifndef Py_CONFIG_H #ifndef Py_CONFIG_H
#define Py_CONFIG_H #define Py_CONFIG_H
/* /* config.h.
config.h. * At some time in the past, generated automatically by/from configure.
At some time in the past, generated automatically by configure. * now maintained manually.
Maintained manually for better results. */
*/
/* build environment */
#define PLATFORM "os2emx" #define PLATFORM "os2emx"
#define COMPILER "[EMX GCC " __VERSION__ "]" #define COMPILER "[EMX GCC " __VERSION__ "]"
#define PYOS_OS2 #define PYOS_OS2 1
#define PYCC_GCC #define PYCC_GCC 1
#define PREFIX "/usr"
/* default location(s) */
#ifndef PREFIX
#define PREFIX ""
#endif
#ifndef PYTHONPATH
#define PYTHONPATH "./Lib;./Lib/plat-" PLATFORM \
";./Lib/lib-dynload;./Lib/site-packages"
#endif
/* Debugging */ /* Debugging */
#ifndef Py_DEBUG #ifndef Py_DEBUG
/*#define Py_DEBUG 1*/ /*#define Py_DEBUG 1*/
#endif #endif
/* so that emx socket headers will define IP V4 socket types */
#define TCPIPV4
/* Use OS/2 flavour of threads */ /* Use OS/2 flavour of threads */
#define WITH_THREAD #define WITH_THREAD 1
#define OS2_THREADS #define OS2_THREADS 1
/* Define if you want to read files with foreign newlines. */
#define WITH_UNIVERSAL_NEWLINES 1
/* We want sockets */ /* We want sockets */
#define USE_SOCKET #define TCPIPV4 1
#define USE_SOCKET 1
#define socklen_t int #define socklen_t int
/* enable the Python object allocator */
#define WITH_PYMALLOC 1
/* enable the GC module */ /* enable the GC module */
#define WITH_CYCLE_GC 1 #define WITH_CYCLE_GC 1
/* Define if you want to read files with foreign newlines. */
#define WITH_UNIVERSAL_NEWLINES 1
/* Define if you want documentation strings in extension modules */ /* Define if you want documentation strings in extension modules */
#define WITH_DOC_STRINGS 1 #define WITH_DOC_STRINGS 1
/* Unicode related */ /* Unicode related */
#define Py_USING_UNICODE #define Py_USING_UNICODE 1
#define PY_UNICODE_TYPE wchar_t #define PY_UNICODE_TYPE wchar_t
#define Py_UNICODE_SIZE SIZEOF_SHORT #define Py_UNICODE_SIZE SIZEOF_SHORT
/* enable the Python object allocator */ /* system capabilities */
/*#define WITH_PYMALLOC 1*/
#define PYTHONPATH ".;./Lib;./Lib/plat-" PLATFORM ";./Lib/lib-dynload;./Lib/site-packages"
#define HAVE_TTYNAME 1 #define HAVE_TTYNAME 1
#define HAVE_WAIT 1 #define HAVE_WAIT 1
#define HAVE_GETEGID 1 #define HAVE_GETEGID 1
...@@ -68,8 +73,7 @@ ...@@ -68,8 +73,7 @@
/* need this for spawnv code in posixmodule (cloned from WIN32 def'n) */ /* need this for spawnv code in posixmodule (cloned from WIN32 def'n) */
typedef long intptr_t; typedef long intptr_t;
/* we don't have tm_zone but do have the external array /* we don't have tm_zone but do have the external array tzname */
tzname. */
#define HAVE_TZNAME 1 #define HAVE_TZNAME 1
/* Define as the return type of signal handlers (int or void). */ /* Define as the return type of signal handlers (int or void). */
...@@ -81,30 +85,26 @@ typedef long intptr_t; ...@@ -81,30 +85,26 @@ typedef long intptr_t;
/* Define if you can safely include both <sys/time.h> and <time.h>. */ /* Define if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1 #define TIME_WITH_SYS_TIME 1
/* Used for BeOS configuration */ /* Define this if you have the type long long. */
/* #undef DL_EXPORT_HEADER */
#ifdef DL_EXPORT_HEADER
#include DL_EXPORT_HEADER
#endif
/* Define this if you have the type long long */
#define HAVE_LONG_LONG 1 #define HAVE_LONG_LONG 1
/* Define if your compiler supports function prototypes */ /* Define if your compiler supports function prototypes. */
#define HAVE_PROTOTYPES 1 #define HAVE_PROTOTYPES 1
/* Define if your compiler supports variable length function prototypes /* Define if your compiler supports variable length function prototypes
(e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */ * (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h>.
*/
#define HAVE_STDARG_PROTOTYPES 1 #define HAVE_STDARG_PROTOTYPES 1
/* Define if malloc(0) returns a NULL pointer */ /* Define if malloc(0) returns a NULL pointer. */
#define MALLOC_ZERO_RETURNS_NULL 1 #define MALLOC_ZERO_RETURNS_NULL 1
/* Define to force use of thread-safe errno, h_errno, and other functions */ /* Define to force use of thread-safe errno, h_errno, and other functions. */
#define _REENTRANT 1 #define _REENTRANT 1
/* Define if you can safely include both <sys/select.h> and <sys/time.h> /* Define if you can safely include both <sys/select.h> and <sys/time.h>
(which you can't on SCO ODT 3.0). */ * (which you can't on SCO ODT 3.0).
*/
#define SYS_SELECT_WITH_SYS_TIME 1 #define SYS_SELECT_WITH_SYS_TIME 1
/* The number of bytes in an off_t. */ /* The number of bytes in an off_t. */
...@@ -305,8 +305,8 @@ typedef long intptr_t; ...@@ -305,8 +305,8 @@ typedef long intptr_t;
/* Define if you have the <utime.h> header file. */ /* Define if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1 #define HAVE_UTIME_H 1
/* EMX has an snprintf() */ /* EMX has an snprintf(). */
#define HAVE_SNPRINTF #define HAVE_SNPRINTF 1
#endif /* !Py_CONFIG_H */ #endif /* !Py_CONFIG_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment