Re: jk2/apr patch v2

2003-11-04 Thread jean-frederic clere
Kurt Miller wrote:
Thanks to jean-frederic clere for input on this. Ok, here goes again... ;-)

Attached is a patch that makes the following changes for building jk2 via
configure and make:
1) Introduces a new configure argument called --enable-apr-threads=val for
use with --with-apr. This argument allows for threading to be configured for
apr because apr doesn't always guess threading the same way apache is
configured.
2) Changes --with-apr to configure apr while configuring jk2. This allows
for the correct naming of the apr library name instead of hard coding it and
compiler consistency with apache13 (I copied stuff from the webapp connector
for this)
3) Added compiler consistency checks for apache13 and apache2. The same
compiler must be used for jk2 as was used for apache. For apache13 a side
effect is that apr is also configured to use the same compiler (picked up
via the environment).
4) Added checks to force the use of --with-apr for apache13 and disallow use
of --with-apr for apache2.
Please review and consider for committing if there are no issues or
objections.
+++
+APR_LDFLAGS=${APR_DIR}/.libs/${APR_LDFLAGS}
+++
That is still weird...
--apr-la-file gives the path to the apr library when installed. (better than 
--link-libtool).
I think we should install the library something like:
+++
$(LIBTOOL) --mode=install \
  cp $(APR_DIR)/$(APR_LIBNAME) $(LIB_DIR)/$(APR_LIBNAME)
$(LIBTOOL) --mode=finish $(LIB_DIR)
+++

Anyway the proposed patch is already much better than the actual code.


-Kurt





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jk2/apr patch v2

2003-11-04 Thread Henri Gomez
jean-frederic clere a écrit :

Kurt Miller wrote:

Thanks to jean-frederic clere for input on this. Ok, here goes 
again... ;-)

Attached is a patch that makes the following changes for building jk2 via
configure and make:
1) Introduces a new configure argument called 
--enable-apr-threads=val for
use with --with-apr. This argument allows for threading to be 
configured for
apr because apr doesn't always guess threading the same way apache is
configured.

2) Changes --with-apr to configure apr while configuring jk2. This allows
for the correct naming of the apr library name instead of hard coding 
it and
compiler consistency with apache13 (I copied stuff from the webapp 
connector
for this)

3) Added compiler consistency checks for apache13 and apache2. The same
compiler must be used for jk2 as was used for apache. For apache13 a side
effect is that apr is also configured to use the same compiler (picked up
via the environment).
4) Added checks to force the use of --with-apr for apache13 and 
disallow use
of --with-apr for apache2.

Please review and consider for committing if there are no issues or
objections.


+++
+APR_LDFLAGS=${APR_DIR}/.libs/${APR_LDFLAGS}
+++
That is still weird...
--apr-la-file gives the path to the apr library when installed. (better 
than --link-libtool).
I think we should install the library something like:
+++
$(LIBTOOL) --mode=install \
  cp $(APR_DIR)/$(APR_LIBNAME) $(LIB_DIR)/$(APR_LIBNAME)
$(LIBTOOL) --mode=finish $(LIB_DIR)
+++

Anyway the proposed patch is already much better than the actual code.
Ok, I'll commit it asap

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jk2/apr patch v2

2003-11-04 Thread Kurt Miller
From: jean-frederic clere [EMAIL PROTECTED]
 Kurt Miller wrote:
  Thanks to jean-frederic clere for input on this. Ok, here goes again...
;-)
 
  Attached is a patch that makes the following changes for building jk2
via
  configure and make:
 
  1) Introduces a new configure argument called --enable-apr-threads=val
for
  use with --with-apr. This argument allows for threading to be configured
for
  apr because apr doesn't always guess threading the same way apache is
  configured.
 
  2) Changes --with-apr to configure apr while configuring jk2. This
allows
  for the correct naming of the apr library name instead of hard coding it
and
  compiler consistency with apache13 (I copied stuff from the webapp
connector
  for this)
 
  3) Added compiler consistency checks for apache13 and apache2. The same
  compiler must be used for jk2 as was used for apache. For apache13 a
