You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by pi...@apache.org on 2001/07/08 05:32:08 UTC

cvs commit: jakarta-tomcat-connectors/webapp buildconf.sh configure.in

pier        01/07/07 20:32:07

  Modified:    webapp   buildconf.sh configure.in
  Log:
  First part of the new build method. More tomorrow morning.
  
  Revision  Changes    Path
  1.2       +5 -0      jakarta-tomcat-connectors/webapp/buildconf.sh
  
  Index: buildconf.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/buildconf.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- buildconf.sh	2001/05/12 04:42:32	1.1
  +++ buildconf.sh	2001/07/08 03:32:07	1.2
  @@ -6,4 +6,9 @@
   # the "configure.in". If you check these sources out of CVS,
   # you will need to execute this script first.
   
  +if [ ! -d ./apr ]
  +then
  +    mkdir apr
  +    echo "Don't a forget to put a copy of the APR sources in `pwd`/apr/"
  +fi
   autoconf
  
  
  
  1.8       +81 -48    jakarta-tomcat-connectors/webapp/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/configure.in,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- configure.in	2001/07/02 14:06:00	1.7
  +++ configure.in	2001/07/08 03:32:07	1.8
  @@ -58,65 +58,56 @@
   dnl -----------------------------------------------------------------------------
   dnl Author  Pier Fumagalli <ma...@eng.sun.com>
   dnl Author  Jon S. Stevens <ma...@latchkey.com>
  -dnl Version $Id: configure.in,v 1.7 2001/07/02 14:06:00 jfclere Exp $
  +dnl Version $Id: configure.in,v 1.8 2001/07/08 03:32:07 pier Exp $
   dnl -----------------------------------------------------------------------------
   
   dnl -----------------------------------------------------------------------------
   dnl Initialize GNU AutoConf
   dnl -----------------------------------------------------------------------------
  -sinclude(../common/build/apache.m4)dnl
   AC_INIT(Makefile.in)
   
   dnl -----------------------------------------------------------------------------
  -dnl Check out CC and RANLIB programs
  +dnl Define the local functions we're going to use
   dnl -----------------------------------------------------------------------------
  -AC_PROG_CC
  -AC_PROG_RANLIB
  -
  -AC_PATH_PROG(AR,ar,$PATH)dnl
  -AC_PATH_PROG(TEST,test,$PATH)dnl
  +AC_DEFUN(LOCAL_HEADER,[
  +    printf "\n\033\13301;31m%s\033\13300m\n" "$1" 1>&2
  +    AC_PROVIDE([$0])
  +])
   
  -AC_SUBST(AR)
  -AC_SUBST(TEST)
  +AC_DEFUN(LOCAL_FILTEREXEC,[{
  +    $1
  +    echo RETVAL $?
  +}|{
  +    RET=0
  +    while ${TRUE}
  +    do
  +        read FIRST LINE
  +        if ${TEST} ! "$?" -eq "0"
  +        then
  +            break
  +        else
  +            if ${TEST} "$FIRST" = "RETVAL"
  +            then
  +                RET="$LINE"
  +            else
  +                printf "\033\13301m%s\033\13300m: %s\n" "$2" "$FIRST $LINE" 1>&2
  +            fi
  +        fi
  +    done
  +    unset FIRST
  +    unset LINE
  +}])
   
   dnl -----------------------------------------------------------------------------
  -dnl Process the --with-apr=... command line argument (required)
  +dnl Check out ranlib and ar
   dnl -----------------------------------------------------------------------------
  -AC_MSG_CHECKING([APR directory])
  -AC_ARG_WITH(apr,
  -	[  --with-apr=DIR          where the APR installation can be found [required]],
  -	APRDIR=$withval,
  -	APRDIR="")
  -if ${TEST} -z "$APRDIR" ; then
  -	AC_MSG_ERROR([Required command line argument \"--with-apr=...\" not specified])
  -fi
  -if ${TEST} ! -d "$APRDIR" ; then
  -	AC_MSG_ERROR([Invalid APR directory \"$APRDIR\" specified])
  -fi
  -if ${TEST} ! -f "$APRDIR/include/apr.h" ; then
  -	AC_MSG_ERROR([No APR headers in \"$APRDIR\"])
  -fi
  -for i in "$APRDIR/lib/libapr*"
  -do
  -    if ${TEST} -f "$i" ; then
  -        has_apr_lib = true
  -        break
  -    fi
  -done
  -if ${TEST} ${has_apr_lib} ; then
  -	AC_MSG_ERROR([No APR libraries in \"$APRDIR\"])
  -fi
  -
  -CURDIR=`pwd`
  -cd $APRDIR
  -APRDIR=`pwd`
  -cd $CURDIR
  -AC_MSG_RESULT($APRDIR)
  -AC_SUBST(APRDIR)
  -
  -TGTDIRS="lib"
  -AC_MSG_RESULT([setting target directories to \"$TGTDIRS\"])
  -AC_SUBST(TGTDIRS)
  +AC_PROG_RANLIB
  +AC_PATH_PROG(AR,ar,${PATH})
  +AC_PATH_PROG(TEST,test,$PATH)
  +AC_PATH_PROG(TRUE,true,$PATH)
  +AC_SUBST(AR)
  +AC_SUBST(TEST)
  +AC_SUBST(TRUE)
   
   dnl -----------------------------------------------------------------------------
   dnl Process the --with-apxs[=FILE]... command line argument
  @@ -188,9 +179,51 @@
   AC_MSG_RESULT($TGTDIR)
   AC_SUBST(TGTDIR)
   
  +dnl -----------------------------------------------------------------------------
  +dnl Process the --with-apr=... command line argument (required)
  +dnl -----------------------------------------------------------------------------
  +AC_MSG_CHECKING([APR directory])
  +AC_ARG_WITH(apr,
  +  [  --with-apr=DIR          where the APR sources can be found],
  +  APRDIR=${withval},
  +  APRDIR="${srcdir}/apr"
  +)
  +
  +if ${TEST} ! -d "${APRDIR}" ; then
  +  AC_MSG_ERROR([Cannot find APR sources directory \"${APRDIR}\"])
  +fi
  +
  +if ${TEST} ! -x "${APRDIR}/buildconf" ; then
  +  AC_MSG_ERROR([Cannot find APR buildconf program in \"${APRDIR}\"])
  +fi
  +
  +CURDIR=`pwd`
  +cd ${APRDIR}
  +APRDIR=`pwd`
  +AC_MSG_RESULT([${APRDIR}])
  +cd ${CURDIR}
  +AC_SUBST(APRDIR)
  +
   dnl -----------------------------------------------------------------------------
  -dnl LDFLAGS and CFLAGS to APXS command
  +dnl Build the configure script for APR and run it
   dnl -----------------------------------------------------------------------------
  -JTC_SET_APXS_FLAGS()
  +cd ${APRDIR}
  +
  +LOCAL_HEADER([Building APR configure script])
  +LOCAL_FILTEREXEC(./buildconf,[  APR buildconf])
  +if ${TEST} "${RET}" -ne "0"
  +then
  +  AC_MSG_ERROR([APR buildconf terminated with error code ${RET}])
  +fi
  +
  +LOCAL_HEADER([Configuring APR])
  +LOCAL_FILTEREXEC(./configure,[  APR configure])
  +if ${TEST} "${RET}" -ne "0"
  +then
  +  AC_MSG_ERROR([APR configure script terminated with error code ${RET}])
  +fi
  +
  +LOCAL_HEADER([Done with APR configuration])
  +cd ${CURDIR}
   
   AC_OUTPUT(Makedefs Makefile lib/Makefile apache-1.3/Makefile)