Initial import.

This commit is contained in:
Gregory Burd 2007-03-10 20:04:07 +01:00
commit a04d39bc52
297 changed files with 138798 additions and 0 deletions

339
LICENSE Normal file
View file

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

109
LICENSE_EXCEPTIONS Normal file
View file

@ -0,0 +1,109 @@
FLOSS License Exception v1.0
The DBSQL Exception for Free/Libre and Open Source Software-only Applications
Using DBSQL Libraries (the "FLOSS Exception").
Version 1.0, 4 February 2007
Exception Intent
We want specified Free/Libre and Open Source Software ("FLOSS") applications
to be able to use specified GPL-licensed MySQL client libraries (the "Program")
despite the fact that not all FLOSS licenses are compatible with version 2 of
the GNU General Public License (the "GPL").
Legal Terms and Conditions
As a special exception to the terms and conditions of version 2.0 or later of
the GPL:
You are free to distribute a Derivative Work that is formed entirely from the
Program and one or more works (each, a "FLOSS Work") licensed under one or
more of the licenses listed below in section 1, as long as:
1. You obey the GPL in all respects for the Program and the Derivative
Work, except for identifiable sections of the Derivative Work which
are not derived from the Program, and which can reasonably be considered
independent and separate works in themselves,
2. all identifiable sections of the Derivative Work which are not derived
from the Program, and which can reasonably be considered independent and
separate works in themselves,
1. are distributed subject to one of the FLOSS licenses listed below,
and
2. the object code or executable form of those sections are
accompanied by the complete corresponding machine-readable source
code for those sections on the same medium and under the same
FLOSS license as the corresponding object code or executable forms
of those sections, and
3. any works which are aggregated with the Program or with a
Derivative Work on a volume of a storage or distribution medium in
accordance with the GPL, can reasonably be considered independent
and separate works in themselves which are not derivatives of
either the Program, a Derivative Work or a FLOSS Work.
If the above conditions are not met, then the Program may only be copied,
modified, distributed or used under the terms and conditions of the GPL or
another valid licensing option from The DBSQL Group, Inc.
1. FLOSS License List
License name Version(s)/Copyright Date
-----------------------------------------------------|-------------------------
Academic Free License | 2.0
Apache Software License | 1.0/1.1/2.0
Apple Public Source License | 2.0
Artistic license | From Perl 5.8.0
BSD license | "July 22 1999"
Common Development and Distribution License (CDDL) | 1.0
Common Public License | 1.0
GNU Library or "Lesser" General Public License (LGPL)| 2.0/2.1
Jabber Open Source License | 1.0
MIT License (As listed in file MIT-License.txt) | -
Mozilla Public License (MPL) | 1.0/1.1
Open Software License | 2.0
OpenSSL license (with original SSLeay license) | "2003" ("1998")
PHP License | 3.0
Python license (CNRI Python License) | -
Python Software Foundation License | 2.1.1
Sleepycat License | "1999"
University of Illinois/NCSA Open Source License | -
W3C License | "2001"
X11 License | "2001"
Zlib/libpng License | -
Zope Public License | 2.0
Due to the many variants of some of the above licenses, we require that any
version follow the 2003 version of the Free Software Foundation's Free
Software Definition (http://www.gnu.org/philosophy/free-sw.html) or version
1.9 of the Open Source Definition by the Open Source Initiative
(http://www.opensource.org/docs/definition.php).
2. Definitions
1. Terms used, but not defined, herein shall have the meaning
provided in the GPL.
2. Derivative Work means a derivative work under copyright law.
3. Applicability
This FLOSS Exception applies to all Programs that contain a notice placed by
The DBSQL Group, Inc. saying that the Program may be distributed under the
terms of this FLOSS Exception. If you create or distribute a work which is a
Derivative Work of both the Program and any other work licensed under the GPL,
then this FLOSS Exception is not available for that work; thus, you must
remove the FLOSS Exception notice from that work and comply with the GPL in
all respects, including by retaining all GPL notices. You may choose to
redistribute a copy of the Program exclusively under the terms of the GPL by
removing the FLOSS Exception notice from that copy of the Program, provided
that the copy has never been modified by you or any third party.
Appendix A. Qualified Libraries and
The following is a a non-exhaustive list of libraries and packages which are
covered by the FLOSS License Exception. Please note that appendix is merely
provided as an additional service to specific FLOSS projects who wish to
simplify licensing information for their users. Compliance with one of the
licenses noted under the "FLOSS license list" section remains a prerequisite.
Package name | Qualifying License | Version
------------------------------|--------------------------|---------------------
Apache Portable Runtime (APR) | Apache Software License | 2.0

46
README Normal file
View file

@ -0,0 +1,46 @@
DBSQL 0.2.2: (March 10, 2007)
This is version 0.2.2 of DBSQL.
To view the release and installation documentation, load the distribution
file docs/index.html into your web browser.
This work started from the SQLite project (found on the web at
http://www.sqlite.org/). SQLite and all contributions to the SQLite
project have been placed in the public domain by its author, Dr. Richard Hipp.
There was no assertion of copyright at all on the code I used as a starting
point for my work. In fact there are statements that explicitly disclaim
copyright. I am asserting copyright on this work, DBSQL. I believe
that if you examine the extent to which I've changed, updated, and
modified the SQLite code you'll respect my copyright assertion. This
is a new product, heavily inspired by another.
The goal for DBSQL is to provide a small SQL92 relational database layer
on top of the Berkeley DB database. Berkeley DB is copyright Oracle
Corporation (formerly Sleepycat Software, acquired in Feb 2006) and
licensed under the Sleepycat Public License. That license is compatible
with the GPL for open source use. Recognize that you, as someone using
DBSQL, will need to review the Sleepycat License and the GPL before you
use and redistribute your incorporating work. It is your responsibility
to comply with those licenses as I am in my work on DBSQL itself. My
motivation on a personal level is quite simple, I am in product management
these days and not in the code itself. I believe that product managers
should be engineers at heart with an ability to understand business,
politics, and software sales and support. This is my playground to keep
my engineering skills sharp enough to speak fluent geek. As a former
engineer at Sleepycat I understand and value the Berkeley DB programming
infrasture, design, and methodologies and I have liberally copied and
reused them in this project to improve SQLite in ways that I hope will
be of value to open source users out there. I did this because I see the
value of SQLite to its userbase, it is a perfect example of the 80/20
rule and the KISS method and I admire those qualities in software. My
hope is that the Berkeley DB database engine will provide some significant
features that SQLite cannot such as replication for high availability
while remaining small enough to live comfortably inside applications,
services, and devices.
Information and resources pertaining to DBSQL can be found at dbsql.org.
Commercial licenses without the restrictions found in the GPL can be
purchased for this product. See http://dbsql.org/wiki/CommercialUse

486
dist/Makefile.in vendored Normal file
View file

@ -0,0 +1,486 @@
# DBSQL - A SQL database engine.
#
# Copyright (C) 2007 The DBSQL Group, Inc. - All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# There are special exceptions to the terms and conditions of the GPL as it
# is applied to this software. View the full text of the exception in file
# LICENSE_EXCEPTIONS in the directory of this software distribution.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# http://creativecommons.org/licenses/GPL/2.0/
#
# $Id: Makefile.in 7 2007-02-03 13:34:17Z gburd $
srcdir= @srcdir@/../src
tstdir= @srcdir@/../test
distdir= @srcdir@/../dist
builddir=.
##################################################
# Installation directories and permissions.
##################################################
prefix= @prefix@
exec_prefix= @exec_prefix@
bindir= @bindir@
includedir= @includedir@
libdir= @libdir@
docdir= $(prefix)/docs
dmode= 755
emode= 555
fmode= 444
transform=@program_transform_name@
##################################################
# Paths for standard user-level commands.
##################################################
SHELL= @db_cv_path_sh@
ar= @db_cv_path_ar@
awk= @db_cv_path_awk@
chmod= @db_cv_path_chmod@
cp= @db_cv_path_cp@
depend= @db_cv_path_makedepend@
grep= @db_cv_path_grep@
ln= @db_cv_path_ln@
mkdir= @db_cv_path_mkdir@
ranlib= @db_cv_path_ranlib@
rm= @db_cv_path_rm@
rpm= @db_cv_path_rpm@
sed= @db_cv_path_sed@
perl= @db_cv_path_perl@
splint= @db_cv_path_splint@
strip= @db_cv_path_strip@
##################################################
# General library information.
##################################################
DEF_LIB= @DEFAULT_LIB@
DEF_LIB_CXX= @DEFAULT_LIB_CXX@
INSTALLER= @INSTALLER@
LIBTOOL= @LIBTOOL@
POSTLINK= @POSTLINK@
SOLINK= @MAKEFILE_SOLINK@
SOFLAGS= @SOFLAGS@
LIBMAJOR= @DBSQL_VERSION_MAJOR@
LIBVERSION= @DBSQL_VERSION_MAJOR@.@DBSQL_VERSION_MINOR@
CPPFLAGS= -I$(builddir) -I$(srcdir) @CPPFLAGS@
##################################################
# Lemon parser generator information.
##################################################
LEMON= ./lemon
LEMON_FLAGS=
##################################################
# C API.
##################################################
CFLAGS= -c $(CPPFLAGS) @CFLAGS@
CC= @MAKEFILE_CC@
CCLINK= @MAKEFILE_CCLINK@
LDFLAGS= @LDFLAGS@
LIBS= @LIBS@
LIBSO_LIBS= @LIBSO_LIBS@
libdbsql_base= libdbsql
libdbsql= $(libdbsql_base).a
libdbsql_version= $(libdbsql_base)-$(LIBVERSION).a
libso= $(libdbsql_base)-$(LIBVERSION)@SOSUFFIX@
libso_target= $(libdbsql_base)-$(LIBVERSION).la
libso_default= $(libdbsql_base)@SOSUFFIX@
libso_major= $(libdbsql_base)-$(LIBMAJOR)@SOSUFFIX@
##################################################
# Python Language Bindings
#
# Python support is optional and requires shared libraries.
##################################################
##################################################
# NOTHING BELOW THIS LINE SHOULD EVER NEED TO BE MODIFIED.
##################################################
##################################################
# Source file lists.
##################################################
C_FILES=\
$(srcdir)/api.c $(srcdir)/api_table.c $(srcdir)/cg_attach.c \
$(srcdir)/cg_auth.c $(srcdir)/cg_build.c $(srcdir)/cg_copy.c \
$(srcdir)/cg_date.c $(srcdir)/cg_delete.c $(srcdir)/cg_expr.c \
$(srcdir)/cg_insert.c $(srcdir)/cg_pragma.c $(srcdir)/cg_select.c \
$(srcdir)/cg_trigger.c $(srcdir)/cg_update.c $(srcdir)/cg_where.c \
$(srcdir)/clib/xvprintf.c $(srcdir)/dbsql/dbsql.c \
$(srcdir)/sm.c $(srcdir)/common/hash.c $(srcdir)/lemon/lemon.c \
$(srcdir)/lemon/lempar.c $(srcdir)/os/os.c $(srcdir)/clib/random.c \
$(srcdir)/sql_fns.c $(srcdir)/sql_tokenize.c \
$(srcdir)/cg_vacuum.c $(srcdir)/vdbe.c $(srcdir)/vdbe_method.c \
$(srcdir)/common/dbsql_err.c $(srcdir)/clib/snprintf.c \
$(srcdir)/os/os_jtime.c $(srcdir)/clib/memcmp.c \
$(srcdir)/clib/strcasecmp.c $(srcdir)/os/dbsql_alloc.c \
$(srcdir)/common/str.c $(srcdir)/common/dbsql_atoi.c \
$(srcdir)/common/dbsql_atof.c $(srcdir)/safety.c \
$(srcdir)/clib/strdup.c
##################################################
# Object and utility lists.
##################################################
C_OBJS= @ADDITIONAL_OBJS@ @REPLACEMENT_OBJS@ \
cg_attach@o@ cg_insert@o@ sql_tokenize@o@ cg_auth@o@ \
cg_copy@o@ api_table@o@ cg_date@o@ api@o@ xvprintf@o@ \
cg_pragma@o@ cg_where@o@ cg_trigger@o@ cg_build@o@ \
sql_fns@o@ random@o@ cg_update@o@ cg_delete@o@ hash@o@ \
cg_expr@o@ opcodes@o@ sql_parser@o@ cg_vacuum@o@ \
vdbe@o@ vdbe_method@o@ sm@o@ snprintf@o@ dbsql_err@o@ cg_select@o@ \
os_jtime@o@ memcmp@o@ dbsql_atof@o@ safety@o@ \
strcasecmp@o@ strdup@o@ dbsql_alloc@o@ str@o@ dbsql_atoi@o@
LEMON_OBJS=\
lemon@o@
UTIL_PROGS=\
@ADDITIONAL_PROGS@ \
dbsql
##################################################
# List of files installed into the library directory.
##################################################
LIB_INSTALL_FILE_LIST=\
$(libdbsql) \
$(libso) \
$(libso_default) \
$(libso_major) \
$(libdbsql_version) \
$(libso_target) \
$(libtso) \
$(libtso_default) \
$(libtso_major) \
$(libtso_static) \
$(libtso_target)
##################################################
# We're building a standard library or a RPM file hierarchy.
# Note: "all" must be the first target in the Makefile.
##################################################
all: @BUILD_TARGET@
install-strip install: all @INSTALL_TARGET@
##################################################
# Library and standard utilities build.
##################################################
library_build: @INSTALL_LIBS@ @ADDITIONAL_LANG@ $(UTIL_PROGS)
# Static C library named libdbsql.a.
$(libdbsql): $(DEF_LIB)
$(rm) -f $@
test ! -f .libs/$(libdbsql_version) || \
$(ln) -s .libs/$(libdbsql_version) $@
test -f .libs/$(libdbsql_version) || \
(test -f $(libdbsql_version) &&
$(ln) -s $(libdbsql_version) $@)
# Real static C library.
$(libdbsql_version): dbsql_int.h sql_parser.h opcodes.h $(C_OBJS)
$(ar) cr $@ $(C_OBJS)
test ! -f $(ranlib) || $(ranlib) $@
# Shared C library.
$(libso_target): dbsql_int.h sql_parser.h opcodes.h $(C_OBJS)
$(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(LIBSO_LIBS)
##################################################
# Utilities
##################################################
lemon: $(LEMON_OBJS)
$(CCLINK) -o $@ $(LDFLAGS) \
$(LEMON_OBJS) $(LIBS)
$(POSTLINK) $@
$(cp) $(srcdir)/lemon/lempar.c .
dbsql: $(DEF_LIB) dbsql@o@
$(CCLINK) -o $@ $(LDFLAGS) \
dbsql@o@ $(DEF_LIB) $(LIBS)
$(POSTLINK) $@
##################################################
# Testing.
##################################################
test: $(tstdir)/scr050/dbsql_tclsh
$(tstdir)/scr050/dbsql_tclsh $(tstdir)/quick.test
##################################################
# Library and standard utilities install.
##################################################
library_install: install_setup
library_install: install_include install_lib install_utilities install_docs
uninstall: uninstall_include uninstall_lib uninstall_utilities uninstall_docs
install_setup:
@test -d $(DESTDIR)$(prefix) || \
($(mkdir) -p $(DESTDIR)$(prefix) && \
$(chmod) $(dmode) $(DESTDIR)$(prefix))
INCDOT= dbsql.h @ADDITIONAL_INCS@
install_include:
@echo "Installing DBSQL include files: $(DESTDIR)$(includedir) ..."
@test -d $(DESTDIR)$(includedir) || \
($(mkdir) -p $(DESTDIR)$(includedir) && \
$(chmod) $(dmode) $(DESTDIR)$(includedir))
@cd $(DESTDIR)$(includedir) && $(rm) -f $(INCDOT)
@$(cp) -p $(INCDOT) $(DESTDIR)$(includedir)
@cd $(DESTDIR)$(includedir) && $(chmod) $(fmode) $(INCDOT)
uninstall_include:
@cd $(DESTDIR)$(includedir) && $(rm) -f $(INCDOT)
install_lib:
@echo "Installing DBSQL library: $(DESTDIR)$(libdir) ..."
@test -d $(DESTDIR)$(libdir) || \
($(mkdir) -p $(DESTDIR)$(libdir) && \
$(chmod) $(dmode) $(DESTDIR)$(libdir))
@cd $(DESTDIR)$(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
@$(INSTALLER) @INSTALL_LIBS@ $(DESTDIR)$(libdir)
@(cd $(DESTDIR)$(libdir) && \
test -f $(libso) && $(ln) -s $(libso) $(libso_default); \
test -f $(libso) && $(ln) -s $(libso) $(libso_major); \
test -f $(libtso) && $(ln) -s $(libtso) $(libtso_default); \
test -f $(libtso) && $(ln) -s $(libtso) $(libtso_major);
uninstall_lib:
@cd $(DESTDIR)$(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
install_utilities:
@echo "Installing DBSQL utilities: $(DESTDIR)$(bindir) ..."
@test -d $(DESTDIR)$(bindir) || \
($(mkdir) -p $(DESTDIR)$(bindir) && \
$(chmod) $(dmode) $(DESTDIR)$(bindir))
@for i in $(UTIL_PROGS); do \
$(rm) -f $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.exe; \
test -f $$i.exe && i=$$i.exe || true; \
$(INSTALLER) $$i $(DESTDIR)$(bindir)/$$i; \
test -f $(strip) && $(strip) $(DESTDIR)$(bindir)/$$i || true; \
$(chmod) $(emode) $(DESTDIR)$(bindir)/$$i; \
done
uninstall_utilities:
@(cd $(DESTDIR)$(bindir); for i in $(UTIL_PROGS); do \
$(rm) -f $$i $$i.exe; \
done)
##################################################
# RPM, build and install.
##################################################
rpm_build:
@test -f @db_cv_path_rpm_archive@ || \
(echo "@db_cv_path_rpm_archive@: archive file not found" && false)
@$(rm) -rf BUILD RPMS SOURCES SPECS SRPMS RPM_INSTALL
@$(mkdir) -p BUILD && $(chmod) $(dmode) BUILD
@$(mkdir) -p RPMS/i386 && $(chmod) $(dmode) RPMS RPMS/i386
@$(mkdir) -p SOURCES && $(chmod) $(dmode) SOURCES
@$(mkdir) -p SPECS && $(chmod) $(dmode) SPECS
@$(mkdir) -p SRPMS && $(chmod) $(dmode) SRPMS
$(cp) @db_cv_path_rpm_archive@ SOURCES/
$(cp) dbsql.spec SPECS/dbsql.spec
@RPM_BUILD@ --define="`cat rpm-macro-defines`" -ba SPECS/dbsql.spec
rpm_install:
RPM_SRPMS=dbsql-@DBSQL_VERSION_MAJOR@.@DBSQL_VERSION_MINOR@.@DBSQL_VERSION_PATCH@-1.src.rpm
##################################################
# Remaining standard Makefile targets.
##################################################
CLEAN_LIST=\
lemon
mostly-clean clean:
$(rm) -rf $(C_OBJS)
$(rm) -rf $(UTIL_PROGS) *.exe $(CLEAN_LIST)
$(rm) -rf $(JAVA_CLASSTOP) $(JAVA_EXCLASSTOP)
$(rm) -rf tags *@o@ *~ *.o *.o.lock *.lo core *.core *.loT
$(rm) -rf .libs $(LIB_INSTALL_FILE_LIST)
$(rm) -rf sql_parser.c sql_parser.h sql_parser.out
$(rm) -rf opcodes.c opcodes.h
$(rm) -rf lempar.c
$(rm) -rf test.db test?.db test.db-journal test1.bt data?.txt
$(rm) -f log.*
REALCLEAN_LIST=\
Makefile config.cache config.log config.status \
configure.lineno dbsql.h dbsql.spec dbsql_config.h \
db_int.h dbsql_int.h db_int_def.h rpm-macro-defines win_dbsql.h
distclean maintainer-clean realclean: clean
$(rm) -rf $(REALCLEAN_LIST)
$(rm) -rf libtool
check dvi info obj TAGS:
@echo "$@: make target not supported" && true
dist:
@echo "$@: make target not supported" && false
##################################################
# TODO Example programs for C.
##################################################
##################################################
# Opcodes are generated from the vdbe.[ch] files.
##################################################
opcodes.c: $(srcdir)/vdbe.c
@echo '/* Automatically generated file. Do not edit */' >opcodes.c
@echo 'char *__opcode_names[] = { "???", ' >>opcodes.c
@$(grep) '^case OP_' $(srcdir)/vdbe.c | \
$(sed) -e 's/^.*OP_/ "/' -e 's/:.*$$/", /' >>opcodes.c
@echo '};' >>opcodes.c
opcodes.h: $(srcdir)/vdbe.c
@echo '/* Automatically generated file. Do not edit */' >opcodes.h
@$(grep) '^case OP_' $(srcdir)/vdbe.c | \
$(sed) -e 's/://' | \
$(awk) '{printf "#define %-30s %3d\n", $$2, ++cnt}' >>opcodes.h
##################################################
# C API build rules.
##################################################
api@o@: $(srcdir)/api.c
$(CC) $(CFLAGS) $?
api_table@o@: $(srcdir)/api_table.c
$(CC) $(CFLAGS) $?
cg_attach@o@: $(srcdir)/cg_attach.c
$(CC) $(CFLAGS) $?
cg_auth@o@: $(srcdir)/cg_auth.c
$(CC) $(CFLAGS) $?
cg_build@o@: $(srcdir)/cg_build.c
$(CC) $(CFLAGS) $?
cg_copy@o@: $(srcdir)/cg_copy.c
$(CC) $(CFLAGS) $?
cg_date@o@: $(srcdir)/cg_date.c
$(CC) $(CFLAGS) $?
cg_delete@o@: $(srcdir)/cg_delete.c
$(CC) $(CFLAGS) $?
cg_expr@o@: $(srcdir)/cg_expr.c
$(CC) $(CFLAGS) $?
cg_insert@o@: $(srcdir)/cg_insert.c
$(CC) $(CFLAGS) $?
cg_pragma@o@: $(srcdir)/cg_pragma.c
$(CC) $(CFLAGS) $?
cg_select@o@: $(srcdir)/cg_select.c
$(CC) $(CFLAGS) $?
cg_trigger@o@: $(srcdir)/cg_trigger.c
$(CC) $(CFLAGS) $?
cg_update@o@: $(srcdir)/cg_update.c
$(CC) $(CFLAGS) $?
cg_where@o@: $(srcdir)/cg_where.c
$(CC) $(CFLAGS) $?
cg_vacuum@o@: $(srcdir)/cg_vacuum.c
$(CC) $(CFLAGS) $?
db_int.h: $(srcdir)/inc/db_int.h
@$(sed) -e 's/__DB_UNIQUE_NAME__/@DB_UNIQUE_NAME@/g' \
$(srcdir)/inc/db_int.h > db_int.h
dbsql_atof@o@: $(srcdir)/common/dbsql_atof.c
$(CC) $(CFLAGS) $?
dbsql_atoi@o@: $(srcdir)/common/dbsql_atoi.c
$(CC) $(CFLAGS) $?
dbsql_err@o@: $(srcdir)/common/dbsql_err.c
$(CC) $(CFLAGS) $?
str@o@: $(srcdir)/common/str.c
$(CC) $(CFLAGS) $?
hash@o@: $(srcdir)/common/hash.c
$(CC) $(CFLAGS) $?
opcodes.c: opcodes.h
opcodes@o@: opcodes.c
$(CC) $(CFLAGS) $?
dbsql_alloc@o@: $(srcdir)/common/dbsql_alloc.c
$(CC) $(CFLAGS) $?
os_jtime@o@: $(srcdir)/os/os_jtime.c
$(CC) $(CFLAGS) $?
lemon@o@: $(srcdir)/lemon/lemon.c
$(CC) $(CFLAGS) $?
memcmp@o@: $(srcdir)/clib/memcmp.c
$(CC) $(CFLAGS) $?
xvprintf@o@: $(srcdir)/clib/xvprintf.c
$(CC) $(CFLAGS) $?
random@o@: $(srcdir)/clib/random.c
$(CC) $(CFLAGS) $?
safety@o@: $(srcdir)/safety.c
$(CC) $(CFLAGS) $?
sm@o@: $(srcdir)/sm.c
$(CC) $(CFLAGS) $?
snprintf@o@: $(srcdir)/clib/snprintf.c
$(CC) $(CFLAGS) $?
sql_fns@o@: $(srcdir)/sql_fns.c
$(CC) $(CFLAGS) $?
sql_parser.c: $(srcdir)/sql_parser.y lemon
@$(cp) $(srcdir)/sql_parser.y .
@$(LEMON) $(LEMON_FLAGS) sql_parser.y
@$(cp) ./sql_parser.c ./_sql_parser.c
@$(sed) -e 's/dbsql_parserAlloc/__sql_parser_alloc/g' \
-e 's/dbsql_parserFree/__sql_parser_free/g' \
-e 's/dbsql_parserTrace/__sql_parser_trace/g' \
-e 's/dbsql_parser(/__sql_parser(/g' \
-e 's/__set_stringn/__str_nappend/g' \
-e 's/__set_string/__str_append/g' \
./_sql_parser.c > ./sql_parser.c
@$(rm) -f ./_sql_parser.c
@$(rm) -f ./sql_parser.y
sql_parser.h: sql_parser.c
sql_parser@o@: sql_parser.c
$(CC) $(CFLAGS) $?
sql_tokenize@o@: $(srcdir)/sql_tokenize.c
$(CC) $(CFLAGS) $?
strcasecmp@o@: $(srcdir)/clib/strcasecmp.c
$(CC) $(CFLAGS) $?
strdup@o@: $(srcdir)/clib/strdup.c
$(CC) $(CFLAGS) $?
vdbe@o@: $(srcdir)/vdbe.c
$(CC) $(CFLAGS) $?
vdbe_method@o@: $(srcdir)/vdbe_method.c
$(CC) $(CFLAGS) $?
dbsql.h: $(srcdir)/dbsql.in
@echo dbsql.h is out of date, re-configure to regenerate it.
##################################################
# Utility build rules.
##################################################
dbsql@o@: $(srcdir)/dbsql/dbsql.c
$(CC) $(CFLAGS) $?
##################################################
# Lint.
##################################################
splint:
$(splint) -nof -f $(distdir)/splint.rc -strict \
$(CPPFLAGS) @CFLAGS@ -I. $(C_FILES)
lint: splint
##################################################
# Dependencies
##################################################
#depend:
# @$(depend) -o @o@ $(CPPFLAGS) @CFLAGS@ $(C_FILES)
# @$(perl) -p -i -e 's#^@srcdir@/../src/common/##g' Makefile
# @$(perl) -p -i -e 's#^@srcdir@/../src/os/##g' Makefile
# @$(perl) -p -i -e 's#^@srcdir@/../src/clib/##g' Makefile
# @$(perl) -p -i -e 's#^@srcdir@/../src/lemon/##g' Makefile
# @$(perl) -p -i -e 's#^@srcdir@/../src/##g' Makefile
# DO NOT DELETE THIS LINE -- make depend depends on it.

31
dist/RELEASE vendored Normal file
View file

@ -0,0 +1,31 @@
# DBSQL - A SQL database engine.
#
# Copyright (C) 2007 The DBSQL Group, Inc. - All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# There are special exceptions to the terms and conditions of the GPL as it
# is applied to this software. View the full text of the exception in file
# LICENSE_EXCEPTIONS in the directory of this software distribution.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# http://creativecommons.org/licenses/GPL/2.0/
#
# $Id: RELEASE 7 2007-02-03 13:34:17Z gburd $
DBSQL_VERSION_MAJOR=0
DBSQL_VERSION_MINOR=2
DBSQL_VERSION_PATCH=2
DBSQL_VERSION="$DBSQL_VERSION_MAJOR.$DBSQL_VERSION_MINOR.$DBSQL_VERSION_PATCH"
DBSQL_VERSION_UNIQUE_NAME=`printf "_%d%03d" $DBSQL_VERSION_MAJOR $DBSQL_VERSION_MINOR`
DBSQL_RELEASE_DATE=`date "+%B %e, %Y"`
DBSQL_VERSION_STRING="DBSQL $DBSQL_VERSION: ($DBSQL_RELEASE_DATE)"

26
dist/aclocal/config.ac vendored Normal file
View file

@ -0,0 +1,26 @@
# Features we don't test for, but want the #defines to exist for
# other ports.
AH_TEMPLATE(DBSQL_WIN32,
[We use DBSQL_WIN32 much as one would use _WIN32 -- to specify that
we're using an operating system environment that supports Win32
calls and semantics. We don't use _WIN32 because Cygwin/GCC also
defines _WIN32, even though Cygwin/GCC closely emulates the Unix
environment.])
AH_TEMPLATE(HAVE_FILESYSTEM_NOTZERO,
[Define to 1 if allocated filesystem blocks are not zeroed.])
AH_TEMPLATE(HAVE_UNLINK_WITH_OPEN_FAILURE,
[Define to 1 if unlink of file with open file descriptors will fail.])
AH_BOTTOM([/*
* Exit success/failure macros.
*/
#ifndef HAVE_EXIT_SUCCESS
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#endif
#ifdef DBSQL_WIN32
#include "win_dbsql.h"
#endif])

17
dist/aclocal/cxx.ac vendored Normal file
View file

@ -0,0 +1,17 @@
# C++ checks to determine what style of headers to use and
# whether to use "using" clauses.
AC_DEFUN(AC_CXX_HAVE_STDHEADERS, [
AC_SUBST(cxx_have_stdheaders)
AC_CACHE_CHECK([whether C++ supports the ISO C++ standard includes],
db_cv_cxx_have_stdheaders,
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <iostream>
],[std::ostream *o; return 0;],
db_cv_cxx_have_stdheaders=yes, db_cv_cxx_have_stdheaders=no)
AC_LANG_RESTORE
])
if test "$db_cv_cxx_have_stdheaders" = yes; then
cxx_have_stdheaders="#define HAVE_CXX_STDHEADERS 1"
fi])

36
dist/aclocal/gcc.ac vendored Normal file
View file

@ -0,0 +1,36 @@
# Version 2.96 of gcc (shipped with RedHat Linux 7.[01] and Mandrake) had
# serious problems.
AC_DEFUN(AC_GCC_CONFIG1, [
AC_CACHE_CHECK([whether we are using gcc version 2.96],
db_cv_gcc_2_96, [
db_cv_gcc_2_96=no
if test "$GCC" = "yes"; then
GCC_VERSION=`${MAKEFILE_CC} --version`
case ${GCC_VERSION} in
2.96*)
db_cv_gcc_2_96=yes;;
esac
fi])
if test "$db_cv_gcc_2_96" = "yes"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O2/-O/'`
CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-O2/-O/'`
AC_MSG_WARN([INSTALLED GCC COMPILER HAS SERIOUS BUGS; PLEASE UPGRADE.])
AC_MSG_WARN([GCC OPTIMIZATION LEVEL SET TO -O.])
fi])
# Versions of g++ up to 2.8.0 required -fhandle-exceptions, but it is
# renamed as -fexceptions and is the default in versions 2.8.0 and after.
AC_DEFUN(AC_GCC_CONFIG2, [
AC_CACHE_CHECK([whether g++ requires -fhandle-exceptions],
db_cv_gxx_except, [
db_cv_gxx_except=no;
if test "$GXX" = "yes"; then
GXX_VERSION=`${MAKEFILE_CXX} --version`
case ${GXX_VERSION} in
1.*|2.[[01234567]].*|*-1.*|*-2.[[01234567]].*)
db_cv_gxx_except=yes;;
esac
fi])
if test "$db_cv_gxx_except" = "yes"; then
CXXFLAGS="$CXXFLAGS -fhandle-exceptions"
fi])

5867
dist/aclocal/libtool.ac vendored Normal file

File diff suppressed because it is too large Load diff

255
dist/aclocal/options.ac vendored Normal file
View file

@ -0,0 +1,255 @@
# $Id: options.ac 7 2007-02-03 13:34:17Z gburd $
# Process user-specified options.
AC_DEFUN(AM_OPTIONS_SET, [
AC_MSG_CHECKING(if --enable-utf8-encoding option specified)
AC_ARG_ENABLE(utf8-encoding,
AC_HELP_STRING([--enable-utf8-encoding],
[Encode strings as UTF-8 or ISO-8859.]),, enableval="yes")
db_cv_utf8_strings="$enableval"
case "$enableval" in
no) AC_MSG_RESULT(yes);;
yes) AC_MSG_RESULT(no);;
esac
if test "$cv_utf8_strings" = "yes"; then
ENCODING=UTF8
AC_DEFINE(DBSQL_UTF8_ENCODING)
else
ENCODING=ISO8859
AC_DEFINE(DBSQL_ISO8859_ENCODING)
fi
AH_TEMPLATE(DBSQL_ISO8859_ENCODING,
[Define to use ISO8859 string encoding.])
AH_TEMPLATE(DBSQL_UTF8_ENCODING,
[Define use UTF8 string encoding.])
AC_MSG_CHECKING(if --enable-incore-databases option specified)
AC_ARG_ENABLE(incore-databases,
AC_HELP_STRING([--enable-incore-databases],
[Enable incore databases for ATTACH and OPEN.]),, enableval="yes")
db_cv_incore_databases="$enableval"
case "$enableval" in
no) AC_MSG_RESULT(yes);;
yes) AC_MSG_RESULT(no);;
esac
if test "$db_cv_incore_databases" = "no"; then
INMEMORYDB=0
else
INMEMORYDB=1
fi
AC_DEFINE(INMEMORYDB)
AH_TEMPLATE(INMEMORYDB,
[Define to 1 to enable incore databases for ATTACH and OPEN.])
AC_MSG_CHECKING(if --enable-authentication option specified)
AC_ARG_ENABLE(authentication,
AC_HELP_STRING([--enable-authentication],
[Include authorization validation code.]),, enableval="yes")
db_cv_auth="$enableval"
case "$enableval" in
no) AC_MSG_RESULT(no);;
yes) AC_MSG_RESULT(yes);;
esac
if test "$db_cv_auth" = "no"; then
AC_DEFINE(DBSQL_OMIT_AUTHORIZATION)
fi
AH_TEMPLATE(DBSQL_OMIT_AUTHORIZATION,
[Define to 1 to omit authorization code from the build.])
AC_MSG_CHECKING(if --enable-vacuum option specified)
AC_ARG_ENABLE(vacuum,
AC_HELP_STRING([--enable-vacuum],
[Include the VACUUM command.]),, enableval="yes")
db_cv_auth="$enableval"
case "$enableval" in
no) AC_MSG_RESULT(no);;
yes) AC_MSG_RESULT(yes);;
esac
if test "$db_cv_auth" = "no"; then
AC_DEFINE(DBSQL_OMIT_VACUUM)
fi
AH_TEMPLATE(DBSQL_OMIT_VACUUM,
[Define to 1 to omit the code for the VACCUM command from the build.])
AC_MSG_CHECKING(if --enable-datetime option specified)
AC_ARG_ENABLE(enable-datetime,
AC_HELP_STRING([--enable-datetime],
[Include datetime functions.]),, enableval="yes")
db_cv_datetime="$enableval"
case "$enableval" in
no) AC_MSG_RESULT(no);;
yes) AC_MSG_RESULT(yes);;
esac
if test "$db_cv_datetime" = "no"; then
AC_DEFINE(DBSQL_OMIT_DATETIME_FUNCS)
fi
AH_TEMPLATE(DBSQL_OMIT_DATETIME_FUNCS,
[Define to 1 to omit support for datetime functions from the build.])
AC_MSG_CHECKING([if --with-berkeleydb=DIR option specified])
AC_ARG_WITH(berkeleydb,
[AC_HELP_STRING([--with-berkeleydb=DIR],
[Path of Berkeley DB. [DIR="/usr/local/BerkeleyDB.4.5"]])],
[with_berkeleydb="$withval"], [with_berkeleydb="no"])
AC_MSG_RESULT($with_berkeleydb)
# If --with-berkeleydb isn't specified, assume it's here | wc -l` -gt 0
if test "$with_berkeleydb" = "no"; then
with_berkeleydb="/usr/local/BerkeleyDB.4.5"
fi
DB_PATH="$with_berkeleydb"
if test `ls "$with_berkeleydb"/lib/libdb-*.la 2>/dev/null | wc -l` -gt 0 ; then
AC_MSG_CHECKING([for Berkeley DB version from install tree])
db_version=`ls "$with_berkeleydb"/lib/libdb-*.la | sed 's/.*db-\(.*\).la/\1/'`
AC_MSG_RESULT([$db_version])
echo "$CPPFLAGS" | grep "$with_berkeleydb/include" >/dev/null 2>&1 || CPPFLAGS="$CPPFLAGS -I$with_berkeleydb/include"
if test `ls "$with_berkeleydb"/lib/libdb-$db_version.* 2>/dev/null | wc -l` -gt 0 ; then
LIBSO_LIBS="$LIBS -L$with_berkeleydb/lib -ldb-$db_version"
else
LIBS="$LIBS -l$with_berkeleydb/lib/libdb-$db_version.a"
fi
elif test `ls /usr/local/lib/db?? 2>/dev/null | wc -l` -gt 0 ; then
AC_MSG_CHECKING([if Berkeley DB was installed using BSD ports])
db_num=`ls /usr/local/lib | grep db | grep -v lib | sed -e 's/db//' | sort -n | head -1`
db_version=`echo $db_num | sed 's/\(.\)\(.\)/\1.\2/'`
AC_MSG_RESULT([yes, $db_version])
echo "$CPPFLAGS" | grep /usr/local/include/db$db_num >/dev/null 2>&1 || CPPFLAGS="$CPPFLAGS -I/usr/local/include/db$db_num"
if test `ls /usr/local/lib/libdb-$db_version.* 2>/dev/null | wc -l` -gt 0 ; then
LIBSO_LIBS="$LIBS -L/usr/local/lib -ldb-$db_version"
else
LIBS="$LIBS -l/usr/local/lib/libdb-$db_version.a"
fi
else
AC_MSG_ERROR([$with_berkeleydb not a valid Berkeley DB install tree.])
fi
AC_MSG_CHECKING([if --with-db-uniquename=NAME option specified])
AC_ARG_WITH(db-uniquename,
[AC_HELP_STRING([--with-db-uniquename=NAME],
[Unique name used when building DB library.])],
[with_db_uniquename="$withval"], [with_db_uniquename="no"])
if test "$with_db_uniquename" = "no"; then
db_cv_uniquename="no"
DB_UNIQUE_NAME=""
AC_MSG_RESULT($with_db_uniquename)
else
db_cv_uniquename="yes"
if test "$with_db_uniquename" = "yes"; then
DB_UNIQUE_NAME="__EDIT_DB_VERSION_UNIQUE_NAME__"
else
DB_UNIQUE_NAME="$with_db_uniquename"
fi
AC_MSG_RESULT($DB_UNIQUE_NAME)
fi
AC_MSG_CHECKING(if --enable-incore-temp-databases option specified)
AC_ARG_ENABLE(incore-temp-databases,
AC_HELP_STRING([--enable-incore-temp-databases],
[Enable incore databases for temporary tables.]),, enableval="no")
db_cv_incore_temp_databases="$enableval"
case "$db_cv_incore_temp_databases" in
never)
TEMP_STORE=0
AC_MSG_RESULT([never])
;;
no)
INMEMORYDB=1
TEMP_STORE=1
AC_MSG_RESULT([no])
;;
always)
INMEMORYDB=1
TEMP_STORE=3
AC_MSG_RESULT([always])
;;
*)
INMEMORYDB=1
TEMP_STORE=2
AC_MSG_RESULT([yes])
;;
esac
AC_DEFINE(INMEMORYDB)
AH_TEMPLATE(INMEMORYDB,
[Define to 1 to enable memory resident databases.])
AC_DEFINE(TEMP_STORE)
AH_TEMPLATE(TEMP_STORE,
[Determines where TEMP databases can be stored, see table in source code.])
AC_MSG_CHECKING(if --disable-statistics option specified)
AC_ARG_ENABLE(statistics,
AC_HELP_STRING([--disable-statistics],
[Do not build statistics support.]),, enableval="yes")
db_cv_build_statistics="$enableval"
case "$enableval" in
no) AC_MSG_RESULT(yes);;
yes) AC_MSG_RESULT(no);;
esac
AC_MSG_CHECKING(if --enable-sqlite-compat option specified)
AC_ARG_ENABLE(sqlite-compat,
[AC_HELP_STRING([--enable-sqlite-compat],
[Build SQLite compatibility API.])],
[db_cv_sqlite_compat="$enable_sqlite_compat"],
[db_cv_sqlite_compat="no"])
AC_MSG_RESULT($db_cv_sqlite_compat)
AC_MSG_CHECKING(if --enable-soundex-sqlfn option specified)
AC_ARG_ENABLE(soundex-sqlfn,
[AC_HELP_STRING([--enable-soundex-sqlfn],
[Include soundex() sql function support.])],
[db_cv_sqlite_compat="$enable_soundex_sqlfn"],
[db_cv_sqlite_compat="no"])
AC_MSG_RESULT($db_cv_soundex_sqlfn)
AC_MSG_CHECKING(if --enable-posixmutexes option specified)
AC_ARG_ENABLE(posixmutexes,
[AC_HELP_STRING([--enable-posixmutexes],
[Force use of POSIX standard mutexes.])],
[db_cv_posixmutexes="$enable_posixmutexes"], [db_cv_posixmutexes="no"])
AC_MSG_RESULT($db_cv_posixmutexes)
AC_MSG_CHECKING(if --enable-debug option specified)
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug],
[Build a debugging version.])],
[db_cv_debug="$enable_debug"], [db_cv_debug="no"])
AC_MSG_RESULT($db_cv_debug)
AC_MSG_CHECKING(if --enable-diagnostic option specified)
AC_ARG_ENABLE(diagnostic,
[AC_HELP_STRING([--enable-diagnostic],
[Build a version with run-time diagnostics.])],
[db_cv_diagnostic="$enable_diagnostic"], [db_cv_diagnostic="no"])
AC_MSG_RESULT($db_cv_diagnostic)
AC_MSG_CHECKING(if --enable-tcl option specified)
AC_ARG_ENABLE(tcl,
[AC_HELP_STRING([--enable-tcl],
[Build Tcl API.])],
[db_cv_tcl="$enable_tcl"], [db_cv_tcl="no"])
AC_MSG_RESULT($db_cv_tcl)
AC_MSG_CHECKING([if --with-tcl=DIR option specified])
AC_ARG_WITH(tcl,
[AC_HELP_STRING([--with-tcl=DIR],
[Directory location of tclConfig.sh.])],
[with_tclconfig="$withval"], [with_tclconfig="no"])
AC_MSG_RESULT($with_tclconfig)
AC_MSG_CHECKING(if --enable-test option specified)
AC_ARG_ENABLE(test,
[AC_HELP_STRING([--enable-test],
[Configure to run the test suite.])],
[db_cv_test="$enable_test"], [db_cv_test="no"])
AC_MSG_RESULT($db_cv_test)
# Test requires Tcl
if test "$db_cv_test" = "yes"; then
if test "$db_cv_tcl" = "no"; then
AC_MSG_ERROR([--enable-test requires --enable-tcl])
fi
fi])

