Skip to content

Commit

Permalink
+ initial commit of mod_auth_pubtkt 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelkasper committed Oct 28, 2008
0 parents commit 7c31eb1
Show file tree
Hide file tree
Showing 19 changed files with 2,007 additions and 0 deletions.
74 changes: 74 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* ====================================================================
* Portions Copyright (c) 2008 Manuel Kasper <mk@neon1.net>.
* All rights reserved.
* Portions Copyright (c) 2001-2006 Open Fusion Pty Ltd (Australia).
* All rights reserved.
* Portions Copyright (c) 2000 Liquid Digital Information Systems, Inc.
* All rights reserved.
*
* Portions of this software were written by Manuel Kasper and are hereby
* contributed to the Apache Software Foundation for distribution under
* the Apache license, as follows.
*
* Portions of this software were written for Open Fusion Pty. Ltd.
* by Gavin Carr and are hereby contributed to the Apache Software
* Foundation for distribution under the Apache license, as follows.
*
* Portions of this software were written for Liquid Digital Information
* Systems, Inc. by Raimondas Kiveris and are hereby contributed to the
* Apache Software Foundation for distribution under the Apache license,
* as follows.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the Apache Group
* for use in the Apache HTTP server project (http://www.apache.org/)."
*
* 4. The names "Apache Server" and "Apache Group" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the Apache Group
* for use in the Apache HTTP server project (http://www.apache.org/)."
*
* THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Group and was originally based
* on public domain software written at the National Center for
* Supercomputing Applications, University of Illinois, Urbana-Champaign.
* For more information on the Apache Group and the Apache HTTP server
* project, please see <http://www.apache.org/>.
*
*/
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
TARGETS = all install clean

$(TARGETS): Makedefs
cd src && $(MAKE) $@

Makedefs:
./configure

realclean:
cd src && make clean
test -f Makedefs && rm -f Makedefs
123 changes: 123 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#!/bin/sh
#
# Simple configure script for mod_auth_pubtkt
#

# Defaults
APXS=/usr/sbin/apxs
test -x $APXS || unset APXS

ME=`basename $0`
DIR=`dirname $0`
if [ $DIR = '.' ]; then
DIR=`pwd`
fi

usage() {
echo "usage: $ME [--apxs=/path/to/apxs] [--apachever=<1.3|2|2.2>] [--debug]"
}
die() {
echo $*
exit 2
}

# Retrograde option handling to allow for primitive getopts
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
case $ac_option in
--apxs=*)
APXS=$ac_optarg
;;
--apxs)
ac_prev=APXS
;;
--apachever=*)
VERSION=$ac_optarg
;;
--debug)
DEBUG="-g -Wall -ansi -Wno-implicit-function-declaration -Wno-long-long"
;;
-h | --help)
usage;
exit 0
;;
*)
usage;
exit 1
;;
esac
done

# Sanity checks
test "$ac_prev" = "APXS" && die "Error: option '--apxs' requires an argument"
test -n "$APXS" || die "Error: cannot locate apxs (use --apxs=/path/to/apxs)"
test -x $APXS || die "Error: missing apxs '$APXS' (use --apxs=/path/to/apxs)"

# Get Apache version
if [ -z "$VERSION" ]; then
HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
test -x $HTTPD || die "Error: cannot determine apache version (use --apachever=<1.3|2|2.2>)"
VERSION=`$HTTPD -v | head -1 | sed -e 's/.*Apache\///' -e 's/^\([0-9]\.[0-9]*\).*/\1/'`
fi
# Standardise
test $VERSION = '1' && VERSION=1.3
test $VERSION = '2.0' && VERSION=2
test $VERSION = '20' && VERSION=2
test $VERSION = '22' && VERSION=2.2
if [ $VERSION != '1.3' -a $VERSION != '2' -a $VERSION != '2.2' ]; then
die "Error: apache version '$VERSION' not supported"
fi

# Generate Makedefs
DIV="#-------------------------------------------------------------------------"
WARNING="# Generated by $ME, do not edit!"
test -f Makedefs && rm -f Makedefs
test -f Makedefs && die "Error deleting Makedefs"

echo $DIV >> Makedefs
echo $WARNING >> Makedefs
echo >> Makedefs
echo "VERSION = $VERSION" >> Makedefs
echo "APXS = $APXS" >> Makedefs
test -n "$DEBUG" && echo "CFLAGS += $DEBUG" >> Makedefs
if [ "$VERSION" = "1.3" ]; then
echo "CFLAGS += -DAPACHE13" >> Makedefs
echo "TARGET = mod_auth_pubtkt.so" >> Makedefs
else
if [ $VERSION = "2.2" ]; then
echo "CFLAGS += -DAPACHE22" >> Makedefs
fi
echo "TARGET = mod_auth_pubtkt.la" >> Makedefs
fi
echo "BASEDIR = $DIR" >> Makedefs

# proper handling of Universal Binaries under Mac OS X
HTTPD="`${APXS} -q SBINDIR`/`${APXS} -q TARGET`"
if test -x /usr/bin/lipo; then
ARCHITECTURES=`/usr/bin/lipo -info $HTTPD | sed -e 's/.*://'`
for ARCH in $ARCHITECTURES; do
echo "CFLAGS += -arch ${ARCH}" >> Makedefs
echo "LDFLAGS += -arch ${ARCH}" >> Makedefs
done
fi

if [ -d /usr/share/man ]; then
echo "MANPATH = /usr/share/man" >> Makedefs
else
echo "MANPATH = /usr/man" >> Makedefs
fi

echo >> Makedefs
echo $WARNING >> Makedefs
echo $DIV >> Makedefs

# Finish with a 'make clean'
make -s clean
Loading

0 comments on commit 7c31eb1

Please sign in to comment.