Skip to content

Commit

Permalink
Add --enable-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 20, 2016
1 parent f4dca11 commit 02a9551
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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}])
Expand Down

0 comments on commit 02a9551

Please sign in to comment.