Index: configure
--- configure.orig	2022-06-06 02:49:36.000000000 +0200
+++ configure	2022-06-06 09:49:03.608371000 +0200
@@ -4831,9 +4831,9 @@
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
+    CFLAGS="-O2"
   else
-    CFLAGS="-g"
+    CFLAGS=""
   fi
 else
   if test "$GCC" = yes; then
@@ -5987,9 +5987,9 @@
   CXXFLAGS=$ac_save_CXXFLAGS
 elif test $ac_cv_prog_cxx_g = yes; then
   if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
+    CXXFLAGS="-O2"
   else
-    CXXFLAGS="-g"
+    CXXFLAGS=""
   fi
 else
   if test "$GXX" = yes; then
@@ -6919,9 +6919,9 @@
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
+    CFLAGS="-O2"
   else
-    CFLAGS="-g"
+    CFLAGS=""
   fi
 else
   if test "$GCC" = yes; then
@@ -7536,7 +7536,7 @@
 NO_STRICT_ALIASING_CFLAGS=""
 NO_FLOAT_EQUAL_CFLAGS=""
 NO_BAD_FUNCTION_CAST_CFLAGS=""
-if test "$GCC" = "yes"; then
+if false; then
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wall" >&5
Index: lib/ii.c
--- lib/ii.c.orig	2022-06-06 02:43:49.000000000 +0200
+++ lib/ii.c	2022-06-06 09:49:03.609659000 +0200
@@ -2571,7 +2571,7 @@
           "<%" GRN_FMT_SIZE ">",
           context,
           POS_LOFFSET_HEADER);
-      return false;
+      return GRN_FALSE;
     }
     if ((POS_LOFFSET_TERM % 4) != 0) {
       ERR(GRN_OPERATION_NOT_SUPPORTED,
@@ -2579,10 +2579,10 @@
           "<%" GRN_FMT_SIZE ">",
           context,
           POS_LOFFSET_TERM);
-      return false;
+      return GRN_FALSE;
     }
   }
-  return true;
+  return GRN_TRUE;
 }
 
 #define POS_IS_EMBED(pos) ((pos) & 1)
