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:
Jack Jansen 2001-08-08 13:56:14 +00:00
parent deefbe5666
commit 9a66b6d470
2 changed files with 433 additions and 388 deletions

770
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@ fi
AC_ARG_WITH(next-framework,
[ --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework],,)
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
AC_SUBST(MACHDEP)
@ -180,6 +180,12 @@ AC_ARG_WITH(suffix, [ --with-suffix=.exe set executable suffix],[
*) EXEEXT=$withval;;
esac])
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
bsdos*)
@ -703,19 +709,26 @@ else
fi
AC_MSG_CHECKING(for --with-dyld)
if test "$with_next_framework" -o "$with_dyld"
then
if test "$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"
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
AC_MSG_RESULT(required for framework build)
fi
AC_DEFINE(WITH_DYLD)
ns_dyld='set'
else
AC_MSG_RESULT(no)
fi
AC_MSG_RESULT(no)
fi ;;
esac
# Set info about shared libraries.
AC_SUBST(SO)
@ -762,7 +775,12 @@ then
hp*|HP*) LDSHARED="ld -b";;
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
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"
then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
@ -1003,7 +1021,10 @@ else
LIBOBJS="$LIBOBJS thread.o"],[
AC_MSG_RESULT(no)
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"
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
@ -1166,7 +1187,7 @@ if test -z "$MACHDEP_OBJS"
then
case $ac_sys_system/$ac_sys_release in
Darwin/*)
MACHDEP_OBJS="Mac/Python/macglue.o"
MACHDEP_OBJS="Python/mactoolboxglue.o"
AC_DEFINE(USE_TOOLBOX_OBJECT_GLUE)
;;
*) MACHDEP_OBJS="";;