Various fixes to streamline build process on Mac OS X:
- Give a warning if you're on a case-insensitive filesystem and have not specified --with-suffix. - Don't require --with-dyld, it is now default for OSX/Darwin (suggested by Martin v. Loewis) - Don't define _POSIX_THREADS on Darwin, it's done by standard headers already (fix by Tony Lownds) - Don't use the Mac subtree anymore, the routines relevant to OSX/Darwin have moved to a new file Python/mactoolboxglue.c.
This commit is contained in:
parent
deefbe5666
commit
9a66b6d470
31
configure.in
31
configure.in
@ -44,7 +44,7 @@ fi
|
|||||||
AC_ARG_WITH(next-framework,
|
AC_ARG_WITH(next-framework,
|
||||||
[ --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework],,)
|
[ --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework],,)
|
||||||
AC_ARG_WITH(dyld,
|
AC_ARG_WITH(dyld,
|
||||||
[ --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) dynamic linker],,)
|
[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
|
||||||
|
|
||||||
# Set name for machine-dependent library files
|
# Set name for machine-dependent library files
|
||||||
AC_SUBST(MACHDEP)
|
AC_SUBST(MACHDEP)
|
||||||
@ -180,6 +180,12 @@ AC_ARG_WITH(suffix, [ --with-suffix=.exe set executable suffix],[
|
|||||||
*) EXEEXT=$withval;;
|
*) EXEEXT=$withval;;
|
||||||
esac])
|
esac])
|
||||||
AC_MSG_RESULT($EXEEXT)
|
AC_MSG_RESULT($EXEEXT)
|
||||||
|
# Test whether we're running on a non-case-sensitive system, in which
|
||||||
|
# case we give a warning if no ext is given
|
||||||
|
if test -d "python" -a -z "$EXEEXT"
|
||||||
|
then
|
||||||
|
AC_MSG_WARN(This filesystem is not case-sensitive so you should probably use --with-suffix)
|
||||||
|
fi
|
||||||
|
|
||||||
case $MACHDEP in
|
case $MACHDEP in
|
||||||
bsdos*)
|
bsdos*)
|
||||||
@ -703,6 +709,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(for --with-dyld)
|
AC_MSG_CHECKING(for --with-dyld)
|
||||||
|
case $ac_sys_system/$ac_sys_release in
|
||||||
|
Darwin/*)
|
||||||
|
AC_DEFINE(WITH_DYLD)
|
||||||
|
AC_MSG_RESULT(always on for Darwin)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
if test "$with_next_framework" -o "$with_dyld"
|
if test "$with_next_framework" -o "$with_dyld"
|
||||||
then
|
then
|
||||||
if test "$with_dyld"
|
if test "$with_dyld"
|
||||||
@ -715,7 +727,8 @@ then
|
|||||||
ns_dyld='set'
|
ns_dyld='set'
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Set info about shared libraries.
|
# Set info about shared libraries.
|
||||||
AC_SUBST(SO)
|
AC_SUBST(SO)
|
||||||
@ -762,7 +775,12 @@ then
|
|||||||
hp*|HP*) LDSHARED="ld -b";;
|
hp*|HP*) LDSHARED="ld -b";;
|
||||||
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
|
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
|
||||||
DYNIX/ptx*) LDSHARED="ld -G";;
|
DYNIX/ptx*) LDSHARED="ld -G";;
|
||||||
Darwin/*|next/*)
|
Darwin/*)
|
||||||
|
LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
|
||||||
|
if test "$with_next_framework" ; then
|
||||||
|
LDSHARED="$LDSHARED \$(LDLIBRARY)"
|
||||||
|
fi ;;
|
||||||
|
next/*)
|
||||||
if test "$ns_dyld"
|
if test "$ns_dyld"
|
||||||
then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
|
then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
|
||||||
else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
|
else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
|
||||||
@ -1003,7 +1021,10 @@ else
|
|||||||
LIBOBJS="$LIBOBJS thread.o"],[
|
LIBOBJS="$LIBOBJS thread.o"],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
|
AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
|
||||||
AC_DEFINE(_POSIX_THREADS)
|
case $ac_sys_system in
|
||||||
|
Darwin*) ;;
|
||||||
|
*) AC_DEFINE(_POSIX_THREADS);;
|
||||||
|
esac
|
||||||
LIBS="-lpthread $LIBS"
|
LIBS="-lpthread $LIBS"
|
||||||
LIBOBJS="$LIBOBJS thread.o"],[
|
LIBOBJS="$LIBOBJS thread.o"],[
|
||||||
AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
|
AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
|
||||||
@ -1166,7 +1187,7 @@ if test -z "$MACHDEP_OBJS"
|
|||||||
then
|
then
|
||||||
case $ac_sys_system/$ac_sys_release in
|
case $ac_sys_system/$ac_sys_release in
|
||||||
Darwin/*)
|
Darwin/*)
|
||||||
MACHDEP_OBJS="Mac/Python/macglue.o"
|
MACHDEP_OBJS="Python/mactoolboxglue.o"
|
||||||
AC_DEFINE(USE_TOOLBOX_OBJECT_GLUE)
|
AC_DEFINE(USE_TOOLBOX_OBJECT_GLUE)
|
||||||
;;
|
;;
|
||||||
*) MACHDEP_OBJS="";;
|
*) MACHDEP_OBJS="";;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user