Roy Marples wrote:
--- openvpn-2.0.4/plugin/down-root/Makefile.orig        2005-11-02 
20:25:40.000000000 +0100
+++ openvpn-2.0.4/plugin/down-root/Makefile     2005-11-02 20:31:53.000000000 
+0100
@@ -7,11 +7,22 @@
CC_FLAGS=-O2 -Wall +ifeq ($(USERLAND),Darwin)
+       LIBNAME=dylib
+else
+       LIBNAME=so
+endif
+
+lib : down-root.$(LIBNAME)
+
 down-root.so : down-root.o
        gcc ${CC_FLAGS} -fPIC -shared -Wl,-soname,openvpn-down-root.so -o 
openvpn-down-root.so down-root.o -lc
+down-root.dylib : down-root.o
+       gcc ${CC_FLAGS} -dynamiclib -install_name openvpn-down-root.dylib -o 
openvpn-down-root.dylib down-root.o -lc
+
 down-root.o : down-root.c
        gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} down-root.c
clean :
-       rm -f *.o *.so
+       rm -f *.o *.so *.dylib

According to the Fink porting documents[1], this is not the right way to link loadable modules on Mac OS X. The module should properly end with ".so", and the compiler flags should include "-bundle" and not "-dynamiclib", which should only be used when linking a shared library.

[1] http://fink.sf.net/doc/porting/shared.php?phpLang=en#lib-and-mod

        Cheers,

        -- Johnny Lam <j...@pkgsrc.org>

Reply via email to