Commit 9a66b6d4 authored by Jack Jansen's avatar Jack Jansen

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.
parent deefbe56
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -44,7 +44,7 @@ fi ...@@ -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],[ ...@@ -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,19 +709,26 @@ else ...@@ -703,19 +709,26 @@ else
fi fi
AC_MSG_CHECKING(for --with-dyld) AC_MSG_CHECKING(for --with-dyld)
if test "$with_next_framework" -o "$with_dyld" case $ac_sys_system/$ac_sys_release in
then Darwin/*)
if test "$with_dyld" AC_DEFINE(WITH_DYLD)
AC_MSG_RESULT(always on for Darwin)
;;
*)
if test "$with_next_framework" -o "$with_dyld"
then then
AC_MSG_RESULT(yes) if test "$with_dyld"
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(required for framework build)
fi
AC_DEFINE(WITH_DYLD)
ns_dyld='set'
else else
AC_MSG_RESULT(required for framework build) AC_MSG_RESULT(no)
fi fi ;;
AC_DEFINE(WITH_DYLD) esac
ns_dyld='set'
else
AC_MSG_RESULT(no)
fi
# Set info about shared libraries. # Set info about shared libraries.
AC_SUBST(SO) AC_SUBST(SO)
...@@ -762,7 +775,12 @@ then ...@@ -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 ...@@ -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" ...@@ -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="";;
......
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