Ian Holyer <[EMAIL PROTECTED]> reports that the configuration
script is not setting the value of DLL_FLAGS.
Sorry, my fault - I should have told people to reread the file hugs/Install
in the latest beta release. Here's the relevant part concerning
dynamic linking:
--with-plugins
Generate Xlib or Win32 libraries.
Note that this does not work on DEC Alphas (or any other machines where
sizeof(int) != sizeof(int*))
These "foreign plugins" can be statically linked or dynamically
linked to the Hugs interpreter.
o Static linking is portable but results in a larger than normal
Hugs executable. This can be irritating if you create your own
plugins and only want to use a subset of the plugins at any one time.
1) Configure with --with-plugins
2) "make xhugs"
o Dynamic linking is much less portable but produces better results.
Here's a list of what to do on the compilers we know about.
Visual C++ (4.2 and 5.0):
Nothing to do: the distributed Makefile uses DLL_FLAGS=/LD
Borland C:
??? We couldn't figure out how to make DLLs with Borland C.
DEC Alpha:
Plugins not supported - see above.
Linux + gcc 2.7.2:
env "DLL_FLAGS=-shared -nostdlib" ./configure --with-plugins
Solaris + gcc (2.6.3 and 2.7.2):
env "DLL_FLAGS=-shared -nostdlib -fPIC" ./configure --with-plugins
Solaris + /opt/SUNWspro/bin/cc:
env "DLL_FLAGS=-G" ./configure --with-plugins
Here's what little we know about building shared object files on
other machines. We'd be delighted if you could tell us what changes
you need to make to the Makefile to build a working Xlib.so file.
(And don't forget that static linking is a viable option!)
??? Sunos4 + gcc 2.4.5:
env "DLL_FLAGS=-r" ./configure --with-plugins
cd ..
make Xlib.so
chmod 111 Xlib.so
??? Sunos4 + acc
acc -pic -c Foo.c
ld -assert pure-text Foo.o -o Foo.so
??? HPUX + cc
cc -D_HPUX_SOURCE -Aa +z -c Foo.c
ld -b Foo.o -o Foo.so
In earlier releases, the configure script tried to guess which of these
to use - but it usually guessed wrong if you were using a weird machine
(ie one I can't try compiling Hugs on 8-). I figured that it would be
less confusing to make people specify it themselves than to try to
guess what was going wrong in some huge machine-generated shell-script.
Alastair