Index: build-aux/m4/buildsys.m4 ================================================================== --- build-aux/m4/buildsys.m4 +++ build-aux/m4/buildsys.m4 @@ -307,10 +307,11 @@ FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@executable_path/../Frameworks/$$out/$${out%.framework}' ]) AC_SUBST(FRAMEWORK_LDFLAGS) AC_SUBST(FRAMEWORK_LDFLAGS_INSTALL_NAME) + AC_SUBST(FRAMEWORK_LIBS) $1 ;; esac ]) Index: buildsys.mk.in ================================================================== --- buildsys.mk.in +++ buildsys.mk.in @@ -61,10 +61,11 @@ PLUGIN_CFLAGS = @PLUGIN_CFLAGS@ PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ PLUGIN_SUFFIX = @PLUGIN_SUFFIX@ FRAMEWORK_LDFLAGS = @FRAMEWORK_LDFLAGS@ FRAMEWORK_LDFLAGS_INSTALL_NAME = @FRAMEWORK_LDFLAGS_INSTALL_NAME@ +FRAMEWORK_LIBS = @FRAMEWORK_LIBS@ CODESIGN = @CODESIGN@ CODESIGN_IDENTITY ?= - CLEAN_LIB = @CLEAN_LIB@ DEP_ASFLAGS = @DEP_ASFLAGS@ DEP_CFLAGS = @DEP_CFLAGS@ @@ -189,11 +190,11 @@ fi ${FRAMEWORK} ${FRAMEWORK_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${LINK_STATUS} out="$@"; \ - if rm -fr $$out && ${MKDIR_P} $$out && ${MAKE} -s COPY_HEADERS_IF_SUBDIR=${includesubdir} COPY_HEADERS_DESTINATION=$$PWD/$@/Headers copy-headers-into-framework && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Info.plist; fi && if test -f module.modulemap; then ${MKDIR_P} $$out/Modules && ${INSTALL} -m 644 module.modulemap $$out/Modules/module.modulemap; fi && ${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 \ + if rm -fr $$out && ${MKDIR_P} $$out && ${MAKE} -s COPY_HEADERS_IF_SUBDIR=${includesubdir} COPY_HEADERS_DESTINATION=$$PWD/$@/Headers copy-headers-into-framework && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Info.plist; fi && if test -f module.modulemap; then ${MKDIR_P} $$out/Modules && ${INSTALL} -m 644 module.modulemap $$out/Modules/module.modulemap; fi && ${LD} -o $$out/$${out%.framework} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${FRAMEWORK_LDFLAGS} ${FRAMEWORK_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${FRAMEWORK_LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} $$out; then \ ${LINK_OK}; \ else \ rm -fr $$out; false; \ ${LINK_FAILED}; \ fi Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -24,12 +24,12 @@ CPP="$OBJCPP" CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS $($OBJFW_CONFIG --cppflags)" OBJCFLAGS="$OBJCFLAGS -Wall $($OBJFW_CONFIG --objcflags)" LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --ldflags --rpath)" -AC_SUBST(OBJFW_LIBS, "$($OBJFW_CONFIG --libs)") -AC_SUBST(OBJFW_FRAMEWORK_LIBS, "$($OBJFW_CONFIG --framework-libs)") +FRAMEWORK_LIBS="$($OBJFW_CONFIG --framework-libs)" +LIBS="$($OBJFW_CONFIG --libs --rpath)" AX_CHECK_COMPILER_FLAGS(-Wdocumentation, [OBJCFLAGS="$OBJCFLAGS -Wdocumentation"]) AC_ARG_ENABLE(shared, @@ -53,16 +53,18 @@ [build with OpenSSL in the specified prefix])) AS_IF([test x"$with_openssl" != x"no" -a x"$with_openssl" != x""], [ OPENSSL_CPPFLAGS="$OPENSSL_CFLAGS -I$with_openssl/include" OPENSSL_LIBS="$OPENSSL_LIBS -L$with_openssl/lib" CPPFLAGS="$CPPFLAGS -I$with_openssl/include" - LIBS="$LIBS -L$with_openssl/lib" + LIBS="-L$with_openssl/lib $LIBS" + FRAMEWORK_LIBS="-L$with_openssl/lib $FRAMEWORK_LIBS" ]) AC_CHECK_LIB(ssl, main, [ OPENSSL_LIBS="$OPENSSL_LIBS -lssl -lcrypto" LIBS="$LIBS -lssl -lcrypto" + FRAMEWORK_LIBS="$FRAMEWORK_LIBS -lssl -lcrypto" ], [ AC_MSG_ERROR(You need openssl >= 1.0.2 installed!) ], [-lcrypto]) AS_IF([test x"$GOBJC" = x"yes"], [ Index: extra.mk.in ================================================================== --- extra.mk.in +++ extra.mk.in @@ -1,7 +1,5 @@ OBJOPENSSL_SHARED_LIB = @OBJOPENSSL_SHARED_LIB@ OBJOPENSSL_STATIC_LIB = @OBJOPENSSL_STATIC_LIB@ OBJOPENSSL_FRAMEWORK = @OBJOPENSSL_FRAMEWORK@ OBJFW_CONFIG = @OBJFW_CONFIG@ -OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@ -OBJFW_LIBS = @OBJFW_LIBS@ Index: src/Makefile ================================================================== --- src/Makefile +++ src/Makefile @@ -15,7 +15,5 @@ ObjOpenSSL.h include ../buildsys.mk LD = ${OBJC} -FRAMEWORK_LIBS := ${OBJFW_FRAMEWORK_LIBS} ${LIBS} -LIBS := ${OBJFW_LIBS} ${LIBS}