118
dist/aclocal/programs.ac vendored Normal file
View file

@ -0,0 +1,118 @@
# $Id: programs.ac 7 2007-02-03 13:34:17Z gburd $
# Check for programs used in building/installation.
AC_DEFUN(AM_PROGRAMS_SET, [
AC_CHECK_TOOL(db_cv_path_ar, ar, missing_ar)
if test "$db_cv_path_ar" = missing_ar; then
AC_MSG_ERROR([No ar utility found.])
fi
AC_CHECK_TOOL(db_cv_path_chmod, chmod, missing_chmod)
if test "$db_cv_path_chmod" = missing_chmod; then
AC_MSG_ERROR([No chmod utility found.])
fi
AC_CHECK_TOOL(db_cv_path_sed, sed, missing_sed)
if test "$db_cv_path_sed" = missing_sed; then
AC_MSG_ERROR([No sed utility found.])
fi
AC_CHECK_TOOL(db_cv_path_perl, perl, missing_perl)
if test "$db_cv_path_perl" = missing_perl; then
AC_MSG_ERROR([No perl utility found.])
fi
AC_CHECK_TOOL(db_cv_path_makedepend, makedepend, missing_makedepend)
if test "$db_cv_path_makedepend" = missing_makedepend; then
AC_MSG_RESULT([no])
db_cv_path_makedepend=echo
fi
AC_CHECK_TOOL(db_cv_path_splint, splint, missing_splint)
if test "$db_cv_path_splint" = missing_splint; then
AC_MSG_RESULT([no])
db_cv_path_splint=echo
fi
AC_CHECK_TOOL(db_cv_path_python, python, missing_python)
if test "$db_cv_path_python" = missing_python; then
AC_MSG_RESULT([no])
db_cv_path_python=echo
fi
AC_CHECK_TOOL(db_cv_path_grep, grep, missing_grep)
if test "$db_cv_path_grep" = missing_grep; then
AC_MSG_ERROR([No grep utility found.])
fi
AC_CHECK_TOOL(db_cv_path_awk, awk, missing_awk)
if test "$db_cv_path_awk" = missing_awk; then
AC_MSG_ERROR([No awk utility found.])
fi
AC_CHECK_TOOL(db_cv_path_cp, cp, missing_cp)
if test "$db_cv_path_cp" = missing_cp; then
AC_MSG_ERROR([No cp utility found.])
fi
if test "$db_cv_rpm" = "yes"; then
AC_CHECK_TOOL(path_ldconfig, ldconfig, missing_ldconfig)
AC_PATH_PROG(db_cv_path_ldconfig, $path_ldconfig, missing_ldconfig)
if test "$db_cv_path_ldconfig" != missing_ldconfig; then
RPM_POST_INSTALL="%post -p $db_cv_path_ldconfig"
RPM_POST_UNINSTALL="%postun -p $db_cv_path_ldconfig"
fi
fi
AC_CHECK_TOOL(db_cv_path_ln, ln, missing_ln)
if test "$db_cv_path_ln" = missing_ln; then
AC_MSG_ERROR([No ln utility found.])
fi
AC_CHECK_TOOL(db_cv_path_mkdir, mkdir, missing_mkdir)
if test "$db_cv_path_mkdir" = missing_mkdir; then
AC_MSG_ERROR([No mkdir utility found.])
fi
# We need a complete path for ranlib, because it doesn't exist on some
# architectures because the ar utility packages the library itself.
AC_CHECK_TOOL(path_ranlib, ranlib, missing_ranlib)
AC_PATH_PROG(db_cv_path_ranlib, $path_ranlib, missing_ranlib)
AC_CHECK_TOOL(db_cv_path_rm, rm, missing_rm)
if test "$db_cv_path_rm" = missing_rm; then
AC_MSG_ERROR([No rm utility found.])
fi
if test "$db_cv_rpm" = "yes"; then
AC_CHECK_TOOL(db_cv_path_rpm, rpm, missing_rpm)
if test "$db_cv_path_rpm" = missing_rpm; then
AC_MSG_ERROR([No rpm utility found.])
fi
fi
# We need a complete path for sh, because some implementations of make
# get upset if SHELL is set to just the command name.
AC_CHECK_TOOL(path_sh, sh, missing_sh)
AC_PATH_PROG(db_cv_path_sh, $path_sh, missing_sh)
if test "$db_cv_path_sh" = missing_sh; then
AC_MSG_ERROR([No sh utility found.])
fi
# Don't strip the binaries if --enable-debug was specified.
if test "$db_cv_debug" = yes; then
db_cv_path_strip=debug_build_no_strip
else
AC_CHECK_TOOL(path_strip, strip, missing_strip)
AC_PATH_PROG(db_cv_path_strip, $path_strip, missing_strip)
fi
if test "$db_cv_test" = "yes"; then
AC_CHECK_TOOL(db_cv_path_kill, kill, missing_kill)
if test "$db_cv_path_kill" = missing_kill; then
AC_MSG_ERROR([No kill utility found.])
fi
fi
])

