pier 01/07/18 11:31:29
Modified: webapp configure.in
webapp/support apjava.m4
Log:
Changed the behaviour of --with-java to specify wether to compile the
Java sources or not.
Revision Changes Path
1.18 +11 -6 jakarta-tomcat-connectors/webapp/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/configure.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- configure.in 2001/07/15 08:44:49 1.17
+++ configure.in 2001/07/18 18:31:29 1.18
@@ -58,7 +58,7 @@
dnl --------------------------------------------------------------------------
dnl Author Pier Fumagalli <mailto:[EMAIL PROTECTED]>
dnl Author Jon S. Stevens <mailto:[EMAIL PROTECTED]>
-dnl Version $Id: configure.in,v 1.17 2001/07/15 08:44:49 pier Exp $
+dnl Version $Id: configure.in,v 1.18 2001/07/18 18:31:29 pier Exp $
dnl --------------------------------------------------------------------------
dnl --------------------------------------------------------------------------
@@ -132,14 +132,15 @@
dnl --------------------------------------------------------------------------
dnl Process the --enable-debug[=FILE] command line argument
dnl --------------------------------------------------------------------------
+AC_MSG_CHECKING([debugging flags])
AC_ARG_ENABLE(debug,
[ --enable-debug Build with full debugging output.],
[
- AC_MSG_RESULT([enabling debug output])
+ AC_MSG_RESULT([enabled])
CFLAGS="$CFLAGS -DDEBUG"
DEBUG="true"
],[
- AC_MSG_RESULT([disabling debug output])
+ AC_MSG_RESULT([disabled])
DEBUG="false"
]
)
@@ -149,8 +150,12 @@
dnl Check JAVA environment
dnl -------------------------------------------------------------------------
AP_JAVA()
-AP_PROG_JAVAC()
-AP_PROG_JAR()
+if test "${JAVA_ENABLE}" = "true"
+then
+ AP_PROG_JAVAC()
+ AP_PROG_JAR()
+ TGTDIRS="${SRCDIR}/java ${TGTDIRS}"
+fi
dnl --------------------------------------------------------------------------
dnl Process the --with-apxs[=FILE] command line argument
@@ -299,7 +304,7 @@
CPPFLAGS="-I${SRCDIR}/include -I${APRDIR}/include ${CPPFLAGS}"
AC_SUBST(CPPFLAGS)
-TGTDIRS="${SRCDIR}/java ${SRCDIR}/lib"
+TGTDIRS="${TGTDIRS} ${SRCDIR}/lib"
AC_SUBST(TGTDIRS)
CONFIGFILES="./Makedefs ./Makefile ./lib/Makefile ./java/Makefile"
1.3 +23 -14 jakarta-tomcat-connectors/webapp/support/apjava.m4
Index: apjava.m4
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/support/apjava.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- apjava.m4 2001/07/15 08:38:49 1.2
+++ apjava.m4 2001/07/18 18:31:29 1.3
@@ -57,7 +57,7 @@
dnl -------------------------------------------------------------------------
dnl Author Pier Fumagalli <mailto:[EMAIL PROTECTED]>
-dnl Version $Id: apjava.m4,v 1.2 2001/07/15 08:38:49 pier Exp $
+dnl Version $Id: apjava.m4,v 1.3 2001/07/18 18:31:29 pier Exp $
dnl -------------------------------------------------------------------------
AC_DEFUN([AP_PROG_JAVAC_WORKS],[
@@ -91,22 +91,31 @@
])
AC_DEFUN([AP_JAVA],[
- AC_ARG_WITH(jdk,
- [ --with-jdk=DIR Specify the location of your JDK installation],
+ AC_MSG_CHECKING([Java support])
+ AC_ARG_WITH(java,
+ [ --with-java[=JAVA_HOME] Build Java sources. If JAVA_HOME is not specified
+ its value will be inherited from the JAVA_HOME
+ environment variable ],
[
- AC_MSG_CHECKING([JAVA_HOME])
- if test -d "$withval"
+ case "${withval}" in
+ yes|YES|true|TRUE)
+ AC_MSG_RESULT([${JAVA_HOME}])
+ ;;
+ *)
+ JAVA_HOME="${withval}"
+ AC_MSG_RESULT([${JAVA_HOME}])
+ ;;
+ esac
+ if ! test -d "${JAVA_HOME}"
then
- JAVA_HOME="$withval"
- AC_MSG_RESULT([$JAVA_HOME])
- else
- AC_MSG_RESULT([failed])
- AC_MSG_ERROR([$withval is not a directory])
+ AC_MSG_ERROR([${JAVA_HOME} is not a directory])
fi
+ JAVA_ENABLE="true"
AC_SUBST(JAVA_HOME)
+ AC_SUBST(JAVA_ENABLE)
+ ],[
+ AC_MSG_RESULT([disabled])
+ JAVA_ENABLE="false"
+ AC_SUBST(JAVA_ENABLE)
])
- if test x"$JAVA_HOME" = x
- then
- AC_MSG_ERROR([Java Home not defined. Rerun with --with-jdk=[...] parameter])
- fi
])