You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Ryan Bloom <rb...@covalent.net> on 2001/08/30 01:55:41 UTC

Build system for mod_webapp and Apache 2.0

Hi everybody,  I'm new to the list, but for anybody who doesn't know me,
I have been pretty active on httpd 2.0.  I decided to port mod_webapp last
week, and Pier committed the code for me, but the build system isn't there, so
I am posting the build system now.

This is currently working, although there seems to be some strangeness when
Tomcat responds to mod_webapp.  I'll be looking into that over the next few days.
I hope to be more active as time permits.  :-)

The Makefile.in should be placed in jakarta-tomcat-connectors/webapp/apache-2.0

Thanks,

Ryan

Index: webapp/Makefile.in
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/Makefile.in,v
retrieving revision 1.15
diff -u -d -b -w -u -r1.15 Makefile.in
--- webapp/Makefile.in	2001/08/06 22:21:52	1.15
+++ webapp/Makefile.in	2001/08/29 23:51:41
@@ -62,6 +62,7 @@
 
 LOCALDIRS = @TGTDIRS@ @TARGET@
 APRDIR = @APRDIR@
+INSTALLDIR = @TARGET@
 
 CFGS = @CONFIGFILES@ \
 	@SRCDIR@/lib/pr_warp_defs.h \
@@ -71,6 +72,8 @@
 
 all: apr-all local-all
 
+install: local-install
+
 clean: apr-clean local-clean
 
 distclean: clean
@@ -128,6 +131,19 @@
 		$(ECHO) "Cleaning up $${DIR}..." ; \
 		cd $${DIR} ; \
 		$(MAKE) clean ; \
+		RET=$$? ; \
+		cd $(SRCDIR) ; \
+		if test "$${RET}" != "0" ; then \
+			exit $${RET} ; \
+		fi ; \
+	done
+
+local-install:
+	@for DIR in $(INSTALLDIR) ; do \
+		$(ECHO) "" ; \
+		$(ECHO) "Compiling sources in $${DIR}..." ; \
+		cd $${DIR} ; \
+		$(MAKE) install ; \
 		RET=$$? ; \
 		cd $(SRCDIR) ; \
 		if test "$${RET}" != "0" ; then \
Index: webapp/configure.in
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/configure.in,v
retrieving revision 1.22
diff -u -d -b -w -u -r1.22 configure.in
--- webapp/configure.in	2001/08/06 22:48:45	1.22
+++ webapp/configure.in	2001/08/29 23:51:41
@@ -214,6 +214,41 @@
 AC_SUBST(TARGET)
 
 dnl --------------------------------------------------------------------------
+dnl Process the --with-apxs2[=FILE] command line argument
+dnl --------------------------------------------------------------------------
+AC_ARG_WITH(apxs2,
+  [  --with-apxs2[=FILE]      build a shared Apache 2.0.x module.],
+  [
+    if ${TEST} -n "${TARGET}"
+    then
+      AC_MSG_ERROR([target already defined as ${TARGET}])
+    fi
+
+    APXS="${withval}"
+
+    if ${TEST} -z "${APXS}" ; then APXS="yes" ; fi
+    if ${TEST} "${APXS}" = "yes"
+    then
+      AC_PATH_PROG(APXS,apxs,${PATH})
+    fi
+
+    AC_MSG_CHECKING([if apxs is working])
+    ${APXS} -q CC 2>&1 1>/dev/null
+    if ${TEST} ! "$?" -eq "0"
+    then
+      AC_MSG_RESULT([no])
+      AC_MSG_ERROR([apxs is unworkable])
+    fi
+    AC_MSG_RESULT([ok])
+
+    TARGET="${SRCDIR}/apache-2.0"
+    makefile="apache-2.0/Makefile"
+    AC_MSG_RESULT([setting target module to... ${TARGET}])
+  ]
+)
+AC_SUBST(TARGET)
+
+dnl --------------------------------------------------------------------------
 dnl Process the --with-apr=... command line argument
 dnl --------------------------------------------------------------------------
 AC_MSG_CHECKING([APR directory])
@@ -253,7 +288,7 @@
 
 LOCAL_HEADER([Configuring APR])
 LOCAL_FILTEREXEC(
-  [./configure --enable-static --disable-shared --disable-threads],
+  [./configure --enable-static --disable-threads],
   ["APR configure"])
 if ${TEST} "${ret}" -ne "0"
 then


