Permalink
Browse files

Merge indexer branch

Conflicts:
	Makefile.am
	include/libcouchstore/couch_db.h
	src/btree_read.c
	src/couch_db.c
	src/couch_save.c
	src/db_compact.c
	src/dbdump.c
	src/internal.h
	src/node_types.h
	tests/testapp.c

Change-Id: I6e154a2b9fe9e815a6a167902f357fbd065e972a
  • Loading branch information...
apage43 committed Feb 1, 2013
2 parents cec5c09 + 8db9bae commit 0cd305422a94b835f60f67d03b19004ff5aaba36
View
@@ -35,6 +35,7 @@
/couch_compact
/couch_dbdump
/couch_dbinfo
+/couch_viewgen
/couchscript
/docs/doxy
/libcouchstore*.changes
View
@@ -15,11 +15,14 @@
# limitations under the License.
ACLOCAL_AMFLAGS = -I m4 --force
-bin_PROGRAMS = couch_dbdump couch_dbinfo couch_compact
+bin_PROGRAMS = couch_dbdump couch_dbinfo couch_compact couch_viewgen
EXTRA_DIST = python LICENSE README.md
+ICU_LOCAL_LIBS=-licuuc -licudata -licui18n
+
pkginclude_HEADERS = \
include/libcouchstore/couch_db.h \
+ include/libcouchstore/couch_index.h \
include/libcouchstore/couch_common.h \
include/libcouchstore/error.h \
include/libcouchstore/file_ops.h \
@@ -47,6 +50,8 @@ libcouchstore_la_SOURCES = \
src/bitfield.h \
src/btree_modify.c \
src/btree_read.c \
+ src/collate_json.c \
+ src/collate_json.h \
src/couch_btree.h \
src/couch_db.c \
src/couch_save.c \
@@ -59,7 +64,11 @@ libcouchstore_la_SOURCES = \
src/internal.h \
src/iobuffer.c \
src/iobuffer.h \
+ src/json_reduce.c \
+ src/json_reduce.h \
src/llmsort.c \
+ src/tree_writer.c \
+ src/tree_writer.h \
src/mergesort.c \
src/mergesort.h \
src/node_types.c \
@@ -68,7 +77,8 @@ libcouchstore_la_SOURCES = \
src/reduces.h \
src/strerror.c \
src/util.c \
- src/util.h
+ src/util.h \
+ src/couch_index.c
libcouchstore_la_LDFLAGS = $(AM_LDFLAGS) $(ICU_LOCAL_LDFLAGS) -version-info $(LIBCOUCHSTORE_API_CURRENT):$(LIBCOUCHSTORE_API_REVISION):$(LIBCOUCHSTORE_API_AGE) -no-undefined -lsnappy -lpthread
@@ -80,7 +90,7 @@ else
libcouchstore_la_SOURCES += src/os.c
endif
-libcouchstore_la_CFLAGS = $(AM_CFLAGS) $(ICU_LOCAL_CFLAGS) -DLIBCOUCHSTORE_INTERNAL=1 -Wstrict-aliasing=2
+libcouchstore_la_CFLAGS = $(AM_CFLAGS) $(ICU_LOCAL_CFLAGS) -DLIBCOUCHSTORE_INTERNAL=1 -Wstrict-aliasing=2 -pedantic
libcouchstore_la_LIBADD = librfc1321.la libbyteswap.la $(ICU_LOCAL_LIBS)
couch_dbdump_SOURCES = src/dbdump.c
@@ -89,6 +99,7 @@ couch_dbdump_CFLAGS = $(AM_CFLAGS) -D__STDC_FORMAT_MACROS
couch_dbdump_LDADD = libcouchstore.la libbyteswap.la -lsnappy
if WINDOWS
+couch_dbdump_SOURCES += win32/win32.c
couch_dbdump_LDADD += -lws2_32
endif
@@ -102,6 +113,11 @@ couch_compact_DEPENDENCIES = libcouchstore.la
couch_compact_CFLAGS = $(AM_CFLAGS) -D__STDC_FORMAT_MACROS
couch_compact_LDADD = libcouchstore.la libbyteswap.la -lsnappy
+couch_viewgen_SOURCES = src/viewgen.c
+couch_viewgen_DEPENDENCIES = libcouchstore.la
+couch_viewgen_CFLAGS = $(AM_CFLAGS) -D__STDC_FORMAT_MACROS
+couch_viewgen_LDADD = libcouchstore.la libbyteswap.la -lsnappy
+
extra_tests=
slow_tests=
@@ -147,7 +163,7 @@ CLEANFILES = test.couch
check_PROGRAMS = testapp
TESTS = ${check_PROGRAMS}
-testapp_SOURCES = tests/testapp.c src/util.c tests/macros.h
+testapp_SOURCES = tests/testapp.c src/util.c tests/macros.h tests/collate_json_test.c tests/indexer_test.c
testapp_CFLAGS = $(AM_CFLAGS)
testapp_DEPENDENCIES = libcouchstore.la libbyteswap.la
testapp_LDADD = libcouchstore.la libbyteswap.la
View
@@ -108,6 +108,28 @@ AS_IF([test "x$ac_cv_header_snappy_c_h" != "xyes"],
AS_IF([test "x${ac_cv_have_libsnappy}" != "xyes"],
[AC_MSG_ERROR(Failed to locate libsnappy)])
+AC_ARG_WITH([win32-icu-binaries], [AC_HELP_STRING([--with-win32-icu-binaries=PATH],
+ [set PATH to the Win32 native ICU binaries directory])], [
+ ICU_CONFIG="" # supposed to be a command to query options...
+ ICU_INCLUDE="$withval/include"
+ ICU_LOCAL_CFLAGS="-I$ICU_INCLUDE"
+ ICU_LIB_DIR="$withval/lib"
+ ICU_LOCAL_LDFLAGS="-L$ICU_LIB_DIR"
+ ICU_LOCAL_BIN=$withval/bin
+ AC_SUBST(ICU_INCLUDE)
+ AC_SUBST(ICU_LIB_DIR)
+], [
+ AC_CHECK_ICU([3.4.1])
+ ICU_LOCAL_CFLAGS=`$ICU_CONFIG --cppflags-searchpath`
+ ICU_LOCAL_LDFLAGS=`$ICU_CONFIG --ldflags-searchpath`
+ ICU_LOCAL_BIN=
+])
+
+AC_SUBST(ICU_CONFIG)
+AC_SUBST(ICU_LOCAL_CFLAGS)
+AC_SUBST(ICU_LOCAL_LDFLAGS)
+AC_SUBST(ICU_LOCAL_BIN)
+
AH_TOP([
#ifndef CONFIG_H
#define CONFIG_H
Oops, something went wrong.

0 comments on commit 0cd3054

Please sign in to comment.