side
  effect is that apr is also configured to use the same compiler (picked
up
  via the environment).
 
  4) Added checks to force the use of --with-apr for apache13 and disallow
use
  of --with-apr for apache2.
 
  Please review and consider for committing if there are no issues or
  objections.

 +++
 +APR_LDFLAGS=${APR_DIR}/.libs/${APR_LDFLAGS}
 +++
 That is still weird...

Yea. I was hoping that apr-config would let me know where the .a file was,
but it only tells you where the .la file is and there not in the same place.

 --apr-la-file gives the path to the apr library when installed. (better
than
 --link-libtool).
 I think we should install the library something like:
 +++
  $(LIBTOOL) --mode=install \
cp $(APR_DIR)/$(APR_LIBNAME) $(LIB_DIR)/$(APR_LIBNAME)
  $(LIBTOOL) --mode=finish $(LIB_DIR)
 +++

Humm. I kinda like not having apr installed since we're staticly linking it
in. For apache13 we're forcing them to build from source but I'm not sure
that an install of apr should be forced too. I guess it conceivable that apr
could already be installed and used by other applications (subversion
maybe?), but be configured differently then is needed for jk2/apache13.


 Anyway the proposed patch is already much better than the actual code.


Thanks. :)

On another thread I noted that jk_md5 is now depending on apr-util. Since
I'm familiar with the m4 macros now would it be worthwhile for me to make a
patch to add configure support for apr-util following the same pattern as
apr? I'd be focusing on the apache13 case only (--with-apr-util) since that
is what I can test easily now.

-Kurt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jk2/apr patch

2003-11-03 Thread jean-frederic clere
Kurt Miller wrote:
From: jean-frederic clere [EMAIL PROTECTED]

Kurt Miller wrote:

Ok thanks for the heads up, I've look briefly at wa_apr.m4 now. I've got
a

question or two I think there are two cases:

1) when --with-apr is specified
2) when --with-apr-include and --with-apr-lib are specified
In case one the apr src directory is given and jk2 builds apr using the
apr-build target in the native2 makefile. The apr-build target does a
./configure  make for apr when building jk2. When configuring jk2,
apr-config is not guaranteed to be available.
Right apr-config is not available before configuring apr.


The webapp connector required apr to be built from source for Apache13
and

configured apr while configuring itself. Should jk2 also make this
requirement?
Yes.


It appears the webapp connector did it to ensure the same
complier was used and that apr was configured without threads for
Apache13.

In the second case the apr src dir is not specified, so apr-config is
not

available again. The webap connector used it to get the lib name. I'm
not

