diff --git a/configure.ac b/configure.ac index be917e11..28f8df5d 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,11 @@ AC_ARG_ENABLE([maintainer-mode], [Turn on compile time warnings])], [maintainer_mode=$withval], [maintainer_mode=no]) +AC_ARG_ENABLE([src], + [AS_HELP_STRING([--enable-src], + [Build installable SPDY client/server programs in src])], + [request_src=$withval], [request_src=yes]) + AC_ARG_ENABLE([examples], [AS_HELP_STRING([--enable-examples], [Build example programs])], @@ -128,6 +133,15 @@ if test "x${have_libxml2}" = "xyes"; then fi AM_CONDITIONAL([HAVE_LIBXML2], [ test "x${have_libxml2}" = "xyes" ]) +# The src programs depend on OpenSSL +enable_src=no +if test "x${request_src}" = "xyes" && + test "x${have_openssl}" = "xyes"; then + enable_src=yes +fi + +AM_CONDITIONAL([ENABLE_SRC], [ test "x${enable_src}" = "xyes" ]) + # The example programs depend on OpenSSL enable_examples=no if test "x${request_examples}" = "xyes" && @@ -255,5 +269,6 @@ AC_MSG_NOTICE([summary of build options: OpenSSL: ${have_openssl} Libxml2: ${have_libxml2} Libevent(SSL): ${have_libevent_openssl} + Src: ${enable_src} Examples: ${enable_examples} ]) diff --git a/src/Makefile.am b/src/Makefile.am index 6cf23dce..86b9dcc4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,7 +21,7 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -if ENABLE_EXAMPLES +if ENABLE_SRC AM_CFLAGS = -Wall AM_CPPFLAGS = -Wall -I$(srcdir)/../lib/includes -I$(builddir)/../lib/includes \ @@ -92,4 +92,4 @@ shrpx_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} \ http-parser/http_parser.c http-parser/http_parser.h endif # HAVE_LIBEVENT_OPENSSL -endif # ENABLE_EXAMPLES +endif # ENABLE_SRC diff --git a/tests/Makefile.am b/tests/Makefile.am index 71b23950..21223d38 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -54,11 +54,11 @@ AM_CFLAGS = -Wall -I${top_srcdir}/lib -I${top_srcdir}/lib/includes -I${top_build TESTS = main failmalloc -if ENABLE_EXAMPLES +if ENABLE_SRC EXTRA_DIST = end_to_end.py TESTS += end_to_end.py -endif # ENABLE_EXAMPLES +endif # ENABLE_SRC endif # HAVE_CUNIT