diff options
author | Trent Mick <trentm@activestate.com> | 2000-08-23 21:33:05 (GMT) |
---|---|---|
committer | Trent Mick <trentm@activestate.com> | 2000-08-23 21:33:05 (GMT) |
commit | 635f6fb0e9fade3c734d650951815682b08bbec2 (patch) | |
tree | e8e8cc921869651ba638995d534203797508f5e5 /configure.in | |
parent | b745a0481b8caff2b3ca9e90e48289f2f65f7b4f (diff) | |
download | cpython-635f6fb0e9fade3c734d650951815682b08bbec2.zip cpython-635f6fb0e9fade3c734d650951815682b08bbec2.tar.gz cpython-635f6fb0e9fade3c734d650951815682b08bbec2.tar.bz2 |
This patch partly (some stuff went in already) ports Python to Monterey.
- Fix bug in thread_pthread.h::PyThread_get_thread_ident() where
sizeof(pthread) < sizeof(long).
- Add 'configure' for:
- SIZEOF_PTHREAD is pthread_t can be included via <pthread.h>
- setting Monterey system name
- appropriate CC,LINKCC,LDSHARED,OPT, and CCSHARED for Monterey
- Add section in README for Monterey build
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/configure.in b/configure.in index b8371f8..6f45634 100644 --- a/configure.in +++ b/configure.in @@ -43,7 +43,7 @@ AC_MSG_CHECKING(MACHDEP) if test -z "$MACHDEP" then ac_sys_system=`uname -s` - if test "$ac_sys_system" = "AIX" ; then + if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then ac_sys_release=`uname -v` else ac_sys_release=`uname -r` @@ -148,6 +148,9 @@ AC_ARG_WITH(gcc, [ --without-gcc never use gcc], [ ;; esac ;; + Monterey*) + RANLIB=: + without_gcc=;; *) without_gcc=no;; esac]) AC_MSG_RESULT($without_gcc) @@ -207,6 +210,10 @@ BeOS*) case $CC in cc) CC=cc;; esac;; +Monterey*) + case $CC in + cc) CC="$CC -Wl,-Bexport";; + esac;; esac # LDLIBRARY is the name of the library to link against (as opposed to the @@ -236,6 +243,8 @@ then LDLIBRARY='libpython$(VERSION).so';; dgux*) LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; + Monterey64*) + LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; *) LINKCC="\$(PURIFY) \$(CC)";; esac fi @@ -308,6 +317,11 @@ then esac fi +# The current (beta) Monterey compiler dies with optimizations +case $ac_sys_system in +Monterey*) OPT="";; +esac + if test "$ac_arch_flags" then OPT="$OPT $ac_arch_flags" @@ -450,6 +464,30 @@ AC_MSG_RESULT($ac_cv_sizeof_time_t) AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t) +# if have pthread_t then define SIZEOF_PTHREAD_T +AC_MSG_CHECKING(for pthread_t) +have_pthread_t=no +AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = (pthread_t)0;], have_pthread_t=yes) +AC_MSG_RESULT($have_pthread_t) +if test "$have_pthread_t" = yes ; then + # AC_CHECK_SIZEOF() doesn't include <pthread.h>. + AC_MSG_CHECKING(size of pthread_t) + AC_CACHE_VAL(ac_cv_sizeof_pthread_t, + [AC_TRY_RUN([#include <stdio.h> + #include <pthread.h> + main() + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(pthread_t)); + exit(0); + }], ac_cv_sizeof_pthread_t=`cat conftestval`, ac_cv_sizeof_pthread_t=0) + ]) + AC_MSG_RESULT($ac_cv_sizeof_pthread_t) + AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t) +fi + + # Minor variations in building a framework between NextStep versions 4 and 5 AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in @@ -547,6 +585,7 @@ then LDSHARED="ld -Bshareable" fi;; SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; + Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; *) LDSHARED="ld";; esac fi @@ -566,6 +605,7 @@ then FreeBSD*|OpenBSD*) CCSHARED="-fpic";; NetBSD*) CCSHARED="-fPIC";; SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; + Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; *) CCSHARED="";; |