Kouhei Sutou 2019-03-22 09:29:11 +0900 (Fri, 22 Mar 2019) Revision: 60530c00efc43c86469395739c34a85e2a834b15 https://github.com/groonga/groonga/commit/60530c00efc43c86469395739c34a85e2a834b15 Message: Add --enable-optimize option Modified files: configure.ac Modified: configure.ac (+17 -0) =================================================================== --- configure.ac 2019-03-22 09:23:26 +0900 (f24bd7409) +++ configure.ac 2019-03-22 09:29:11 +0900 (82ebae2aa) @@ -353,6 +353,23 @@ if test "x$grn_debug" != "xno"; then fi AC_SUBST(grn_debug) +# For optimization +AC_ARG_ENABLE(optimize, + [AS_HELP_STRING([--enable-optimize], + [use optimize flags (default=no)])], + [grn_optimize="$enableval"], + [grn_optimize="no"]) +if test "x$grn_optimize" != "xno"; then + grn_optimize="yes" + if test "$CLANG" = "yes"; then + CFLAGS="$CFLAGS -O3 -march=native" + CXXFLAGS="$CXXFLAGS -O3 -march=native" + elif test "$GCC" = "yes"; then + CFLAGS="$CFLAGS -O3 -march=native" + CXXFLAGS="$CXXFLAGS -O3 -march=native" + fi +fi + AC_SEARCH_LIBS(log, m, [], [AC_MSG_ERROR("No libm found")]) AC_MSG_CHECKING([for fpclassify]) AC_LINK_IFELSE( -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190322/953328ad/attachment.html>