Made OpenSSL not mandatory. Don't build examples if OpenSSL is not found.
Spdylay library itself does not depend on OpenSSL. The example programs in examples directory do. Spdylay library should be built without OpenSSL.
This commit is contained in:
parent
efebc1e1af
commit
8251fa1315
13
configure.ac
13
configure.ac
|
@ -88,7 +88,16 @@ fi
|
||||||
AM_CONDITIONAL([HAVE_CUNIT], [ test "x${have_cunit}" = "xyes" ])
|
AM_CONDITIONAL([HAVE_CUNIT], [ test "x${have_cunit}" = "xyes" ])
|
||||||
|
|
||||||
# openssl (for examples)
|
# openssl (for examples)
|
||||||
PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1])
|
PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1],
|
||||||
|
[have_openssl=yes], [have_openssl=no])
|
||||||
|
if test "x${have_openssl}" = "xno"; then
|
||||||
|
AC_MSG_NOTICE($OPENSSL_PKG_ERRORS)
|
||||||
|
AC_MSG_NOTICE([The example programs will not be built.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# The example programs depend on OpenSSL
|
||||||
|
enable_examples=$have_openssl
|
||||||
|
AM_CONDITIONAL([ENABLE_EXAMPLES], [ test "x${enable_examples}" = "xyes" ])
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([ \
|
AC_CHECK_HEADERS([ \
|
||||||
|
@ -152,4 +161,6 @@ AC_MSG_NOTICE([summary of build options:
|
||||||
CFlags: ${CFLAGS}
|
CFlags: ${CFLAGS}
|
||||||
Library types: Shared=${enable_shared}, Static=${enable_static}
|
Library types: Shared=${enable_shared}, Static=${enable_static}
|
||||||
CUnit: ${have_cunit}
|
CUnit: ${have_cunit}
|
||||||
|
OpenSSL: ${have_openssl}
|
||||||
|
Examples: ${enable_examples}
|
||||||
])
|
])
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
if ENABLE_EXAMPLES
|
||||||
|
|
||||||
AM_CFLAGS = -Wall
|
AM_CFLAGS = -Wall
|
||||||
AM_CPPFLAGS = -Wall -I$(srcdir)/../lib/includes -I$(builddir)/../lib/includes \
|
AM_CPPFLAGS = -Wall -I$(srcdir)/../lib/includes -I$(builddir)/../lib/includes \
|
||||||
@OPENSSL_CFLAGS@ @DEFS@
|
@OPENSSL_CFLAGS@ @DEFS@
|
||||||
|
@ -63,3 +65,5 @@ spdynative_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} \
|
||||||
${SPDY_SERVER_OBJECTS} ${SPDY_SERVER_HFILES} \
|
${SPDY_SERVER_OBJECTS} ${SPDY_SERVER_HFILES} \
|
||||||
spdy.h spdynative.cc
|
spdy.h spdynative.cc
|
||||||
endif # HAVE_STDCXX_11
|
endif # HAVE_STDCXX_11
|
||||||
|
|
||||||
|
endif # ENABLE_EXAMPLES
|
||||||
|
|
|
@ -40,6 +40,12 @@ main_LDFLAGS = -static @CUNIT_LIBS@
|
||||||
AM_CFLAGS = -Wall -g -O2 -I${top_srcdir}/lib -I${top_srcdir}/lib/includes -I${top_builddir}/lib/includes \
|
AM_CFLAGS = -Wall -g -O2 -I${top_srcdir}/lib -I${top_srcdir}/lib/includes -I${top_builddir}/lib/includes \
|
||||||
@CUNIT_CFLAGS@ @DEFS@
|
@CUNIT_CFLAGS@ @DEFS@
|
||||||
|
|
||||||
TESTS = main end_to_end.py
|
TESTS = main
|
||||||
|
|
||||||
|
if ENABLE_EXAMPLES
|
||||||
|
|
||||||
|
TESTS += end_to_end.py
|
||||||
|
|
||||||
|
endif # ENABLE_EXAMPLES
|
||||||
|
|
||||||
endif # HAVE_CUNIT
|
endif # HAVE_CUNIT
|
||||||
|
|
Loading…
Reference in New Issue