______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: Build system for mod_webapp and Apache 2.0

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Ryan Bloom wrote:
> 
> On Thursday 30 August 2001 01:10, jean-frederic clere wrote:
> > Ryan Bloom wrote:
> > > Hi everybody,  I'm new to the list, but for anybody who doesn't know me,
> > > I have been pretty active on httpd 2.0.  I decided to port mod_webapp
> > > last week, and Pier committed the code for me, but the build system isn't
> > > there, so I am posting the build system now.
> > >
> > > This is currently working, although there seems to be some strangeness
> > > when Tomcat responds to mod_webapp.  I'll be looking into that over the
> > > next few days. I hope to be more active as time permits.  :-)
> > >
> > > The Makefile.in should be placed in
> > > jakarta-tomcat-connectors/webapp/apache-2.0
> >
> > Hi Ryan,
> >
> > I committed some code some hours before... I will try to merge the two.
> > I am detecting  Apache version using apxs thru the following code:
> > +++
> >     dnl test apache version (from mod_jk)
> >     $RM -rf test
> >     $APXS -n test -g
> >     APA=`grep STANDARD20 test/mod_test.c`
> >     if  ${TEST} -z "$APA" ; then
> >       TARGET="${SRCDIR}/apache-1.3"
> >       makefile="apache-1.3/Makefile"
> >     else
> >       TARGET="${SRCDIR}/apache-2.0"
> >       makefile="apache-2.0/Makefile"
> >     fi
> > +++
> > Any comment? - I am using the same in mod_jk -
> 
> Doesn't this needlessly create a new directory on the machine?  And, it doesn't
> clean that dir until the next time you try to configure.  At the very least,
> we should execute the '$RM -rf test' command after the grep.  It would actually
> be possible to just do 'grep STANDARD20 $APXS'.  This is because
> the perl script actually has a copy of the module in it.  That is probably the
> cleanest solution.

Yes I will change mod_jk and  mod_webapp to do that way.

> 
> > I have also noted strange things mod_webapp always returns 500.
> > It seems the request is mapped (wam_match) correctly but the handler
> > (wam_invoke) is not called.
> > What is the problem you have detected?
> 
> It looks like when Tomcat returns a 302 through mod_webapp, we are
> redirected to a strange port.

I must have another problem then. ;-(

>  I haven't even begun to look at it yet, but I
> am hoping to have time either today or tomorrow.
> 
> Ryan
> ______________________________________________________________
> Ryan Bloom                              rbb@apache.org
> Covalent Technologies                   rbb@covalent.net
> --------------------------------------------------------------

Re: Build system for mod_webapp and Apache 2.0

Posted by Ryan Bloom <rb...@covalent.net>.
On Thursday 30 August 2001 01:10, jean-frederic clere wrote:
> Ryan Bloom wrote:
> > Hi everybody,  I'm new to the list, but for anybody who doesn't know me,
> > I have been pretty active on httpd 2.0.  I decided to port mod_webapp
> > last week, and Pier committed the code for me, but the build system isn't
> > there, so I am posting the build system now.
> >
> > This is currently working, although there seems to be some strangeness
> > when Tomcat responds to mod_webapp.  I'll be looking into that over the
> > next few days. I hope to be more active as time permits.  :-)
> >
> > The Makefile.in should be placed in
> > jakarta-tomcat-connectors/webapp/apache-2.0
>
> Hi Ryan,
>
> I committed some code some hours before... I will try to merge the two.
> I am detecting  Apache version using apxs thru the following code:
> +++
>     dnl test apache version (from mod_jk)
>     $RM -rf test
>     $APXS -n test -g
>     APA=`grep STANDARD20 test/mod_test.c`
>     if  ${TEST} -z "$APA" ; then
>       TARGET="${SRCDIR}/apache-1.3"
>       makefile="apache-1.3/Makefile"
>     else
>       TARGET="${SRCDIR}/apache-2.0"
>       makefile="apache-2.0/Makefile"
>     fi
> +++
> Any comment? - I am using the same in mod_jk -

Doesn't this needlessly create a new directory on the machine?  And, it doesn't
clean that dir until the next time you try to configure.  At the very least,
we should execute the '$RM -rf test' command after the grep.  It would actually
be possible to just do 'grep STANDARD20 $APXS'.  This is because
the perl script actually has a copy of the module in it.  That is probably the
cleanest solution.