@@ -4969,11 +4969,11 @@
         buffer_merge(ctx, ii, lseg, h, sb, sc, db, &dc, &merging_data);
         if (ctx->rc == GRN_SUCCESS) {
           const uint32_t actual_chunk_size = db->header.chunk_size;
-          bool need_chunk_free = true;
+          grn_bool need_chunk_free = GRN_TRUE;
           if (actual_chunk_size > 0) {
             chunk_new(ctx, ii, &dcn, actual_chunk_size);
             if (ctx->rc == GRN_SUCCESS) {
-              need_chunk_free = true;
+              need_chunk_free = GRN_TRUE;
             }
           }
           if (ctx->rc == GRN_SUCCESS) {
@@ -4986,8 +4986,8 @@
               dc = NULL;
               buffer_segment_update(ii, lseg, ds);
               ii->header.common->total_chunk_size += actual_chunk_size;
-              need_chunk_free = false;
-              merging_data.succeeded = true;
+              need_chunk_free = GRN_FALSE;
+              merging_data.succeeded = GRN_TRUE;
               if (scn != GRN_II_PSEG_NOT_ASSIGNED) {
                 chunk_free(ctx, ii, scn, sb->header.chunk_size);
                 ii->header.common->total_chunk_size -= sb->header.chunk_size;
@@ -5371,11 +5371,11 @@
           buffer_merge(ctx, ii, lseg, h, sb, sc, db0, &dc0, &merging_data);
           if (ctx->rc == GRN_SUCCESS) {
             const uint32_t actual_db0_chunk_size = db0->header.chunk_size;
-            bool need_db0_chunk_free = false;
+            grn_bool need_db0_chunk_free = GRN_FALSE;
             if (actual_db0_chunk_size > 0) {
               chunk_new(ctx, ii, &dcn0, actual_db0_chunk_size);
               if (ctx->rc == GRN_SUCCESS) {
-                need_db0_chunk_free = true;
+                need_db0_chunk_free = GRN_TRUE;
               }
             }
             if (ctx->rc == GRN_SUCCESS) {
@@ -5390,11 +5390,11 @@
                 buffer_merge(ctx, ii, lseg, h, sb, sc, db1, &dc1, &merging_data);
                 if (ctx->rc == GRN_SUCCESS) {
                   const uint32_t actual_db1_chunk_size = db1->header.chunk_size;
-                  bool need_db1_chunk_free = false;
+                  grn_bool need_db1_chunk_free = GRN_FALSE;
                   if (actual_db1_chunk_size > 0) {
                     chunk_new(ctx, ii, &dcn1, actual_db1_chunk_size);
                     if (ctx->rc == GRN_SUCCESS) {
-                      need_db1_chunk_free = true;
+                      need_db1_chunk_free = GRN_TRUE;
                     }
                   }
                   if (ctx->rc == GRN_SUCCESS) {
@@ -5415,9 +5415,9 @@
                       ii->header.common->total_chunk_size +=
                         actual_db0_chunk_size +
                         actual_db1_chunk_size;
-                      need_db0_chunk_free = false;
-                      need_db1_chunk_free = false;
-                      merging_data.succeeded = true;
+                      need_db0_chunk_free = GRN_FALSE;
+                      need_db1_chunk_free = GRN_FALSE;
+                      merging_data.succeeded = GRN_TRUE;
                       if (scn != GRN_II_PSEG_NOT_ASSIGNED) {
                         chunk_free(ctx, ii, scn, sb->header.chunk_size);
                         ii->header.common->total_chunk_size -=
Index: src/Makefile.in
--- src/Makefile.in.orig	2022-06-06 02:49:39.000000000 +0200
+++ src/Makefile.in	2022-06-06 09:55:14.206876000 +0200
@@ -554,8 +554,9 @@
 
 nodist_EXTRA_groonga_SOURCES = $(NONEXISTENT_CXX_SOURCE)
 groonga_CFLAGS = $(AM_CFLAGS) $(LIBEDIT_CFLAGS)
-groonga_LDADD = \
+groonga_LDADD = -static \
 	$(top_builddir)/lib/libgroonga.la	\
+	$(top_builddir)/vendor/onigmo-source/libonigmo.la \
 	$(LIBEDIT_LIBS)				\
 	$(MESSAGE_PACK_LIBS)
 
@@ -563,24 +564,27 @@
 	grnslap.c
 
 nodist_EXTRA_grnslap_SOURCES = $(NONEXISTENT_CXX_SOURCE)
-grnslap_LDADD = \
+grnslap_LDADD = -static \
 	$(top_builddir)/lib/libgroonga.la	\
+	$(top_builddir)/vendor/onigmo-source/libonigmo.la \
 	$(MESSAGE_PACK_LIBS)
 
 grndb_SOURCES = \
 	grndb.c
 
 nodist_EXTRA_grndb_SOURCES = $(NONEXISTENT_CXX_SOURCE)
-grndb_LDADD = \
+grndb_LDADD = -static \
 	$(top_builddir)/lib/libgroonga.la	\
+	$(top_builddir)/vendor/onigmo-source/libonigmo.la \
 	$(MESSAGE_PACK_LIBS)
 
 groonga_mruby_SOURCES = \
 	groonga_mruby.c
 
 nodist_EXTRA_groonga_mruby_SOURCES = $(NONEXISTENT_CXX_SOURCE)
-groonga_mruby_LDADD = \
+groonga_mruby_LDADD = -static \
 	$(top_builddir)/lib/libgroonga.la	\
+	$(top_builddir)/vendor/onigmo-source/libonigmo.la \
 	$(MESSAGE_PACK_LIBS)
 
 all: all-recursive
Index: src/suggest/Makefile.in
--- src/suggest/Makefile.in.orig	2022-06-06 02:49:39.000000000 +0200
+++ src/suggest/Makefile.in	2022-06-06 09:49:03.610010000 +0200
@@ -563,8 +563,9 @@
 groonga_suggest_create_dataset_CFLAGS = \
 	$(AM_CFLAGS)
 
-groonga_suggest_create_dataset_LDADD = \
-	$(top_builddir)/lib/libgroonga.la
+groonga_suggest_create_dataset_LDADD = -static \
+	$(top_builddir)/lib/libgroonga.la \
+	$(top_builddir)/vendor/onigmo-source/libonigmo.la
 
 libutil_la_SOURCES = \
 	util.c					\
