[Groonga-commit] groonga/groonga-normalizer-mysql at 02a9551 [master] Add --enable-debug

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Apr 20 22:32:10 JST 2016


Kouhei Sutou	2016-04-20 22:32:10 +0900 (Wed, 20 Apr 2016)

  New Revision: 02a95517539b543da0e01b74ebf48b6daa5bb5ac
  https://github.com/groonga/groonga-normalizer-mysql/commit/02a95517539b543da0e01b74ebf48b6daa5bb5ac

  Message:
    Add --enable-debug

  Modified files:
    configure.ac

  Modified: configure.ac (+24 -0)
===================================================================
--- configure.ac    2016-04-20 22:28:40 +0900 (547efae)
+++ configure.ac    2016-04-20 22:32:10 +0900 (b619622)
@@ -28,11 +28,35 @@ AM_INIT_AUTOMAKE([1.9 foreign tar-pax])
 
 AC_PROG_LIBTOOL
 
+AC_MSG_CHECKING([for clang])
+if test "$CC" = "clang"; then
+  CLANG=yes
+else
+  CLANG=no
+fi
+AC_MSG_RESULT([$CLANG])
+
 if test "$GCC" = "yes"; then
   CFLAGS="$CFLAGS -Wall -Wextra"
   CFLAGS="$CFLAGS -Wmissing-declarations -Wmissing-prototypes"
 fi
 
+# For debug
+AC_ARG_ENABLE(debug,
+  [AS_HELP_STRING([--enable-debug],
+                  [use debug flags (default=no)])],
+  [groonga_normalizer_mysql_debug="$enableval"],
+  [groonga_normalizer_mysql_debug="no"])
+if test "x$groonga_normalizer_mysql_debug" != "xno"; then
+  if test "$CLANG" = "yes"; then
+    CFLAGS="$CFLAGS -O0 -g"
+    CXXFLAGS="$CXXFLAGS -O0 -g"
+  elif test "$GCC" = "yes"; then
+    CFLAGS="$CFLAGS -O0 -g3"
+    CXXFLAGS="$CXXFLAGS -O0 -g3"
+  fi
+fi
+
 m4_define([groonga_required_version], m4_include(required_groonga_version))
 GROONGA_REQUIRED_VERSION=groonga_required_version
 PKG_CHECK_MODULES([GROONGA], [groonga >= ${GROONGA_REQUIRED_VERSION}])
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-commit mailing list
Back to archive index