> I have also noted strange things mod_webapp always returns 500.
> It seems the request is mapped (wam_match) correctly but the handler
> (wam_invoke) is not called.
> What is the problem you have detected?

It looks like when Tomcat returns a 302 through mod_webapp, we are
redirected to a strange port.  I haven't even begun to look at it yet, but I
am hoping to have time either today or tomorrow.

Ryan
______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: Build system for mod_webapp and Apache 2.0

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Ryan Bloom wrote:
> 
> Hi everybody,  I'm new to the list, but for anybody who doesn't know me,
> I have been pretty active on httpd 2.0.  I decided to port mod_webapp last
> week, and Pier committed the code for me, but the build system isn't there, so
> I am posting the build system now.
> 
> This is currently working, although there seems to be some strangeness when
> Tomcat responds to mod_webapp.  I'll be looking into that over the next few days.
> I hope to be more active as time permits.  :-)
> 
> The Makefile.in should be placed in jakarta-tomcat-connectors/webapp/apache-2.0

Hi Ryan,

I committed some code some hours before... I will try to merge the two.
I am detecting  Apache version using apxs thru the following code:
+++
    dnl test apache version (from mod_jk)
    $RM -rf test
    $APXS -n test -g
    APA=`grep STANDARD20 test/mod_test.c`
    if  ${TEST} -z "$APA" ; then
      TARGET="${SRCDIR}/apache-1.3"
      makefile="apache-1.3/Makefile"
    else
      TARGET="${SRCDIR}/apache-2.0"
      makefile="apache-2.0/Makefile"
    fi
+++
Any comment? - I am using the same in mod_jk -

I have also noted strange things mod_webapp always returns 500.
It seems the request is mapped (wam_match) correctly but the handler
(wam_invoke) is not called.
What is the problem you have detected?

Cheers

Jean-frederic

> 
> Thanks,
> 
> Ryan
> 
> Index: webapp/Makefile.in
> ===================================================================
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/Makefile.in,v
> retrieving revision 1.15
> diff -u -d -b -w -u -r1.15 Makefile.in
> --- webapp/Makefile.in  2001/08/06 22:21:52     1.15
> +++ webapp/Makefile.in  2001/08/29 23:51:41
> @@ -62,6 +62,7 @@
> 
>  LOCALDIRS = @TGTDIRS@ @TARGET@
>  APRDIR = @APRDIR@
> +INSTALLDIR = @TARGET@
> 
>  CFGS = @CONFIGFILES@ \
>         @SRCDIR@/lib/pr_warp_defs.h \
> @@ -71,6 +72,8 @@
> 
>  all: apr-all local-all
> 
> +install: local-install
> +
>  clean: apr-clean local-clean
> 
>  distclean: clean
> @@ -128,6 +131,19 @@
>                 $(ECHO) "Cleaning up $${DIR}..." ; \
>                 cd $${DIR} ; \
>                 $(MAKE) clean ; \
> +               RET=$$? ; \
> +               cd $(SRCDIR) ; \
> +               if test "$${RET}" != "0" ; then \
> +                       exit $${RET} ; \
> +               fi ; \
> +       done
> +
> +local-install:
> +       @for DIR in $(INSTALLDIR) ; do \
> +               $(ECHO) "" ; \
> +               $(ECHO) "Compiling sources in $${DIR}..." ; \
> +               cd $${DIR} ; \
> +               $(MAKE) install ; \
>                 RET=$$? ; \
>                 cd $(SRCDIR) ; \
>                 if test "$${RET}" != "0" ; then \
> Index: webapp/configure.in
> ===================================================================
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/configure.in,v
> retrieving revision 1.22
> diff -u -d -b -w -u -r1.22 configure.in
> --- webapp/configure.in 2001/08/06 22:48:45     1.22
> +++ webapp/configure.in 2001/08/29 23:51:41
> @@ -214,6 +214,41 @@
>  AC_SUBST(TARGET)
> 
>  dnl --------------------------------------------------------------------------
> +dnl Process the --with-apxs2[=FILE] command line argument
> +dnl --------------------------------------------------------------------------
> +AC_ARG_WITH(apxs2,
> +  [  --with-apxs2[=FILE]      build a shared Apache 2.0.x module.],
> +  [
> +    if ${TEST} -n "${TARGET}"
> +    then
> +      AC_MSG_ERROR([target already defined as ${TARGET}])
> +    fi
> +
> +    APXS="${withval}"
> +
> +    if ${TEST} -z "${APXS}" ; then APXS="yes" ; fi
> +    if ${TEST} "${APXS}" = "yes"
> +    then
> +      AC_PATH_PROG(APXS,apxs,${PATH})
> +    fi
> +
> +    AC_MSG_CHECKING([if apxs is working])
> +    ${APXS} -q CC 2>&1 1>/dev/null
> +    if ${TEST} ! "$?" -eq "0"
> +    then
> +      AC_MSG_RESULT([no])
> +      AC_MSG_ERROR([apxs is unworkable])
> +    fi
> +    AC_MSG_RESULT([ok])
> +
> +    TARGET="${SRCDIR}/apache-2.0"
> +    makefile="apache-2.0/Makefile"
> +    AC_MSG_RESULT([setting target module to... ${TARGET}])
> +  ]
> +)
> +AC_SUBST(TARGET)
> +
> +dnl --------------------------------------------------------------------------
>  dnl Process the --with-apr=... command line argument
>  dnl --------------------------------------------------------------------------
>  AC_MSG_CHECKING([APR directory])
> @@ -253,7 +288,7 @@
> 
>  LOCAL_HEADER([Configuring APR])
>  LOCAL_FILTEREXEC(
> -  [./configure --enable-static --disable-shared --disable-threads],
> +  [./configure --enable-static --disable-threads],
>    ["APR configure"])
>  if ${TEST} "${ret}" -ne "0"
>  then
> 
> ______________________________________________________________
> Ryan Bloom                              rbb@apache.org
> Covalent Technologies                   rbb@covalent.net
> --------------------------------------------------------------
> 
>   --------------------------------------------------------------------------------
>                   Name: Makefile.in
>    Makefile.in    Type: Plain Text (text/plain)
>               Encoding: base64

