apxs.in revision 75161f3b2029c25bdb3f8ab87b85cb1810c479ea
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames#!@perlbin@ -w
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# ====================================================================
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# The Apache Software License, Version 1.1
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# Copyright (c) 2000-2002 The Apache Software Foundation. All rights
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# Redistribution and use in source and binary forms, with or without
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# modification, are permitted provided that the following conditions
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# 1. Redistributions of source code must retain the above copyright
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# notice, this list of conditions and the following disclaimer.
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# 2. Redistributions in binary form must reproduce the above copyright
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# notice, this list of conditions and the following disclaimer in
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# the documentation and/or other materials provided with the
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# distribution.
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# 3. The end-user documentation included with the redistribution,
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# if any, must include the following acknowledgment:
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# "This product includes software developed by the
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# Apache Software Foundation (http://www.apache.org/)."
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# Alternately, this acknowledgment may appear in the software itself,
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# if and wherever such third-party acknowledgments normally appear.
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# 4. The names "Apache" and "Apache Software Foundation" must
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# not be used to endorse or promote products derived from this
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# software without prior written permission. For written
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# permission, please contact apache@apache.org.
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# 5. Products derived from this software may not be called "Apache",
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# nor may "Apache" appear in their name, without prior written
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# permission of the Apache Software Foundation.
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# SUCH DAMAGE.
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# ====================================================================
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# This software consists of voluntary contributions made by many
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# individuals on behalf of the Apache Software Foundation. For more
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# information on the Apache Software Foundation, please see
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregamesrequire 5.003;
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames## Configuration
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregamesget_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# read the configuration variables once
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames qw(SHLTCFLAGS CFLAGS NOTEST_CPPFLAGS EXTRA_CPPFLAGS EXTRA_CFLAGS);
d468ce085370fb85e0cb4e3b48bd1a47c2eca33ctrawickmy %internal_vars = map {$_ => 1}
8b30d716ef6380801f225010838faa3c00141a06trawick qw(TARGET CC CFLAGS CFLAGS_SHLIB LD_SHLIB LDFLAGS_SHLIB LIBS_SHLIB
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames## parse argument line
d468ce085370fb85e0cb4e3b48bd1a47c2eca33ctrawick# defaults for parameters
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# this subroutine is derived from Perl's getopts.pl with the enhancement of
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# the "+" metacharacter at the format string to allow a list to be built by
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames# subsequent occurrences of the same option.
1c86147fa9b58111f7df3b0e24a5bf97833d5d84trawick local $[ = 0;
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames error("Incomplete option: $first (needs an argument)");
3d0434b7f8ce3bfce252ebbe3cabe626ba750d83gregames error("Incomplete option: $first (needs an argument)");
$errs++;
my $rc;
&usage;
&usage;
$result =~ s|;;$||;
$result =~ s|:| |;
return $result;
foreach $cmd (@cmds) {
notice($cmd);
if ($rc) {
if ($opt_g) {
if (-d $name) {
$data =~ s|%TARGET%|$CFG_TARGET|sg;
$data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg;
my $dso_file;
my $mod;
my $slo = $s;
my $lo = $s;
my $la = $s;
push(@cmds, "$installbuilddir/libtool $ltflags --mode=compile $CFG_CC $cflags -I$CFG_INCLUDEDIR $opt -c -o $lo $s && touch $slo");
my $lo;
my $base = $f;
$base =~ s|\.[^.]+$||;
$filename =~ s|^[^/]+/||;
$filename =~ s|^[^/]+/||;
# activate module via LoadModule/AddModule directive
if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found");
open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die;
error("Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file.");
my $lmd;
$c = '#' if ($opt_A);
foreach $lmd (@lmd) {
$lmd =~ m|LoadModule\s+(.+?)_module.*|;
my $amd;
builddir=.
test: reload
lynx -mime_header http://localhost/%NAME%
** SetHandler %NAME%
** </Location>
** Then after restarting Apache via
** $ lynx -mime_header http://localhost/%NAME%
** Connection: close
#include "httpd.h"
#include "http_config.h"
#include "http_protocol.h"
#include "ap_config.h"
return DECLINED;
return OK;
%NAME%_register_hooks /* register hooks */