diff --git a/.travis.yml b/.travis.yml index 78e69d34..8d974c15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ before_script: - autoreconf -i - automake - autoconf - - ./configure --enable-werror + - ./configure --enable-werror --with-mruby script: - make - make check diff --git a/src/Makefile.am b/src/Makefile.am index 1c3d8b67..73b0c05d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -141,13 +141,16 @@ endif # HAVE_MRUBY noinst_LIBRARIES = libnghttpx.a libnghttpx_a_SOURCES = ${NGHTTPX_SRCS} -libnghttpx_a_CPPFLAGS = ${AM_CPPFLAGS} \ - -I${top_srcdir}/third-party/mruby/include @LIBMRUBY_CFLAGS@ +libnghttpx_a_CPPFLAGS = ${AM_CPPFLAGS} nghttpx_SOURCES = shrpx.cc shrpx.h nghttpx_CPPFLAGS = ${libnghttpx_a_CPPFLAGS} -nghttpx_LDADD = libnghttpx.a ${LDADD} \ - -L${top_builddir}/third-party/mruby/build/lib @LIBMRUBY_LIBS@ +nghttpx_LDADD = libnghttpx.a ${LDADD} + +if HAVE_MRUBY +nghttpx_CPPFLAGS += -I${top_srcdir}/third-party/mruby/include @LIBMRUBY_CFLAGS@ +nghttpx_LDADD += -L${top_builddir}/third-party/mruby/build/lib @LIBMRUBY_LIBS@ +endif # HAVE_MRUBY if HAVE_CUNIT check_PROGRAMS += nghttpx-unittest @@ -162,11 +165,15 @@ nghttpx_unittest_SOURCES = shrpx-unittest.cc \ buffer_test.cc buffer_test.h \ memchunk_test.cc memchunk_test.h nghttpx_unittest_CPPFLAGS = ${AM_CPPFLAGS} \ - -I${top_srcdir}/third-party/mruby/include @LIBMRUBY_CFLAGS@ \ -DNGHTTP2_TESTS_DIR=\"$(top_srcdir)/tests\" -nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} \ - -L${top_builddir}/third-party/mruby/build/lib @LIBMRUBY_LIBS@ \ - @CUNIT_LIBS@ @TESTLDADD@ +nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} @CUNIT_LIBS@ @TESTLDADD@ + +if HAVE_MRUBY +nghttpx_unittest_CPPFLAGS += \ + -I${top_srcdir}/third-party/mruby/include @LIBMRUBY_CFLAGS@ +nghttpx_unittest_LDADD += \ + -L${top_builddir}/third-party/mruby/build/lib @LIBMRUBY_LIBS@ +endif # HAVE_MRUBY TESTS += nghttpx-unittest endif # HAVE_CUNIT