47
dist/aclocal/readline.ac vendored Normal file
View file

@ -0,0 +1,47 @@
# $Id: readline.ac 7 2007-02-03 13:34:17Z gburd $
# Find a readline compatible library.
AC_DEFUN([VL_LIB_READLINE], [
AC_CACHE_CHECK([for a readline compatible library],
vl_cv_lib_readline, [
ORIG_LIBS="$LIBS"
for readline_lib in readline edit editline; do
for termcap_lib in "" termcap curses ncurses; do
if test -z "$termcap_lib"; then
TRY_LIB="-l$readline_lib"
else
TRY_LIB="-l$readline_lib -l$termcap_lib"
fi
LIBS="$ORIG_LIBS $TRY_LIB"
AC_TRY_LINK_FUNC(readline, vl_cv_lib_readline="$TRY_LIB")
if test -n "$vl_cv_lib_readline"; then
break
fi
done
if test -n "$vl_cv_lib_readline"; then
break
fi
done
if test -z "$vl_cv_lib_readline"; then
vl_cv_lib_readline="no"
LIBS="$ORIG_LIBS"
fi
])
if test "$vl_cv_lib_readline" != "no"; then
AC_DEFINE(HAVE_LIBREADLINE, 1,
[Define if you have a readline compatible library])
AC_CHECK_HEADERS(readline.h readline/readline.h)
AC_CACHE_CHECK([whether readline supports history],
vl_cv_lib_readline_history, [
vl_cv_lib_readline_history="no"
AC_TRY_LINK_FUNC(add_history, vl_cv_lib_readline_history="yes")
])
if test "$vl_cv_lib_readline_history" = "yes"; then
AC_DEFINE(HAVE_READLINE_HISTORY, 1,
[Define if your readline library has \`add_history'])
AC_CHECK_HEADERS(history.h readline/history.h)
fi
fi
])dnl

76
dist/aclocal/sosuffix.ac vendored Normal file
View file

@ -0,0 +1,76 @@
# $Id: sosuffix.ac 7 2007-02-03 13:34:17Z gburd $
# Determine shared object suffixes.
#
# Our method is to use the libtool variable $library_names_spec,
# set by using AC_PROG_LIBTOOL. This variable is a snippet of shell
# defined in terms of $versuffix, $release, $libname and $module
# We want to eval it and grab the suffix used for shared objects.
# By setting $module to yes/no, we obtain the suffixes
# used to create dlloadable, or java loadable modules.
# On many (*nix) systems, these all evaluate to .so, but there
# are some notable exceptions.
# Before calling this macro, $LIBTOOL_PROG must be set to
# the correct method of invoking libtool (e.g. $SHELL ./libtool)
# This macro is used internally to discover the suffix for the current
# settings of $module. The result is stored in $_SOSUFFIX.
AC_DEFUN(_SOSUFFIX_INTERNAL, [
versuffix=""
release=""
libname=libfoo
eval _SOSUFFIX=\"$shrext\"
if test "X$_SOSUFFIX" = "" ; then
_SOSUFFIX=".so"
if test `$LIBTOOL_PROG --config | grep build_libtool_libs | grep no` 2>/dev/null; then
if test "X$_SOSUFFIX_MESSAGE" = "X"; then
_SOSUFFIX_MESSAGE=yes
AC_MSG_WARN([libtool may not know about this architecture.])
AC_MSG_WARN([assuming $_SUFFIX suffix for dynamic libraries.])
fi
fi
fi
])
# SOSUFFIX_CONFIG will set the variable SOSUFFIX to be the
# shared library extension used for general linking, not dlopen.
AC_DEFUN(SOSUFFIX_CONFIG, [
AC_MSG_CHECKING([SOSUFFIX from libtool])
module=no
_SOSUFFIX_INTERNAL
SOSUFFIX=$_SOSUFFIX
AC_MSG_RESULT($SOSUFFIX)
AC_SUBST(SOSUFFIX)
])
# MODSUFFIX_CONFIG will set the variable MODSUFFIX to be the
# shared library extension used for dlopen'ed modules.
# To discover this, we set $module, simulating libtool's -module option.
AC_DEFUN(MODSUFFIX_CONFIG, [
AC_MSG_CHECKING([MODSUFFIX from libtool])
module=yes
_SOSUFFIX_INTERNAL
MODSUFFIX=$_SOSUFFIX
AC_MSG_RESULT($MODSUFFIX)
AC_SUBST(MODSUFFIX)
])
# JMODSUFFIX_CONFIG will set the variable JMODSUFFIX to be the
# shared library extension used JNI modules opened by Java.
# To discover this, we set $jnimodule, simulating libtool's -shrext option.
##########################################################################
# Robert Boehne: Not much point in this macro any more because apparently
# Darwin is the only OS that wants or needs the .jnilib extension.
##########################################################################
AC_DEFUN(JMODSUFFIX_CONFIG, [
AC_MSG_CHECKING([JMODSUFFIX from libtool])
module=yes
_SOSUFFIX_INTERNAL
if test `uname` = "Darwin"; then
JMODSUFFIX=".jnilib"
else
JMODSUFFIX=$_SOSUFFIX
fi
AC_MSG_RESULT($JMODSUFFIX)
AC_SUBST(JMODSUFFIX)
])

128
dist/aclocal/tcl.ac vendored Normal file
View file

@ -0,0 +1,128 @@
# $Id: tcl.ac 7 2007-02-03 13:34:17Z gburd $
# The SC_* macros in this file are from the unix/tcl.m4 files in the Tcl
# 8.3.0 distribution, with some minor changes. For this reason, license
# terms for the Berkeley DB distribution dist/aclocal/tcl.m4 file are as
# follows (copied from the license.terms file in the Tcl 8.3 distribution):
#
# This software is copyrighted by the Regents of the University of
# California, Sun Microsystems, Inc., Scriptics Corporation,
# and other parties. The following terms apply to all files associated
# with the software unless explicitly disclaimed in individual files.
#
# The authors hereby grant permission to use, copy, modify, distribute,
# and license this software and its documentation for any purpose, provided
# that existing copyright notices are retained in all copies and that this
# notice is included verbatim in any distributions. No written agreement,
# license, or royalty fee is required for any of the authorized uses.
# Modifications to this software may be copyrighted by their authors
# and need not follow the licensing terms described here, provided that
# the new terms are clearly indicated on the first page of each file where
# they apply.
#
# IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
# ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
# DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
# IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
# NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
# MODIFICATIONS.
#
# GOVERNMENT USE: If you are acquiring this software on behalf of the
# U.S. government, the Government shall have only "Restricted Rights"
# in the software and related documentation as defined in the Federal
# Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
# are acquiring the software on behalf of the Department of Defense, the
# software shall be classified as "Commercial Computer Software" and the
# Government shall have only "Restricted Rights" as defined in Clause
# 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
# authors grant the U.S. Government and others acting in its behalf
# permission to use and distribute the software in accordance with the
# terms specified in this license.
AC_DEFUN(SC_PATH_TCLCONFIG, [
AC_CACHE_VAL(ac_cv_c_tclconfig,[
# First check to see if --with-tclconfig was specified.
if test x"${with_tclconfig}" != x; then
if test -f "${with_tclconfig}/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
else
AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
fi
fi
# check in a few common install locations
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in `ls -d /usr/local/lib 2>/dev/null` ; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i; pwd)`
break
fi
done
fi
])
if test x"${ac_cv_c_tclconfig}" = x ; then
TCL_BIN_DIR="# no Tcl configs found"
AC_MSG_ERROR(can't find Tcl configuration definitions)
else
TCL_BIN_DIR=${ac_cv_c_tclconfig}
fi
AC_SUBST(TCL_BIN_DIR)
])
AC_DEFUN(SC_LOAD_TCLCONFIG, [
AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
AC_MSG_RESULT([loading])
. $TCL_BIN_DIR/tclConfig.sh
else
AC_MSG_RESULT([file not found])