sure what the best method for determining the lib name in this case.
Currently the the lib name is hardcoded to libapr.a for apache13 and
libapr-0 for apache2. Any suggestions?
find + awk?
+++
NUMVERAPR=`find ${tempval} -name *.la | awk -F - '{ print $2 }' | awk -F
. '{

print $1 }'
APR_LDFLAGS=-lapr-${NUMVERAPR} -L${tempval}
+++


Before I start making a patch, I'd like to make sure I've got the new
behavior nailed down...
It seems like there is some conflicting stuff going on. Apr may need to be
configured without threads at times (without for Apache13 on OpenBSD and
Apache2 on FreeBSD 4.7 (pre fork MPM)). When using --with-apr currently it
doesn't specify with or without threads while configuring apr. So it just
guesses and will likely be with threads at times it shouldn't be.
I'd like to add a new configure argument called --with-apr-threads that will
indicated if apr should be with or without threads. This argument will
ignored, unless -with-apr is also specified and will used to configure apr.
Not sure what the default should be.
It is possible to configure apr with --enable-threads=pthread or 
--enable-threads=system_threads.

Currently --with-apr-include and --with-apr-lib override --with-apr. So I'm
thinking after all three arguments have been processed do the following if
APR_BUILD is not empty:
1) For Apache13 and Apache2 get the compiler used by apxs.
2) configure apr with --enable-static --disable-shared (override
compiler for Apache13 and Apache2) --with-threads or
--without-threads based on the --with-apr-threads argument.
3) Use apr-config to get lib name.
In --with-apr-lib processing set the lib name using your find + awk
technique.
Does the above sound acceptable so far?
For Apache13 yes. For Apache2 no, Apache2 contains a compiled apr we must use 
this one. (And may be give an error when using 
--with-apr-include/-with-apr-lib/--with-apr and --with-apxs2).

Hummm, if neither --with-apr or --with-apr-lib is specified what do we do
for the lib name (it may be there already for Apache2)?
-Kurt

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jk2/apr patch

2003-11-03 Thread Henri Gomez
Ok,

Who is handling today the many configure/m4 suggestions ?

BTW, I'm using Redhat 9.0 and the apr-config is available so it should 
be a common situation even when it's a distro and not by hand build

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jk2/apr patch

2003-11-03 Thread Kurt Miller
From: Henri Gomez [EMAIL PROTECTED]
 Ok,

 Who is handling today the many configure/m4 suggestions ?

 BTW, I'm using Redhat 9.0 and the apr-config is available so it should
 be a common situation even when it's a distro and not by hand build


Hi Henri,

I'm about completed with the patch for the Apache13 case (--with-apr) that I
described earlier in this thread. I'll post it for review later-today.
Thanks for the commits ;-)

-Kurt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jk2/apr patch

2003-11-03 Thread Kurt Miller
From: jean-frederic clere [EMAIL PROTECTED]
 Kurt Miller wrote:
  Before I start making a patch, I'd like to make sure I've got the new
  behavior nailed down...
 
  It seems like there is some conflicting stuff going on. Apr may need to
be
  configured without threads at times (without for Apache13 on OpenBSD and
  Apache2 on FreeBSD 4.7 (pre fork MPM)). When using --with-apr currently
it
  doesn't specify with or without threads while configuring apr. So it
just
  guesses and will likely be with threads at times it shouldn't be.
 
  I'd like to add a new configure argument called --with-apr-threads that
will
  indicated if apr should be with or without threads. This argument will
  ignored, unless -with-apr is also specified and will used to configure
apr.
  Not sure what the default should be.

 It is possible to configure apr with --enable-threads=pthread or
 --enable-threads=system_threads.

Ok, I'll make it called --enable-apr-threads=val. If not specified, it
will just let apr configure take its guess.


 
  Currently --with-apr-include and --with-apr-lib override --with-apr. So
I'm
  thinking after all three arguments have been processed do the following
if
  APR_BUILD is not empty:
  1) For Apache13 and Apache2 get the compiler used by apxs.
  2) configure apr with --enable-static --disable-shared (override
  compiler for Apache13 and Apache2) --with-threads or
  --without-threads based on the --with-apr-threads argument.
  3) Use apr-config to get lib name.
 
  In --with-apr-lib processing set the lib name using your find + awk
  technique.
 
  Does the above sound acceptable so far?

 For Apache13 yes. For Apache2 no, Apache2 contains a compiled apr we must
use
 this one. (And may be give an error when using
 --with-apr-include/-with-apr-lib/--with-apr and --with-apxs2).


Ok, just for Apache13. For Apache2 give an error when --with-apr is
specified, but how should lib name be found if --with-apr-lib is not also
given with --with-apxs2? (Currently the lib name is hardcoded in
servers/Apache2/Makefile.in) I don't have Apache2 setup yet, so I can't
check it out myself. Maybe I should leave Apache2 changes till later or
someone else.

 
  Hummm, if neither --with-apr or --with-apr-lib is specified what do we
do
  for the lib name (it may be there already for Apache2)?
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jk2/apr patch

2003-10-31 Thread jean-frederic clere
Kurt Miller wrote:
Checking out the apache2 makefile it looks like apr-0 is right. Here's a revised
patch (I missed a spot).
Index: jk/support/jk_apr.m4
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
retrieving revision 1.3
diff -u -r1.3 jk_apr.m4
--- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
+++ jk/support/jk_apr.m4 30 Oct 2003 22:11:05 -
@@ -99,7 +99,7 @@
 APR_CLEAN=apr-clean
 APR_DIR=${tempval}
 APR_INCDIR=${tempval}/include
-APR_LDFLAGS=${tempval}/.libs/libapr.a
+APR_LDFLAGS=${tempval}/.libs/libapr-0.a
 APR_LIBDIR=
use_apr=true
 COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
@@ -189,7 +189,7 @@
   APR_CLEAN=
   APR_DIR=
   APR_LIBDIR=${tempval}
-  APR_LDFLAGS=-lapr -L${tempval}
+  APR_LDFLAGS=-lapr-0 -L${tempval}
   COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
  use_apr=true
 fi
- Original Message - 
From: Kurt Miller [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 4:32 PM
Subject: jk2/apr patch



Getting ready for jk2 requiring apr (even for Apache13)... Building jk2
using:
./configure --with-apxs=/usr/sbin/apxs --with-apr=apr src loc  make

linking fails because the apr library is not named libapr.a it is named
libapr-0.a. I'm not sure if this naming problem is universal for all
platforms, but libapr-0.a appears to be the correct name for OpenBSD,
FreeBSD and NetBSD. If it is universal then here's a quick patch to change
it:
Index: jk/support/jk_apr.m4
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
retrieving revision 1.3
diff -u -r1.3 jk_apr.m4
--- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
+++ jk/support/jk_apr.m4 30 Oct 2003 21:03:16 -
@@ -99,7 +99,7 @@
APR_CLEAN=apr-clean
APR_DIR=${tempval}
APR_INCDIR=${tempval}/include
-APR_LDFLAGS=${tempval}/.libs/libapr.a
+APR_LDFLAGS=${tempval}/.libs/libapr-0.a
APR_LIBDIR=
   use_apr=true
COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
If this name needs to be libapr.a for other platforms, then I guess I
could

patch the apr-build target in Makefile.in to rename it. Any thoughts?
-1. We have to use apr-config to get the name of the apr library.
Look in the web-app deprecated code (in wa_apr.m4).
-Kurt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jk2/apr patch

2003-10-31 Thread jean-frederic clere
Clere, Jean-Frederic wrote:
Kurt Miller wrote:

Checking out the apache2 makefile it looks like apr-0 is right. Here's 
a revised
patch (I missed a spot).

Index: jk/support/jk_apr.m4
===
RCS file: 
/home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
retrieving revision 1.3
diff -u -r1.3 jk_apr.m4
--- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
+++ jk/support/jk_apr.m4 30 Oct 2003 22:11:05 -
@@ -99,7 +99,7 @@
 APR_CLEAN=apr-clean
 APR_DIR=${tempval}
 APR_INCDIR=${tempval}/include
-APR_LDFLAGS=${tempval}/.libs/libapr.a
+APR_LDFLAGS=${tempval}/.libs/libapr-0.a
 APR_LIBDIR=
use_apr=true
 COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
@@ -189,7 +189,7 @@
   APR_CLEAN=
   APR_DIR=
   APR_LIBDIR=${tempval}
-  APR_LDFLAGS=-lapr -L${tempval}
+  APR_LDFLAGS=-lapr-0 -L${tempval}
   COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
  use_apr=true
 fi

- Original Message - From: Kurt Miller [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 4:32 PM
Subject: jk2/apr patch


Getting ready for jk2 requiring apr (even for Apache13)... Building jk2
using:
./configure --with-apxs=/usr/sbin/apxs --with-apr=apr src loc  make

linking fails because the apr library is not named libapr.a it is named
libapr-0.a. I'm not sure if this naming problem is universal for all
platforms, but libapr-0.a appears to be the correct name for OpenBSD,
FreeBSD and NetBSD. If it is universal then here's a quick patch to 
change
it:

Index: jk/support/jk_apr.m4
===
RCS file: 
/home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
retrieving revision 1.3
diff -u -r1.3 jk_apr.m4
--- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
+++ jk/support/jk_apr.m4 30 Oct 2003 21:03:16 -
@@ -99,7 +99,7 @@
APR_CLEAN=apr-clean
APR_DIR=${tempval}
APR_INCDIR=${tempval}/include
-APR_LDFLAGS=${tempval}/.libs/libapr.a
+APR_LDFLAGS=${tempval}/.libs/libapr-0.a
APR_LIBDIR=
   use_apr=true
COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}

If this name needs to be libapr.a for other platforms, then I guess I


could

patch the apr-build target in Makefile.in to rename it. Any thoughts?


-1. We have to use apr-config to get the name of the apr library.
Look in the web-app deprecated code (in wa_apr.m4).
For example I have with APR for CVS:
+++
[EMAIL PROTECTED]:~/apr  apr-config --link-ld --libs
 -L/home/jfclere/apr -lapr-1 -lrt -lm -lcrypt -lnsl  -lpthread -ldl
[EMAIL PROTECTED]:~/apr  find . -name *.so -print
./.libs/libapr-1.so
+++


-Kurt




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[Fwd: Re: jk2/apr patch]

2003-10-31 Thread jean-frederic clere
Does someone else got those kind of messages?
If yes could the address [EMAIL PROTECTED] be removed from the tomcat-dev list?
Cheers

Jean-Frederic

BTW: I think [EMAIL PROTECTED] should also be removed...
---BeginMessage---
AUTOMATED MESSAGE DO NOT REPLY 
--
The e-mail address you tried to contact is no longer a valid email address.  If you 
need to contact NeuroDimension, please resend your message to [EMAIL PROTECTED] 



---End Message---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: [Fwd: Re: jk2/apr patch]

2003-10-31 Thread Ignacio J. Ortega
I'm not receiving this messages from the list, i'll try to unsubscribe
them anyway..

Saludos,
Ignacio J. Ortega


 -Original Message-
 From: jean-frederic clere [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 9:39 AM
 To: [EMAIL PROTECTED]
 Subject: [Fwd: Re: jk2/apr patch]
 
 
 Does someone else got those kind of messages?
 If yes could the address [EMAIL PROTECTED] be removed from the 
 tomcat-dev list?
 
 Cheers
 
 Jean-Frederic
 
 BTW: I think [EMAIL PROTECTED] should also be removed...
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jk2/apr patch

2003-10-31 Thread Kurt Miller
From: jean-frederic clere [EMAIL PROTECTED]
 Clere, Jean-Frederic wrote:
  Kurt Miller wrote:
 
  Checking out the apache2 makefile it looks like apr-0 is right. Here's
  a revised
  patch (I missed a spot).
 
  Index: jk/support/jk_apr.m4
  ===
  RCS file:
  /home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
  retrieving revision 1.3
  diff -u -r1.3 jk_apr.m4
  --- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
  +++ jk/support/jk_apr.m4 30 Oct 2003 22:11:05 -
  @@ -99,7 +99,7 @@
   APR_CLEAN=apr-clean
   APR_DIR=${tempval}
   APR_INCDIR=${tempval}/include
  -APR_LDFLAGS=${tempval}/.libs/libapr.a
  +APR_LDFLAGS=${tempval}/.libs/libapr-0.a
   APR_LIBDIR=
  use_apr=true
   COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
  @@ -189,7 +189,7 @@
 APR_CLEAN=
 APR_DIR=
 APR_LIBDIR=${tempval}
  -  APR_LDFLAGS=-lapr -L${tempval}
  +  APR_LDFLAGS=-lapr-0 -L${tempval}
 COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
use_apr=true
   fi
 
 
  - Original Message - From: Kurt Miller [EMAIL PROTECTED]
  To: Tomcat Developers List [EMAIL PROTECTED]
  Sent: Thursday, October 30, 2003 4:32 PM
  Subject: jk2/apr patch
 
 
 
  Getting ready for jk2 requiring apr (even for Apache13)... Building
jk2
  using:
 
  ./configure --with-apxs=/usr/sbin/apxs --with-apr=apr src loc 
make
 
  linking fails because the apr library is not named libapr.a it is
named
  libapr-0.a. I'm not sure if this naming problem is universal for all
  platforms, but libapr-0.a appears to be the correct name for OpenBSD,

  FreeBSD and NetBSD. If it is universal then here's a quick patch to
  change
  it:
 
  Index: jk/support/jk_apr.m4
  ===
  RCS file:
  /home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
  retrieving revision 1.3
  diff -u -r1.3 jk_apr.m4
  --- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
  +++ jk/support/jk_apr.m4 30 Oct 2003 21:03:16 -
  @@ -99,7 +99,7 @@
  APR_CLEAN=apr-clean
  APR_DIR=${tempval}
  APR_INCDIR=${tempval}/include
  -APR_LDFLAGS=${tempval}/.libs/libapr.a
  +APR_LDFLAGS=${tempval}/.libs/libapr-0.a
  APR_LIBDIR=
 use_apr=true
  COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
 
  If this name needs to be libapr.a for other platforms, then I guess I
 
 
  could
 
  patch the apr-build target in Makefile.in to rename it. Any thoughts?
 
 
  -1. We have to use apr-config to get the name of the apr library.
  Look in the web-app deprecated code (in wa_apr.m4).

 For example I have with APR for CVS:
 +++
 [EMAIL PROTECTED]:~/apr  apr-config --link-ld --libs
   -L/home/jfclere/apr -lapr-1 -lrt -lm -lcrypt -lnsl  -lpthread -ldl
 [EMAIL PROTECTED]:~/apr  find . -name *.so -print
 ./.libs/libapr-1.so
 +++


Ok thanks for the heads up, I've look briefly at wa_apr.m4 now. I've got a
question or two I think there are two cases:

1) when --with-apr is specified
2) when --with-apr-include and --with-apr-lib are specified

In case one the apr src directory is given and jk2 builds apr using the
apr-build target in the native2 makefile. The apr-build target does a
./configure  make for apr when building jk2. When configuring jk2,
apr-config is not guaranteed to be available.

The webapp connector required apr to be built from source for Apache13 and
configured apr while configuring itself. Should jk2 also make this
requirement? It appears the webapp connector did it to ensure the same
complier was used and that apr was configured without threads for Apache13.

In the second case the apr src dir is not specified, so apr-config is not
available again. The webap connector used it to get the lib name. I'm not
sure what the best method for determining the lib name in this case.
Currently the the lib name is hardcoded to libapr.a for apache13 and
libapr-0 for apache2. Any suggestions?

-Kurt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jk2/apr patch

2003-10-31 Thread jean-frederic clere
Kurt Miller wrote:
From: jean-frederic clere [EMAIL PROTECTED]

Clere, Jean-Frederic wrote:

Kurt Miller wrote:


Checking out the apache2 makefile it looks like apr-0 is right. Here's
a revised
patch (I missed a spot).
Index: jk/support/jk_apr.m4
===
RCS file:
/home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
retrieving revision 1.3
diff -u -r1.3 jk_apr.m4
--- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
+++ jk/support/jk_apr.m4 30 Oct 2003 22:11:05 -
@@ -99,7 +99,7 @@
APR_CLEAN=apr-clean
APR_DIR=${tempval}
APR_INCDIR=${tempval}/include
-APR_LDFLAGS=${tempval}/.libs/libapr.a
+APR_LDFLAGS=${tempval}/.libs/libapr-0.a
APR_LIBDIR=
   use_apr=true
COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
@@ -189,7 +189,7 @@
  APR_CLEAN=
  APR_DIR=
  APR_LIBDIR=${tempval}
-  APR_LDFLAGS=-lapr -L${tempval}
+  APR_LDFLAGS=-lapr-0 -L${tempval}
  COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
 use_apr=true
fi
- Original Message - From: Kurt Miller [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 4:32 PM
Subject: jk2/apr patch



Getting ready for jk2 requiring apr (even for Apache13)... Building
jk2

using:

./configure --with-apxs=/usr/sbin/apxs --with-apr=apr src loc 
make

linking fails because the apr library is not named libapr.a it is
named

libapr-0.a. I'm not sure if this naming problem is universal for all
platforms, but libapr-0.a appears to be the correct name for OpenBSD,


FreeBSD and NetBSD. If it is universal then here's a quick patch to
change
it:
Index: jk/support/jk_apr.m4
===
RCS file:
/home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
retrieving revision 1.3
diff -u -r1.3 jk_apr.m4
--- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
+++ jk/support/jk_apr.m4 30 Oct 2003 21:03:16 -
@@ -99,7 +99,7 @@
   APR_CLEAN=apr-clean
   APR_DIR=${tempval}
   APR_INCDIR=${tempval}/include
-APR_LDFLAGS=${tempval}/.libs/libapr.a
+APR_LDFLAGS=${tempval}/.libs/libapr-0.a
   APR_LIBDIR=
  use_apr=true
   COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
If this name needs to be libapr.a for other platforms, then I guess I


could


patch the apr-build target in Makefile.in to rename it. Any thoughts?


-1. We have to use apr-config to get the name of the apr library.
Look in the web-app deprecated code (in wa_apr.m4).
For example I have with APR for CVS:
+++
[EMAIL PROTECTED]:~/apr  apr-config --link-ld --libs
 -L/home/jfclere/apr -lapr-1 -lrt -lm -lcrypt -lnsl  -lpthread -ldl
[EMAIL PROTECTED]:~/apr  find . -name *.so -print
./.libs/libapr-1.so
+++


Ok thanks for the heads up, I've look briefly at wa_apr.m4 now. I've got a
question or two I think there are two cases:
1) when --with-apr is specified
2) when --with-apr-include and --with-apr-lib are specified
In case one the apr src directory is given and jk2 builds apr using the
apr-build target in the native2 makefile. The apr-build target does a
./configure  make for apr when building jk2. When configuring jk2,
apr-config is not guaranteed to be available.
Right apr-config is not available before configuring apr.

The webapp connector required apr to be built from source for Apache13 and
configured apr while configuring itself. Should jk2 also make this
requirement?
Yes.

It appears the webapp connector did it to ensure the same
complier was used and that apr was configured without threads for Apache13.
In the second case the apr src dir is not specified, so apr-config is not
available again. The webap connector used it to get the lib name. I'm not
sure what the best method for determining the lib name in this case.
Currently the the lib name is hardcoded to libapr.a for apache13 and
libapr-0 for apache2. Any suggestions?
find + awk?
+++
NUMVERAPR=`find ${tempval} -name *.la | awk -F - '{ print $2 }' | awk -F . '{ 
print $1 }'
APR_LDFLAGS=-lapr-${NUMVERAPR} -L${tempval}
+++

