PATCH: Support for dynamic modules on MacOS X
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2820
Reported by @grubba
From: Bill Welliver <firstname.lastname@example.org> To: "email@example.com" <firstname.lastname@example.org> Date: Tue, 5 Mar 2002 18:22:25 -0500 Subject: Revised patch for Darwin/MacOSX
Here's a revised patch for pike 7.3.16 to get dynamic modules working on MacOSX/Darwin. After considerable fiddling, it appears that it will be necessary to use the flat namespace when compiling for Darwin (ask me offline if you need specific examples and reasons). The attached patch provides the necessary changes for configure.in.
That said, there are some other problems that I've identified (but don't have patches for):
the configure script for the Java module always fails complaining about not having a working ls. There is no relevant information in config.log for me to be able to determine what the problem really is, though I'm sure it's a simple fix.
If I install X11 and GTK (from fink if that's helpful), it's necessary to use the -traditional-cpp flag to get the GTK module to compile. I'm pretty sure the flag is set in the main configure script but it doesn't seem to propagate.
Hope this helps!
--- configure.in.orig Thu Feb 28 20:23:12 2002 +++ configure.in Tue Mar 5 18:08:03 2002 @@ -1318,6 +1318,7 @@ # Foundation framework needed by JavaVM.framework. The OS X 10.1 linker # no longer includes indirect dependencies so we need to add them here. AC_SYS_COMPILER_FLAG(-framework Foundation, framework_Foundation, LDFLAGS)
- AC_SYS_COMPILER_FLAG(-framework System, framework_System, LDFLAGS)
# -flat_namespace only needed for linking with libMallocDebug # AC_SYS_COMPILER_FLAG(-flat_namespace, flat_namespace, LDFLAGS) @@ -5435,7 +5436,7 @@ fi ;; Darwin*) - LDSHARED="ld -bundle -bind_at_load -undefined suppress -lbundle1.o" + LDSHARED="ld -bundle -bind_at_load -flat_namespace -undefined suppress -lbundle1.o" ;; IRIX*) if test "$GCC" = yes ; then