null+****@clear*****
null+****@clear*****
2012年 8月 6日 (月) 22:42:57 JST
Kouhei Sutou 2012-08-06 22:42:57 +0900 (Mon, 06 Aug 2012) New Revision: cde0f69b37916277131bade2475f88ca2b906cea https://github.com/groonga/groonga/commit/cde0f69b37916277131bade2475f88ca2b906cea Log: groonga-httpd: support PCRE auto detection Modified files: configure.ac groonga-httpd-conf.sh.in vendor/nginx/configure Modified: configure.ac (+28 -1) =================================================================== --- configure.ac 2012-08-06 15:50:25 +0900 (91d663f) +++ configure.ac 2012-08-06 22:42:57 +0900 (337cdd1) @@ -1211,6 +1211,29 @@ else fi AM_CONDITIONAL(WITH_NGINX, test "$enable_nginx" = "yes") +# PCRE +WITH_PCRE=no +AC_ARG_WITH(pcre, + [AS_HELP_STRING([--without-pcre], + [use PCRE for groonga-httpd. [default=auto-detect]])], + [with_pcre="$witheval"], + [with_pcre="auto"]) +if test "x$with_pcre" != "xno"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([PCRE], [libpcre], + [_PKG_CONFIG(PCRE_LIBS_ONLY_L, [libs-only-L], [libpcre]) + WITH_PCRE=yes], + [WITH_PCRE=no]) + ], + [WITH_PCRE=no]) + if test "x$with_pcre" = "xyes" -a "$WITH_PCRE" != "yes"; then + AC_MSG_ERROR("No PCRE found") + fi +fi +AC_SUBST(WITH_PCRE) +AC_SUBST(PCRE_CFLAGS) +AC_SUBST(PCRE_LIBS_ONLY_L) + # For package AC_ARG_WITH(rsync-path, [AS_HELP_STRING([--with-rsync-path=PATH], @@ -1265,7 +1288,6 @@ echo " buildable: ${document_buildable}" echo " built: ${have_built_document}" echo " Munin plugins: ${install_munin_plugins}" echo " Package platform: ${package_platform}" -echo " groonga-httpd: ${enable_nginx}" echo echo "Paths:" echo " Install path prefix: ${prefix}" @@ -1308,6 +1330,11 @@ echo "groonga-httpd:" echo " enable: $enable_nginx" if test "$enable_nginx" = "yes"; then echo " default database path: $GROONGA_HTTPD_DEFAULT_DATABASE_PATH" + echo " PCRE: $WITH_PCRE" + if test "$WITH_PCRE" = "yes"; then + echo " CFLAGS: $PCRE_CFLAGS" + echo " LIBS only -L: $PCRE_LIBS_ONLY_L" + fi fi echo Modified: groonga-httpd-conf.sh.in (+3 -0) =================================================================== --- groonga-httpd-conf.sh.in 2012-08-06 15:50:25 +0900 (6073c04) +++ groonga-httpd-conf.sh.in 2012-08-06 22:42:57 +0900 (6cad40f) @@ -15,3 +15,6 @@ export GROONGA_HTTPD_CONF_PATH="${pkgsysconfdir}/httpd/groonga-httpd.conf" export GROONGA_HTTPD_ERROR_LOG_PATH="${localstatedir}/log/groonga/httpd/error.log" export GROONGA_HTTPD_HTTP_LOG_PATH="${localstatedir}/log/groonga/httpd/access.log" export GROONGA_HTTPD_DEBUG="@grn_debug@" +export GROONGA_HTTPD_WITH_PCRE="@WITH_PCRE@" +export GROONGA_HTTPD_PCRE_CFLAGS="@PCRE_CFLAGS@" +export GROONGA_HTTPD_PCRE_LIBS_ONLY_L="@PCRE_LIBS_ONLY_L@" Modified: vendor/nginx/configure (+10 -1) =================================================================== --- vendor/nginx/configure 2012-08-06 15:50:25 +0900 (3b463d2) +++ vendor/nginx/configure 2012-08-06 22:42:57 +0900 (adf4c24) @@ -33,6 +33,16 @@ if [ "$GROONGA_HTTPD_DEBUG" = "yes" ]; then configure_args="$configure_args --with-debug" fi +if [ "$GROONGA_HTTPD_WITH_PCRE" = "yes" ]; then + CFLAGS="$CFLAGS $GROONGA_HTTPD_PCRE_CFLAGS" + LIBS="$LIBS $GROONGA_HTTPD_PCRE_LIBS_ONLY_L" +else + configure_args="$configure_args --without-http_rewrite_module" +fi + +export CFLAGS +export LIBS + cd "../nginx-${nginx_version}" ./configure \ @@ -42,7 +52,6 @@ cd "../nginx-${nginx_version}" --error-log-path="${GROONGA_HTTPD_ERROR_LOG_PATH}" \ --http-log-path="${GROONGA_HTTPD_HTTP_LOG_PATH}" \ --add-module="${GROONGA_HTTPD_MODULE_PATH}" \ - --without-http_rewrite_module \ ${configure_args} if [ "$GROONGA_HTTPD_DEBUG" = "yes" ]; then -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B... Télécharger