Re: [PATCH] mod_webapp build cleanups...

2001-10-03 Thread jean-frederic clere

Justin Erenkrantz wrote:
> 
> I finally got a chance to build mod_webapp from j-t-c with Apache 2.0.
> Looks good and is quite easy to do.  Only problem is that we aren't
> handling directories properly.  If you do the examples webapp, you
> see a link to:
> 
> http://localhost:8080/examples/servlets/
> 
> Going there results in a bad response (actually nothing returned!),
> but
> 
> http://localhost:8080/examples/servlets/index.html
> 
> works.  I'm not terribly sure if httpd or Tomcat should be handling
> this case (i.e. redirecting or handling DirectoryIndex-type semantics).
> Somebody isn't handling it and that's not good.

I have fixed it (The port handling was wrong).

> 
> You will find attached a patch that cleans up some of the build
> process in j-t-c so that it works with Apache 2.0 cleanly and
> fixes some tpyos and formatting quirks.

I have committed the patch (it builds better with it ;-)).
 
> 
> The only questionable thing is that lib/libwebapp.a isn't built by
> libtool.  The simple straightforward ar and ranlib should work fine,
> but it may not work on all systems.  When linking mod_webapp.lo with
> libwebapp.a, libtool emits a warning.  It may be worth it to try and
> use APR's libtool to compile and link all of the files in lib (this
> would produce lib/libwebapp.la).
> 
> Enjoy.  Oh, and Pier, thanks for dinner.  =-)  This is my
> payback...  -- justin
> 
> Index: webapp/Makefile.in
> ===
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/Makefile.in,v
> retrieving revision 1.20
> diff -u -r1.20 Makefile.in
> --- webapp/Makefile.in  2001/09/17 05:06:27 1.20
> +++ webapp/Makefile.in  2001/10/01 06:39:24
> @@ -107,6 +107,12 @@
>  apache-1.3-clean:
> @$(MAKE) template MFLG="$(MAKEFLAGS)" MDIR="apache-1.3" MTGT="clean"
> 
> +apache-2.0-build:
> +   @$(MAKE) template MFLG="$(MAKEFLAGS)" MDIR="apache-2.0" MTGT="build"
> +
> +apache-2.0-clean:
> +   @$(MAKE) template MFLG="$(MAKEFLAGS)" MDIR="apache-2.0" MTGT="clean"
> +
>  template:
> @ { \
> $(ECHO) "" ; \
> Index: webapp/configure.in
> ===
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/configure.in,v
> retrieving revision 1.39
> diff -u -r1.39 configure.in
> --- webapp/configure.in 2001/09/17 05:07:01 1.39
> +++ webapp/configure.in 2001/10/01 06:39:24
> @@ -177,7 +177,7 @@
>  dnl Upd vars: N/A
>  dnl -
>  AC_ARG_WITH(tomcat,
> -  [  --with-tomcat[=DIR] path of a Tomcat 4.0 distribution. (DIR defaults
> +  [  --with-tomcat[=DIR]   path of a Tomcat 4.0 distribution. (DIR defaults
>to \"/usr/local/tomcat\"). Not required and ignored
>when the --enable-java option is not specified.],
>[
> @@ -241,7 +241,7 @@
>  AC_MSG_CHECKING([for C API documentation])
>  AC_ARG_ENABLE(apidocs-c,
>[  --enable-apidocs-c[=PERL]
> -  enbale generation of C API documentation using
> +  enable generation of C API documentation using
>ScanDoc (PERL is the name of the Perl interpreter
>used to run ScanDoc. If not specified this is
>looked up in your current path).],
> @@ -302,7 +302,7 @@
>  AC_MSG_CHECKING([for Java API documentation])
>  AC_ARG_ENABLE(apidocs-java,
>[  --enable-apidocs-java[=JAVADOC]
> -  enbale generation of Java API documentation using
> +  enable generation of Java API documentation using
>JavaDoc (If JAVADOC is not set its value will be
>discovered by \"--enable-java\").],
>[
> @@ -347,10 +347,10 @@
>  dnl Upd vars: APR_SRCDIR
>  dnl --
>  AC_ARG_WITH(apr,
> -  [  --with-apr[=DIR]path of an APR (Apache Portable Runtime) source
> +  [  --with-apr[=DIR]  path of an APR (Apache Portable Runtime) source
>distribution or CVS snapshot. (DIR defaults to
> -  \"./apr\"). Not required and ignored when the
> -  --with-apxs2 option is specified.],
> +  \"./apr\"). Not required and ignored when an
> +  Apache 2.0 apxs is specified (--with-apxs).],
>[
>  case "${withval}" in
>  ""|"yes"|"YES"|"true"|"TRUE")
> @@ -382,7 +382,7 @@
>  dnl --
>  AC_MSG_CHECKING([for Apache apxs])
>  AC_ARG_WITH(apxs,
> -  [  --with-apxs[=FILE]  build a shared Apache module. If FILE was not
> +  [  --with-apxs[=FILE]build a shared Apache module. If FILE was not
>specified, 

Re: [PATCH] mod_webapp build cleanups...

2001-10-01 Thread jean-frederic clere

Justin Erenkrantz wrote:
> 
> I finally got a chance to build mod_webapp from j-t-c with Apache 2.0.
> Looks good and is quite easy to do.  Only problem is that we aren't
> handling directories properly.  If you do the examples webapp, you
> see a link to:
> 
> http://localhost:8080/examples/servlets/
> 
> Going there results in a bad response (actually nothing returned!),
> but
> 
> http://localhost:8080/examples/servlets/index.html
> 
> works.  I'm not terribly sure if httpd or Tomcat should be handling
> this case (i.e. redirecting or handling DirectoryIndex-type semantics).
> Somebody isn't handling it and that's not good.

There should be a redirect... And it worked in the past ;-(

> 
> You will find attached a patch that cleans up some of the build
> process in j-t-c so that it works with Apache 2.0 cleanly and
> fixes some tpyos and formatting quirks.
> 
> The only questionable thing is that lib/libwebapp.a isn't built by
> libtool.  The simple straightforward ar and ranlib should work fine,
> but it may not work on all systems.  When linking mod_webapp.lo with
> libwebapp.a, libtool emits a warning.  It may be worth it to try and
> use APR's libtool to compile and link all of the files in lib (this
> would produce lib/libwebapp.la).

I remember that it was a little more than a warning: it tries to use
libwebapp.so and we did not install it.
I will try to retest it with the actual state. 

> 
> Enjoy.  Oh, and Pier, thanks for dinner.  =-)  This is my
> payback...  -- justin
> 
> Index: webapp/Makefile.in
> ===
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/Makefile.in,v
> retrieving revision 1.20
> diff -u -r1.20 Makefile.in
> --- webapp/Makefile.in  2001/09/17 05:06:27 1.20
> +++ webapp/Makefile.in  2001/10/01 06:39:24
> @@ -107,6 +107,12 @@
>  apache-1.3-clean:
> @$(MAKE) template MFLG="$(MAKEFLAGS)" MDIR="apache-1.3" MTGT="clean"
> 
> +apache-2.0-build:
> +   @$(MAKE) template MFLG="$(MAKEFLAGS)" MDIR="apache-2.0" MTGT="build"
> +
> +apache-2.0-clean:
> +   @$(MAKE) template MFLG="$(MAKEFLAGS)" MDIR="apache-2.0" MTGT="clean"
> +
>  template:
> @ { \
> $(ECHO) "" ; \
> Index: webapp/configure.in
> ===
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/configure.in,v
> retrieving revision 1.39
> diff -u -r1.39 configure.in
> --- webapp/configure.in 2001/09/17 05:07:01 1.39
> +++ webapp/configure.in 2001/10/01 06:39:24
> @@ -177,7 +177,7 @@
>  dnl Upd vars: N/A
>  dnl -
>  AC_ARG_WITH(tomcat,
> -  [  --with-tomcat[=DIR] path of a Tomcat 4.0 distribution. (DIR defaults
> +  [  --with-tomcat[=DIR]   path of a Tomcat 4.0 distribution. (DIR defaults
>to \"/usr/local/tomcat\"). Not required and ignored
>when the --enable-java option is not specified.],
>[
> @@ -241,7 +241,7 @@
>  AC_MSG_CHECKING([for C API documentation])
>  AC_ARG_ENABLE(apidocs-c,
>[  --enable-apidocs-c[=PERL]
> -  enbale generation of C API documentation using
> +  enable generation of C API documentation using
>ScanDoc (PERL is the name of the Perl interpreter
>used to run ScanDoc. If not specified this is
>looked up in your current path).],
> @@ -302,7 +302,7 @@
>  AC_MSG_CHECKING([for Java API documentation])
>  AC_ARG_ENABLE(apidocs-java,
>[  --enable-apidocs-java[=JAVADOC]
> -  enbale generation of Java API documentation using
> +  enable generation of Java API documentation using
>JavaDoc (If JAVADOC is not set its value will be
>discovered by \"--enable-java\").],
>[
> @@ -347,10 +347,10 @@
>  dnl Upd vars: APR_SRCDIR
>  dnl --
>  AC_ARG_WITH(apr,
> -  [  --with-apr[=DIR]path of an APR (Apache Portable Runtime) source
> +  [  --with-apr[=DIR]  path of an APR (Apache Portable Runtime) source
>distribution or CVS snapshot. (DIR defaults to
> -  \"./apr\"). Not required and ignored when the
> -  --with-apxs2 option is specified.],
> +  \"./apr\"). Not required and ignored when an
> +  Apache 2.0 apxs is specified (--with-apxs).],
>[
>  case "${withval}" in
>  ""|"yes"|"YES"|"true"|"TRUE")
> @@ -382,7 +382,7 @@
>  dnl --
>  AC_MSG_CHECKING([for Apache apxs])
>  AC_ARG_WITH(apxs,
> -  [  --with-apxs[=FILE]  build a shared Apache module. If FILE was not
> +  [  --