aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-11-22 19:44:49 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-11-22 19:44:49 +0000
commit362492e53e0d53c771e24be22c5697300b7d8f74 (patch)
treec63dd3d5d27cd2d973b8979f12acdf1339342a6c /lib
parent912bdb4db78de4a2bfe5c7db64b1fadf0de1d846 (diff)
downloadsrc-362492e53e0d53c771e24be22c5697300b7d8f74.tar.gz
src-362492e53e0d53c771e24be22c5697300b7d8f74.zip
Promote SQLite3 as a privatelib as it will also be used by mandoc
While here ensure sqlite3 is using pread(2) and enable the suppot for FTS4
Notes
Notes: svn path=/head/; revision=274885
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile1
-rw-r--r--lib/libsqlite3/Makefile38
2 files changed, 39 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 8ca673ac2a83..a5d0df52a76d 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -90,6 +90,7 @@ SUBDIR= ${SUBDIR_ORDERED} \
${_libsmb} \
${_libsmdb} \
${_libsmutil} \
+ libsqlite3 \
libstand \
libstdbuf \
libstdthreads \
diff --git a/lib/libsqlite3/Makefile b/lib/libsqlite3/Makefile
new file mode 100644
index 000000000000..78ee86d1ab83
--- /dev/null
+++ b/lib/libsqlite3/Makefile
@@ -0,0 +1,38 @@
+# $FreeBSD$
+
+PRIVATELIB= yes
+LIB= sqlite3
+SHLIB_MAJOR?= 0
+
+SRCS= sqlite3.c
+
+SQLITE= ${.CURDIR}/../../contrib/sqlite3
+.PATH: ${SQLITE}
+
+WARNS= 3
+CFLAGS+= -I${SQLITE} \
+ -DSTDC_HEADERS=1 \
+ -DHAVE_SYS_TYPES_H=1 \
+ -DHAVE_SYS_STAT_H=1 \
+ -DUSE_PREAD=1 \
+ -DHAVE_STDLIB_H=1 \
+ -DHAVE_STRING_H=1 \
+ -DHAVE_MEMORY_H=1 \
+ -DHAVE_STRINGS_H=1 \
+ -DHAVE_INTTYPES_H=1 \
+ -DHAVE_STDINT_H=1 \
+ -DHAVE_UNISTD_H=1 \
+ -DHAVE_DLFCN_H=1 \
+ -DHAVE_USLEEP=1 \
+ -DHAVE_LOCALTIME_R=1 \
+ -DHAVE_GMTIME_R=1 \
+ -DHAVE_DECL_STRERROR_R=1 \
+ -DHAVE_STRERROR_R=1 \
+ -DHAVE_POSIX_FALLOCATE=1 \
+ -D_REENTRANT=1 \
+ -DSQLITE_THREADSAFE=1 \
+ -DSQLITE_ENABLE_FTS3 \
+ -DSQLITE_ENABLE_FTS4 \
+ -DSQLITE_ENABLE_RTREE
+
+.include <bsd.lib.mk>