OSDN Git Service

Add JAVA_HOME test for Ant.
authorBruce Momjian <bruce@momjian.us>
Fri, 6 Sep 2002 14:31:16 +0000 (14:31 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 6 Sep 2002 14:31:16 +0000 (14:31 +0000)
configure
configure.in

index 4d2c5b3..07a1436 100755 (executable)
--- a/configure
+++ b/configure
@@ -3020,6 +3020,11 @@ if test "${with_java+set}" = set; then
     yes)
       echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
+if test ! "$JAVA_HOME" -o ! -d "$JAVA_HOME" ; then
+  { { echo "$as_me:$LINENO: error: Set the JAVA_HOME environment variable to build Java components" >&5
+echo "$as_me: error: Set the JAVA_HOME environment variable to build Java components" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
   for ac_prog in jakarta-ant ant ant.sh ant.bat
 do
index fbaae6a..76c70c8 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.206 2002/09/05 18:28:45 petere Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.207 2002/09/06 14:31:16 momjian Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -371,6 +371,9 @@ AC_SUBST(with_python)
 AC_MSG_CHECKING([whether to build Java/JDBC tools])
 PGAC_ARG_BOOL(with, java, no, [  --with-java             build JDBC interface and Java tools],
 [AC_MSG_RESULT(yes)
+if test ! "$JAVA_HOME" -o ! -d "$JAVA_HOME" ; then
+  AC_MSG_ERROR([Set the JAVA_HOME environment variable to build Java components])
+fi
 PGAC_PATH_ANT
 if test -z "$ANT"; then
   AC_MSG_ERROR([Ant is required to build Java components])