diff options
author | Jeff Brown <jeffbrown@google.com> | 2014-02-24 18:11:26 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2014-02-24 18:11:26 -0800 |
commit | 399dce677c821a43476eac5e07da340669d82321 (patch) | |
tree | 4d7056c3a917210096b2a5ba4c8370ba5d58c852 | |
parent | ac0e0d5f866fbce0ebf00d0ddd615464849aa83b (diff) | |
download | android_external_sqlite-399dce677c821a43476eac5e07da340669d82321.tar.gz android_external_sqlite-399dce677c821a43476eac5e07da340669d82321.tar.bz2 android_external_sqlite-399dce677c821a43476eac5e07da340669d82321.zip |
Enable ICU support in SQLite.
This makes the "icu" tokenizer available for applications to use
with full text search.
Bug: 5465099
Change-Id: I5ad9790ee126d69b68eb3d8907320e74fb89219d
-rw-r--r-- | dist/Android.mk | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/dist/Android.mk b/dist/Android.mk index 3e39229..26c4e2a 100644 --- a/dist/Android.mk +++ b/dist/Android.mk @@ -29,6 +29,14 @@ common_sqlite_flags := \ -DSQLITE_OMIT_LOAD_EXTENSION \ -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 +device_sqlite_flags := $(common_sqlite_flags) \ + -DSQLITE_ENABLE_ICU \ + -DUSE_PREAD64 \ + -Dfdatasync=fdatasync \ + -DHAVE_MALLOC_USABLE_SIZE + +host_sqlite_flags := $(common_sqlite_flags) + common_src_files := sqlite3.c # the device library @@ -40,13 +48,17 @@ ifneq ($(TARGET_ARCH),arm) LOCAL_LDLIBS += -lpthread -ldl endif -LOCAL_CFLAGS += $(common_sqlite_flags) -DUSE_PREAD64 -Dfdatasync=fdatasync \ - -DHAVE_MALLOC_USABLE_SIZE +LOCAL_CFLAGS += $(device_sqlite_flags) LOCAL_SHARED_LIBRARIES := libdl LOCAL_MODULE:= libsqlite -LOCAL_C_INCLUDES += $(call include-path-for, system-core)/cutils + +LOCAL_C_INCLUDES += \ + $(call include-path-for, system-core)/cutils \ + external/icu4c/i18n \ + external/icu4c/common + LOCAL_SHARED_LIBRARIES += liblog \ libicuuc \ libicui18n \ @@ -56,7 +68,6 @@ LOCAL_SHARED_LIBRARIES += liblog \ # include android specific methods LOCAL_WHOLE_STATIC_LIBRARIES := libsqlite3_android - include $(BUILD_SHARED_LIBRARY) @@ -64,7 +75,7 @@ ifeq ($(WITH_HOST_DALVIK),true) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) LOCAL_LDLIBS += -lpthread -ldl - LOCAL_CFLAGS += $(common_sqlite_flags) + LOCAL_CFLAGS += $(host_sqlite_flags) LOCAL_MODULE:= libsqlite LOCAL_SHARED_LIBRARIES += libicuuc-host libicui18n-host LOCAL_STATIC_LIBRARIES := liblog libutils libcutils @@ -85,7 +96,11 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := shell.c -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../android $(call include-path-for, system-core)/cutils +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/../android \ + $(call include-path-for, system-core)/cutils \ + external/icu4c/i18n \ + external/icu4c/common LOCAL_SHARED_LIBRARIES := libsqlite \ libicuuc \ @@ -96,7 +111,7 @@ ifneq ($(TARGET_ARCH),arm) LOCAL_LDLIBS += -lpthread -ldl endif -LOCAL_CFLAGS += $(common_sqlite_flags) -DUSE_PREAD64 +LOCAL_CFLAGS += $(device_sqlite_flags) LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) @@ -119,7 +134,8 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) shell.c -LOCAL_CFLAGS += $(common_sqlite_flags) -DNO_ANDROID_FUNCS=1 +LOCAL_CFLAGS += $(host_sqlite_flags) \ + -DNO_ANDROID_FUNCS=1 # sqlite3MemsysAlarm uses LOG() LOCAL_STATIC_LIBRARIES += liblog |