Author: mturk
Date: Wed Nov 11 21:20:09 2009
New Revision: 835075
URL: http://svn.apache.org/viewvc?rev=835075&view=rev
Log:
Add sqlite to srclib
Added:
commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/
commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/README (with
props)
commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/config.h
(with props)
commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/sqlite3.c
(with props)
commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/sqlite3.h
(with props)
commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/sqlite3ext.h
(with props)
Modified:
commons/sandbox/runtime/trunk/src/main/native/Makefile.in
commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in
commons/sandbox/runtime/trunk/src/main/native/configure
Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.in
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.in?rev=835075&r1=835074&r2=835075&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.in Wed Nov 11
21:20:09 2009
@@ -77,6 +77,7 @@
$(SRCDIR)/modules/network/ssl \
$(SRCDIR)/srclib/bzip2 \
$(SRCDIR)/srclib/regex \
+ $(SRCDIR)/srclib/sqlite \
$(SRCDIR)/srclib/zlib \
$(SRCDIR)/test
@@ -313,6 +314,8 @@
OPENSSL_OBJS=\
$(SRCDIR)/modules/network/ssl/openssl.$(OBJ)
+SQLITE_OBJS= \
+ $(SRCDIR)/srclib/sqlite/sqlite3.$(OBJ)
TEST_OBJS= \
$(SRCDIR)/test/testcase.$(OBJ)
@@ -344,6 +347,9 @@
$(SRCDIR)/srclib/zlib/%.$(OBJ) : $(SRCDIR)/srclib/zlib/%.c
$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
+$(SRCDIR)/srclib/sqlite/%.$(OBJ) : $(SRCDIR)/srclib/sqlite/%.c
+ $(CC) $(CFLAGS) $(CSFLAGS) -D_HAVE_SQLITE_CONFIG_H $(CPPFLAGS)
$(INCLUDES) -c -o $@ $<
+
$(SRCDIR)/modules/network/ssl/%.$(OBJ) : $(SRCDIR)/modules/network/ssl/%.c
$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
@@ -353,12 +359,12 @@
.cpp.$(OBJ):
$(CXX) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) -c -o
$@ $<
-$(STATICLIB): $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs) $(REGEX_OBJS)
$(BZIP2_OBJS) $(ZLIB_OBJS) @testobjs@
- $(AR) $(ARFLAGS) $@ $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs)
$(REGEX_OBJS) $(BZIP2_OBJS) $(ZLIB_OBJS) @testobjs@
+$(STATICLIB): $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs) $(REGEX_OBJS)
$(BZIP2_OBJS) $(ZLIB_OBJS) @sqliteobjs@ @testobjs@
+ $(AR) $(ARFLAGS) $@ $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs)
$(REGEX_OBJS) $(BZIP2_OBJS) $(ZLIB_OBJS) @sqliteobjs@ @testobjs@
$(RANLIB) $@
-$(SHAREDLIB): $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs) $(REGEX_OBJS)
$(BZIP2_OBJS) $(ZLIB_OBJS) @testobjs@ $(STATICLIB)
- $(CC) $(SHFLAGS) $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs)
$(REGEX_OBJS) $(BZIP2_OBJS) $(ZLIB_OBJS) @testobjs@ $(LDFLAGS) -o $@
+$(SHAREDLIB): $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs) $(REGEX_OBJS)
$(BZIP2_OBJS) $(ZLIB_OBJS) @sqliteobjs@ @testobjs@ $(STATICLIB)
+ $(CC) $(SHFLAGS) $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs)
$(REGEX_OBJS) $(BZIP2_OBJS) $(ZLIB_OBJS) @sqliteobjs@ @testobjs@ $(LDFLAGS) -o
$@
$(SSLMODLIB): $(SHAREDLIB) $(OPENSSL_OBJS)
$(CC) $(EXLFLAGS) $(SHFLAGS) $(OPENSSL_OBJS) $(LDFLAGS) $(SSLFLAGS) -L.
-l$(NAME) -o $@
Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in?rev=835075&r1=835074&r2=835075&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in Wed Nov 11
21:20:09 2009
@@ -201,6 +201,9 @@
OPENSSL_OBJS=\
$(SRCDIR)/modules/network/ssl/openssl.$(OBJ)
+SQLITE_OBJS= \
+ $(SRCDIR)/srclib/sqlite/sqlite3.$(OBJ)
+
TEST_OBJS= \
$(SRCDIR)/test/testcase.$(OBJ)
@@ -221,6 +224,9 @@
{$(SRCDIR)\srclib\regex}.c{$(SRCDIR)\srclib\regex}.$(OBJ):
$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT $(INCLUDES)
-c -Fo$@ -Fd$(LIBNAME)-src $<
+{$(SRCDIR)\srclib\sqlite3}.c{$(SRCDIR)\srclib\sqlite3}.$(OBJ):
+ $(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -D_HAVE_SQLITE_CONFIG_H
-DACR_DECLARE_EXPORT $(INCLUDES) -c -Fo$@ -Fd$(LIBNAME)-src $<
+
{$(SRCDIR)\srclib\zlib}.c{$(SRCDIR)\srclib\zlib}.$(OBJ):
$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT $(INCLUDES)
-c -Fo$@ -Fd$(LIBNAME)-src $<
@@ -233,10 +239,10 @@
{$(SRCDIR)\modules\network\ssl}.c{$(SRCDIR)\modules\network\ssl}.$(OBJ):
$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -Fo$@
-Fd$(SSLNAME)-src $<
-$(SHAREDLIB): $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs) $(REGEX_OBJS)
$(BZIP2_OBJS) $(ZLIB_OBJS) @testobjs@
+$(SHAREDLIB): $(PPORT_OBJS) $(COMMON_OBJS) $(@platf...@_objs) $(REGEX_OBJS)
$(BZIP2_OBJS) $(ZLIB_OBJS) @sqliteobjs@ @testobjs@
$(RC) /l 0x409 /d "NDEBUG" /i "$(SRCDIR)\include" /fo [email protected]
$(SRCDIR)/os/win32/main.rc
$(LINK) $(SHFLAGS) $(LDFLAGS) /DLL /SUBSYSTEM:WINDOWS $(EXPORTS)
/pdb:$(LIBNAME).pdb /out:$@ @<<
- $(PPORT_OBJS) $(COMMON_OBJS) $(WINDOWS_OBJS) $(REGEX_OBJS)
$(BZIP2_OBJS) $(ZLIB_OBJS) @testobjs@ [email protected]
+ $(PPORT_OBJS) $(COMMON_OBJS) $(WINDOWS_OBJS) $(REGEX_OBJS)
$(BZIP2_OBJS) $(ZLIB_OBJS) @sqliteobjs@ @testobjs@ [email protected]
<<
IF EXIST [email protected] \
mt -nologo -manifest [email protected] -outputresource:$@;2
Modified: commons/sandbox/runtime/trunk/src/main/native/configure
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=835075&r1=835074&r2=835075&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Wed Nov 11 21:20:09
2009
@@ -99,6 +99,9 @@
has_posix_mutex=no
has_unicode=no
+has_embedded_sqlite=no
+has_sqlite=no
+have_sqlite3=0
has_openssl=no
openssl_inc=""
openssl_lib=""
@@ -196,6 +199,15 @@
has_openssl=yes
shift
;;
+ --with-sqlite )
+ has_sqlite=yes
+ shift
+ ;;
+ --with-embedded-sqlite )
+ has_embedded_sqlite=yes
+ has_sqlite=yes
+ shift
+ ;;
CC=*) cc="$a" ; shift ;;
CXX=*) cxx="$a" ; shift ;;
CPP=*) cpp="$a" ; shift ;;
@@ -1044,6 +1056,26 @@
fi
fi
+if [ ".$has_sqlite" = .yes ]; then
+ if [ ".$has_embedded_sqlite" = .yes ]; then
+ sqliteobjs='$(SQLITE_OBJS)'
+ varadds includes "-I$topdir/srclib/sqlite"
+ have_sqlite3=1
+ else
+ have_sqlite3=`have_include 0 sqlite3`
+ if [ .$have_sqlite3 = .1 ] ; then
+ if [ ".$host" = .windows ]; then
+ test ".$sqlite_lib" != . && varadds ldflags
"/libpath:\"$sqlite_lib\""
+ varadds ldflags libsqlite3.lib
+ else
+ varadds ldflags -lsqlite3
+ fi
+ fi
+ fi
+else
+ sqliteobjs=""
+fi
+
if [ ".$cc" = .gcc ]; then
if [ ${cc_ver_major}${cc_ver_minor}0 -gt 400 ]; then
varadds cppopts -DUSE_ATOMICS_BUILTINS
@@ -1089,11 +1121,13 @@
#define HAVE_OCSP $have_ocsp
#define HAVE_SELINUX_H $have_selinux
#define HAVE_PORT_H $have_port
+#define HAVE_SQLITE3_H $have_sqlite3
#define HAVE_UNISTD_H `have_include 0 unistd`
#define HAVE_STRING_H `have_include 1 string`
#define HAVE_STRINGS_H `have_include 0 strings`
#define HAVE_INTTYPES_H `have_include 0 inttypes`
+#define HAVE_STDINT_H `have_include 0 stdint`
#define HAVE_WTYPES_H `have_include 0 wtypes`
#define HAVE_DLFCN_H `have_include 0 dlfcn`
#define HAVE_LINK_H `have_include 0 link`
@@ -1228,6 +1262,7 @@
-e 's|@vpatch@|'"$vpatch"'|g' \
-e 's|@platform@|'"$platform"'|g' \
-e 's|@testobjs@|'"$testobjs"'|g' \
+ -e 's|@sqliteobjs@|'"$sqliteobjs"'|g' \
-e 's|@modules@|'"$modules"'|g' \
$topdir/$m.in > $makefile
done
Added: commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/README
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/README?rev=835075&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/README (added)
+++ commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/README Wed Nov
11 21:20:09 2009
@@ -0,0 +1,14 @@
+SQLITE
+2001 September 15
+
+The author disclaims copyright to this source code. In place of
+a legal notice, here is a blessing:
+
+ May you do good and not evil.
+ May you find forgiveness for yourself and forgive others.
+ May you share freely, never taking more than you give.
+
+
+This package contains:
+the SQLite library amalgamation (single file) source code distribution,
+version 3.6.20
Propchange: commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/README
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/config.h
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/config.h?rev=835075&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/config.h (added)
+++ commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/config.h Wed
Nov 11 21:20:09 2009
@@ -0,0 +1,32 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CONFIG_H
+#define _CONFIG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Just include our main config file
+ */
+#include "acr_config.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CONFIG_H */
Propchange: commons/sandbox/runtime/trunk/src/main/native/srclib/sqlite/config.h
------------------------------------------------------------------------------
svn:eol-style = native