Index: build-aux/m4/buildsys.m4 ================================================================== --- build-aux/m4/buildsys.m4 +++ build-aux/m4/buildsys.m4 @@ -142,10 +142,11 @@ ]) AC_DEFUN([BUILDSYS_SHARED_LIB], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_MSG_CHECKING(for shared library system) + case "$host_os" in darwin*) AC_MSG_RESULT(Darwin) LIB_CFLAGS='-fPIC -DPIC' LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}' @@ -281,9 +282,8 @@ AC_SUBST(FRAMEWORK_LDFLAGS) AC_SUBST(FRAMEWORK_LDFLAGS_INSTALL_NAME) $1 - ;; esac ]) Index: buildsys.mk.in ================================================================== --- buildsys.mk.in +++ buildsys.mk.in @@ -275,11 +275,11 @@ ${INSTALL_FAILED}; \ fi \ fi ${LINK_STATUS} out="$@"; \ - if ${LD} -o $$out/$${out%.framework} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${FRAMEWORK_LDFLAGS} ${FRAMEWORK_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} --timestamp=none $$out; then \ + if ${LD} -o $$out/$${out%.framework} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${FRAMEWORK_LDFLAGS} ${FRAMEWORK_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${FRAMEWORK_LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} --timestamp=none $$out; then \ ${LINK_OK}; \ else \ rm -fr $$out; \ ${LINK_FAILED}; \ fi Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -19,11 +19,12 @@ CPP="$OBJCPP" CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS $($OBJFW_CONFIG --cppflags)" OBJCFLAGS="$OBJCFLAGS -Wall $($OBJFW_CONFIG --objcflags)" LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --ldflags --rpath)" -LIBS="$LIBS $($OBJFW_CONFIG --libs)" +AC_SUBST(OBJFW_LIBS, "$($OBJFW_CONFIG --libs)") +AC_SUBST(OBJFW_FRAMEWORK_LIBS, "$($OBJFW_CONFIG --framework-libs)") AX_CHECK_COMPILER_FLAGS(-Wdocumentation, [OBJCFLAGS="$OBJCFLAGS -Wdocumentation"]) AC_ARG_ENABLE(shared, Index: extra.mk.in ================================================================== --- extra.mk.in +++ extra.mk.in @@ -1,3 +1,6 @@ OBJOPENSSL_SHARED_LIB = @OBJOPENSSL_SHARED_LIB@ OBJOPENSSL_STATIC_LIB = @OBJOPENSSL_STATIC_LIB@ OBJOPENSSL_FRAMEWORK = @OBJOPENSSL_FRAMEWORK@ + +OBJFW_LIBS = @OBJFW_LIBS@ +OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@ Index: src/Makefile ================================================================== --- src/Makefile +++ src/Makefile @@ -15,5 +15,7 @@ ObjOpenSSL.h include ../buildsys.mk LD = ${OBJC} +FRAMEWORK_LIBS := ${OBJFW_FRAMEWORK_LIBS} ${LIBS} +LIBS := ${OBJFW_LIBS} ${LIBS}