Re: Build system for mod_webapp and Apache 2.0

Posted by Ryan Bloom <rb...@covalent.net>.
On Wednesday 05 September 2001 09:57, jean-frederic clere wrote:
> Ryan Bloom wrote:
> > On Wednesday 05 September 2001 04:13, jean-frederic clere wrote:
> >
> > If you don't remove the --disable-shared, then libtool 1.4 can't compile
> > mod_webapp as a dynamic library.
>
> I just want a DSO file...
>
> - On my Linux if I remove the --disable-shared to the APR, libtool
> complains when building mod_webapp.so:
>   something like that "we use dynamic library we have to install them"...
> (That is libtool 1.3.5)
>
> Are you suggesting to use dynamic libapr and libwebapp?

I don't really have a good suggestion.  I am just telling you that with
--disable-shared, libtool 1.4 CAN NOT create DSOs.  It sucks, but
that is libtool for ya.

It sounds like we may have to figure out which version of libtool the user has,
and adjust our build rules appropriately.  :-(

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: Build system for mod_webapp and Apache 2.0

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Ryan Bloom wrote:
> 
> On Wednesday 05 September 2001 04:13, jean-frederic clere wrote:
> 
> If you don't remove the --disable-shared, then libtool 1.4 can't compile
> mod_webapp as a dynamic library.

I just want a DSO file...

- On my Linux if I remove the --disable-shared to the APR, libtool complains
when building mod_webapp.so:
  something like that "we use dynamic library we have to install them"... (That
is libtool 1.3.5)

Are you suggesting to use dynamic libapr and libwebapp?

>  It really sucks, but complain to the
> libtool developers.  That flg must go, or we break anybody who tries to use
> the latest version of libtool.  :-(

I will try tomorrow with the lastest version of libtool.

> 
> Ryan
> 
> > Hi,
> >
> > I have committed it. Note that the --disable-shared MUST NOT be removed
> > otherwise libtool uses the dynamic libraries and we want it to use the
> > static ones.
> >
> > Cheers
> >
> > Jean-frederic
> 
> ______________________________________________________________
> Ryan Bloom                              rbb@apache.org
> Covalent Technologies                   rbb@covalent.net
> --------------------------------------------------------------

Re: Build system for mod_webapp and Apache 2.0

Posted by Ryan Bloom <rb...@covalent.net>.
On Wednesday 05 September 2001 04:13, jean-frederic clere wrote:

If you don't remove the --disable-shared, then libtool 1.4 can't compile 
mod_webapp as a dynamic library.  It really sucks, but complain to the 
libtool developers.  That flg must go, or we break anybody who tries to use
the latest version of libtool.  :-(

Ryan

> Hi,
>
> I have committed it. Note that the --disable-shared MUST NOT be removed
> otherwise libtool uses the dynamic libraries and we want it to use the
> static ones.
>
> Cheers
>
> Jean-frederic

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: Build system for mod_webapp and Apache 2.0

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Hi,

I have committed it. Note that the --disable-shared MUST NOT be removed
otherwise libtool uses the dynamic libraries and we want it to use the static
ones.

Cheers

Jean-frederic

Ryan Bloom wrote:
> 
> > > > LOCAL_HEADER([Configuring APR])
> > > > LOCAL_FILTEREXEC(
> > > > -  [./configure --enable-static --disable-shared --disable-threads],
> > > > +  [./configure --enable-static --disable-threads],
> > > >  ["APR configure"])
> > > > if ${TEST} "${ret}" -ne "0"
> > > > then
> > >
> > > Hmm... I'd like to rely on the APR code coming with Apache 2.0 instead of
> > > building our local copy with Apache 2.0... (I'll see what I can figure
> > > out, hoping that 2.0 works on my OS/X box :)
> >
> > Oh, if that's what you want to do, I can make that happen.  Give me five
> > minutes, and you'll have a patch.  :-)
> 
> Sorry, I got called into a meeting, so this took a little bit longer than I wanted it
> to.  Here is a patch that stops us from building APR, and we just use the one
> from Apache 2.0.
> 
> Index: Makefile.in
> ===================================================================
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/Makefile.in,v
> retrieving revision 1.16
> diff -u -d -b -w -u -r1.16 Makefile.in
> --- Makefile.in 2001/08/31 10:26:24     1.16
> +++ Makefile.in 2001/08/31 20:36:29
> @@ -70,11 +70,11 @@
>         config.log \
>         config.status
> 
> -all: apr-all local-all
> +all: @APR_BUILD@ local-all
> 
>  install: local-install
> 
> -clean: apr-clean local-clean
> +clean: @APR_CLEAN@ local-clean
> 
>  distclean: clean
>         @$(ECHO) ""
> Index: configure.in
> ===================================================================
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/configure.in,v
> retrieving revision 1.24
> diff -u -d -b -w -u -r1.24 configure.in
> --- configure.in        2001/08/31 10:26:24     1.24
> +++ configure.in        2001/08/31 20:36:29
> @@ -210,15 +210,21 @@
>      APA=`${GREP} STANDARD20 ${APXS}`
>      if  ${TEST} -z "$APA" ; then
>        TARGET="${SRCDIR}/apache-1.3"
> +      APR_BUILD="apr-all"
> +      APR_CLEAN="apr-clean"
>        makefile="apache-1.3/Makefile"
>      else
>        TARGET="${SRCDIR}/apache-2.0"
> +      APR_BUILD=""
> +      APR_CLEAN=""
>        makefile="apache-2.0/Makefile"
>      fi
>      AC_MSG_RESULT([setting target module to... ${TARGET}])
>    ]
>  )
>  AC_SUBST(TARGET)
> +AC_SUBST(APR_BUILD)
> +AC_SUBST(APR_CLEAN)
> 
>  dnl --------------------------------------------------------------------------
>  dnl Process the --with-apr=... command line argument
> @@ -226,10 +232,16 @@
>  AC_MSG_CHECKING([APR directory])
>  AC_ARG_WITH(apr,
>    [  --with-apr=DIR          where the APR sources can be found.],
> -  APRDIR="${withval}",
> -  APRDIR="${SRCDIR}/apr"
> +  APRDIR="${withval}"
>  )
> 
> +if ${TEST} -z "${APA}" -a -z "${APRDIR}" ; then
> +  APRDIR="{SRCDIR}/apr"
> +else
> +  APRDIR="${APXS_PREFIX}"
> +fi
> +
> +if ${TEST} -z "${APA}" ; then
>  if ${TEST} ! -d "${APRDIR}" ; then
>    AC_MSG_ERROR([Cannot find APR sources directory \"${APRDIR}\"])
>  fi
> @@ -267,6 +279,9 @@
>    AC_MSG_ERROR([APR configure script terminated with error code ${ret}])
>  fi
>  cd ${curdir}
> +else
> +  AC_MSG_RESULT(Using APR from Apache build)
> +fi
> 
>  dnl --------------------------------------------------------------------------
>  dnl Retrieving APR default values
> @@ -275,19 +290,29 @@
> 
>  if ${TEST} ! -f ${APRDIR}/APRVARS
>  then
> +  if ${TEST} "${APA}" ; then
> +    LIBDIR="/lib"
> +  else
>    AC_MSG_RESULT([error])
>    AC_MSG_ERROR([Cannot find APR defaults in ${APRDIR}/APRVARS])
>  fi
> +else
> +  LIBDIR=""
> +fi
> 
>  if ${TEST} ! -x ${APRDIR}/libtool
>  then
> +  if ${TEST} "${APA}" ; then
> +    LIBTOOL="${APXS_PREFIX}/build/libtool"
> +  else
>    AC_MSG_RESULT([error])
>    AC_MSG_ERROR([Cannot find APR libtool binary])
> +  fi
>  else
>    LIBTOOL="${APRDIR}/libtool"
>  fi
> 
> -eval `cat ${APRDIR}/APRVARS`
> +eval `cat ${APRDIR}${LIBDIR}/APRVARS`
>  AC_SUBST(CC)
>  AC_SUBST(CPP)
>  AC_SUBST(SHELL)
> 
> ______________________________________________________________
> Ryan Bloom                              rbb@apache.org
> Covalent Technologies                   rbb@covalent.net
> --------------------------------------------------------------

Re: Build system for mod_webapp and Apache 2.0

Posted by Ryan Bloom <rb...@covalent.net>.
> > > LOCAL_HEADER([Configuring APR])
> > > LOCAL_FILTEREXEC(
> > > -  [./configure --enable-static --disable-shared --disable-threads],
> > > +  [./configure --enable-static --disable-threads],
> > >  ["APR configure"])
> > > if ${TEST} "${ret}" -ne "0"
> > > then
> >
> > Hmm... I'd like to rely on the APR code coming with Apache 2.0 instead of
> > building our local copy with Apache 2.0... (I'll see what I can figure
> > out, hoping that 2.0 works on my OS/X box :)
>
> Oh, if that's what you want to do, I can make that happen.  Give me five
> minutes, and you'll have a patch.  :-)

Sorry, I got called into a meeting, so this took a little bit longer than I wanted it
to.  Here is a patch that stops us from building APR, and we just use the one
from Apache 2.0.

Index: Makefile.in
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/Makefile.in,v
retrieving revision 1.16
diff -u -d -b -w -u -r1.16 Makefile.in
--- Makefile.in	2001/08/31 10:26:24	1.16
+++ Makefile.in	2001/08/31 20:36:29
@@ -70,11 +70,11 @@
 	config.log \
 	config.status
 
-all: apr-all local-all
+all: @APR_BUILD@ local-all
 
 install: local-install
 
-clean: apr-clean local-clean
+clean: @APR_CLEAN@ local-clean
 
 distclean: clean
 	@$(ECHO) ""
Index: configure.in
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/configure.in,v
retrieving revision 1.24
diff -u -d -b -w -u -r1.24 configure.in
--- configure.in	2001/08/31 10:26:24	1.24
+++ configure.in	2001/08/31 20:36:29
@@ -210,15 +210,21 @@
     APA=`${GREP} STANDARD20 ${APXS}`
     if  ${TEST} -z "$APA" ; then
       TARGET="${SRCDIR}/apache-1.3"
+      APR_BUILD="apr-all"
+      APR_CLEAN="apr-clean"
       makefile="apache-1.3/Makefile"
     else
       TARGET="${SRCDIR}/apache-2.0"
+      APR_BUILD=""
+      APR_CLEAN=""
       makefile="apache-2.0/Makefile"
     fi
     AC_MSG_RESULT([setting target module to... ${TARGET}])
   ]
 )
 AC_SUBST(TARGET)
+AC_SUBST(APR_BUILD)
+AC_SUBST(APR_CLEAN)
 
 dnl --------------------------------------------------------------------------
 dnl Process the --with-apr=... command line argument
@@ -226,10 +232,16 @@
 AC_MSG_CHECKING([APR directory])
 AC_ARG_WITH(apr,
   [  --with-apr=DIR          where the APR sources can be found.],
-  APRDIR="${withval}",
-  APRDIR="${SRCDIR}/apr"
+  APRDIR="${withval}"
 )
 
+if ${TEST} -z "${APA}" -a -z "${APRDIR}" ; then
+  APRDIR="{SRCDIR}/apr"
+else
+  APRDIR="${APXS_PREFIX}"
+fi
+
+if ${TEST} -z "${APA}" ; then
 if ${TEST} ! -d "${APRDIR}" ; then
   AC_MSG_ERROR([Cannot find APR sources directory \"${APRDIR}\"])
 fi
@@ -267,6 +279,9 @@
   AC_MSG_ERROR([APR configure script terminated with error code ${ret}])
 fi
 cd ${curdir}
+else
+  AC_MSG_RESULT(Using APR from Apache build)
+fi
 
 dnl --------------------------------------------------------------------------
 dnl Retrieving APR default values
@@ -275,19 +290,29 @@
 
 if ${TEST} ! -f ${APRDIR}/APRVARS
 then
+  if ${TEST} "${APA}" ; then
+    LIBDIR="/lib"
+  else
   AC_MSG_RESULT([error])
   AC_MSG_ERROR([Cannot find APR defaults in ${APRDIR}/APRVARS])
 fi
+else
+  LIBDIR=""
+fi
 
 if ${TEST} ! -x ${APRDIR}/libtool
 then
+  if ${TEST} "${APA}" ; then
+    LIBTOOL="${APXS_PREFIX}/build/libtool"
+  else
   AC_MSG_RESULT([error])
   AC_MSG_ERROR([Cannot find APR libtool binary])
+  fi
 else
   LIBTOOL="${APRDIR}/libtool"
 fi
 
-eval `cat ${APRDIR}/APRVARS`
+eval `cat ${APRDIR}${LIBDIR}/APRVARS`
 AC_SUBST(CC)
 AC_SUBST(CPP)
 AC_SUBST(SHELL)

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: Build system for mod_webapp and Apache 2.0

Posted by Pier Fumagalli <pi...@betaversion.org>.
"Ryan Bloom" <rb...@covalent.net> wrote:
> 
>> Hmm... I'd like to rely on the APR code coming with Apache 2.0 instead of
>> building our local copy with Apache 2.0... (I'll see what I can figure out,
>> hoping that 2.0 works on my OS/X box :)
> 
> Oh, if that's what you want to do, I can make that happen.  Give me five
> minutes, and you'll have a patch.  :-)

Yeah... I mean, it's pointless to build APR if Apache 2.0 has it already :)
Also, we avoid versioning conflicts (since right now APR is linked-in
statically, at least in 1.3)...

    Pier


Re: Build system for mod_webapp and Apache 2.0

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 31 August 2001 10:36, Pier Fumagalli wrote:
> > +    TARGET="${SRCDIR}/apache-2.0"
> > +    makefile="apache-2.0/Makefile"
> > +    AC_MSG_RESULT([setting target module to... ${TARGET}])
> > +  ]
> > +)
> > +AC_SUBST(TARGET)
> > +
> > +dnl
>
> Wasn't APXS for 2.0 completely broken? That's what you said last time :)

