costin 01/10/26 11:25:09
Modified: jk/native README.configure configure.in
jk/native/apache-1.3 Makefile.am
jk/native/apache-2.0 Makefile.in
jk/native/common Makefile.in list.mk.in
jk/native/scripts/build rules.mk
Log:
I think now everything works fine ( at least for .so files and gmake ).
If someone else could check it would be great.
Jni is built if --enable-jni configure option is used, if something change it'll
be recompiled ( without recompiling everything else ). I'm not sure how makdepend
could be incoprorated ( probably making it write in Makefile.in ).
I'm also not sure why Makefile.am in 1.3 and Makefile.in in 2.0.
Another question - do we need Makefile in common ?
In any case, I believe the only way to get a decent build system is to replace
this mess with ant. The options should be specified in build.properties, not in
command line, and the complexity should be hidden in ant tasks, not in makefiles
and shell scripts.
Revision Changes Path
1.8 +13 -2 jakarta-tomcat-connectors/jk/native/README.configure
Index: README.configure
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/README.configure,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- README.configure 2001/07/24 16:38:44 1.7
+++ README.configure 2001/10/26 18:25:09 1.8
@@ -29,6 +29,17 @@
LDFLAGS=-lc \
./configure -with-apxs=/home2/local/apache/bin/apxs
+ Examples
+ --------
+
+ Apache2.0, JNI support:
+
+ ./configure --with-apxs=/opt/apache2/bin/apxs --with-java-home=${JAVA_HOME}
--with-java-platform=2 -enable-jni
+
+ Apache 1.3, no JNI support:
+
+ ./configure --with-apxs=/usr/sbin/apxs
+
jakarta-tomcat-connectors arguments
-----------------------------------
JVM related parameters:
@@ -65,7 +76,7 @@
APR is code is "protected" by #ifdef HAVE_APR ... #endif
JNI support:
-* --enable-jni
- Build the jni_connect.so.
+ --enable-jni
+ Build the jni_connect.so and the JNI worker.
* Not yet supported.
1.14 +7 -3 jakarta-tomcat-connectors/jk/native/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/configure.in,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- configure.in 2001/10/25 20:11:12 1.13
+++ configure.in 2001/10/26 18:25:09 1.14
@@ -1,7 +1,7 @@
dnl
dnl Process this file with autoconf to produce a configure script
dnl
-AC_REVISION($Id: configure.in,v 1.13 2001/10/25 20:11:12 costin Exp $)dnl
+AC_REVISION($Id: configure.in,v 1.14 2001/10/26 18:25:09 costin Exp $)dnl
AC_PREREQ(2.13)
AC_INIT(common/jk_ajp13.h)
@@ -13,6 +13,10 @@
AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
+dnl Not sure what it does, but the libtool manual seems to require this
+dnl It should use the native platform dlopen ( if available )
+AC_LIBTOOL_DLOPEN
+
dnl AM_PROG_LIBTOOL often causes problems.
dnl I have solved them once using aclocal --acdir=/usr/local/share/aclocal/
AM_PROG_LIBTOOL
@@ -187,7 +191,7 @@
[
AC_MSG_RESULT(jni enable (need JDK))
CFLAGS="${CFLAGS} -DHAVE_JNI"
- JK_JNI_WORKER="\${JK}/jk_jni_worker\${OEXT}"
+ JK_JNI_WORKER="\${JK}jk_jni_worker\${OEXT}"
])dnl
AC_SUBST(JK_JNI_WORKER)
@@ -406,7 +410,7 @@
fi
dnl Add common to subdir list
-WEBSERVER="common ${WEBSERVER}"
+WEBSERVER="${WEBSERVER}"
AC_SUBST(WEBSERVER)
1.4 +14 -0 jakarta-tomcat-connectors/jk/native/apache-1.3/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile.am 2001/08/03 15:42:35 1.3
+++ Makefile.am 2001/10/26 18:25:09 1.4
@@ -9,9 +9,14 @@
DESTDIR=@APACHE_DIR@
libdir=/libexec
+VPATH=.:../common
APACHE_FILES = Makefile.tmpl Makefile.libdir libjk.module
+if MAKE_DYNAMIC_APACHE
+JK=
+else
JK=../common
+endif
JK_INCL=-DUSE_APACHE_MD5 -I ${JK}
JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS}
JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L ${JAVA_HOME}/lib/${ARCH}/native_threads
@@ -26,6 +31,15 @@
lib_LTLIBRARIES = libjk.la
libjk_la_SOURCES = mod_jk.c
libjk_la_LIBADD = $(APACHE_OBJECTS)
+
+all: mod_jk.so
+
+mod_jk.la: mod_jk.lo $(APACHE_OBJECTS)
+ $(LIBTOOL) --mode=link ${COMPILE} -o $@ -module -rpath ${libexecdir}
-avoid-version mod_jk.lo $(APACHE_OBJECTS)
+
+mod_jk.so: mod_jk.la
+ $(LIBTOOL) --mode=install cp $< `pwd`/$@
+
else
1.11 +20 -15 jakarta-tomcat-connectors/jk/native/apache-2.0/Makefile.in
Index: Makefile.in
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/Makefile.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Makefile.in 2001/10/25 23:42:06 1.10
+++ Makefile.in 2001/10/26 18:25:09 1.11
@@ -7,21 +7,29 @@
APACHE_DIR=@APACHE_DIR@
MKDIR=@MKDIR@
+# Defaults
LIBTOOL=libtool
+libexecdir=${APACHE_DIR}/modules
-JK=../common
-JK_INCL=-DUSE_APACHE_MD5 -I ${JK} -DHAVE_JNI
+JK=
+# Defines APACHE_OBJECTS - the list of all common files
+include ../common/list.mk
+
+# Apache2 settings, values guessed by Apache config and used to build it
+# Will define libexecdir, LIBTOOL, etc
+include ${APACHE_DIR}/build/config_vars.mk
+
+# Local settings ( overriding/appending to Apache's )
+COMMON=../common
+JK_INCL=-DUSE_APACHE_MD5 -I ${COMMON}
JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS}
JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L ${JAVA_HOME}/lib/${ARCH}/native_threads
-CFLAGS=@apache_include@ @CFLAGS@ ${JK_INCL} ${JAVA_INCL} -D_REENTRANT -Wall
+CFLAGS=@apache_include@ @CFLAGS@ ${JK_INCL} ${JAVA_INCL} -D_REENTRANT -Wall
${EXTRA_CFLAGS} ${EXTRA_CPPFLAGS}
-include ../common/list.mk
-include ../scripts/build/rules.mk
-#include ${APACHE_DIR}/build/config_vars.mk
-LOCAL_OBJECTS=$(subst ../common/,,$(APACHE_OBJECTS))
+# Implicit rules
+include ../scripts/build/rules.mk
-# OEXT=@APACHE20_OEXT@
OEXT=.lo
all: Makefile @LIB_JK_TYPE@
@@ -31,8 +39,8 @@
echo Regenerating Makefile
( cd ..; ./config.status )
-lib_jk.la: mod_jk.lo
- $(LIBTOOL) --mode=link $(CC) -o lib_jk.la -static -rpath
${APACHE_DIR}/modules/jk mod_jk.lo $(APACHE_OBJECTS)
+lib_jk.la: mod_jk.lo ${APACHE_OBJECTS}
+ $(LIBTOOL) --mode=link $(CC) -o lib_jk.la -static -rpath ${libexecdir}
mod_jk.lo $(APACHE_OBJECTS)
install_static:
@echo ""
@@ -51,11 +59,9 @@
#################### Dynamic .so file ####################
# APXS will compile every file, this is derived from apxs
-
-mod_jk.la: mod_jk.lo $(LOCAL_OBJECTS)
- $(LIBTOOL) --mode=link ${COMPILE} -o $@ -module -rpath `pwd` -avoid-version
mod_jk.lo $(LOCAL_OBJECTS)
-#$(APXS) ${JK_INCL} ${JAVA_INCL} -c -o mod_jk.la mod_jk.c $(APACHE_OBJECTS)
+mod_jk.la: mod_jk.lo $(APACHE_OBJECTS)
+ $(LIBTOOL) --mode=link ${COMPILE} -o $@ -module -rpath ${libexecdir}
-avoid-version mod_jk.lo $(APACHE_OBJECTS)
mod_jk.so: mod_jk.la
$(LIBTOOL) --mode=install cp $< `pwd`/$@
@@ -69,6 +75,5 @@
@echo ""
clean:
-# (cd ../common && $(MAKE) clean)
rm -f *.o *.so *.lo *.la *.slo
rm -rf .libs
1.4 +2 -1 jakarta-tomcat-connectors/jk/native/common/Makefile.in
Index: Makefile.in
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/Makefile.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile.in 2001/07/06 10:22:59 1.3
+++ Makefile.in 2001/10/26 18:25:09 1.4
@@ -1,3 +1,4 @@
+#### XXXX DO we need this Makefile ????
OEXT=.lo
include list.mk
@@ -6,7 +7,7 @@
include ../scripts/build/rules.mk
-JK=.
+JK=./
all: ${APACHE_OBJECTS}
1.2 +9 -9 jakarta-tomcat-connectors/jk/native/common/list.mk.in
Index: list.mk.in
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/list.mk.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- list.mk.in 2001/06/14 14:38:14 1.1
+++ list.mk.in 2001/10/26 18:25:09 1.2
@@ -1,10 +1,10 @@
## Object needed for mod_jk for Apache-1.3
-APACHE_OBJECTS= ${JK}/jk_ajp12_worker${OEXT} ${JK}/jk_connect${OEXT} \
- ${JK}/jk_msg_buff${OEXT} ${JK}/jk_util${OEXT} \
- ${JK}/jk_ajp13${OEXT} ${JK}/jk_pool${OEXT} \
- ${JK}/jk_worker${OEXT} ${JK}/jk_ajp13_worker${OEXT} \
- ${JK}/jk_lb_worker${OEXT} ${JK}/jk_sockbuf${OEXT} \
- ${JK}/jk_map${OEXT} ${JK}/jk_uri_worker_map${OEXT} \
- ${JK}/jk_ajp14${OEXT} ${JK}/jk_ajp14_worker${OEXT} \
- ${JK}/jk_md5${OEXT} @JK_JNI_WORKER@ \
- ${JK}/jk_ajp_common${OEXT} ${JK}/jk_context${OEXT}
+APACHE_OBJECTS= ${JK}jk_ajp12_worker${OEXT} ${JK}jk_connect${OEXT} \
+ ${JK}jk_msg_buff${OEXT} ${JK}jk_util${OEXT} \
+ ${JK}jk_ajp13${OEXT} ${JK}jk_pool${OEXT} \
+ ${JK}jk_worker${OEXT} ${JK}jk_ajp13_worker${OEXT} \
+ ${JK}jk_lb_worker${OEXT} ${JK}jk_sockbuf${OEXT} \
+ ${JK}jk_map${OEXT} ${JK}jk_uri_worker_map${OEXT} \
+ ${JK}jk_ajp14${OEXT} ${JK}jk_ajp14_worker${OEXT} \
+ ${JK}jk_md5${OEXT} @JK_JNI_WORKER@ \
+ ${JK}jk_ajp_common${OEXT} ${JK}jk_context${OEXT}
1.3 +0 -3 jakarta-tomcat-connectors/jk/native/scripts/build/rules.mk
Index: rules.mk
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/scripts/build/rules.mk,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rules.mk 2001/10/25 23:34:35 1.2
+++ rules.mk 2001/10/26 18:25:09 1.3
@@ -1,9 +1,6 @@
# That an extract of what is in APR.
#
-# may be libtool as to be the one of APR (that just not to forget it).
-LIBTOOL = libtool
-
# Compile commands
VPATH=.:../common
COMPILE = $(CC) $(CFLAGS)