When I try with gcc4, it says ../../tools/winegcc/winegcc -B../../tools/winebuild --sysroot=../.. -fasynchronous-unwind-tables -shared ./aclui.spec aclui_main.o -o aclui.dll.so -lkernel32 ../../libs/port/libwine_port.a /boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-100425/lib/gcc/i586-pc-haiku/4.3.3/../../../../i586-pc-haiku/bin/ld: cannot find -lm I patched it out of the autoconf though as it's not needed on Haiku.