ObjOpenSSL  Check-in [86da8ecd4c]

Overview
Comment:Update buildsys and use rpath for ObjFW
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 86da8ecd4c06417d69003c8e4a4650ca41fec3de8c0d887824fc512529c0288b
User & Date: js on 2020-10-03 09:58:12
Other Links: manifest | tags
Context
2020-12-07
00:35
Adjust to ObjFW changes check-in: 8d227ad030 user: js tags: trunk
2020-10-03
09:58
Update buildsys and use rpath for ObjFW check-in: 86da8ecd4c user: js tags: trunk
2020-10-02
23:58
ObjOpenSSL.oc: Include FRAMEWORK_LIBS check-in: a9dc759a9f user: js tags: trunk
Changes

Modified build-aux/m4/buildsys.m4 from [74391b1263] to [3ccfd8c6b5].

305
306
307
308
309
310
311

312
313
314
315
316
305
306
307
308
309
310
311
312
313
314
315
316
317







+





			], [
				FRAMEWORK_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
				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
])

Modified buildsys.mk.in from [4ea263de35] to [1766cbea3c].

59
60
61
62
63
64
65

66
67
68
69
70
71
72
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73







+







AMIGA_LIB_CFLAGS = @AMIGA_LIB_CFLAGS@
AMIGA_LIB_LDFLAGS = @AMIGA_LIB_LDFLAGS@
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@
DEP_CXXFLAGS = @DEP_CXXFLAGS@
DEP_OBJCFLAGS = @DEP_OBJCFLAGS@
187
188
189
190
191
192
193
194

195
196
197
198
199
200
201
188
189
190
191
192
193
194

195
196
197
198
199
200
201
202







-
+







	else \
		${LINK_FAILED}; \
	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

copy-headers-into-framework:

Modified configure.ac from [7261dbb9d1] to [d2bf053646].

22
23
24
25
26
27
28
29
30


31
32
33
34
35
36
37
22
23
24
25
26
27
28


29
30
31
32
33
34
35
36
37







-
-
+
+







AC_PROG_LN_S
AC_PROG_INSTALL

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,
	AS_HELP_STRING([--disable-shared], [do not build shared library]))
AS_IF([test x"$enable_shared" != x"no"], [
51
52
53
54
55
56
57
58


59
60
61
62
63

64
65
66
67
68
69
70
51
52
53
54
55
56
57

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72







-
+
+





+








AC_ARG_WITH(openssl, AS_HELP_STRING([--with-openssl=PREFIX],
	[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"], [
	OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith -Werror"
])

Modified extra.mk.in from [d0a6614d71] to [d4300a709f].

1
2
3
4
5
6
7
1
2
3
4
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@

Modified src/Makefile from [f2e76a5176] to [b4ded8f30b].

13
14
15
16
17
18
19
20
21
13
14
15
16
17
18
19









-
-

INCLUDES = ${SRCS:.m=.h}	\
	   ObjOpenSSL.h

include ../buildsys.mk

LD = ${OBJC}
FRAMEWORK_LIBS := ${OBJFW_FRAMEWORK_LIBS} ${LIBS}
LIBS := ${OBJFW_LIBS} ${LIBS}