diff options
author | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2003-04-21 14:28:01 (GMT) |
---|---|---|
committer | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2003-04-21 14:28:01 (GMT) |
commit | d4c9b16b34a4bd6495daed091fb7a4d323642ecb (patch) | |
tree | f28023aa8e8aa9c7f9f6a8d02abbfb3dff35e525 | |
parent | baf25b06a63250aa7e6e5571de53977fa3322750 (diff) | |
download | cpython-d4c9b16b34a4bd6495daed091fb7a4d323642ecb.zip cpython-d4c9b16b34a4bd6495daed091fb7a4d323642ecb.tar.gz cpython-d4c9b16b34a4bd6495daed091fb7a4d323642ecb.tar.bz2 |
Makefile:
- add _csv module to the build list
- various cleanups
config.c:
- various cleanups
pyconfig.h:
- various cleanups
-rw-r--r-- | PC/os2emx/Makefile | 64 | ||||
-rw-r--r-- | PC/os2emx/config.c | 2 | ||||
-rw-r--r-- | PC/os2emx/pyconfig.h | 220 |
3 files changed, 153 insertions, 133 deletions
diff --git a/PC/os2emx/Makefile b/PC/os2emx/Makefile index 10dc9bd..787a3f4 100644 --- a/PC/os2emx/Makefile +++ b/PC/os2emx/Makefile @@ -27,37 +27,48 @@ MODE= optimize #MODE= debug # === Assert() enabled === -#ASSERTIONS=no -ASSERTIONS=yes +ASSERTIONS=no +#ASSERTIONS=yes +# === Hard-wire installation location === +FIXED_PYHOME=no +#FIXED_PYHOME=yes # === Optional modules === # Do you have the InfoZip compression library installed? -ZLIB= no +HAVE_ZLIB= no # Do you have the Ultra Fast Crypt (UFC) library installed? -UFC= no +HAVE_UFC= no # Do you have the Tcl/Tk library installed? -TCLTK= no +HAVE_TCLTK= no # Do you have the GNU multiprecision library installed? -GMPZ= no +HAVE_GMPZ= no # Do you have the GNU readline library installed? # NOTE: I'm using a modified version of Kai Uwe Rommel's port that # - is compiled with multithreading enabled # - is linked statically -# I have had no success trying to use a DLL version, even with -# the multithreading switch. -GREADLINE= no +# I have had no success trying to use a DLL version, even when +# compiled with multithreading enabled. +HAVE_GREADLINE= no # 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 # renamed to avoid problems with the multithreaded errno support # (there is a structure member called errno, used for shadowing the # 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! -CURSES= no +HAVE_NCURSES= no # Do you have the GDBM library installed? -GDBM= no +HAVE_GDBM= no # 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 === CC= gcc @@ -85,6 +96,9 @@ endif ifeq ($(ASSERTIONS),no) CFLAGS+= -DNDEBUG 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 # because of which it sometimes fails to build relocations @@ -250,7 +264,7 @@ SRC.MODULES= $(addprefix $(TOP), \ Modules/gcmodule.c \ Modules/signalmodule.c \ Modules/posixmodule.c \ - Modules/threadmodule.c) + Modules/threadmodule.c SRC.PARSE1= $(addprefix $(TOP), \ Parser/acceler.c \ Parser/grammar1.c \ @@ -391,6 +405,7 @@ EASYEXTMODULES= array \ HARDEXTMODULES= binascii \ cPickle \ cStringI \ + _csv \ _hotshot \ imageop \ itertool \ @@ -410,33 +425,33 @@ HARDEXTMODULES= binascii \ zipimpor # Python external ($(MODULE.EXT)) modules - can be EASY or HARD -ifeq ($(ZLIB),yes) +ifeq ($(HAVE_ZLIB),yes) HARDEXTMODULES+= zlib endif -ifeq ($(UFC),yes) +ifeq ($(HAVE_UFC),yes) HARDEXTMODULES+= crypt endif -ifeq ($(TCLTK),yes) +ifeq ($(HAVE_TCLTK),yes) HARDEXTMODULES+= _tkinter CFLAGS+= -DHAS_DIRENT -I/TclTk80/include TK_LIBS+= -L/TclTk80/lib -ltcl80 -ltk80 endif -ifeq ($(GMPZ),yes) +ifeq ($(HAVE_GMPZ),yes) HARDEXTMODULES+= mpz endif -ifeq ($(GREADLINE),yes) +ifeq ($(HAVE_GREADLINE),yes) HARDEXTMODULES+= readline endif -ifeq ($(BSDDB),yes) +ifeq ($(HAVE_BSDDB),yes) HARDEXTMODULES+= bsddb185 endif -ifeq ($(CURSES),yes) +ifeq ($(HAVE_NCURSES),yes) HARDEXTMODULES+= _curses _curses_ endif -ifeq ($(GDBM),yes) +ifeq ($(HAVE_GDBM),yes) HARDEXTMODULES+= gdbm dbm endif -ifeq ($(BZ2),yes) +ifeq ($(HAVE_BZ2),yes) HARDEXTMODULES+= bz2 endif @@ -526,6 +541,9 @@ cStringIO$(MODULE.EXT): $(OUT)cStringIO$O $(OUT)cStringIO_m.def $(PYTHON.IMPLIB) cStringI$(MODULE.EXT): cStringIO$(MODULE.EXT) 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) $(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS) diff --git a/PC/os2emx/config.c b/PC/os2emx/config.c index 0a0b901..0b21d56 100644 --- a/PC/os2emx/config.c +++ b/PC/os2emx/config.c @@ -66,6 +66,7 @@ extern void initfcntl(); extern void initfpectl(); extern void initfpetest(); extern void initimageop(); +extern void inititertools(); extern void initmath(); extern void initmd5(); extern void initoperator(); @@ -129,6 +130,7 @@ struct _inittab _PyImport_Inittab[] = { {"fpectl", initfpectl}, {"fpetest", initfpetest}, {"imageop", initimageop}, + {"itertools", inititertools}, {"math", initmath}, {"md5", initmd5}, {"operator", initoperator}, diff --git a/PC/os2emx/pyconfig.h b/PC/os2emx/pyconfig.h index 807083e..23f0cfe 100644 --- a/PC/os2emx/pyconfig.h +++ b/PC/os2emx/pyconfig.h @@ -1,53 +1,58 @@ #ifndef Py_CONFIG_H #define Py_CONFIG_H -/* - config.h. - At some time in the past, generated automatically by configure. - Maintained manually for better results. -*/ +/* config.h. + * At some time in the past, generated automatically by/from configure. + * now maintained manually. + */ +/* build environment */ #define PLATFORM "os2emx" #define COMPILER "[EMX GCC " __VERSION__ "]" -#define PYOS_OS2 -#define PYCC_GCC -#define PREFIX "/usr" +#define PYOS_OS2 1 +#define PYCC_GCC 1 + +/* default location(s) */ +#ifndef PREFIX +#define PREFIX "" +#endif +#ifndef PYTHONPATH +#define PYTHONPATH "./Lib;./Lib/plat-" PLATFORM \ + ";./Lib/lib-dynload;./Lib/site-packages" +#endif /* Debugging */ #ifndef Py_DEBUG /*#define Py_DEBUG 1*/ #endif -/* so that emx socket headers will define IP V4 socket types */ -#define TCPIPV4 - /* Use OS/2 flavour of threads */ -#define WITH_THREAD -#define OS2_THREADS - -/* Define if you want to read files with foreign newlines. */ -#define WITH_UNIVERSAL_NEWLINES 1 +#define WITH_THREAD 1 +#define OS2_THREADS 1 /* We want sockets */ -#define USE_SOCKET -#define socklen_t int +#define TCPIPV4 1 +#define USE_SOCKET 1 +#define socklen_t int + +/* enable the Python object allocator */ +#define WITH_PYMALLOC 1 /* enable the GC module */ #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 WITH_DOC_STRINGS 1 /* Unicode related */ -#define Py_USING_UNICODE -#define PY_UNICODE_TYPE wchar_t +#define Py_USING_UNICODE 1 +#define PY_UNICODE_TYPE wchar_t #define Py_UNICODE_SIZE SIZEOF_SHORT -/* enable the Python object allocator */ -/*#define WITH_PYMALLOC 1*/ - -#define PYTHONPATH ".;./Lib;./Lib/plat-" PLATFORM ";./Lib/lib-dynload;./Lib/site-packages" - +/* system capabilities */ #define HAVE_TTYNAME 1 #define HAVE_WAIT 1 #define HAVE_GETEGID 1 @@ -63,48 +68,43 @@ #define HAVE_DYNAMIC_LOADING 1 /* if port of GDBM installed, it includes NDBM emulation */ -#define HAVE_NDBM_H 1 +#define HAVE_NDBM_H 1 /* need this for spawnv code in posixmodule (cloned from WIN32 def'n) */ typedef long intptr_t; -/* we don't have tm_zone but do have the external array - tzname. */ +/* we don't have tm_zone but do have the external array tzname */ #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). */ #define RETSIGTYPE void -/* Define if you have the ANSI C header files. */ +/* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 -/* 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 -/* Used for BeOS configuration */ -/* #undef DL_EXPORT_HEADER */ -#ifdef DL_EXPORT_HEADER -#include DL_EXPORT_HEADER -#endif - -/* Define this if you have the type long long */ +/* Define this if you have the type long long. */ #define HAVE_LONG_LONG 1 -/* Define if your compiler supports function prototypes */ +/* Define if your compiler supports function prototypes. */ #define HAVE_PROTOTYPES 1 /* 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 if malloc(0) returns a NULL pointer */ +/* Define if malloc(0) returns a NULL pointer. */ #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 if you can safely include both <sys/select.h> and <sys/time.h> - (which you can't on SCO ODT 3.0). */ +/* Define if you can safely include both <sys/select.h> and <sys/time.h> + * (which you can't on SCO ODT 3.0). + */ #define SYS_SELECT_WITH_SYS_TIME 1 /* The number of bytes in an off_t. */ @@ -113,200 +113,200 @@ typedef long intptr_t; /* The number of bytes in an time_t. */ #define SIZEOF_TIME_T 4 -/* The number of bytes in a short. */ +/* The number of bytes in a short. */ #define SIZEOF_SHORT 2 -/* The number of bytes in a int. */ +/* The number of bytes in a int. */ #define SIZEOF_INT 4 -/* The number of bytes in a long. */ +/* The number of bytes in a long. */ #define SIZEOF_LONG 4 -/* The number of bytes in a long long. */ +/* The number of bytes in a long long. */ #define SIZEOF_LONG_LONG 8 -/* The number of bytes in a void *. */ +/* The number of bytes in a void *. */ #define SIZEOF_VOID_P 4 -/* Define if you have the alarm function. */ +/* Define if you have the alarm function. */ #define HAVE_ALARM 1 -/* Define if you have the clock function. */ +/* Define if you have the clock function. */ #define HAVE_CLOCK 1 -/* Define if you have the dup2 function. */ +/* Define if you have the dup2 function. */ #define HAVE_DUP2 1 -/* Define if you have the execv function. */ +/* Define if you have the execv function. */ #define HAVE_EXECV 1 -/* Define if you have the spawnv function. */ +/* Define if you have the spawnv function. */ #define HAVE_SPAWNV 1 -/* Define if you have the flock function. */ +/* Define if you have the flock function. */ #define HAVE_FLOCK 1 -/* Define if you have the fork function. */ +/* Define if you have the fork function. */ #define HAVE_FORK 1 -/* Define if you have the fsync function. */ +/* Define if you have the fsync function. */ #define HAVE_FSYNC 1 -/* Define if you have the ftime function. */ +/* Define if you have the ftime function. */ #define HAVE_FTIME 1 -/* Define if you have the ftruncate function. */ +/* Define if you have the ftruncate function. */ #define HAVE_FTRUNCATE 1 -/* Define if you have the getcwd function. */ +/* Define if you have the getcwd function. */ #define HAVE_GETCWD 1 -/* Define if you have the getpeername function. */ +/* Define if you have the getpeername function. */ #define HAVE_GETPEERNAME 1 -/* Define if you have the getpgrp function. */ +/* Define if you have the getpgrp function. */ #define HAVE_GETPGRP 1 -/* Define if you have the getpid function. */ +/* Define if you have the getpid function. */ #define HAVE_GETPID 1 -/* Define if you have the getpwent function. */ +/* Define if you have the getpwent function. */ #define HAVE_GETPWENT 1 -/* Define if you have the gettimeofday function. */ +/* Define if you have the gettimeofday function. */ #define HAVE_GETTIMEOFDAY 1 -/* Define if you have the getwd function. */ +/* Define if you have the getwd function. */ #define HAVE_GETWD 1 -/* Define if you have the hypot function. */ +/* Define if you have the hypot function. */ #define HAVE_HYPOT 1 -/* Define if you have the kill function. */ +/* Define if you have the kill function. */ #define HAVE_KILL 1 -/* Define if you have the memmove function. */ +/* Define if you have the memmove function. */ #define HAVE_MEMMOVE 1 -/* Define if you have the mktime function. */ +/* Define if you have the mktime function. */ #define HAVE_MKTIME 1 -/* Define if you have the pause function. */ +/* Define if you have the pause function. */ #define HAVE_PAUSE 1 -/* Define if you have the putenv function. */ +/* Define if you have the putenv function. */ #define HAVE_PUTENV 1 -/* Define if you have the select function. */ +/* Define if you have the select function. */ #define HAVE_SELECT 1 -/* Define if you have the setgid function. */ +/* Define if you have the setgid function. */ #define HAVE_SETGID 1 -/* Define if you have the setlocale function. */ +/* Define if you have the setlocale function. */ #define HAVE_SETLOCALE 1 -/* Define if you have the setpgid function. */ +/* Define if you have the setpgid function. */ #define HAVE_SETPGID 1 -/* Define if you have the setuid function. */ +/* Define if you have the setuid function. */ #define HAVE_SETUID 1 -/* Define if you have the setvbuf function. */ +/* Define if you have the setvbuf function. */ #define HAVE_SETVBUF 1 -/* Define if you have the sigaction function. */ +/* Define if you have the sigaction function. */ #define HAVE_SIGACTION 1 -/* Define if you have the strdup function. */ +/* Define if you have the strdup function. */ #define HAVE_STRDUP 1 -/* Define if you have the strerror function. */ +/* Define if you have the strerror function. */ #define HAVE_STRERROR 1 -/* Define if you have the strftime function. */ +/* Define if you have the strftime function. */ #define HAVE_STRFTIME 1 -/* Define if you have the strptime function. */ +/* Define if you have the strptime function. */ #define HAVE_STRPTIME 1 -/* Define if you have the tcgetpgrp function. */ +/* Define if you have the tcgetpgrp function. */ #define HAVE_TCGETPGRP 1 -/* Define if you have the tcsetpgrp function. */ +/* Define if you have the tcsetpgrp function. */ #define HAVE_TCSETPGRP 1 -/* Define if you have the times function. */ +/* Define if you have the times function. */ #define HAVE_TIMES 1 -/* Define if you have the truncate function. */ +/* Define if you have the truncate function. */ #define HAVE_TRUNCATE 1 -/* Define if you have the uname function. */ +/* Define if you have the uname function. */ #define HAVE_UNAME 1 -/* Define if you have the waitpid function. */ +/* Define if you have the waitpid function. */ #define HAVE_WAITPID 1 -/* Define if you have the <dirent.h> header file. */ +/* Define if you have the <dirent.h> header file. */ #define HAVE_DIRENT_H 1 -/* Define if you have the <fcntl.h> header file. */ +/* Define if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 -/* Define if you have the <limits.h> header file. */ +/* Define if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 -/* Define if you have the <locale.h> header file. */ +/* Define if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 -/* Define if you have the <ncurses.h> header file. */ +/* Define if you have the <ncurses.h> header file. */ #define HAVE_NCURSES_H 1 -/* Define if you have the <signal.h> header file. */ +/* Define if you have the <signal.h> header file. */ #define HAVE_SIGNAL_H 1 -/* Define if you have the <stdarg.h> header file. */ +/* Define if you have the <stdarg.h> header file. */ #define HAVE_STDARG_H 1 -/* Define if you have the <stddef.h> header file. */ +/* Define if you have the <stddef.h> header file. */ #define HAVE_STDDEF_H 1 -/* Define if you have the <stdlib.h> header file. */ +/* Define if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 -/* Define if you have the <sys/file.h> header file. */ +/* Define if you have the <sys/file.h> header file. */ #define HAVE_SYS_FILE_H 1 -/* Define if you have the <sys/param.h> header file. */ +/* Define if you have the <sys/param.h> header file. */ #define HAVE_SYS_PARAM_H 1 -/* Define if you have the <sys/select.h> header file. */ +/* Define if you have the <sys/select.h> header file. */ #define HAVE_SYS_SELECT_H 1 -/* Define if you have the <sys/time.h> header file. */ +/* Define if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H 1 -/* Define if you have the <sys/times.h> header file. */ +/* Define if you have the <sys/times.h> header file. */ #define HAVE_SYS_TIMES_H 1 -/* Define if you have the <sys/un.h> header file. */ +/* Define if you have the <sys/un.h> header file. */ #define HAVE_SYS_UN_H 1 -/* Define if you have the <sys/utsname.h> header file. */ +/* Define if you have the <sys/utsname.h> header file. */ #define HAVE_SYS_UTSNAME_H 1 -/* Define if you have the <sys/wait.h> header file. */ +/* Define if you have the <sys/wait.h> header file. */ #define HAVE_SYS_WAIT_H 1 -/* Define if you have the <unistd.h> header file. */ +/* Define if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 -/* Define if you have the <utime.h> header file. */ +/* Define if you have the <utime.h> header file. */ #define HAVE_UTIME_H 1 -/* EMX has an snprintf() */ -#define HAVE_SNPRINTF +/* EMX has an snprintf(). */ +#define HAVE_SNPRINTF 1 #endif /* !Py_CONFIG_H */ |