summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-08-08 13:56:14 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-08-08 13:56:14 (GMT)
commit9a66b6d470c448fd3d0dd1a00232887bae8cf088 (patch)
treeecf9872e00ac4260bf6984588fb9b1edc25efe44 /configure.in
parentdeefbe56662b1fe02baa504bfd76c7fcf7d6cac1 (diff)
downloadcpython-9a66b6d470c448fd3d0dd1a00232887bae8cf088.zip
cpython-9a66b6d470c448fd3d0dd1a00232887bae8cf088.tar.gz
cpython-9a66b6d470c448fd3d0dd1a00232887bae8cf088.tar.bz2
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.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in51
1 files changed, 36 insertions, 15 deletions
diff --git a/configure.in b/configure.in
index bc7101a..2192d4c 100644
--- a/configure.in
+++ b/configure.in
@@ -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="";;