Skip to content

Commit

Permalink
switch to dense/sparse hash instead of Judy
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed Sep 4, 2015
1 parent e235a54 commit 67991a7
Show file tree
Hide file tree
Showing 18 changed files with 1,186 additions and 2,134 deletions.
54 changes: 0 additions & 54 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -197,59 +197,6 @@ AC_ARG_ENABLE(static-build,
)
dnl }}}

dnl {{{ --with-judy
AC_ARG_WITH(judy,
[AS_HELP_STRING([--with-judy],[specify Judy install prefix])
],
[ ],
[with_judy=yes]
)

if test "x$with_judy" = "xno"; then
AC_MSG_ERROR([can't continue without Judy])
else
AC_MSG_CHECKING([Judy install prefix])

if test "x$with_judy" = "xyes"; then
for i in `echo "$STANDARD_PREFIXES"`; do
if test -f "$i/include/Judy.h"; then
JUDY_DIR="$i"
break;
fi
done
else

with_judy=`dir_resolve "$with_judy"`

if test -f "$with_judy/include/Judy.h"; then
JUDY_DIR="$with_judy"
else
AC_MSG_ERROR([Can't find Judy headers under $with_judy directory]);
fi
fi

if test "x$JUDY_DIR" = "x"; then
AC_MSG_ERROR([Unable to locate Judy headers, please use --with-judy=<DIR>]);
fi

AC_MSG_RESULT([$JUDY_DIR])

CXXFLAGS="$CXXFLAGS -I$JUDY_DIR/include"
CFLAGS="$CFLAGS -I$JUDY_DIR/include"

if test "$FORCE_STATIC_BUILD" = "yes"; then
LIBS="$LIBS $JUDY_DIR/$LIBDIR/libJudy.a"
else
LDFLAGS="$LDFLAGS -L$JUDY_DIR/$LIBDIR"
LIBS="$LIBS -lJudy"

if test "$PINBA_RPATH" != "no"; then
LDFLAGS="$LDFLAGS $ld_runpath_switch$JUDY_DIR/$LIBDIR"
fi
fi
fi
dnl }}}

dnl {{{ --enable-debug
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],[enable debugging symbols and compile flags])
Expand Down Expand Up @@ -287,7 +234,6 @@ if test x"$debug" = xyes ; then
INSTALL_STRIP_FLAG=""
else
AC_DEFINE([DEBUG_OFF], [1], [debug is off])
ADD_FLAGS="-DJUDYERROR_NOTEST"

dnl Make sure to strip symbols from non-developer object files.
INSTALL_STRIP_FLAG="-s"
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Used to build Makefile.in

EXTRA_DIST = ha_pinba.h pinba.h pinba_types.h pinba_limits.h pinba.pb-c.h threadpool.h protobuf-c.h pinba_regenerate_report.h pinba_regenerate_report_tpl.h pinba_update_report.h pinba_update_report_tpl.h pinba_update_report_proto.h pinba_update_report_proto_tpl.h xxhash.h pinba_map.h
EXTRA_DIST = ha_pinba.h pinba.h pinba_types.h pinba_limits.h pinba.pb-c.h threadpool.h protobuf-c.h pinba_regenerate_report.h pinba_regenerate_report_tpl.h pinba_update_report.h pinba_update_report_tpl.h pinba_update_report_proto.h pinba_update_report_proto_tpl.h xxhash.h pinba_map.h pinba_lmap.h

AM_CPPFLAGS = $(MYSQL_INC) $(DEPS_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/sparsehash/src -I$(top_builddir)/sparsehash/src

noinst_HEADERS = ha_pinba.h pinba.h pinba_types.h pinba_limits.h pinba.pb-c.h threadpool.h protobuf-c.h pinba_regenerate_report.h pinba_update_report.h pinba_update_report_proto.h xxhash.h

lib_LTLIBRARIES = libpinba_engine.la
libpinba_engine_la_SOURCES = pinba.pb-c.c ha_pinba.cc data.cc tags.cc pool.cc main.cc threadpool.cc xxhash.c pinba_map.cc
libpinba_engine_la_SOURCES = pinba.pb-c.c ha_pinba.cc data.cc tags.cc pool.cc main.cc threadpool.cc xxhash.c pinba_map.cc pinba_lmap.cc
libpinba_engine_la_LIBADD = $(DEPS_LIBS)
libpinba_engine_la_LDFLAGS = -module
Loading

0 comments on commit 67991a7

Please sign in to comment.