Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 97555 invoked from network); 3 Jan 2008 04:30:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jan 2008 04:30:51 -0000 Received: (qmail 91423 invoked by uid 500); 3 Jan 2008 04:30:40 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 91368 invoked by uid 500); 3 Jan 2008 04:30:40 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 91357 invoked by uid 99); 3 Jan 2008 04:30:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 20:30:40 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 04:30:26 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C5AFA1A9832; Wed, 2 Jan 2008 20:30:17 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r608337 - in /httpd/mod_wombat/trunk: ./ Makefile.in bootstrap build/PrintPath build/buildcheck.sh build/install.sh buildconf configure.in Date: Thu, 03 Jan 2008 04:30:17 -0000 To: cvs@httpd.apache.org From: jerenkrantz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080103043017.C5AFA1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jerenkrantz Date: Wed Jan 2 20:30:16 2008 New Revision: 608337 URL: http://svn.apache.org/viewvc?rev=608337&view=rev Log: Take a whack at improving mod_wombat's build system and making it more like other httpd modules (ie use buildconf vs bootstrap). This builds out-of-the-box on Leopard... * Makefile.in, configure.in: Tweak to be more auto-fu-y. * bootstrap: Remove in favor of... * buildconf: this, which follows httpd conventions. * build/install.sh, build/buildcheck.sh, build/PrintPath: Copy over from APR. Added: httpd/mod_wombat/trunk/build/PrintPath (with props) httpd/mod_wombat/trunk/build/buildcheck.sh (with props) httpd/mod_wombat/trunk/build/install.sh (with props) httpd/mod_wombat/trunk/buildconf (with props) Removed: httpd/mod_wombat/trunk/bootstrap Modified: httpd/mod_wombat/trunk/ (props changed) httpd/mod_wombat/trunk/Makefile.in httpd/mod_wombat/trunk/configure.in Propchange: httpd/mod_wombat/trunk/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Wed Jan 2 20:30:16 2008 @@ -9,3 +9,5 @@ *.slo .libs ref +mod_wombat_config.h.in +mod_wombat_config.h Modified: httpd/mod_wombat/trunk/Makefile.in URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/Makefile.in?rev=608337&r1=608336&r2=608337&view=diff ============================================================================== --- httpd/mod_wombat/trunk/Makefile.in (original) +++ httpd/mod_wombat/trunk/Makefile.in Wed Jan 2 20:30:16 2008 @@ -1,26 +1,33 @@ -APXS_CFLAGS = -Wc,-Wall -Wc,-Werror +# Makefile for mod_wombat -COMPILE_APACHE_MOD = @APXS@ -c -I`@APXS@ -q INCLUDEDIR`/apreq2 -I@APREQ2_DIR@/include/apreq2 -L@APREQ2_DIR@/lib -lapreq2 @LUA_LIBS@ @LUA_CFLAGS@ $(APXS_CFLAGS) +APXS=@APXS@ -INSTALL_MOD_SHARED = @APXS@ -i +EXTRA_CFLAGS = -Wc,-Wall -Wc,-Werror + +APREQ2_DIR = @APREQ2_DIR@ +APREQ2_INCLUDES = -I$(APREQ2_DIR)/include/apreq2 +APREQ2_LIBS = -L$(APREQ2_DIR)/lib -Wl,-R$(APREQ2_DIR)/lib -lapreq2 + +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ + +CPPFLAGS=$(APREQ2_INCLUDES) $(LUA_CFLAGS) $(EXTRA_CFLAGS) +LIBS=$(APREQ2_LIBS) $(LUA_LIBS) +LDFLAGS= + +COMPILE_APACHE_MOD = $(APXS) -c $(CPPFLAGS) $(LDFLAGS) $(LIBS) + +INSTALL_MOD_SHARED = $(APXS) -i all: mod_wombat.la install: install-mods clean: - @rm -rf *.la - @rm -rf *.lo - @rm -rf *.o - @rm -rf *.slo - @rm -rf .libs + @rm -rf *.la *.lo *.o *.slo .libs maintainer-clean: clean - @rm -rf Makefile - @rm -rf config - @rm -rf config.log - @rm -rf config.status - @rm -rf configure + @rm -rf Makefile config config.log config.status configure dist-clean: maintainer-clean Added: httpd/mod_wombat/trunk/build/PrintPath URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/build/PrintPath?rev=608337&view=auto ============================================================================== --- httpd/mod_wombat/trunk/build/PrintPath (added) +++ httpd/mod_wombat/trunk/build/PrintPath Wed Jan 2 20:30:16 2008 @@ -0,0 +1,130 @@ +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Look for program[s] somewhere in $PATH. +# +# Options: +# -s +# Do not print out full pathname. (silent) +# -pPATHNAME +# Look in PATHNAME instead of $PATH +# +# Usage: +# PrintPath [-s] [-pPATHNAME] program [program ...] +# +# Initially written by Jim Jagielski for the Apache configuration mechanism +# (with kudos to Kernighan/Pike) + +## +# Some "constants" +## +pathname=$PATH +echo="yes" + +## +# Find out what OS we are running for later on +## +os=`(uname) 2>/dev/null` + +## +# Parse command line +## +for args in $* +do + case $args in + -s ) echo="no" ;; + -p* ) pathname="`echo $args | sed 's/^..//'`" ;; + * ) programs="$programs $args" ;; + esac +done + +## +# Now we make the adjustments required for OS/2 and everyone +# else :) +# +# First of all, all OS/2 programs have the '.exe' extension. +# Next, we adjust PATH (or what was given to us as PATH) to +# be whitespace separated directories. +# Finally, we try to determine the best flag to use for +# test/[] to look for an executable file. OS/2 just has '-r' +# but with other OSs, we do some funny stuff to check to see +# if test/[] knows about -x, which is the prefered flag. +## + +if [ "x$os" = "xOS/2" ] +then + ext=".exe" + pathname=`echo -E $pathname | + sed 's/^;/.;/ + s/;;/;.;/g + s/;$/;./ + s/;/ /g + s/\\\\/\\//g' ` + test_exec_flag="-r" +else + ext="" # No default extensions + pathname=`echo $pathname | + sed 's/^:/.:/ + s/::/:.:/g + s/:$/:./ + s/:/ /g' ` + # Here is how we test to see if test/[] can handle -x + testfile="pp.t.$$" + + cat > $testfile </dev/null`; then + test_exec_flag="-x" + else + test_exec_flag="-r" + fi + rm -f $testfile +fi + +for program in $programs +do + for path in $pathname + do + if [ $test_exec_flag $path/${program}${ext} ] && \ + [ ! -d $path/${program}${ext} ]; then + if [ "x$echo" = "xyes" ]; then + echo $path/${program}${ext} + fi + exit 0 + fi + +# Next try without extension (if one was used above) + if [ "x$ext" != "x" ]; then + if [ $test_exec_flag $path/${program} ] && \ + [ ! -d $path/${program} ]; then + if [ "x$echo" = "xyes" ]; then + echo $path/${program} + fi + exit 0 + fi + fi + done +done +exit 1 + Propchange: httpd/mod_wombat/trunk/build/PrintPath ------------------------------------------------------------------------------ svn:executable = * Added: httpd/mod_wombat/trunk/build/buildcheck.sh URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/build/buildcheck.sh?rev=608337&view=auto ============================================================================== --- httpd/mod_wombat/trunk/build/buildcheck.sh (added) +++ httpd/mod_wombat/trunk/build/buildcheck.sh Wed Jan 2 20:30:16 2008 @@ -0,0 +1,66 @@ +#! /bin/sh + +echo "buildconf: checking installation..." + +# any python +python=`build/PrintPath python` +if test -z "$python"; then +echo "buildconf: python not found." +echo " You need python installed" +echo " to build APR from SVN." +exit 1 +else +py_version=`python -c 'import sys; print sys.version' 2>&1|sed 's/ .*//;q'` +echo "buildconf: python version $py_version (ok)" +fi + +# autoconf 2.50 or newer +ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;q'` +if test -z "$ac_version"; then +echo "buildconf: autoconf not found." +echo " You need autoconf version 2.50 or newer installed" +echo " to build APR from SVN." +exit 1 +fi +IFS=.; set $ac_version; IFS=' ' +if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then +echo "buildconf: autoconf version $ac_version found." +echo " You need autoconf version 2.50 or newer installed" +echo " to build APR from SVN." +exit 1 +else +echo "buildconf: autoconf version $ac_version (ok)" +fi + +# Sample libtool --version outputs: +# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11) +# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a +# output is multiline from 1.5 onwards + +# Require libtool 1.4 or newer +libtool=`build/PrintPath glibtool libtool libtool15 libtool14` +lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` +if test -z "$lt_pversion"; then +echo "buildconf: libtool not found." +echo " You need libtool version 1.4 or newer installed" +echo " to build APR from SVN." +exit 1 +fi +lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'` +IFS=.; set $lt_version; IFS=' ' +lt_status="good" +if test "$1" = "1"; then + if test "$2" -lt "4"; then + lt_status="bad" + fi +fi +if test $lt_status = "good"; then + echo "buildconf: libtool version $lt_pversion (ok)" + exit 0 +fi + +echo "buildconf: libtool version $lt_pversion found." +echo " You need libtool version 1.4 or newer installed" +echo " to build APR from SVN." + +exit 1 Propchange: httpd/mod_wombat/trunk/build/buildcheck.sh ------------------------------------------------------------------------------ svn:executable = * Added: httpd/mod_wombat/trunk/build/install.sh URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/build/install.sh?rev=608337&view=auto ============================================================================== --- httpd/mod_wombat/trunk/build/install.sh (added) +++ httpd/mod_wombat/trunk/build/install.sh Wed Jan 2 20:30:16 2008 @@ -0,0 +1,112 @@ +#!/bin/sh +## +## install.sh -- install a program, script or datafile +## +## Based on `install-sh' from the X Consortium's X11R5 distribution +## as of 89/12/18 which is freely available. +## Cleaned up for Apache's Autoconf-style Interface (APACI) +## by Ralf S. Engelschall +## +# +# This script falls under the Apache License. +# See http://www.apache.org/docs/LICENSE + + +# +# put in absolute paths if you don't have them in your path; +# or use env. vars. +# +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" + +# +# parse argument line +# +instcmd="$mvprog" +chmodcmd="" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +ext="" +src="" +dst="" +while [ "x$1" != "x" ]; do + case $1 in + -c) instcmd="$cpprog" + shift; continue + ;; + -m) chmodcmd="$chmodprog $2" + shift; shift; continue + ;; + -o) chowncmd="$chownprog $2" + shift; shift; continue + ;; + -g) chgrpcmd="$chgrpprog $2" + shift; shift; continue + ;; + -s) stripcmd="$stripprog" + shift; continue + ;; + -S) stripcmd="$stripprog $2" + shift; shift; continue + ;; + -e) ext="$2" + shift; shift; continue + ;; + *) if [ "x$src" = "x" ]; then + src=$1 + else + dst=$1 + fi + shift; continue + ;; + esac +done +if [ "x$src" = "x" ]; then + echo "install.sh: no input file specified" + exit 1 +fi +if [ "x$dst" = "x" ]; then + echo "install.sh: no destination specified" + exit 1 +fi + +# +# If destination is a directory, append the input filename; if +# your system does not like double slashes in filenames, you may +# need to add some logic +# +if [ -d $dst ]; then + dst="$dst/`basename $src`" +fi + +# Add a possible extension (such as ".exe") to src and dst +src="$src$ext" +dst="$dst$ext" + +# Make a temp file name in the proper directory. +dstdir=`dirname $dst` +dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name +$instcmd $src $dsttmp + +# And set any options; do chmod last to preserve setuid bits +if [ "x$chowncmd" != "x" ]; then $chowncmd $dsttmp; fi +if [ "x$chgrpcmd" != "x" ]; then $chgrpcmd $dsttmp; fi +if [ "x$stripcmd" != "x" ]; then $stripcmd $dsttmp; fi +if [ "x$chmodcmd" != "x" ]; then $chmodcmd $dsttmp; fi + +# Now rename the file to the real destination. +$rmcmd $dst +$mvcmd $dsttmp $dst + +exit 0 + Propchange: httpd/mod_wombat/trunk/build/install.sh ------------------------------------------------------------------------------ svn:executable = * Added: httpd/mod_wombat/trunk/buildconf URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/buildconf?rev=608337&view=auto ============================================================================== --- httpd/mod_wombat/trunk/buildconf (added) +++ httpd/mod_wombat/trunk/buildconf Wed Jan 2 20:30:16 2008 @@ -0,0 +1,90 @@ +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# buildconf: Build the support scripts needed to compile from a +# checked-out version of the source code. + +# Verify that the builder has the right config tools installed +# +build/buildcheck.sh || exit 1 + +libtoolize=`build/PrintPath glibtoolize libtoolize15 libtoolize14 libtoolize` +if [ "x$libtoolize" = "x" ]; then + echo "libtoolize not found in path" + exit 1 +fi + +# Create the libtool helper files +# +# Note: we copy (rather than link) them to simplify distribution. +# Note: APR supplies its own config.guess and config.sub -- we do not +# rely on libtool's versions +# +echo "Copying libtool helper files ..." + +# Remove any libtool files so one can switch between libtool 1.3 +# and libtool 1.4 by simply rerunning the buildconf script. +(cd build ; rm -f ltconfig ltmain.sh libtool.m4) + +$libtoolize --copy --automake + +if [ -f libtool.m4 ]; then + ltfile=`pwd`/libtool.m4 +else + ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \ + < $libtoolize`" + ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`} + # Expecting the code above to be very portable, but just in case... + if [ -z "$ltfile" -o ! -f "$ltfile" ]; then + ltpath=`dirname $libtoolize` + ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4 + fi +fi + +if [ ! -f $ltfile ]; then + echo "$ltfile not found" + exit 1 +fi + +echo "buildconf: Using libtool.m4 at ${ltfile}." + +cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4 + +# libtool.m4 from 1.6 requires ltsugar.m4 +if [ -f ltsugar.m4 ]; then + rm -f build/ltsugar.m4 + mv ltsugar.m4 build/ltsugar.m4 +fi + +# Clean up any leftovers +rm -f aclocal.m4 libtool.m4 + +# +# Generate the autoconf header and ./configure +# +echo "Creating include/arch/unix/apr_private.h.in ..." +${AUTOHEADER:-autoheader} + +echo "Creating configure ..." +### do some work to toss config.cache? +${AUTOCONF:-autoconf} + +# Remove autoconf 2.5x's cache directory +rm -rf autom4te*.cache + +exit 0 Propchange: httpd/mod_wombat/trunk/buildconf ------------------------------------------------------------------------------ svn:executable = * Modified: httpd/mod_wombat/trunk/configure.in URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/configure.in?rev=608337&r1=608336&r2=608337&view=diff ============================================================================== --- httpd/mod_wombat/trunk/configure.in (original) +++ httpd/mod_wombat/trunk/configure.in Wed Jan 2 20:30:16 2008 @@ -1,11 +1,15 @@ +AC_PREREQ(2.50) + AC_INIT -AC_CONFIG_AUX_DIR(config) +AC_CONFIG_HEADER(mod_wombat_config.h) +AC_CONFIG_AUX_DIR(build) sinclude(build/ac-macros/lua.m4) AC_MSG_NOTICE(looking for Apache module support via DSO through APXS) AC_ARG_WITH(apxs, -[[ --with-apxs[=FILE] FILE is the path to apxs; defaults to "apxs".]], + [AS_HELP_STRING([[--with-apxs=[=FILE]]], + [FILE is the path to apxs; defaults to "apxs".])], [ if test "$withval" = "yes"; then APXS=apxs @@ -14,13 +18,17 @@ fi ]) -if test "$BINNAME" = "" -a "$APXS" = ""; then +if test -z "$APXS"; then for i in /usr/sbin \ /usr/local/apache/bin \ /usr/local/apache2/bin \ /usr/local/sbin ; do - if test -f "$i/apxs"; then + if test -f "$i/apxs2"; then + APXS="$i/apxs2" + break + elif test -f "$i/apxs"; then APXS="$i/apxs" + break fi done fi @@ -61,13 +69,18 @@ fi ]) -if test -n "$APREQ2_DIR" -a "$APREQ2_DIR" != "no"; then - AC_MSG_NOTICE(found apreq2 at $APREQ2_DIR) -else - AC_MSG_ERROR(couldn't find apreq2) -fi +save_CPPFLAGS=$CPPFLAGS +APXS_INCLUDES="`$APXS -q EXTRA_INCLUDES`" +CPPFLAGS="$APXS_INCLUDES -I$APREQ2_DIR/include/apreq2 $CPPFLAGS" +AC_CHECK_HEADERS([apreq2/apreq_module_apache2.h apreq.h], + [], + [AC_MSG_ERROR([APREQ headers not found. Try --with-apreq2])]) +CPPFLAGS=$save_CPPFLAGS AC_SUBST(APXS) + AC_SUBST(APREQ2_DIR) -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT