Commit c18bb990 authored by Peter Mount's avatar Peter Mount

Ok, I've split todays commit into three, the first two already done had some
bits in JDBC & the first set of tools into contrib.

This is the third, and deals with enabling JDBC to be compiled with the main
source.

What it does is add a new option to configure: --with-java

This option tells configure to look for ant (our build tool of choice) and
if found, it then compiles both the JDBC driver and the new tools as part
of the normal make.

Also, when the postgresql install is done, all the .jar files are also
installed into the ${PGLIB}/java directory (thought best to keep then separate)

Now I had some conflicts when this applied so could someone please double check
that everything is ok?

Peter
parent 9142ca2f
dnl $Header: /cvsroot/pgsql/aclocal.m4,v 1.11 2000/11/05 21:04:05 petere Exp $
dnl $Header: /cvsroot/pgsql/aclocal.m4,v 1.12 2001/03/05 09:38:54 peter Exp $
builtin([include], [config/ac_func_accept_argtypes.m4])
builtin([include], [config/c-compiler.m4])
builtin([include], [config/c-library.m4])
builtin([include], [config/cxx.m4])
builtin([include], [config/docbook.m4])
builtin([include], [config/general.m4])
builtin([include], [config/java.m4])
builtin([include], [config/libtool.m4])
builtin([include], [config/programs.m4])
builtin([include], [config/python.m4])
......
......@@ -12,7 +12,7 @@
detect the presence of both the JDK and ANT, and if both are found
to build the jdbc driver and utils with the rest of postgresql.
$Id: build.xml,v 1.1 2001/01/18 14:50:14 peter Exp $
$Id: build.xml,v 1.2 2001/03/05 09:38:54 peter Exp $
-->
......@@ -90,5 +90,6 @@ e.g.
<ant dir="src/interfaces/jdbc" target="${target}" />
<ant dir="contrib/retep" target="${target}" />
</target>
</project>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -401,6 +401,15 @@ PGAC_PATH_PYTHONDIR],
[AC_MSG_RESULT(no)])
AC_SUBST(with_python)
#
# Optionally build the Java/JDBC tools
#
AC_MSG_CHECKING([whether to build Java/JDBC tools])
PGAC_ARG_BOOL(with, java, no, [ --with-java build JDBC interface & Java tools],
[AC_MSG_RESULT(yes)
PGAC_PROG_ANT],
[AC_MSG_RESULT(no)])
AC_SUBST(with_java)
dnl A note on the Kerberos and OpenSSL options:
dnl
......@@ -1136,6 +1145,10 @@ if test -n "$NSGMLS"; then
AC_CHECK_PROGS(SGMLSPL, sgmlspl)
fi
<<<<<<< configure.in
# Finally ready to produce output files ...
=======
# check whether 'test -ef' works
if (test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
......@@ -1143,7 +1156,15 @@ if (test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
else
test_ef_works=no
fi
>>>>>>> 1.104
<<<<<<< configure.in
if test x"$abs_top_srcdir" != x"$abs_top_builddir"; then
echo $ac_n "preparing build tree... $ac_c" 1>&6
/bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "$abs_top_builddir" \
|| AC_MSG_ERROR(failed)
AC_MSG_RESULT(done)
=======
abs_top_srcdir=
AC_SUBST(abs_top_srcdir)
......@@ -1156,6 +1177,7 @@ if test "$test_ef_works" = yes ; then
|| AC_MSG_ERROR(failed)
AC_MSG_RESULT(done)
fi
>>>>>>> 1.104
fi
AC_OUTPUT(
......
# -*-makefile-*-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.121 2001/03/03 15:53:41 petere Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.122 2001/03/05 09:39:51 peter Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
......@@ -107,6 +107,7 @@ odbcinst_ini_dir = @odbcinst_ini_dir@
# Records the choice of the various --enable-xxx and --with-xxx options.
with_CXX = @with_CXX@
with_java = @with_java@
with_perl = @with_perl@
with_python = @with_python@
with_tcl = @with_tcl@
......@@ -174,6 +175,7 @@ X = @EXEEXT@
# Miscellaneous
ANT = @ANT@
AWK = @AWK@
LN_S = @LN_S@
PERL = @PERL@
......
......@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.43 2000/09/25 22:23:00 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.44 2001/03/05 09:39:52 peter Exp $
#
#-------------------------------------------------------------------------
......@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
DIRS := libpq ecpg libpgeasy
ALLDIRS := $(DIRS) odbc libpq++ libpgtcl perl5 python
ALLDIRS := $(DIRS) odbc libpq++ libpgtcl perl5 python jdbc
ifeq ($(enable_odbc), yes)
DIRS += odbc
......@@ -36,6 +36,10 @@ ifeq ($(with_python), yes)
DIRS += python
endif
ifeq ($(with_java), yes)
DIRS += jdbc
endif
all install installdirs uninstall dep depend distprep:
@for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done
......
Fri Mar 02 10:00:00 GMT 2001 peter@retep.org.uk
- Fixed build.xml so that PGclob is not built in the JDBC1.2 driver
Fri Feb 17 18:25:00 GMT 2001 peter@retep.org.uk
- Removed the last deprecation warnings from the Java2 driver. Now only
the old examples give deprecation warnings.
- Added a new class into core that (JDK1.3+) ensures all connections are
closed when the VM terminates.
Fri Feb 17 15:11:00 GMT 2001 peter@retep.org.uk
- Reduced the object overhead in PreparedStatement by reusing the same
StringBuffer object throughout. Similarly SimpleDateStamp's are alse
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
build file to allow ant (http://jakarta.apache.org/ant/) to be used
to build the PostgreSQL JDBC Driver.
$Id: build.xml,v 1.6 2001/02/14 17:45:13 peter Exp $
$Id: build.xml,v 1.7 2001/03/05 09:40:01 peter Exp $
-->
......@@ -63,6 +63,7 @@
<!-- comment out 1.3+ stuff -->
<property name="jdk13only" value="//" />
<available property="jdk13only" value="" classname="java.lang.StrictMath" />
<filter token="JDK1.3ONLY" value="${jdk13only}" />
<!-- Some defaults -->
<filter token="MAJORVERSION" value="${major}" />
......@@ -98,9 +99,11 @@
<target name="compile" depends="prepare,check_versions,driver">
<javac srcdir="${src}" destdir="${dest}">
<include name="${package}/**" />
<exclude name="${package}/core/ConnectionHook.java" unless="jdk1.3+" />
<exclude name="${package}/jdbc1/**" if="jdk1.2+" />
<exclude name="${package}/jdbc2/**" unless="jdk1.2+" />
<exclude name="${package}/largeobject/PGblob.java" unless="jdk1.2+" />
<exclude name="${package}/largeobject/PGclob.java" unless="jdk1.2+" />
<exclude name="${package}/PostgresqlDataSource.java" unless="jdk1.2e+" />
<exclude name="${package}/xa/**" unless="jdk1.2e+" />
<exclude name="${package}/test/**" unless="junit" />
......
......@@ -9,7 +9,7 @@
<property category="sys" name="CheckStable" value="1" />
<property category="sys" name="Company" value="" />
<property category="sys" name="Copyright" value="Copyright (c) 2001" />
<property category="sys" name="DefaultPackage" value="org.postgresql.test.jdbc2" />
<property category="sys" name="DefaultPackage" value="org.postgresql.core" />
<property category="sys" name="Description" value="" />
<property category="sys" name="DocPath" value="doc" />
<property category="sys" name="ExcludeClassEnabled" value="0" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment