From octave-maintainers-request at bevo dot che dot wisc dot edu Tue Nov 26 11:43:00 2002 Subject: Shared libs on OSX From: "John W. Eaton" To: octave-maintainers at bevo dot che dot wisc dot edu Date: Tue, 26 Nov 2002 11:42:49 -0600 On 26-Nov-2002, Per Persson wrote: | Hi, | I've been looking into the issue of building shared libs for OS X and | have made some progress. | Some of the problems with dynamic linking (as reported before) persist, | but I've been able to run a version octave built with shared libs. | This was accomplished using a yet-to-be-released version of Apples gcc | (v3.3 build 1301). | | One thing that will need to be changed in the Makefiles is with repect | to the SH_LD and SH_LDFLAGS. | | In Mach-O objects there is a difference between a shared library | (dylib) and a loadable module (.oct in this case). A dylib is used for | linking either statically or shared from, but _not_ dynamically as | opposed to ELF where I it is my understanding that a shared lib (.so) | can be used for both shared and dynamic loading(?). | | Hence, I'd like to split SH_LD and SH_LDFLAGS into SH_LD, SH_LDFLAGS, | DL_LD and DL_LDFLAGS where the default is DL_LD=SH_LD and | DL_LDFLAGS=SH_LDFLAGS for systems other than OS X. | | I've attached a patch with the changes so you can comment on the | suggestion. This seems to suggest that the MKOCTFILE_SH_* variables should also be renamed MKOCTFILE_DL_* becuase mkoctfile is creating files that can be dynamically linked, but that are not shared libraries on all systems. Is that OK? Are we reinventing something here, that will make it more difficult to switch to libtool? Does libtool support OS X? Thanks, jwe