Hi all,
I'm in the process of trying to get winelib working on an HP-UX / PA-RISC
machine.
The first issue I've come across is related to autoconf, and I'm afraid I'm far
from an autoconf guru, so I wanted to post my proposed solution here before
submitting a patch.
The problem is that the current autoconf tests done to determine how to link a
shared library aren't very good - they use WINE_TRY_CFLAGS, which builds a c
file containing something like "void main() { } " and tries to link it.
The
problem is that this isn't a very good test about whether you can link a *shared
library* - since you've got a main line defined.
Unfortunately the gnu ld doesn't work on hpux, so I have to use the system
linker, and the UnixWare link test succeed when it should fail - since the HPUX
linker doesn't understand the arguments it is given, it goes on to link an
executable and generates a warning about not being able to hide symbol
"conftest.so.1.0".
I believe that a better test is to try to link a shared lib from a C file
containing "void myfunc() {}" - this way if the provided arguments don't
convince the linker to create a shared lib, you'll get a error about "main"
being undefined.
My proposed solution is to define a new function "WINE_TRY_SHLIB" that does what
I describe above, and then use it in the 3 existing places we're checking for
shared libs, and add a new test specifically for hpux.
I've attached my proposed patch file (although I'm still trying to sort out
exactly what flags I need for hpux libs)...
Does this seem reasonable?
thanks,
Warren
(See attached file: patch.txt)