-library += -framework Foundation -framework CFNetwork
-library += -framework JavaScriptCore -framework WebCore
-library += -lsubstrate -liconv
+library += -framework Foundation
+library += -framework JavaScriptCore
+# XXX: do I just need WebCore?
+library += -framework WebKit
+library += -liconv
+flags += -I/usr/include/ffi
+apr_config := /usr/bin/apr-1-config
+
+ifeq ($(uname_p),i386)
+flags += -m32
+endif