Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
23db5e3f
Commit
23db5e3f
authored
Aug 18, 2018
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conditionally build libkj-tls if OpenSSL headers/libs are available.
parent
9c4259a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
Makefile.am
c++/Makefile.am
+20
-1
configure.ac
c++/configure.ac
+27
-0
No files found.
c++/Makefile.am
View file @
23db5e3f
...
@@ -219,10 +219,20 @@ includecapnpcompat_HEADERS = \
...
@@ -219,10 +219,20 @@ includecapnpcompat_HEADERS = \
src/capnp/compat/json.h
\
src/capnp/compat/json.h
\
src/capnp/compat/json.capnp.h
src/capnp/compat/json.capnp.h
if
BUILD_KJ_TLS
MAYBE_KJ_TLS_LA
=
libkj-tls.la
MAYBE_KJ_TLS_TESTS
=
\
src/kj/compat/readiness-io-test.c++
\
src/kj/compat/tls-test.c++
else
MAYBE_KJ_TLS_LA
=
MAYBE_KJ_TLS_TESTS
=
endif
if
LITE_MODE
if
LITE_MODE
lib_LTLIBRARIES
=
libkj.la libkj-test.la libcapnp.la
lib_LTLIBRARIES
=
libkj.la libkj-test.la libcapnp.la
else
else
lib_LTLIBRARIES
=
libkj.la libkj-test.la libkj-async.la libkj-http.la libcapnp.la libcapnp-rpc.la libcapnp-json.la libcapnpc.la
lib_LTLIBRARIES
=
libkj.la libkj-test.la libkj-async.la libkj-http.la
$(MAYBE_KJ_TLS_LA)
libcapnp.la libcapnp-rpc.la libcapnp-json.la libcapnpc.la
endif
endif
# Don't include security release in soname -- we want to replace old binaries
# Don't include security release in soname -- we want to replace old binaries
...
@@ -278,6 +288,13 @@ libkj_http_la_SOURCES= \
...
@@ -278,6 +288,13 @@ libkj_http_la_SOURCES= \
src/kj/compat/url.c++
\
src/kj/compat/url.c++
\
src/kj/compat/http.c++
\
src/kj/compat/http.c++
\
src/kj/compat/gzip.c++
src/kj/compat/gzip.c++
libkj_tls_la_LIBADD
=
libkj-async.la libkj.la
-lssl
-lcrypto
$(ASYNC_LIBS)
$(PTHREAD_LIBS)
libkj_tls_la_LDFLAGS
=
-release
$(SO_VERSION)
-no-undefined
libkj_tls_la_SOURCES
=
\
src/kj/compat/readiness-io.c++
\
src/kj/compat/tls.c++
endif
!LITE_MODE
endif
!LITE_MODE
if
!LITE_MODE
if
!LITE_MODE
...
@@ -451,6 +468,7 @@ heavy_tests = \
...
@@ -451,6 +468,7 @@ heavy_tests = \
src/kj/compat/url-test.c++
\
src/kj/compat/url-test.c++
\
src/kj/compat/http-test.c++
\
src/kj/compat/http-test.c++
\
src/kj/compat/gzip-test.c++
\
src/kj/compat/gzip-test.c++
\
$(MAYBE_KJ_TLS_TESTS)
\
src/capnp/canonicalize-test.c++
\
src/capnp/canonicalize-test.c++
\
src/capnp/capability-test.c++
\
src/capnp/capability-test.c++
\
src/capnp/membrane-test.c++
\
src/capnp/membrane-test.c++
\
...
@@ -474,6 +492,7 @@ capnp_test_LDADD = \
...
@@ -474,6 +492,7 @@ capnp_test_LDADD = \
libcapnp-json.la
\
libcapnp-json.la
\
libcapnp.la
\
libcapnp.la
\
libkj-http.la
\
libkj-http.la
\
$(MAYBE_KJ_TLS_LA)
\
libkj-async.la
\
libkj-async.la
\
libkj-test.la
\
libkj-test.la
\
libkj.la
\
libkj.la
\
...
...
c++/configure.ac
View file @
23db5e3f
...
@@ -22,6 +22,11 @@ AC_ARG_WITH([external-capnp],
...
@@ -22,6 +22,11 @@ AC_ARG_WITH([external-capnp],
one (useful for cross-compiling)])],
one (useful for cross-compiling)])],
[external_capnp=yes],[external_capnp=no])
[external_capnp=yes],[external_capnp=no])
AC_ARG_WITH([openssl],
[AS_HELP_STRING([--with-openssl],
[build libkj-tls by linking against openssl @<:@default=check@:>@])],
[],[with_openssl=check])
AC_ARG_ENABLE([reflection], [
AC_ARG_ENABLE([reflection], [
AS_HELP_STRING([--disable-reflection], [
AS_HELP_STRING([--disable-reflection], [
compile Cap'n Proto in "lite mode", in which all reflection APIs (schema.h, dynamic.h, etc.)
compile Cap'n Proto in "lite mode", in which all reflection APIs (schema.h, dynamic.h, etc.)
...
@@ -135,5 +140,27 @@ AC_SUBST([PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR])
...
@@ -135,5 +140,27 @@ AC_SUBST([PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR])
AC_CHECK_SIZEOF([void *])
AC_CHECK_SIZEOF([void *])
AC_SUBST(CMAKE_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
AC_SUBST(CMAKE_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
# Detect presence of OpenSSL, if it was not specified explicitly.
AS_IF([test "$with_openssl" = check], [
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [:], [
with_openssl=no
])
AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [:], [
with_openssl=no
], [-lcrypto])
AC_CHECK_HEADER([openssl/ssl.h], [:], [
with_openssl=no
])
AS_IF([test "$with_openssl" = no], [
AC_MSG_WARN("could not find OpenSSL -- won't build libkj-tls")
], [
with_openssl=yes
])
])
AS_IF([test "$with_openssl" != no], [
CXXFLAGS="$CXXFLAGS -DKJ_HAS_OPENSSL"
])
AM_CONDITIONAL([BUILD_KJ_TLS], [test "$with_openssl" != no])
AC_CONFIG_FILES([Makefile] CAPNP_PKG_CONFIG_FILES CAPNP_CMAKE_CONFIG_FILES)
AC_CONFIG_FILES([Makefile] CAPNP_PKG_CONFIG_FILES CAPNP_CMAKE_CONFIG_FILES)
AC_OUTPUT
AC_OUTPUT
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment