]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 19 Jun 2001 15:00:23 +0000 (15:00 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 19 Jun 2001 15:00:23 +0000 (15:00 +0000)
Mac/macglue.c into the core interpreter. This file contains the glue code that
allows extension modules for Mac toolboxes to live in different shared libraries
but still communicate with each other. The glue code is controlled by the
USE_MAC_TOOLBOX_GLUE define.

Makefile.pre.in
config.h.in
configure.in

index c6a053ebe2457693e679efba2f30ed93e5830043..7fd60a118a3c6c67a20c97adbdacf75d9340c87c 100644 (file)
@@ -138,6 +138,7 @@ MAINOBJ=    @MAINOBJ@
 LIBOBJS=       @LIBOBJS@
 DLINCLDIR=     @DLINCLDIR@
 DYNLOADFILE=   @DYNLOADFILE@
+MACHDEP_OBJS=  @MACHDEP_OBJS@
 
 PYTHON=                python$(EXE)
 
@@ -222,6 +223,7 @@ PYTHON_OBJS=        \
                Python/traceback.o \
                Python/getopt.o \
                Python/$(DYNLOADFILE) \
+               $(MACHDEP_OBJS) \
                $(LIBOBJS)
 
 
@@ -411,6 +413,8 @@ Objects/object.o: $(srcdir)/Objects/object.c $(srcdir)/Objects/obmalloc.c
 Objects/unicodectype.o:        $(srcdir)/Objects/unicodectype.c \
                                $(srcdir)/Objects/unicodetype_db.h
 
+Mac/Python/macglue.o: $(srcdir)/Mac/Python/macglue.c
+               $(CC) -c $(CFLAGS) $(CPPFLAGS) -I$(srcdir)/Mac/Include -I$(srcdir)/Python -o $@ $(srcdir)/Mac/Python/macglue.c
 
 ############################################################################
 # Header files
index 6753327247a5dbc1ba2fb2b1f9c296b514f31d2b..18c62117b4a7e7b4a584a4315e4cb4b4e3a02041 100644 (file)
    (shared library plus accessory files). */
 #undef WITH_NEXT_FRAMEWORK
 
+/* Define if you want to use MacPython modules on MacOSX in unix-Python */
+#undef USE_TOOLBOX_OBJECT_GLUE
+
 /* Define if you want to use SGI (IRIX 4) dynamic linking.
    This requires the "dl" library by Jack Jansen,
    ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
index 890aae2bd059a6013087a5eed7f592a0b4a57162..561c10493c856f5a8a69187c35c17b6f015634d0 100644 (file)
@@ -677,7 +677,7 @@ then
        # crt1.o) gets erroneously defined as common, which breaks dynamic
        # loading of any modules which reference it in System.framework
        next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
-       Darwin/*) LINKFORSHARED="-u __dummy -framework System -framework Foundation" ;;
+       Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;;
        UnixWare*) LINKFORSHARED="-dy -Bdynamic -Wl,-Bexport";;
        SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
        ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
@@ -997,6 +997,22 @@ then
        AC_DEFINE(HAVE_DYNAMIC_LOADING)
 fi
 
+# MACHDEP_OBJS can be set to platform-specific object files needed by Python
+
+AC_SUBST(MACHDEP_OBJS)
+AC_MSG_CHECKING(MACHDEP_OBJS)
+if test -z "$MACHDEP_OBJS"
+then
+       case $ac_sys_system/$ac_sys_release in
+       Darwin/*)
+               MACHDEP_OBJS="Mac/Python/macglue.o"
+               AC_DEFINE(USE_TOOLBOX_OBJECT_GLUE)
+               ;;
+       *) MACHDEP_OBJS="";;
+       esac
+fi
+AC_MSG_RESULT($DYNLOADFILE)
+
 # checks for library functions
 AC_CHECK_FUNCS(alarm chown clock confstr ctermid ctermid_r execv \
  flock fork fsync fdatasync fpathconf ftime ftruncate \