It was.  I fixed it.  :)

> > LOCAL_HEADER([Configuring APR])
> > LOCAL_FILTEREXEC(
> > -  [./configure --enable-static --disable-shared --disable-threads],
> > +  [./configure --enable-static --disable-threads],
> >  ["APR configure"])
> > if ${TEST} "${ret}" -ne "0"
> > then
>
> Hmm... I'd like to rely on the APR code coming with Apache 2.0 instead of
> building our local copy with Apache 2.0... (I'll see what I can figure out,
> hoping that 2.0 works on my OS/X box :)

Oh, if that's what you want to do, I can make that happen.  Give me five minutes,
and you'll have a patch.  :-)

Ryan
______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: Build system for mod_webapp and Apache 2.0

Posted by Pier Fumagalli <pi...@betaversion.org>.
"Ryan Bloom" <rb...@covalent.net> wrote:

> 
> Hi everybody,  I'm new to the list, but for anybody who doesn't know me,
> I have been pretty active on httpd 2.0.

DOH! :) Hi Ryan :)

> I decided to port mod_webapp last week, and Pier committed the code for me,
> but the build system isn't there, so I am posting the build system now.

Cool... Thanks! :)

> This is currently working, although there seems to be some strangeness when
> Tomcat responds to mod_webapp.  I'll be looking into that over the next few
> days. I hope to be more active as time permits.  :-)