-Kurt

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jk2/apr patch

2003-10-31 Thread Kurt Miller
From: jean-frederic clere [EMAIL PROTECTED]
 Kurt Miller wrote:
  Ok thanks for the heads up, I've look briefly at wa_apr.m4 now. I've got
a
  question or two I think there are two cases:
 
  1) when --with-apr is specified
  2) when --with-apr-include and --with-apr-lib are specified
 
  In case one the apr src directory is given and jk2 builds apr using the
  apr-build target in the native2 makefile. The apr-build target does a
  ./configure  make for apr when building jk2. When configuring jk2,
  apr-config is not guaranteed to be available.

 Right apr-config is not available before configuring apr.

 
  The webapp connector required apr to be built from source for Apache13
and
  configured apr while configuring itself. Should jk2 also make this
  requirement?

 Yes.

  It appears the webapp connector did it to ensure the same
  complier was used and that apr was configured without threads for
Apache13.
 
  In the second case the apr src dir is not specified, so apr-config is
not
  available again. The webap connector used it to get the lib name. I'm
not
  sure what the best method for determining the lib name in this case.
  Currently the the lib name is hardcoded to libapr.a for apache13 and
  libapr-0 for apache2. Any suggestions?

 find + awk?
 +++
 NUMVERAPR=`find ${tempval} -name *.la | awk -F - '{ print $2 }' | awk -F
. '{
 print $1 }'
 APR_LDFLAGS=-lapr-${NUMVERAPR} -L${tempval}
 +++

Before I start making a patch, I'd like to make sure I've got the new
behavior nailed down...

It seems like there is some conflicting stuff going on. Apr may need to be
configured without threads at times (without for Apache13 on OpenBSD and
Apache2 on FreeBSD 4.7 (pre fork MPM)). When using --with-apr currently it
doesn't specify with or without threads while configuring apr. So it just
guesses and will likely be with threads at times it shouldn't be.

I'd like to add a new configure argument called --with-apr-threads that will
indicated if apr should be with or without threads. This argument will
ignored, unless -with-apr is also specified and will used to configure apr.
Not sure what the default should be.

Currently --with-apr-include and --with-apr-lib override --with-apr. So I'm
thinking after all three arguments have been processed do the following if
APR_BUILD is not empty:
1) For Apache13 and Apache2 get the compiler used by apxs.
2) configure apr with --enable-static --disable-shared (override
compiler for Apache13 and Apache2) --with-threads or
--without-threads based on the --with-apr-threads argument.
3) Use apr-config to get lib name.

In --with-apr-lib processing set the lib name using your find + awk
technique.

Does the above sound acceptable so far?

Hummm, if neither --with-apr or --with-apr-lib is specified what do we do
for the lib name (it may be there already for Apache2)?

-Kurt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jk2/apr patch

2003-10-30 Thread Kurt Miller
Checking out the apache2 makefile it looks like apr-0 is right. Here's a revised
patch (I missed a spot).

Index: jk/support/jk_apr.m4
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
retrieving revision 1.3
diff -u -r1.3 jk_apr.m4
--- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
+++ jk/support/jk_apr.m4 30 Oct 2003 22:11:05 -
@@ -99,7 +99,7 @@
 APR_CLEAN=apr-clean
 APR_DIR=${tempval}
 APR_INCDIR=${tempval}/include
-APR_LDFLAGS=${tempval}/.libs/libapr.a
+APR_LDFLAGS=${tempval}/.libs/libapr-0.a
 APR_LIBDIR=
use_apr=true
 COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
@@ -189,7 +189,7 @@
   APR_CLEAN=
   APR_DIR=
   APR_LIBDIR=${tempval}
-  APR_LDFLAGS=-lapr -L${tempval}
+  APR_LDFLAGS=-lapr-0 -L${tempval}
   COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}
  use_apr=true
 fi


- Original Message - 
From: Kurt Miller [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 4:32 PM
Subject: jk2/apr patch


 Getting ready for jk2 requiring apr (even for Apache13)... Building jk2
 using:

 ./configure --with-apxs=/usr/sbin/apxs --with-apr=apr src loc  make

 linking fails because the apr library is not named libapr.a it is named
 libapr-0.a. I'm not sure if this naming problem is universal for all
 platforms, but libapr-0.a appears to be the correct name for OpenBSD,
 FreeBSD and NetBSD. If it is universal then here's a quick patch to change
 it:

 Index: jk/support/jk_apr.m4
 ===
 RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v
 retrieving revision 1.3
 diff -u -r1.3 jk_apr.m4
 --- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 - 1.3
 +++ jk/support/jk_apr.m4 30 Oct 2003 21:03:16 -
 @@ -99,7 +99,7 @@
  APR_CLEAN=apr-clean
  APR_DIR=${tempval}
  APR_INCDIR=${tempval}/include
 -APR_LDFLAGS=${tempval}/.libs/libapr.a
 +APR_LDFLAGS=${tempval}/.libs/libapr-0.a
  APR_LIBDIR=
 use_apr=true
  COMMON_APR_OBJECTS=\${COMMON_APR_OBJECTS}

 If this name needs to be libapr.a for other platforms, then I guess I
could
 patch the apr-build target in Makefile.in to rename it. Any thoughts?

 -Kurt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]