Changes for BeOS, QNX and long long, by Chris Herborth.
This commit is contained in:
parent
d8eb2119b5
commit
ec95c7bd2b
|
@ -134,6 +134,9 @@ INSTALL= @srcdir@/install-sh -c
|
|||
INSTALL_PROGRAM=${INSTALL} -m $(EXEMODE)
|
||||
INSTALL_DATA= ${INSTALL} -m $(FILEMODE)
|
||||
|
||||
# Use this to make a link between python$(VERSION) and python in $(BINDIR)
|
||||
LN=@LN@
|
||||
|
||||
# --with-PACKAGE options for configure script
|
||||
# e.g. --with-readline --with-svr5 --with-solaris --with-thread
|
||||
# (see README for an explanation)
|
||||
|
@ -237,7 +240,7 @@ bininstall: altbininstall
|
|||
then rm -f $(BINDIR)/python; \
|
||||
else true; \
|
||||
fi
|
||||
(cd $(BINDIR); ln python$(VERSION)$(EXE) python$(EXE))
|
||||
(cd $(BINDIR); $(LN) python$(VERSION)$(EXE) python$(EXE))
|
||||
|
||||
# Install the interpreter with $(VERSION) affixed
|
||||
# This goes into $(exec_prefix)
|
||||
|
|
42
README
42
README
|
@ -251,27 +251,40 @@ QNX: Chris Herborth (chrish@qnx.com) writes:
|
|||
ftp.qnx.com in /usr/free. I used the following process to build,
|
||||
test and install Python 1.5 under QNX:
|
||||
|
||||
1) SHELL=/usr/local/bin/bash CC=cc CFLAGS="-5 -O" RANLIB=: \
|
||||
bash ./configure --verbose --without-gcc --with-libm=""
|
||||
1) CONFIG_SHELL=/usr/local/bin/bash CC=cc RANLIB=: \
|
||||
./configure --verbose --without-gcc --with-libm=""
|
||||
|
||||
2) copy Modules/Setup.in to Modules/Setup; edit Modules/Setup to
|
||||
activate everything that makes sense for your system... tested
|
||||
here at QNX with the following modules:
|
||||
|
||||
regex reop pcre posix signal readline array cmath math strop
|
||||
struct time operator _locale fcntl pwd grp crypt select socket
|
||||
errno termios audioop imageop rgbimg md5 timing rotor syslog
|
||||
new gdbm soundex binascii parser cStringIO cPickle zlib curses
|
||||
array, audioop, binascii, cPickle, cStringIO, cmath, crypt, curses,
|
||||
errno, fcntl, gdbm, grp, imageop, _locale, math, md5, new, operator,
|
||||
parser, pcre, posix, pwd, readline, regex, reop, rgbimg, rotor,
|
||||
select, signal, socket, soundex, strop, struct, syslog, termios,
|
||||
time, timing, zlib
|
||||
|
||||
3) SHELL=/usr/local/bin/bash make SHELL=/usr/local/bin/bash
|
||||
Newly compiled/tested in 1.5.1:
|
||||
|
||||
4) SHELL=/usr/local/bin/bash make SHELL=/usr/local/bin/bash test
|
||||
audioop, imageop, rgbimgmodule
|
||||
|
||||
The socket, strftime and possibly gdbm tests might fail in the
|
||||
test harness; going through them by hand shows that they work.
|
||||
A good exercise for the reader: make these work "out of the box".
|
||||
3) make SHELL=/usr/local/bin/bash
|
||||
|
||||
or, if you feel the need for speed:
|
||||
|
||||
make SHELL=/usr/local/bin/bash OPT="-5 -Oil+nrt"
|
||||
|
||||
5) SHELL=/usr/local/bin/bash make SHELL=/usr/local/bin/bash install
|
||||
4) make SHELL=/usr/local/bin/bash test
|
||||
|
||||
The socket test might fail in the test harness; going through it by
|
||||
hand shows that they work.
|
||||
|
||||
A good exercise for the reader: make this work "out of the box".
|
||||
|
||||
Using GNU readline 2.2 seems to behave strangely, but I think that's
|
||||
a problem with my readline 2.2 port. :-\
|
||||
|
||||
5) make SHELL=/usr/local/bin/bash install
|
||||
|
||||
If you get SIGSEGVs while running Python (I haven't yet, but I've
|
||||
only run small programs and the test cases), you're probably running
|
||||
|
@ -279,6 +292,11 @@ QNX: Chris Herborth (chrish@qnx.com) writes:
|
|||
the stack size, edit the Makefile in the Modules directory to read:
|
||||
LDFLAGS = -N 48k
|
||||
|
||||
BeOS: Chris Herborth (chrish@qnx.com) writes:
|
||||
See BeOS/README for notes about compiling/installing Python on
|
||||
BeOS R3 or later. Note that only the PowerPC platform is supported
|
||||
at this time, but feel free to try building it on x86.
|
||||
|
||||
Cray T3E: Konrad Hinsen writes:
|
||||
1) Don't use gcc. It compiles Python/graminit.c into something that
|
||||
the Cray assembler doesn't like. Cray's cc seems to work fine.
|
||||
|
|
|
@ -102,6 +102,9 @@
|
|||
/* Define if you have POSIX threads */
|
||||
#undef _POSIX_THREADS
|
||||
|
||||
/* Define if you have BeOS threads */
|
||||
#undef BEOS_THREADS
|
||||
|
||||
/* Define to force use of thread-safe errno, h_errno, and other functions */
|
||||
#undef _REENTRANT
|
||||
|
||||
|
@ -400,5 +403,11 @@
|
|||
/* Define if you have the ieee library (-lieee). */
|
||||
#undef HAVE_LIBIEEE
|
||||
|
||||
/* Define if your compiler supports long long. */
|
||||
#undef HAVE_LONG_LONG
|
||||
|
||||
/* The number of bytes in a long long. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* Define if you have the m library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
|
44
configure.in
44
configure.in
|
@ -106,6 +106,8 @@ AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
|
|||
case $ac_sys_system in
|
||||
OSF1) CC=cc
|
||||
without_gcc=;;
|
||||
BeOS*) CC=cc
|
||||
without_gcc=;;
|
||||
*) without_gcc=no;;
|
||||
esac])
|
||||
AC_MSG_RESULT($without_gcc)
|
||||
|
@ -124,10 +126,15 @@ hp*|HP*)
|
|||
case $CC in
|
||||
cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
|
||||
esac;;
|
||||
BeOS*)
|
||||
case $CC in
|
||||
cc) CC=cc;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
# LINKCC is the command that links the python executable -- default is $(CC).
|
||||
# This is altered for AIX in order to build the export list before linking.
|
||||
# This is altered for AIX and BeOS in order to build the export list before
|
||||
# linking.
|
||||
AC_SUBST(LINKCC)
|
||||
AC_MSG_CHECKING(LINKCC)
|
||||
if test -z "$LINKCC"
|
||||
|
@ -135,6 +142,9 @@ then
|
|||
case $ac_sys_system in
|
||||
AIX*)
|
||||
LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
|
||||
BeOS*)
|
||||
LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) -nodup \$(OPT)"
|
||||
REALLIBRARY='libpython$(VERSION).so';;
|
||||
dgux*)
|
||||
LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
|
||||
*) LINKCC="\$(PURIFY) \$(CC)";;
|
||||
|
@ -160,6 +170,15 @@ else
|
|||
INSTALL_DATA="$INSTALL -m 644"
|
||||
fi
|
||||
|
||||
# Not every filesystem supports hard links
|
||||
AC_SUBST(LN)
|
||||
if test -z "$LN" ; then
|
||||
case $ac_sys_system in
|
||||
BeOS*) LN="ln -s";;
|
||||
*) LN=ln;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Optimizer/debugger flags passed between Makefiles
|
||||
AC_SUBST(OPT)
|
||||
if test -z "$OPT"
|
||||
|
@ -261,6 +280,14 @@ AC_TYPE_UID_T
|
|||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
|
||||
AC_MSG_CHECKING(for long long support)
|
||||
have_long_long=no
|
||||
AC_TRY_COMPILE([], [long long x; x = (long long)0;], AC_DEFINE(HAVE_LONG_LONG) have_long_long=yes)
|
||||
AC_MSG_RESULT($have_long_long)
|
||||
if test $have_long_long = yes ; then
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
fi
|
||||
|
||||
# Set info about shared libraries.
|
||||
AC_SUBST(SO)
|
||||
AC_SUBST(LDSHARED)
|
||||
|
@ -284,6 +311,7 @@ if test -z "$LDSHARED"
|
|||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
|
||||
BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
|
||||
IRIX/5*) LDSHARED="ld -shared";;
|
||||
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
|
||||
SunOS/4*) LDSHARED="ld";;
|
||||
|
@ -349,11 +377,15 @@ AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
|
|||
AC_CHECK_LIB(m, pow) # Std math lib -- assume needed if it exists
|
||||
# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
|
||||
# However on SGI IRIX, these exist but are broken.
|
||||
case "$ac_sys_system" in IRIX*) ;;
|
||||
# BeOS' sockets are stashed in libnet.
|
||||
case "$ac_sys_system" in
|
||||
IRIX*) ;;
|
||||
*)
|
||||
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
|
||||
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
|
||||
;; esac
|
||||
AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(for --with-libs)
|
||||
AC_ARG_WITH(libs, [--with-libs='lib1 ...' link against additional libs], [
|
||||
|
@ -401,6 +433,9 @@ AC_DEFINE(_REENTRANT)
|
|||
AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(C_THREADS)
|
||||
LIBOBJS="$LIBOBJS thread.o"],[
|
||||
AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(BEOS_THREADS)
|
||||
LIBOBJS="$LIBOBJS thread.o"],[
|
||||
AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(_POSIX_THREADS)
|
||||
LIBS="$LIBS -lpthreads"
|
||||
|
@ -421,7 +456,7 @@ AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
|
|||
AC_DEFINE(_POSIX_THREADS)
|
||||
LIBS="$LIBS -lcma"
|
||||
LIBOBJS="$LIBOBJS thread.o"])
|
||||
])])])])])
|
||||
])])])])])])
|
||||
|
||||
AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
|
||||
LIBS="$LIBS -lmpc"
|
||||
|
@ -589,6 +624,7 @@ fi])
|
|||
AC_SUBST(LIBM)
|
||||
case $ac_sys_system in
|
||||
next) ;;
|
||||
BeOS) ;;
|
||||
*) LIBM=-lm
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
|
|
Loading…
Reference in New Issue