Uh... I've been awfully busy lately... Didn't have much time to keep track
of things either...

> The Makefile.in should be placed in
> jakarta-tomcat-connectors/webapp/apache-2.0
> 
> Thanks,
> 
> Ryan
> 
> Index: webapp/Makefile.in
> ===================================================================
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/Makefile.in,v
> retrieving revision 1.15
> diff -u -d -b -w -u -r1.15 Makefile.in
> --- webapp/Makefile.in    2001/08/06 22:21:52    1.15
> +++ webapp/Makefile.in    2001/08/29 23:51:41
> @@ -62,6 +62,7 @@
> 
> LOCALDIRS = @TGTDIRS@ @TARGET@
> APRDIR = @APRDIR@
> +INSTALLDIR = @TARGET@
> 
> CFGS = @CONFIGFILES@ \
> @SRCDIR@/lib/pr_warp_defs.h \
> @@ -71,6 +72,8 @@
> 
> all: apr-all local-all
> 
> +install: local-install
> +
> clean: apr-clean local-clean
> 
> distclean: clean
> @@ -128,6 +131,19 @@
> $(ECHO) "Cleaning up $${DIR}..." ; \
> cd $${DIR} ; \
> $(MAKE) clean ; \
> +        RET=$$? ; \
> +        cd $(SRCDIR) ; \
> +        if test "$${RET}" != "0" ; then \
> +            exit $${RET} ; \
> +        fi ; \
> +    done
> +
> +local-install:
> +    @for DIR in $(INSTALLDIR) ; do \
> +        $(ECHO) "" ; \
> +        $(ECHO) "Compiling sources in $${DIR}..." ; \
> +        cd $${DIR} ; \
> +        $(MAKE) install ; \
> RET=$$? ; \
> cd $(SRCDIR) ; \
> if test "$${RET}" != "0" ; then \
> Index: webapp/configure.in
> ===================================================================
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/configure.in,v
> retrieving revision 1.22
> diff -u -d -b -w -u -r1.22 configure.in
> --- webapp/configure.in    2001/08/06 22:48:45    1.22
> +++ webapp/configure.in    2001/08/29 23:51:41
> @@ -214,6 +214,41 @@
> AC_SUBST(TARGET)
> 
> dnl --------------------------------------------------------------------------
> +dnl Process the --with-apxs2[=FILE] command line argument
> +dnl 
> --------------------------------------------------------------------------
> +AC_ARG_WITH(apxs2,
> +  [  --with-apxs2[=FILE]      build a shared Apache 2.0.x module.],
> +  [
> +    if ${TEST} -n "${TARGET}"
> +    then
> +      AC_MSG_ERROR([target already defined as ${TARGET}])
> +    fi
> +
> +    APXS="${withval}"
> +
> +    if ${TEST} -z "${APXS}" ; then APXS="yes" ; fi
> +    if ${TEST} "${APXS}" = "yes"
> +    then
> +      AC_PATH_PROG(APXS,apxs,${PATH})
> +    fi
> +
> +    AC_MSG_CHECKING([if apxs is working])
> +    ${APXS} -q CC 2>&1 1>/dev/null
> +    if ${TEST} ! "$?" -eq "0"
> +    then
> +      AC_MSG_RESULT([no])
> +      AC_MSG_ERROR([apxs is unworkable])
> +    fi
> +    AC_MSG_RESULT([ok])
> +
> +    TARGET="${SRCDIR}/apache-2.0"
> +    makefile="apache-2.0/Makefile"
> +    AC_MSG_RESULT([setting target module to... ${TARGET}])
> +  ]
> +)
> +AC_SUBST(TARGET)
> +
> +dnl 


Wasn't APXS for 2.0 completely broken? That's what you said last time :)

> --------------------------------------------------------------------------
> dnl Process the --with-apr=... command line argument
> dnl --------------------------------------------------------------------------
> AC_MSG_CHECKING([APR directory])
> @@ -253,7 +288,7 @@
> 
> LOCAL_HEADER([Configuring APR])
> LOCAL_FILTEREXEC(
> -  [./configure --enable-static --disable-shared --disable-threads],
> +  [./configure --enable-static --disable-threads],
>  ["APR configure"])
> if ${TEST} "${ret}" -ne "0"
> then

Hmm... I'd like to rely on the APR code coming with Apache 2.0 instead of
building our local copy with Apache 2.0... (I'll see what I can figure out,
hoping that 2.0 works on my OS/X box :)

    Pier