Skip to content

Commit

Permalink
groonga-httpd: enable mruby when --enable-mruby is specified
Browse files Browse the repository at this point in the history
When mruby is enabled for groonga-httpd, mruby is built as
a loadable module (/etc/groonga/httpd/modulesngx_http_mruby_module.so)
  • Loading branch information
kenhys committed Oct 12, 2016
1 parent 11b08a6 commit 1cba35c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure.ac
Expand Up @@ -1558,9 +1558,11 @@ if test "$enable_mruby" = "yes"; then
fi
AC_DEFINE(GRN_WITH_MRUBY, [1], [Define to 1 if mruby is enabled.])
MRUBY_CFLAGS="-I\$(top_srcdir)/vendor/mruby-source/include"
GRN_WITH_MRUBY="yes"
else
MRUBY_CFLAGS=""
fi
AC_SUBST(GRN_WITH_MRUBY)
AC_SUBST(MRUBY_CFLAGS)
AM_CONDITIONAL(WITH_MRUBY, test "$enable_mruby" = "yes")

Expand Down
1 change: 1 addition & 0 deletions groonga-httpd-conf.sh.in
Expand Up @@ -31,3 +31,4 @@ export GROONGA_HTTPD_WITH_ZLIB="@GRN_WITH_ZLIB@"
export GROONGA_HTTPD_WITH_SSL="@GRN_WITH_SSL@"
export GROONGA_HTTPD_SSL_CFLAGS="@SSL_CFLAGS@"
export GROONGA_HTTPD_SSL_LIBS_ONLY_L="@SSL_LIBS_ONLY_L@"
export GROONGA_HTTPD_WITH_MRUBY="@GRN_WITH_MRUBY@"
9 changes: 9 additions & 0 deletions src/httpd/configure
Expand Up @@ -86,6 +86,15 @@ if [ "${GROONGA_HTTPD_WITH_SSL}" = "yes" ]; then
configure_args="${configure_args} --with-http_ssl_module"
fi

nginx_mruby_directory="${top_builddir}/vendor/ngx_mruby-source"
mruby_directory="${top_srcdir}/vendor/mruby-source"
if [ "${GROONGA_HTTPD_WITH_MRUBY}" = "yes" ]; then
cd "${nginx_mruby_directory}"
./configure --with-ngx-src-root=${nginx_directory} --with-mruby-root=${mruby_directory}
make build_mruby_with_fpic
make generate_gems_config_dynamic
configure_args="${configure_args} --add-dynamic-module=${nginx_mruby_directory}"
fi

cd "${nginx_directory_in_build_directory}"

Expand Down

0 comments on commit 1cba35c

Please sign in to comment.