summaryrefslogtreecommitdiff
path: root/APACHE_1_3_42/src/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'APACHE_1_3_42/src/helpers')
-rwxr-xr-xAPACHE_1_3_42/src/helpers/CutRule25
-rwxr-xr-xAPACHE_1_3_42/src/helpers/GuessCodeset32
-rwxr-xr-xAPACHE_1_3_42/src/helpers/GuessOS377
-rwxr-xr-xAPACHE_1_3_42/src/helpers/MakeEtags55
-rw-r--r--APACHE_1_3_42/src/helpers/MakeLint47
-rwxr-xr-xAPACHE_1_3_42/src/helpers/PrintPath122
-rwxr-xr-xAPACHE_1_3_42/src/helpers/TestCompile298
-rwxr-xr-xAPACHE_1_3_42/src/helpers/binbuild.sh314
-rwxr-xr-xAPACHE_1_3_42/src/helpers/buildinfo.sh171
-rwxr-xr-xAPACHE_1_3_42/src/helpers/checkheader.sh46
-rw-r--r--APACHE_1_3_42/src/helpers/cvstodsp5.pl58
-rw-r--r--APACHE_1_3_42/src/helpers/dsp5tocvs.pl55
-rw-r--r--APACHE_1_3_42/src/helpers/dummy.c12
-rw-r--r--APACHE_1_3_42/src/helpers/find-dbm-lib90
-rwxr-xr-xAPACHE_1_3_42/src/helpers/findcpp.sh84
-rw-r--r--APACHE_1_3_42/src/helpers/fixwin32mak.pl62
-rwxr-xr-xAPACHE_1_3_42/src/helpers/fmn.sh60
-rwxr-xr-xAPACHE_1_3_42/src/helpers/fp2rp29
-rwxr-xr-xAPACHE_1_3_42/src/helpers/getuid.sh79
-rwxr-xr-xAPACHE_1_3_42/src/helpers/install.sh131
-rwxr-xr-xAPACHE_1_3_42/src/helpers/mfhead8
-rwxr-xr-xAPACHE_1_3_42/src/helpers/mkdir.sh46
-rwxr-xr-xAPACHE_1_3_42/src/helpers/mkshadow.sh121
-rwxr-xr-xAPACHE_1_3_42/src/helpers/ppl.sh66
-rwxr-xr-xAPACHE_1_3_42/src/helpers/slo.sh189
25 files changed, 2577 insertions, 0 deletions
diff --git a/APACHE_1_3_42/src/helpers/CutRule b/APACHE_1_3_42/src/helpers/CutRule
new file mode 100755
index 0000000000..f74303b1d5
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/CutRule
@@ -0,0 +1,25 @@
+#!/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.
+#
+#
+# Helper script for Configure - cut a rule from Configuration.
+# note that there is a tab and a space in the character groups.
+# Map to lowercase to make tests easier
+
+egrep "^[ ]*Rule[ ]+$1[ ]*=" $2 | \
+awk 'BEGIN {FS="="}{print $2}' | \
+sed 's/[ ]//g' | tr "A-Z" "a-z"
diff --git a/APACHE_1_3_42/src/helpers/GuessCodeset b/APACHE_1_3_42/src/helpers/GuessCodeset
new file mode 100755
index 0000000000..14b5c2ec26
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/GuessCodeset
@@ -0,0 +1,32 @@
+#!/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.
+#
+#
+# This script tries to find out whether the native codeset of this machine
+# is ASCII or EBCDIC. On EBCDIC based machines, it is used to activate
+# the mod_ebcdic EBCDIC conversion module.
+#
+# Note: This script will break if you use an ebcdic cross-compiler!
+#
+case `${AWK-awk} 'BEGIN {printf("%c%c%c%c%c<->%c%c%c%c%c%c\n",97,115,99,105,105,133,130,131,132,137,131);}' /dev/null` in
+ ascii*) echo ASCII;;
+ *ebcdic) echo EBCDIC;;
+ *) echo >&2 "ERROR: Your platform codeset could not be detected correctly."
+ echo >&2 "Assuming ASCII. Please send an EMail to <martin@apache.org>"
+ echo >&2 "describing the platform in use. Is your AWK broken?"
+ echo ASCII;;
+esac
diff --git a/APACHE_1_3_42/src/helpers/GuessOS b/APACHE_1_3_42/src/helpers/GuessOS
new file mode 100755
index 0000000000..ea431ac2ae
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/GuessOS
@@ -0,0 +1,377 @@
+#!/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.
+#
+#
+# Simple OS/Platform guesser. Similar to config.guess but
+# much, much smaller. Since it was developed for use with
+# Apache, it follows under Apache's regular licensing
+# (see http://www.apache.org/docs/LICENSE) with one specific
+# addition: Any changes or additions to this script should be
+# Emailed to the Apache group (apache@apache.org).
+#
+# Initially written by Jim Jagielski for the Apache configuration mechanism
+#
+# Be as similar to the output of config.guess/config.sub
+# as possible.
+
+# Handle TPF before the other operating systems
+# since it's compiled on non-TPF platforms.
+# This keeps GuessOS from returning incorrect
+# uname values for TPF:
+if [ "x$TPF" = "xYES" ]; then
+ echo "TPF"
+ exit 0
+fi
+
+# First get uname entries that we use below
+
+MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
+RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
+SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
+VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
+
+# Some HP machines have slashes.
+MACHINE=`echo ${MACHINE}|sed -e 's/\//_/'`
+
+# Now test for ISC and SCO, since it is has a braindamaged uname.
+#
+# We need to work around FreeBSD 1.1.5.1
+XREL=`uname -X 2>/dev/null | grep "^Release" | awk '{print $3}'`
+if [ "x$XREL" != "x" ]; then
+ if [ -f /etc/kconfig ]; then
+ case "$XREL" in
+ 4.0|4.1)
+ echo "${MACHINE}-whatever-isc4"; exit 0
+ ;;
+ esac
+ else
+ case "$XREL" in
+ 3.2v4.2)
+ echo "whatever-whatever-sco3"; exit 0
+ ;;
+ 3.2v5.0*)
+ echo "whatever-whatever-sco5"; exit 0
+ ;;
+ 4.2MP)
+ if [ "x$VERSION" = "x2.1.1" ]; then
+ echo "${MACHINE}-whatever-unixware211"; exit 0
+ elif [ "x$VERSION" = "x2.1.2" ]; then
+ echo "${MACHINE}-whatever-unixware212"; exit 0
+ else
+ echo "${MACHINE}-whatever-unixware2"; exit 0
+ fi
+ ;;
+ 4.2)
+ echo "whatever-whatever-unixware1"; exit 0
+ ;;
+ 5)
+ case "$VERSION" in
+ 7*)
+ echo "${MACHINE}-whatever-unixware7"; exit 0
+ ;;
+ 8*)
+ echo "${MACHINE}-whatever-OpenUNIX"; exit 0
+ ;;
+ esac
+ ;;
+ esac
+ fi
+fi
+# Now we simply scan though... In most cases, the SYSTEM info is enough
+#
+case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
+ MiNT:*)
+ echo "m68k-atari-mint"; exit 0
+ ;;
+ A/UX:*)
+ echo "m68k-apple-aux3"; exit 0
+ ;;
+
+ AIX:*)
+ echo "${MACHINE}-ibm-aix${VERSION}.${RELEASE}"; exit 0
+ ;;
+
+ dgux:*)
+ echo "${MACHINE}-dg-dgux"; exit 0
+ ;;
+
+ HI-UX:*)
+ echo "${MACHINE}-hi-hiux"; exit 0
+ ;;
+
+ HP-UX:*)
+ HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo "${MACHINE}-hp-hpux${HPUXVER}"; exit 0
+ ;;
+
+ IRIX:*)
+ if [ -f /usr/lib32/mips4/libm.so ]; then
+ echo "${MACHINE}-sgi-irix32"; exit 0
+ else
+ echo "${MACHINE}-sgi-irix"; exit 0
+ fi
+ ;;
+
+ IRIX64:*)
+ echo "${MACHINE}-sgi-irix64"; exit 0
+ ;;
+
+ Linux:2.0.*)
+ echo "${MACHINE}-whatever-linux20"; exit 0
+ ;;
+
+ Linux:[2-9].*)
+ # This handles linux 2.2 and above (2.4, ...)
+ # Don't worry if you don't really have a Linux-2.2
+ echo "${MACHINE}-whatever-linux22"; exit 0
+ ;;
+
+ Linux:1.*)
+ echo "${MACHINE}-whatever-linux1"; exit 0
+ ;;
+
+ GNU:*)
+ echo "${MACHINE}-GNU-GNU/Hurd"; exit 0
+ ;;
+
+ LynxOS:*)
+ echo "${MACHINE}-lynx-lynxos"; exit 0
+ ;;
+
+ BSD/386:*:*:*486*|BSD/OS:*:*:*:*486*)
+ echo "i486-whatever-bsdi"; exit 0
+ ;;
+
+ BSD/386|BSD/OS:3.*)
+ echo "${MACHINE}-whatever-bsdi3"; exit 0
+ ;;
+
+ BSD/386:*|BSD/OS:*)
+ echo "${MACHINE}-whatever-bsdi"; exit 0
+ ;;
+
+ FreeBSD:*:*:*486*)
+ FREEBSDVERS=`echo ${RELEASE}|sed -e 's/[-(].*//'`
+ echo "i486-whatever-freebsd${FREEBSDVERS}"; exit 0
+ ;;
+
+ FreeBSD:*)
+ FREEBSDVERS=`echo ${RELEASE}|sed -e 's/[-(].*//'`
+ echo "${MACHINE}-whatever-freebsd${FREEBSDVERS}"; exit 0
+ ;;
+
+ NetBSD:*:*:*486*)
+ echo "i486-whatever-netbsd"; exit 0
+ ;;
+
+ NetBSD:*)
+ echo "${MACHINE}-whatever-netbsd"; exit 0
+ ;;
+
+ OpenBSD:*)
+ OPENBSDVERS=`echo ${RELEASE}|sed -e 's/[-(].*//'`
+ echo "${MACHINE}-whatever-openbsd${OPENBSDVERS}"; exit 0
+ ;;
+
+ OSF1:*:*:*alpha*)
+ echo "${MACHINE}-dec-osf"; exit 0
+ ;;
+
+ NONSTOP_KERNEL:*:*:*)
+ echo "${MACHINE}-tandem-oss"; exit 0;
+ ;;
+
+ QNX:*)
+ if [ "$VERSION" -gt 422 ]; then
+ echo "${MACHINE}-qssl-qnx32"
+ else
+ echo "${MACHINE}-qssl-qnx"
+ fi
+ exit 0
+ ;;
+
+ Paragon*:*:*:*)
+ echo "i860-intel-osf1"; exit 0
+ ;;
+
+ SunOS:5.*)
+ SOLVER=`echo ${RELEASE}|awk -F. '{
+ if (NF < 3)
+ printf "2%s0\n",$2
+ else
+ printf "2%s%s\n",$2,$3
+ }'`
+ echo "${MACHINE}-sun-solaris2.${SOLVER}"; exit 0
+ ;;
+
+ SunOS:*)
+ echo "${MACHINE}-sun-sunos4"; exit 0
+ ;;
+
+ UNIX_System_V:4.*:*)
+ echo "${MACHINE}-whatever-sysv4"; exit 0
+ ;;
+
+ unix:3.0.9*:*:88k)
+ echo "${MACHINE}-encore-sysv4"; exit 0
+ ;;
+
+ *:4*:R4*:m88k)
+ echo "${MACHINE}-whatever-sysv4"; exit 0
+ ;;
+
+ UnixWare:5:99*:*)
+ # Gemini, beta release of next rev of unixware
+ echo "${MACHINE}-whatever-unixware212"; exit 0
+ ;;
+
+ DYNIX/ptx:4*:*:i386)
+ PTXVER=`echo ${VERSION}|sed -e 's/[^.]//'`
+ echo "${MACHINE}-sequent-ptx${PTXVER}"; exit 0
+ ;;
+
+ *:3.2.0:*:i386)
+ # uname on DYNIX/ptx below V4.0.0 is brain dead
+ PTXVER=`echo ${VERSION}|sed -e 's/[^.]//'`
+ echo "${MACHINE}-sequent-ptx${PTXVER}"; exit 0
+ ;;
+
+ *:4.0:3.0:[345][0-9]?? | *:4.0:3.0:3[34]??[/,]* | library:*)
+ echo "x86-ncr-sysv4"; exit 0
+ ;;
+
+ ULTRIX:*)
+ echo "${MACHINE}-unknown-ultrix"; exit 0
+ ;;
+
+ SINIX-?:* | ReliantUNIX-?:*)
+ echo "${MACHINE}-siemens-sysv4"; exit 0
+ ;;
+
+ POSIX*BS2000)
+ echo "${MACHINE}-siemens-sysv4"; exit 0
+ ;;
+
+ machten:*)
+ echo "${MACHINE}-tenon-${SYSTEM}"; exit 0;
+ ;;
+
+ ConvexOS:*:11.*:*)
+ echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
+ ;;
+
+ UNIX_SV:*:*:maxion)
+ echo "${MACHINE}-ccur-sysv4"; exit 0;
+ ;;
+
+ PowerMAX_OS:*:*:Night_Hawk)
+ MACHINE=`uname -p`
+ echo "${MACHINE}-concurrent-powermax"; exit 0;
+ ;;
+
+ UNIX_SV:*)
+ if [ -d /usr/nec ];then
+ echo "mips-nec-sysv4"; exit 0;
+ fi
+ ;;
+
+ NonStop-UX:4.[02]*:[BC]*:*)
+ echo "${MACHINE}-tandem-sysv4"; exit 0;
+ ;;
+
+ NonStop-UX:*:*:*)
+ echo "${MACHINE}-compaq-sysv4"; exit 0;
+ ;;
+
+ Rhapsody:*:*:*)
+ case "${MACHINE}" in
+ Power*) MACHINE=powerpc ;;
+ esac
+ echo "${MACHINE}-apple-rhapsody${RELEASE}"; exit 0
+ ;;
+
+ Darwin:*:*:*)
+ MACHINE=`uname -p`
+ echo "${MACHINE}-apple-darwin${RELEASE}"; exit 0
+ ;;
+
+ "RISC iX":*)
+ echo "arm-whatever-riscix"; exit 0;
+ ;;
+
+ *:4.0:2:*)
+ echo "whatever-unisys-sysv4"; exit 0;
+ ;;
+
+ *:*:dcosx:NILE*)
+ echo "pyramid-pyramid-svr4"; exit 0;
+ ;;
+
+ *:*:*:"DRS 6000")
+ echo "drs6000-whatever-whatever"; exit 0;
+ ;;
+ OS/390:*)
+ echo "${MACHINE}-IBM-OS390-${RELEASE}-${VERSION}"; exit 0;
+ ;;
+ CYGWIN*:*:*:*)
+ echo "${MACHINE}-whatever-cygwin"; exit 0
+ ;;
+ atheos:*)
+ echo "${MACHINE}-whatever-atheos"; exit 0
+ ;;
+esac
+
+#
+# Ugg. These are all we can determine by what we know about
+# the output of uname. Be more creative:
+#
+
+# Do the Apollo stuff first. Here, we just simply assume
+# that the existance of the /usr/apollo directory is proof
+# enough
+if [ -d /usr/apollo ]; then
+ echo "whatever-apollo-whatever"
+ exit 0
+fi
+
+# Now NeXT
+ISNEXT=`hostinfo 2>/dev/null`
+case "$ISNEXT" in
+ *NeXT*)
+# echo "whatever-next-nextstep"; exit 0
+
+# Swiped from a friendly uname clone for NEXT/OPEN Step.
+ NEXTOSVER="`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'`"
+ if [ "$NEXTOSVER" -gt 3.3 ]
+ then
+ NEXTOS="openstep"
+ else
+ NEXTOS="nextstep"
+ fi
+
+ NEXTREL="`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'`"
+ NEXTARCH=`arch`
+ echo "${NEXTARCH}-next-${NEXTOS}${NEXTREL}" ; exit 0
+
+ ;;
+esac
+
+# At this point we gone through all the one's
+# we know of: Punt
+
+echo "${MACHINE}-whatever-${SYSTEM},${RELEASE},${VERSION}"
+exit 0
diff --git a/APACHE_1_3_42/src/helpers/MakeEtags b/APACHE_1_3_42/src/helpers/MakeEtags
new file mode 100755
index 0000000000..ebf56c74ac
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/MakeEtags
@@ -0,0 +1,55 @@
+#!/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.
+#
+#
+# This file illustrates how to generate a useful TAGS file via etags
+# for emacs. This should be invoked from the src directory i.e.:
+# > helpers/MakeEtags
+# and will create a TAGS file in the src directory.
+
+# This script falls under the Apache License.
+# See http://www.apache.org/docs/LICENSE
+
+# Once you have created src/TAGS in emacs you'll need to setup
+# tag-table-alist with an entry to assure it finds the single src/TAGS
+# file from the many source directories. Something along these lines:
+# (setq tag-table-alist
+# '(("/home/me/work/apache-1.3/src/"
+# . "/home/me/work/apache-1.3/src/")
+# ))
+
+# This requires a special version of etags, i.e. the
+# one called "Exuberant ctags" available at:
+# http://fly.hiwaay.net/~darren/ctags/
+# Once that is setup you'll need to point to the
+# executable here:
+
+etags=~/local/bin/etags
+
+# Exuberant etags is necessary since it can ignore some defined symbols
+# that obscure the function signatures.
+
+ignore=API_EXPORT,API_EXPORT_NONSTD,__declspec
+
+# Create an etags file at the root of the source
+# tree, then create symbol links to it from each
+# directory in the source tree. By passing etags
+# absolute pathnames we get a tag file that is
+# NOT portable when we move the directory tree.
+
+find . -name '*.[ch]' -print | $etags -I "$ignore" -L -
+
diff --git a/APACHE_1_3_42/src/helpers/MakeLint b/APACHE_1_3_42/src/helpers/MakeLint
new file mode 100644
index 0000000000..aa557ad0f1
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/MakeLint
@@ -0,0 +1,47 @@
+#!perl
+#
+# 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.
+#
+#
+# Create a Configuration.lint with every Module except for the modules
+# specified in the 'isbad' subroutine.
+
+sub isbad
+{
+ local($module) = @_;
+ return 1 if $module =~ /mod_dld/;
+ return 1 if $module =~ /mod_dld/;
+ return 1 if $module =~ /mod_auth_msql/;
+ return 1 if $module =~ /mod_example/;
+
+ return 0;
+}
+
+open(TMPL, "Configuration.tmpl") || die "can't open Configuration.tmpl: $!";
+open(LINT, ">Configuration.lint") || die "can't write Configuration.link: $!";
+
+while(<TMPL>)
+{
+ next if /^$/;
+ print LINT if /^[^#]/;
+ if(/^# AddModule\s+(.*)$/)
+ {
+ $module = $1;
+ print LINT "AddModule $module\n" if ! &isbad($module);
+ }
+}
+close(TMPL);
+close(LINT);
diff --git a/APACHE_1_3_42/src/helpers/PrintPath b/APACHE_1_3_42/src/helpers/PrintPath
new file mode 100755
index 0000000000..b177c9d46f
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/PrintPath
@@ -0,0 +1,122 @@
+#!/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)
+#
+# This script falls under the Apache License.
+# See http://www.apache.org/docs/LICENSE
+
+##
+# 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 seperated 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 <<ENDTEST
+#!/bin/sh
+if [ -x / ] || [ -x /bin ] || [ -x /bin/ls ]; then
+ exit 0
+fi
+exit 1
+ENDTEST
+
+ if `/bin/sh $testfile 2>/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
+ done
+done
+exit 1
+
diff --git a/APACHE_1_3_42/src/helpers/TestCompile b/APACHE_1_3_42/src/helpers/TestCompile
new file mode 100755
index 0000000000..ff8a4bc531
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/TestCompile
@@ -0,0 +1,298 @@
+#!/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.
+#
+#
+exstat=1
+trap 'rm -f Makefile dummy ../dummy.o dummy.exe testfunc.c testfunc ../testfunc.o testfunc.exe; exit $exstat' 0 1 2 3 15
+#
+# Yet another Apache Configure helper script.
+# This script tests certain aspects of the compilation
+# process. Right now, it can perform 5 tests:
+#
+# ./helpers/TestCompile lib <libname>
+# Which checks to see if <libname> exists on this system
+#
+# ./helpers/TestCompile lib <libname> <func>
+# Which checks to see if <libname> exists on this system and
+# contains func.
+#
+# ./helpers/TestCompile func <function>
+# Which checks to see if <function> exists
+#
+# ./helpers/TestCompile header <header>
+# Which checks to see if header file <header> exists
+#
+# ./helpers/TestCompile sanity
+# Which does a simple sanity check/test compile
+#
+# ./helpers/TestCompile sizeof <type>
+# Which prints out the sizeof <type> (sure would be nice
+# if sizeof could be use in preprocessor if's)
+#
+# ./helpers/TestCompile byteorder
+# Which prints out the byte order of the machine
+# (12: little endian, 21: big endian)
+#
+# It does these by creating a small mini-makefile, based on
+# ../Makefile.config and trying to compile a small dummy
+# program. If the compilation succeeds, we assume the test
+# was successful as well.
+#
+# This must be run as './helpers/TestCompile' from
+# the ./src directory (same directory that Configure is
+# located) if you want to test it out. Configure must
+# also call it as './helpers/TestCompile'
+#
+#
+# INVOCATION SWITCHES:
+# TestCompile evaluates the following switches
+# (currently, it accepts only *ONE* of them!):
+#
+# -v (enable verbose operation)
+# Enables VERBOSE=yes, see below.
+#
+# -s (enforce silent operation)
+# Override a VERBOSE=yes, force it to VERBOSE=no.
+#
+# -r (run generated test program)
+# Enables TCRUNIT=yes, see below
+#
+#
+# ENVIRONMENT VARIABLES:
+# The following environment variables have influence on
+# TestCompile's operation:
+#
+# $VERBOSE (yes|no; default=no)
+# If set to "yes", will print compiler messages to stderr
+# Otherwise, stderr of all invoked programs is sent to /dev/null
+#
+# $TCRUNIT (yes|no; default=no)
+# (This variable is obsoleted by the "-r" switch)
+# If set to "yes", will invoke the test program which was
+# generated by TestCompile. Useful for "TestCompile sizeof"
+# and "TestCompile byteorder" tests.
+# Otherwise, TestCompile only tests for the presence of a
+# generated program when deciding whether the compilation was
+# successful.
+#
+# $TCADDINCL (#include <> stmt list; default=empty)
+# If set to an "#include <file>" preprocessor directive
+# (optionally several #include's separated by newlines), these
+# directives will be added to the generated test sources.
+# That allows, e.g., the "TestCompile sizeof" test to check for
+# types which are not defined in the standard locations.
+#
+# $TLIB (additional libraries; default=empty)
+# If set to a list of additional libraries, these libs will be used
+# in addition to the one tested by the "TestCompile lib" call.
+# For the other TestCompile tests, it is ignored.
+#
+#
+# Initially written by Jim Jagielski for the Apache configuration mechanism
+#
+# This script falls under the Apache License.
+# See http://www.apache.org/docs/LICENSE
+
+
+cd ./helpers
+
+#
+# Handle "verbose", "silent" and "runit" flags. Allow for them
+# to be set via the environment
+#
+if [ "x$VERBOSE" = "x" ]; then
+ VERBOSE="no"
+fi
+if [ "x$TCRUNIT" = "x" ]; then
+ TCRUNIT="no";
+fi
+case "$1" in
+ "-v")
+ VERBOSE="yes"
+ shift
+ ;;
+ "-s")
+ VERBOSE="no"
+ shift
+ ;;
+ "-r")
+ TCRUNIT="yes"
+ shift
+ ;;
+esac
+
+#
+# Make sure we have the right arguments
+#
+
+case "$1" in
+ "lib")
+ if [ "x$2" = "x" ]; then
+ exit
+ fi
+ TLIB="-l$2 $TLIB"
+ if [ "x$VERBOSE" = "xyes" ]; then
+ ERRDIR=""
+ else
+ ERRDIR='2>/dev/null'
+ fi
+ if [ "x$3" = "x" ]; then
+ TARGET='dummy'
+ else
+ TARGET='testfunc'
+ echo "int main(void) { $3(); return(0); }" > testfunc.c
+ fi
+ ;;
+ "sizeof")
+ if [ "x$2" = "x" ]; then
+ exit
+ fi
+ TLIB=""
+ if [ "x$VERBOSE" = "xyes" ]; then
+ ERRDIR=""
+ else
+ ERRDIR='2>/dev/null'
+ fi
+ TARGET='testfunc'
+ cat <<EOF >testfunc.c
+#include <stdio.h>
+#include <sys/types.h>
+$TCADDINCL
+int main(void) {
+ printf("%d\n", sizeof($2));
+ return(0);
+}
+EOF
+ ;;
+ "byteorder")
+ TLIB=""
+ if [ "x$VERBOSE" = "xyes" ]; then
+ ERRDIR=""
+ else
+ ERRDIR='2>/dev/null'
+ fi
+ TARGET='testfunc'
+ cat <<EOF >testfunc.c
+#include <stdio.h>
+#include <sys/types.h>
+$TCADDINCL
+int main(void) {
+ /* Are we little or big endian? From Harbison & Steele */
+ union {
+ long l;
+ char c[sizeof(long)];
+ } u;
+ u.l = 1;
+ printf("%s\n", u.c[sizeof(long)-1] == 1 ? "21" : "12");
+ return(0);
+}
+EOF
+ ;;
+ "sanity")
+ TLIB=""
+ if [ "x$VERBOSE" = "xno" ]; then
+ ERRDIR='2>/dev/null'
+ else
+ ERRDIR=""
+ fi
+ TARGET='dummy'
+ ;;
+ "func")
+ if [ "x$2" = "x" ]; then
+ exit
+ fi
+ TLIB=""
+ if [ "x$VERBOSE" = "xyes" ]; then
+ ERRDIR=""
+ else
+ ERRDIR='2>/dev/null'
+ fi
+ TARGET='testfunc'
+ cat <<EOF >testfunc.c
+$TCADDINCL
+int main(void) {
+ $2();
+ return(0);
+}
+EOF
+ ;;
+ "header")
+ if [ "x$2" = "x" ]; then
+ exit
+ fi
+ TLIB=""
+ if [ "x$VERBOSE" = "xyes" ]; then
+ ERRDIR=""
+ else
+ ERRDIR='2>/dev/null'
+ fi
+ TARGET='testfunc'
+ cat <<EOF >testfunc.c
+$TCADDINCL
+#include <$2>
+int main(void) {
+ return(0);
+}
+EOF
+ ;;
+ *)
+ exit
+ ;;
+esac
+
+#
+# Get makefile settings and build a basic Makefile
+#
+rm -f dummy ../dummy.o testfunc ../testfunc.o
+
+cat ../Makefile.config > Makefile
+cat <<EOF >> Makefile
+CFLAGS=\$(OPTIM) \$(CFLAGS1) \$(EXTRA_CFLAGS)
+LIBS=\$(EXTRA_LIBS) \$(LIBS1)
+INCLUDES=\$(INCLUDES1) \$(EXTRA_INCLUDES)
+LDFLAGS=\$(LDFLAGS1) \$(EXTRA_LDFLAGS)
+
+dummy:
+ cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) -o helpers/dummy helpers/dummy.c $TLIB \$(LIBS)
+
+testfunc:
+ cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) -o helpers/testfunc helpers/testfunc.c $TLIB \$(LIBS)
+EOF
+
+# Now run that Makefile
+eval "${MAKE-make} ${TARGET} $ERRDIR >&2"
+
+# And see if dummy exists and is executable, if so, then we
+# assume the condition we are testing for is good
+#
+# Use our PrintPath helper script using the "-p" option to
+# have PrintPath just search this directory.
+
+if ./PrintPath -s -p`pwd` $TARGET ; then
+ if [ "x$OS" = "xMPE/iX" ]; then
+ # clever hack to check for unresolved externals without actually
+ # executing the test program
+ if eval "callci run `pwd`/$TARGET\;stdin=\*notfound 2>&1 | /bin/grep ^UNRESOLVED $ERRDIR >&2"; then
+ exit 1 # there were unresolved externals
+ fi
+ fi
+ if [ "x$TCRUNIT" = "xyes" ]; then
+ `pwd`/$TARGET
+ fi
+ exstat=0
+fi
+
diff --git a/APACHE_1_3_42/src/helpers/binbuild.sh b/APACHE_1_3_42/src/helpers/binbuild.sh
new file mode 100755
index 0000000000..bc29199b15
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/binbuild.sh
@@ -0,0 +1,314 @@
+#!/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.
+#
+#
+# binbuild.sh - Builds an Apache binary distribution.
+# Initially written by Lars Eilebrecht <lars@apache.org>.
+
+OS=`src/helpers/GuessOS`
+case "x$OS" in
+ x*OS390*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most";;
+ *cygwin*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most \
+ --enable-rule=SHARED_CORE --libexecdir=bin";;
+ *) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max";;
+esac
+APDIR=`pwd`
+APDIR=`basename $APDIR`
+VER=`echo $APDIR |sed s/apache_//`
+TAR="`src/helpers/PrintPath tar`"
+GTAR="`src/helpers/PrintPath gtar`"
+GZIP="`src/helpers/PrintPath gzip`"
+
+if [ x$1 != x ]
+then
+ USER=$1
+else
+ USER="`src/helpers/buildinfo.sh -n %u@%h%d`"
+fi
+
+if [ ! -f ./ABOUT_APACHE ]
+then
+ echo "ERROR: The current directory contains no valid Apache distribution."
+ echo "Please change the directory to the top level directory of a freshly"
+ echo "unpacked Apache 1.3 source distribution and re-execute the script"
+ echo "'./src/helpers/bindbuild.sh'."
+ exit 1;
+fi
+
+if [ -d ./CVS ]
+then
+ echo "ERROR: The current directory is a CVS checkout of Apache."
+ echo "Only a standard Apache 1.3 source distribution should be used to"
+ echo "create a binary distribution."
+ exit 1;
+fi
+
+echo "Building Apache $VER binary distribution..."
+echo "Platform is \"$OS\"..."
+
+( echo "Build log for Apache binary distribution" && \
+ echo "----------------------------------------------------------------------" && \
+ ./configure $CONFIGPARAM && \
+ echo "----------------------------------------------------------------------" && \
+ make clean && \
+ rm -rf bindist install-bindist.sh *.bindist
+ echo "----------------------------------------------------------------------" && \
+ make && \
+ echo "----------------------------------------------------------------------" && \
+ make install-quiet root="bindist/" && \
+ echo "----------------------------------------------------------------------" && \
+ make clean && \
+ echo "----------------------------------------------------------------------" && \
+ echo "[EOF]" \
+) > build.log 2>&1
+
+if [ ! -f ./bindist/bin/httpd ]
+then
+ echo "ERROR: Failed to build Apache. See \"build.log\" for details."
+ exit 1;
+fi
+
+echo "Binary image successfully created..."
+
+./bindist/bin/httpd -v
+
+echo "Creating supplementary files..."
+
+( echo " " && \
+ echo "Apache $VER binary distribution" && \
+ echo "================================" && \
+ echo " " && \
+ echo "This binary distribution is usable on a \"$OS\"" && \
+ echo "system and was built by \"$USER\"." && \
+ echo "" && \
+ echo "The distribution contains all standard Apache modules as shared" && \
+ echo "objects. This allows you to enable or disable particular modules" && \
+ echo "with the LoadModule/AddModule directives in the configuration file" && \
+ echo "without the need to re-compile Apache." && \
+ echo "" && \
+ echo "See \"INSTALL.bindist\" on how to install the distribution." && \
+ echo " " && \
+ echo "NOTE: Please do not send support-related mails to the address mentioned" && \
+ echo " above or to any member of the Apache Group! Support questions" && \
+ echo " should be directed to the forums mentioned at" && \
+ echo " http://httpd.apache.org/lists.html#http-users" && \
+ echo " where some of the Apache team lurk, in the company of many other" && \
+ echo " Apache gurus who should be able to help." && \
+ echo " If you think you found a bug in Apache or have a suggestion please" && \
+ echo " visit the bug report page at http://httpd.apache.org/bug_report.html" && \
+ echo " " && \
+ echo "----------------------------------------------------------------------" && \
+ ./bindist/bin/httpd -V && \
+ echo "----------------------------------------------------------------------" \
+) > README.bindist
+cp README.bindist ../apache_$VER-$OS.README
+
+( echo " " && \
+ echo "Apache $VER binary installation" && \
+ echo "================================" && \
+ echo " " && \
+ echo "To install this binary distribution you have to execute the installation" && \
+ echo "script \"install-bindist.sh\" in the top-level directory of the distribution." && \
+ echo " " && \
+ echo "The script takes the ServerRoot directory into which you want to install" && \
+ echo "Apache as an option. If you ommit the option the default path" && \
+ echo "\"/usr/local/apache\" is used." && \
+ echo "Make sure you have write permissions in the target directory, e.g. switch" && \
+ echo "to user \"root\" before you execute the script." && \
+ echo " " && \
+ echo "See \"README.bindist\" for further details about this distribution." && \
+ echo " " && \
+ echo "Please note that this distribution includes the complete Apache source code." && \
+ echo "Therefore you may compile Apache yourself at any time if you have a compiler" && \
+ echo "installation on your system." && \
+ echo "See \"INSTALL\" for details on how to accomplish this." && \
+ echo " " \
+) > INSTALL.bindist
+
+( echo "#!/bin/sh" && \
+ echo "#" && \
+ echo "# Usage: install-bindist.sh [ServerRoot]" && \
+ echo "# This script installs the Apache binary distribution and" && \
+ echo "# was automatically created by binbuild.sh." && \
+ echo " " && \
+ echo "lmkdir()" && \
+ echo "{" && \
+ echo " path=\"\"" && \
+ echo " dirs=\`echo \$1 | sed -e 's%/% %g'\`" && \
+ echo " mode=\$2" && \
+ echo " " && \
+ echo " set -- \${dirs}" && \
+ echo " " && \
+ echo " for d in \${dirs}" && \
+ echo " do" && \
+ echo " path=\"\${path}/\$d\"" && \
+ echo " if test ! -d \"\${path}\" ; then" && \
+ echo " mkdir \${path}" && \
+ echo " if test \$? -ne 0 ; then" && \
+ echo " echo \"Failed to create directory: \${path}\"" && \
+ echo " exit 1" && \
+ echo " fi" && \
+ echo " chmod \${mode} \${path}" && \
+ echo " fi" && \
+ echo " done" && \
+ echo "}" && \
+ echo " " && \
+ echo "lcopy()" && \
+ echo "{" && \
+ echo " from=\$1" && \
+ echo " to=\$2" && \
+ echo " dmode=\$3" && \
+ echo " fmode=\$4" && \
+ echo " " && \
+ echo " test -d \${to} || lmkdir \${to} \${dmode}" && \
+ echo " (cd \${from} && tar -cf - *) | (cd \${to} && tar -xf -)" && \
+ echo " " && \
+ echo " if test \"X\${fmode}\" != X ; then" && \
+ echo " find \${to} -type f -print | xargs chmod \${fmode}" && \
+ echo " fi" && \
+ echo " if test \"X\${dmode}\" != X ; then" && \
+ echo " find \${to} -type d -print | xargs chmod \${dmode}" && \
+ echo " fi" && \
+ echo "}" && \
+ echo " " && \
+ echo "##" && \
+ echo "## determine path to (optional) Perl interpreter" && \
+ echo "##" && \
+ echo "PERL=no-perl5-on-this-system" && \
+ echo "perls='perl5 perl'" && \
+ echo "path=\`echo \$PATH | sed -e 's/:/ /g'\`" && \
+ echo " " && \
+ echo "for dir in \${path} ; do" && \
+ echo " for pperl in \${perls} ; do" && \
+ echo " if test -f \"\${dir}/\${pperl}\" ; then" && \
+ echo " if \`\${dir}/\${pperl} -v | grep 'version 5\.' >/dev/null 2>&1\` ; then" && \
+ echo " PERL=\"\${dir}/\${pperl}\"" && \
+ echo " break" && \
+ echo " fi" && \
+ echo " fi" && \
+ echo " done" && \
+ echo "done" && \
+ echo " " && \
+ echo "if [ .\$1 = . ]" && \
+ echo "then" && \
+ echo " SR=/usr/local/apache" && \
+ echo "else" && \
+ echo " SR=\$1" && \
+ echo "fi" && \
+ echo "echo \"Installing binary distribution for platform $OS\"" && \
+ echo "echo \"into directory \$SR ...\"" && \
+ echo "lmkdir \$SR 755" && \
+ echo "lmkdir \$SR/proxy 750" && \
+ echo "lmkdir \$SR/logs 750" && \
+ echo "lcopy bindist/man \$SR/man 755 644" && \
+ echo "lcopy bindist/libexec \$SR/libexec 750 750" && \
+ echo "lcopy bindist/include \$SR/include 755 644" && \
+ echo "lcopy bindist/icons \$SR/icons 755 644" && \
+ echo "lcopy bindist/cgi-bin \$SR/cgi-bin 750 750" && \
+ echo "lcopy bindist/bin \$SR/bin 750 750" && \
+ echo "if [ -d \$SR/conf ]" && \
+ echo "then" && \
+ echo " echo \"[Preserving existing configuration files.]\"" && \
+ echo " cp bindist/conf/*.default \$SR/conf/" && \
+ echo "else" && \
+ echo " lcopy bindist/conf \$SR/conf 750 640" && \
+ echo "fi" && \
+ echo "if [ -d \$SR/htdocs ]" && \
+ echo "then" && \
+ echo " echo \"[Preserving existing htdocs directory.]\"" && \
+ echo "else" && \
+ echo " lcopy bindist/htdocs \$SR/htdocs 755 644" && \
+ echo "fi" && \
+ echo " " && \
+ echo "sed -e \"s;^#!/.*;#!\$PERL;\" -e \"s;\@prefix\@;\$SR;\" -e \"s;\@sbindir\@;\$SR/bin;\" \\" && \
+ echo " -e \"s;\@libexecdir\@;\$SR/libexec;\" -e \"s;\@includedir\@;\$SR/include;\" \\" && \
+ echo " -e \"s;\@sysconfdir\@;\$SR/conf;\" bindist/bin/apxs > \$SR/bin/apxs" && \
+ echo "sed -e \"s;^#!/.*;#!\$PERL;\" bindist/bin/dbmmanage > \$SR/bin/dbmmanage" && \
+ echo "sed -e \"s%/usr/local/apache%\$SR%\" \$SR/conf/httpd.conf.default > \$SR/conf/httpd.conf" && \
+ echo "sed -e \"s%PIDFILE=%PIDFILE=\$SR/%\" -e \"s%HTTPD=%HTTPD=\\\"\$SR/%\" -e \"s%httpd\$%httpd -d \$SR -R \$SR/libexec\\\"%\" bindist/bin/apachectl > \$SR/bin/apachectl" && \
+ echo " " && \
+ echo "echo \"Ready.\"" && \
+ echo "echo \" +--------------------------------------------------------+\"" && \
+ echo "echo \" | You now have successfully installed the Apache $VER |\"" && \
+ echo "echo \" | HTTP server. To verify that Apache actually works |\"" && \
+ echo "echo \" | correctly you should first check the (initially |\"" && \
+ echo "echo \" | created or preserved) configuration files: |\"" && \
+ echo "echo \" | |\"" && \
+ echo "echo \" | \$SR/conf/httpd.conf\"" && \
+ echo "echo \" | |\"" && \
+ echo "echo \" | You should then be able to immediately fire up |\"" && \
+ echo "echo \" | Apache the first time by running: |\"" && \
+ echo "echo \" | |\"" && \
+ echo "echo \" | \$SR/bin/apachectl start \"" &&\
+ echo "echo \" | |\"" && \
+ echo "echo \" | Thanks for using Apache. The Apache Group |\"" && \
+ echo "echo \" | http://www.apache.org/ |\"" && \
+ echo "echo \" +--------------------------------------------------------+\"" && \
+ echo "echo \" \"" \
+) > install-bindist.sh
+chmod 755 install-bindist.sh
+
+sed -e "s%\"htdocs%\"/usr/local/apache/htdocs%" \
+ -e "s%\"icons%\"/usr/local/apache/icons%" \
+ -e "s%\"cgi-bin%\"/usr/local/apache/cgi-bin%" \
+ -e "s%\"proxy%\"/usr/local/apache/proxy%" \
+ -e "s%^ServerAdmin.*%ServerAdmin you@your.address%" \
+ -e "s%#ServerName.*%#ServerName localhost%" \
+ -e "s%Port 8080%Port 80%" \
+ bindist/conf/httpd.conf.default > bindist/conf/httpd.conf
+cp bindist/conf/httpd.conf bindist/conf/httpd.conf.default
+
+echo "Creating distribution archive and readme file..."
+
+if [ ".`grep -i error build.log > /dev/null`" != . ]
+then
+ echo "ERROR: Failed to build Apache. See \"build.log\" for details."
+ exit 1;
+else
+ if [ "x$GTAR" != "x" ]
+ then
+ $GTAR -zcf ../apache_$VER-$OS.tar.gz -C .. apache_$VER
+ else
+ if [ "x$TAR" != "x" ]
+ then
+ case "x$OS" in
+ x*OS390*) $TAR -cfU ../apache_$VER-$OS.tar -C .. apache_$VER;;
+ *) (cd .. && $TAR -cf apache_$VER-$OS.tar apache_$VER);;
+ esac
+ if [ "x$GZIP" != "x" ]
+ then
+ $GZIP ../apache_$VER-$OS.tar
+ fi
+ else
+ echo "ERROR: Could not find a 'tar' program!"
+ echo " Please execute the following commands manually:"
+ echo " tar -cf ../apache_$VER-$OS.tar ."
+ echo " gzip ../apache_$VER-$OS.tar"
+ fi
+ fi
+
+ if [ -f ../apache_$VER-$OS.tar.gz ] && [ -f ../apache_$VER-$OS.README ]
+ then
+ echo "Ready."
+ echo "You can find the binary archive (apache_$VER-$OS.tar.gz)"
+ echo "and the readme file (apache_$VER-$OS.README) in the"
+ echo "parent directory."
+ exit 0;
+ else
+ exit 1;
+ fi
+fi
diff --git a/APACHE_1_3_42/src/helpers/buildinfo.sh b/APACHE_1_3_42/src/helpers/buildinfo.sh
new file mode 100755
index 0000000000..82596ef224
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/buildinfo.sh
@@ -0,0 +1,171 @@
+#!/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.
+#
+#
+# buildinfo.sh -- Determine Build Information
+# Initially written by Ralf S. Engelschall <rse@apache.org>
+# for the Apache's Autoconf-style Interface (APACI)
+
+#
+# argument line handling
+#
+error=no
+if [ $# -ne 1 -a $# -ne 2 ]; then
+ error=yes
+fi
+if [ $# -eq 2 -a "x$1" != "x-n" ]; then
+ error=yes
+fi
+if [ "x$error" = "xyes" ]; then
+ echo "$0:Error: invalid argument line"
+ echo "$0:Usage: $0 [-n] <format-string>"
+ echo "Where <format-string> can contain:"
+ echo " %u ...... substituted by determined username (foo)"
+ echo " %h ...... substituted by determined hostname (bar)"
+ echo " %d ...... substituted by determined domainname (.com)"
+ echo " %D ...... substituted by determined day (DD)"
+ echo " %M ...... substituted by determined month (MM)"
+ echo " %Y ...... substituted by determined year (YYYYY)"
+ echo " %m ...... substituted by determined monthname (Jan)"
+ exit 1
+fi
+if [ $# -eq 2 ]; then
+ newline=no
+ format_string="$2"
+else
+ newline=yes
+ format_string="$1"
+fi
+
+#
+# initialization
+#
+username=''
+hostname=''
+domainname=''
+time_day=''
+time_month=''
+time_year=''
+time_monthname=''
+
+#
+# determine username
+#
+username="$LOGNAME"
+if [ "x$username" = "x" ]; then
+ username="$USER"
+ if [ "x$username" = "x" ]; then
+ username="`(whoami) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ "x$username" = "x" ]; then
+ username="`(who am i) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ "x$username" = "x" ]; then
+ username='unknown'
+ fi
+ fi
+ fi
+fi
+
+#
+# determine hostname and domainname
+#
+hostname="`(uname -n) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+if [ "x$hostname" = "x" ]; then
+ hostname="`(hostname) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ "x$hostname" = "x" ]; then
+ hostname='unknown'
+ fi
+fi
+case $hostname in
+ *.* )
+ domainname=".`echo $hostname | cut -d. -f2-`"
+ hostname="`echo $hostname | cut -d. -f1`"
+ ;;
+esac
+if [ "x$domainname" = "x" ]; then
+ if [ -f /etc/resolv.conf ]; then
+ domainname="`egrep '^[ ]*domain' /etc/resolv.conf | head -1 |\
+ sed -e 's/.*domain//' \
+ -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
+ -e 's/^\.//' -e 's/^/./' |\
+ awk '{ printf("%s", $1); }'`"
+ if [ "x$domainname" = "x" ]; then
+ domainname="`egrep '^[ ]*search' /etc/resolv.conf | head -1 |\
+ sed -e 's/.*search//' \
+ -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
+ -e 's/ .*//' -e 's/ .*//' \
+ -e 's/^\.//' -e 's/^/./' |\
+ awk '{ printf("%s", $1); }'`"
+ fi
+ fi
+fi
+
+#
+# determine current time
+#
+time_day="`date '+%d' | awk '{ printf("%s", $1); }'`"
+time_month="`date '+%m' | awk '{ printf("%s", $1); }'`"
+time_year="`date '+%Y' 2>/dev/null | awk '{ printf("%s", $1); }'`"
+if [ "x$time_year" = "x" ]; then
+ time_year="`date '+%y' | awk '{ printf("%s", $1); }'`"
+ case $time_year in
+ [5-9][0-9]) time_year="19$time_year" ;;
+ [0-4][0-9]) time_year="20$time_year" ;;
+ esac
+fi
+case $time_month in
+ 1|01) time_monthname='Jan' ;;
+ 2|02) time_monthname='Feb' ;;
+ 3|03) time_monthname='Mar' ;;
+ 4|04) time_monthname='Apr' ;;
+ 5|05) time_monthname='May' ;;
+ 6|06) time_monthname='Jun' ;;
+ 7|07) time_monthname='Jul' ;;
+ 8|08) time_monthname='Aug' ;;
+ 9|09) time_monthname='Sep' ;;
+ 10) time_monthname='Oct' ;;
+ 11) time_monthname='Nov' ;;
+ 12) time_monthname='Dec' ;;
+esac
+
+#
+# create result string
+#
+if [ "x$newline" = "xyes" ]; then
+ echo $format_string |\
+ sed -e "s;%u;$username;g" \
+ -e "s;%h;$hostname;g" \
+ -e "s;%d;$domainname;g" \
+ -e "s;%D;$time_day;g" \
+ -e "s;%M;$time_month;g" \
+ -e "s;%Y;$time_year;g" \
+ -e "s;%m;$time_monthname;g"
+else
+ echo "${format_string}&" |\
+ sed -e "s;%u;$username;g" \
+ -e "s;%h;$hostname;g" \
+ -e "s;%d;$domainname;g" \
+ -e "s;%D;$time_day;g" \
+ -e "s;%M;$time_month;g" \
+ -e "s;%Y;$time_year;g" \
+ -e "s;%m;$time_monthname;g" |\
+ awk '-F&' '{ printf("%s", $1); }'
+fi
+
diff --git a/APACHE_1_3_42/src/helpers/checkheader.sh b/APACHE_1_3_42/src/helpers/checkheader.sh
new file mode 100755
index 0000000000..a3fccc781c
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/checkheader.sh
@@ -0,0 +1,46 @@
+#!/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.
+#
+#
+# checkheader.sh -- Check whether a C header file exists
+# Initially written by Ralf S. Engelschall for the Apache
+# configuration mechanism
+
+header=$1
+rc=1
+if [ "x$CPP" = "x" ]; then
+ CPP='NOT-AVAILABLE'
+fi
+if [ "x$CPP" != "xNOT-AVAILABLE" ]; then
+ # create a test C source
+ cat >conftest.c <<EOF
+#include <$header>
+Syntax Error
+EOF
+ (eval "$CPP conftest.c >/dev/null") 2>conftest.out
+ my_error=`grep -v '^ *+' conftest.out`
+ if [ "x$my_error" = "x" ]; then
+ rc=0
+ fi
+else
+ if [ -f "/usr/include/$header" ]; then
+ rc=0
+ fi
+fi
+rm -f conftest.*
+exit $rc
+
diff --git a/APACHE_1_3_42/src/helpers/cvstodsp5.pl b/APACHE_1_3_42/src/helpers/cvstodsp5.pl
new file mode 100644
index 0000000000..88e58f822c
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/cvstodsp5.pl
@@ -0,0 +1,58 @@
+# 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.
+
+use IO::File;
+use File::Find;
+
+chdir '..';
+find(\&tovc5, '.');
+
+sub tovc5 {
+
+ if (m|.dsp$|) {
+ $oname = $_;
+ $tname = '.#' . $_;
+ $verchg = 0;
+ $srcfl = new IO::File $oname, "r" || die;
+ $dstfl = new IO::File $tname, "w" || die;
+ while ($src = <$srcfl>) {
+ if ($src =~ s|Format Version 6\.00|Format Version 5\.00|) {
+ $verchg = -1;
+ }
+ if ($src =~ s|^(# ADD CPP .*)/ZI (.*)|$1/Zi $2|) {
+ $verchg = -1;
+ }
+ if ($src =~ s|^(# ADD BASE CPP .*)/ZI (.*)|$1/Zi $2|) {
+ $verchg = -1;
+ }
+ if ($src !~ m|^# PROP AllowPerConfigDependencies|) {
+ print $dstfl $src; }
+ else {
+ $verchg = -1;
+
+ }
+ }
+ undef $srcfl;
+ undef $dstfl;
+ if ($verchg) {
+ unlink $oname || die;
+ rename $tname, $oname || die;
+ print "Converted VC6 project " . $oname . " to VC5 in " . $File::Find::dir . "\n";
+ }
+ else {
+ unlink $tname;
+ }
+ }
+}
diff --git a/APACHE_1_3_42/src/helpers/dsp5tocvs.pl b/APACHE_1_3_42/src/helpers/dsp5tocvs.pl
new file mode 100644
index 0000000000..19875aa11e
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/dsp5tocvs.pl
@@ -0,0 +1,55 @@
+# 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.
+
+use IO::File;
+use File::Find;
+
+chdir '..';
+find(\&tovc6, '.');
+
+sub tovc6 {
+
+ if (m|.dsp$|) {
+ $oname = $_;
+ $tname = '.#' . $_;
+ $verchg = 0;
+ $srcfl = new IO::File $_, "r" || die;
+ $dstfl = new IO::File $tname, "w" || die;
+ while ($src = <$srcfl>) {
+ if ($src =~ s|Format Version 5\.00|Format Version 6\.00|) {
+ $verchg = -1;
+ }
+ if ($src =~ s|^(!MESSAGE .*)\\\n|$1|) {
+ $cont = <$srcfl>;
+ $src = $src . $cont;
+ $verchg = -1;
+ }
+ print $dstfl $src;
+ if ($verchg && $src =~ m|^# Begin Project|) {
+ print $dstfl "# PROP AllowPerConfigDependencies 0\n";
+ }
+ }
+ undef $srcfl;
+ undef $dstfl;
+ if ($verchg) {
+ unlink $oname || die;
+ rename $tname, $oname || die;
+ print "Converted VC5 project " . $oname . " to VC6 in " . $File::Find::dir . "\n";
+ }
+ else {
+ unlink $tname;
+ }
+ }
+}
diff --git a/APACHE_1_3_42/src/helpers/dummy.c b/APACHE_1_3_42/src/helpers/dummy.c
new file mode 100644
index 0000000000..cf938b8402
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/dummy.c
@@ -0,0 +1,12 @@
+/* this file is used by TestLib */
+/* the extra decl is to shutup gcc -Wmissing-prototypes */
+extern int foo (const char *c);
+int foo ( const char *c )
+{
+return *c;
+}
+int main(void) {
+ const char *c = "";
+ (void)foo(c);
+ return 0;
+}
diff --git a/APACHE_1_3_42/src/helpers/find-dbm-lib b/APACHE_1_3_42/src/helpers/find-dbm-lib
new file mode 100644
index 0000000000..4100719680
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/find-dbm-lib
@@ -0,0 +1,90 @@
+# 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.
+#
+#
+# Our config tool sucks... if this script decides to modify the
+# LIBS variable it won't be used by any of the other TestCompiles.
+# So unless we protect ourselves with the found_dbm variable
+# we'd end up having to do the work twice... and we'd end up putting
+# two -ldbm -ldbm into the LIBS variable.
+
+if [ "x$found_dbm" = "x" ]; then
+ if ./helpers/TestCompile func dbm_open; then
+ found_dbm=1
+ else
+ found_dbm=0
+ case "$PLAT" in
+ *-linux*)
+ # many systems don't have -ldbm
+ DBM_LIB=""
+ if ./helpers/TestCompile lib ndbm dbm_open; then
+ DBM_LIB="-lndbm"
+ if ./helpers/TestCompile lib db1 dbm_open; then
+ # Red Hat needs this; ndbm.h lives in db1
+ CFLAGS="$CFLAGS -I/usr/include/db1"
+ fi
+ elif ./helpers/TestCompile lib db1 dbm_open; then
+ # For Red Hat 7, if not handled by the ndbm case above
+ DBM_LIB="-ldb1"
+ CFLAGS="$CFLAGS -I/usr/include/db1"
+ elif ./helpers/TestCompile lib gdbm dbm_open; then
+ DBM_LIB="-lgdbm"
+ CFLAGS="$CFLAGS -I/usr/include/gdbm"
+ elif ./helpers/TestCompile lib dbm dbm_open; then
+ DBM_LIB="-ldbm"
+ fi
+ if [ "x$DBM_LIB" != "x" ]; then
+ LIBS="$LIBS $DBM_LIB"
+ found_dbm=1
+ fi
+ ;;
+ *-cygwin*)
+ # we use the shared DLL version of gdbm if available
+ DBM_LIB=""
+ if ./helpers/TestCompile lib gdbm dbm_open; then
+ DBM_LIB="-lgdbm"
+ LIBS="$LIBS $DBM_LIB"
+ found_dbm=1
+ fi
+ ;;
+ *)
+ if [ "x$DBM_LIB" != "x" ]; then
+ oldLIBS="$LIBS"
+ LIBS="$LIBS $DBM_LIB"
+ if ./helpers/TestCompile func dbm_open; then
+ found_dbm=1
+ else
+ found_dbm=0
+ LIBS="$oldLIBS"
+ fi
+ else
+ for dblib in dbm ndbm db
+ do
+ DBM_LIB=""
+ if ./helpers/TestCompile lib $dblib dbm_open; then
+ DBM_LIB="-l${dblib}"
+ LIBS="$LIBS $DBM_LIB"
+ found_dbm=1
+ break
+ fi
+ done
+ fi
+ ;;
+ esac
+ if [ "x$found_dbm" = "x1" ]; then
+ echo " + using $DBM_LIB for DBM support"
+ fi
+ fi
+fi
diff --git a/APACHE_1_3_42/src/helpers/findcpp.sh b/APACHE_1_3_42/src/helpers/findcpp.sh
new file mode 100755
index 0000000000..6a31bc9d02
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/findcpp.sh
@@ -0,0 +1,84 @@
+#!/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.
+#
+#
+# findcpp.sh -- Find out how to _directly_ run the C Pre-Processor (CPP)
+# Initially written by Ralf S. Engelschall for the Apache configuration
+# mechanism
+
+# create a test C source:
+# - has to use extension ".c" because some CPP only accept this one
+# - uses assert.h because this is a standard header and harmless to include
+# - contains a Syntax Error to make sure it passes only the preprocessor
+# but not the real compiler pass
+cat >conftest.c <<EOF
+#include <assert.h>
+Syntax Error
+EOF
+
+# some braindead systems have a CPP define for a directory :-(
+if [ "x$CPP" != "x" ]; then
+ if [ -d "$CPP" ]; then
+ CPP=''
+ fi
+fi
+if [ "x$CPP" != "x" ]; then
+ # case 1: user provided a default CPP variable (we only check)
+ (eval "$CPP conftest.c >/dev/null") 2>conftest.out
+ my_error=`grep -v '^ *+' conftest.out`
+ if [ "x$my_error" != "x" ]; then
+ CPP=''
+ fi
+else
+ # case 2: no default CPP variable (we have to find one)
+ # 1. try the standard -E option
+ CPP="${CC-cc} -E"
+ (eval "$CPP conftest.c >/dev/null") 2>conftest.out
+ my_error=`grep -v '^ *+' conftest.out`
+ if [ "x$my_error" != "x" ]; then
+ # 2. try the -E option and GCC's -traditional-ccp option
+ CPP="${CC-cc} -E -traditional-cpp"
+ (eval "$CPP conftest.c >/dev/null") 2>conftest.out
+ my_error=`grep -v '^ *+' conftest.out`
+ if [ "x$my_error" != "x" ]; then
+ # 3. try a standalone cpp command in $PATH and lib dirs
+ CPP="`./helpers/PrintPath cpp`"
+ if [ "x$CPP" = "x" ]; then
+ CPP="`./helpers/PrintPath -p/lib:/usr/lib:/usr/local/lib cpp`"
+ fi
+ if [ "x$CPP" != "x" ]; then
+ (eval "$CPP conftest.c >/dev/null") 2>conftest.out
+ my_error=`grep -v '^ *+' conftest.out`
+ if [ "x$my_error" != "x" ]; then
+ # ok, we gave up...
+ CPP=''
+ fi
+ fi
+ fi
+ fi
+fi
+
+# cleanup after work
+rm -f conftest.*
+
+# Ok, empty CPP variable now means it's not available
+if [ "x$CPP" = "x" ]; then
+ CPP='NOT-AVAILABLE'
+fi
+
+echo $CPP
+
diff --git a/APACHE_1_3_42/src/helpers/fixwin32mak.pl b/APACHE_1_3_42/src/helpers/fixwin32mak.pl
new file mode 100644
index 0000000000..59ce92dd94
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/fixwin32mak.pl
@@ -0,0 +1,62 @@
+# 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.
+#
+#
+# fixwin32mak.pl ::: Apache/Win32 maintanace program
+#
+# This program, launched from the build/ directory, replaces all nasty absoulute paths
+# in the win32 .mak files with the appropriate relative root.
+#
+# Run this program prior to committing or packaging any newly exported make files.
+
+use Cwd;
+use IO::File;
+use File::Find;
+
+chdir '..';
+$root = cwd;
+$root =~ s|.:(.*)|cd "$1|;
+$root =~ s|/|\\\\|g;
+find(\&fixcwd, '.');
+
+sub fixcwd {
+ if (m|.mak$|) {
+ $repl = $File::Find::dir;
+ $repl =~ s|^./||;
+ $repl =~ s|[^\./]+|..|g;
+ $repl =~ s|/|\\|;
+ $oname = $_;
+ $tname = '.#' . $_;
+ $verchg = 0;
+ $srcfl = new IO::File $_, "r" || die;
+ $dstfl = new IO::File $tname, "w" || die;
+ while ($src = <$srcfl>) {
+ if ($src =~ s|^(\s*)$root|$1cd "$repl|) {
+ $verchg = -1;
+ }
+ print $dstfl $src;
+ }
+ undef $srcfl;
+ undef $dstfl;
+ if ($verchg) {
+ unlink $oname || die;
+ rename $tname, $oname || die;
+ print "Corrected absolute paths within " . $oname . " in " . $File::Find::dir . "\n";
+ }
+ else {
+ unlink $tname;
+ }
+ }
+}
diff --git a/APACHE_1_3_42/src/helpers/fmn.sh b/APACHE_1_3_42/src/helpers/fmn.sh
new file mode 100755
index 0000000000..1e018e44f4
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/fmn.sh
@@ -0,0 +1,60 @@
+#!/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.
+#
+#
+# fmn.sh -- find a modules (structure) name
+#
+# Extracted from the Configure script for use with
+# Apache's Autoconf-style Interface (APACI).
+
+# input: the modules source file
+modfile=$1
+
+# the part from the Configure script
+tmpfile=${TMPDIR-/tmp}/fmn.tmp.$$
+rm -f $tmpfile
+modname=''
+ext=`echo $modfile | sed 's/^.*\.//'`
+modbase=`echo $modfile | sed 's/\.[^.]*$//'`
+if [ "x$ext" = "x$modfile" ]; then ext=o; modbase=$modfile; modfile=$modbase.o; fi
+if [ "x$ext" = "x" ] ; then ext=o; modbase=$modfile; fi
+if [ "x$ext" = "xc" ] ; then ext=o; fi
+if [ -r $modbase.module ] ; then
+ cat $modbase.module >$tmpfile
+else
+ if [ -f $modbase.c ] ; then
+ modname=`egrep '^module .*;' $modbase.c | head -1 |\
+ sed 's/^module.*[ ][ ]*//' | \
+ sed 's/[ ]*;[ ]*$//'`
+ if grep "MODULE-DEFINITION-" $modbase.c >/dev/null; then
+ cat $modbase.c | \
+ sed '1,/MODULE-DEFINITION-START/d;/MODULE-DEFINITION-END/,$d' >$tmpfile
+ fi
+ fi
+fi
+if [ -r $tmpfile ] ; then
+ modname=`grep "Name:" $tmpfile | sed 's/^.*Name:[ ]*//'`
+fi
+if [ "x$modname" = "x" ] ; then
+ modname=`echo $modbase | sed 's/^.*\///' | \
+ sed 's/^mod_//' | sed 's/^lib//' | sed 's/$/_module/'`
+fi
+rm -f $tmpfile
+
+# output: the name of the module structure symbol
+echo "$modname"
+
diff --git a/APACHE_1_3_42/src/helpers/fp2rp b/APACHE_1_3_42/src/helpers/fp2rp
new file mode 100755
index 0000000000..217ecfd5aa
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/fp2rp
@@ -0,0 +1,29 @@
+#!/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.
+#
+#
+# fp2rp -- convert a standard forward path to a reverse dotted path
+
+if [ "x$1" = "x." ]; then
+ rp="."
+else
+ rp=""
+ for pe in `IFS="$IFS/"; echo $1`; do
+ rp="../$rp"
+ done
+fi
+echo $rp | sed -e 's:/$::'
diff --git a/APACHE_1_3_42/src/helpers/getuid.sh b/APACHE_1_3_42/src/helpers/getuid.sh
new file mode 100755
index 0000000000..2b6d422640
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/getuid.sh
@@ -0,0 +1,79 @@
+#!/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.
+#
+#
+# Return the uid of the process being run. If we cannot
+# determine what it is, return '?'.
+#
+# Initially written by Jim Jagielski for the Apache configuration mechanism
+
+# First we try 'id'
+if `./src/helpers/PrintPath -s id` ; then
+ AP_IDPATH=`./src/helpers/PrintPath id`
+ # See if it's a POSIX 'id'
+ if `$AP_IDPATH -u >/dev/null 2>&1` ; then
+ AP_RETVAL=`$AP_IDPATH -u`
+ echo $AP_RETVAL
+ exit 0
+ else
+ AP_RETVAL=`$AP_IDPATH | \
+ sed -e 's/^.*uid[ ]*=[ ]*[^0123456789]*//' | \
+ sed -e 's/[ ]*(.*$//'`
+ echo $AP_RETVAL
+ exit 0
+ fi
+fi
+
+#
+# Ugg. Now we have to grab the login name of the process, and
+# scan /etc/passwd.
+#
+# Try 'whoami' first, then 'who am i' (making sure to strip away
+# the who crud) and finally just copy $LOGNAME
+#
+if `./src/helpers/PrintPath -s whoami` ; then
+ AP_WAIPATH=`./src/helpers/PrintPath whoami`
+ AP_LOGNAME=`$AP_WAIPATH`
+else
+ AP_LOGNAME=`who am i | tail -1 | sed -e 's/[ ][ ]*.*$//'`
+fi
+
+#
+# See if we have a valid login name.
+#
+if [ "x$AP_LOGNAME" = "x" ]; then
+ AP_LOGNAME=$LOGNAME
+ if [ "x$AP_LOGNAME" = "x" ]; then
+ echo "?"
+ exit 1
+ fi
+fi
+
+#
+# Ok, now we scan through /etc/passwd
+#
+AP_RETVAL=`egrep \^${AP_LOGNAME}: /etc/passwd | \
+ sed -e 's/[^:]*:[^:]*://' | \
+ sed -e 's/:.*$//'`
+
+if [ "x$AP_RETVAL" = "x" ]; then
+ echo "?"
+ exit 1
+else
+ echo $AP_RETVAL
+ exit 0
+fi
diff --git a/APACHE_1_3_42/src/helpers/install.sh b/APACHE_1_3_42/src/helpers/install.sh
new file mode 100755
index 0000000000..dd00e9ba2d
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/install.sh
@@ -0,0 +1,131 @@
+#!/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.
+#
+#
+# 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 <rse apache.org>
+
+#
+# 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
+
+# Check if we need to add an executable extension (such as ".exe")
+# on specific OS to src and dst
+if [ -f "$src.exe" ]; then
+ if [ -f "$src" ]; then
+ : # Cygwin [ test ] is too stupid to do [ -f "$src.exe" ] && [ ! -f "$src" ]
+ else
+ ext=".exe"
+ fi
+fi
+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
+
diff --git a/APACHE_1_3_42/src/helpers/mfhead b/APACHE_1_3_42/src/helpers/mfhead
new file mode 100755
index 0000000000..277c396246
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/mfhead
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo "##"
+echo "## Apache Makefile, automatically generated by Configure script."
+echo "## Hand-edited changes will be lost if the Configure script is re-run."
+echo "## Sources: - `./helpers/fp2rp $1`/Makefile.config (via $2)"
+echo "## - ./Makefile.tmpl"
+echo "##"
+echo ""
diff --git a/APACHE_1_3_42/src/helpers/mkdir.sh b/APACHE_1_3_42/src/helpers/mkdir.sh
new file mode 100755
index 0000000000..20d6963439
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/mkdir.sh
@@ -0,0 +1,46 @@
+#!/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.
+#
+#
+# mkdir.sh -- make directory hierarchy
+#
+# Based on `mkinstalldirs' from Noah Friedman <friedman@prep.ai.mit.edu>
+# as of 1994-03-25, which was placed in the Public Domain.
+# Cleaned up for Apache's Autoconf-style Interface (APACI)
+# by Ralf S. Engelschall <rse apache.org>
+
+umask 022
+errstatus=0
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" |\
+ sed -e 's/^:\//%/' -e 's/^://' -e 's/\// /g' -e 's/^%/\//'`
+ shift
+ pathcomp=
+ for d in ${1+"$@"}; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" || errstatus=$?
+ fi
+ pathcomp="$pathcomp/"
+ done
+done
+exit $errstatus
+
diff --git a/APACHE_1_3_42/src/helpers/mkshadow.sh b/APACHE_1_3_42/src/helpers/mkshadow.sh
new file mode 100755
index 0000000000..e6575bf4fa
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/mkshadow.sh
@@ -0,0 +1,121 @@
+#!/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.
+#
+#
+# mkshadow.sh -- create a shadow tree
+#
+# Initially written by Ralf S. Engelschall <rse apache.org>
+# for the shadow tree generation option (--shadow) of
+# Apache's Autoconf-style Interface (APACI)
+
+# default IFS
+DIFS='
+'
+
+# source and destination directory
+src=`echo $1 | sed -e 's:/$::'`
+dst=`echo $2 | sed -e 's:/$::'`
+
+# check whether source exists
+if [ ! -d $src ]; then
+ echo "mkshadow.sh:Error: source directory not found" 1>&2
+ exit 1
+fi
+
+# determine if one of the paths is an absolute path,
+# because then we have to use an absolute symlink
+oneisabs=0
+case $src in
+ /* ) oneisabs=1 ;;
+esac
+case $dst in
+ /* ) oneisabs=1 ;;
+esac
+
+# determine reverse directory for destination directory
+dstrevdir=''
+if [ "x$oneisabs" = "x0" ]; then
+ # (inlined fp2rp)
+ OIFS2="$IFS"; IFS='/'
+ for pe in $dst; do
+ dstrevdir="../$dstrevdir"
+ done
+ IFS="$OIFS2"
+else
+ src="`cd $src; pwd`";
+fi
+
+# create directory tree at destination
+if [ ! -d $dst ]; then
+ mkdir $dst
+fi
+DIRS="`cd $src; \
+ find . -type d -print |\
+ sed -e '/\/CVS/d' \
+ -e '/^\.$/d' \
+ -e 's:^\./::'`"
+OIFS="$IFS" IFS="$DIFS"
+for dir in $DIRS; do
+ mkdir $dst/$dir
+done
+IFS="$OIFS"
+
+# fill directory tree with symlinks to files
+FILES="`cd $src; \
+ find . -depth -print |\
+ sed -e '/\.o$/d' \
+ -e '/\.a$/d' \
+ -e '/\.so$/d' \
+ -e '/\.so-o$/d' \
+ -e '/\.cvsignore$/d' \
+ -e '/\/CVS/d' \
+ -e '/\.indent\.pro$/d' \
+ -e '/\.apaci.*/d' \
+ -e '/Makefile$/d' \
+ -e '/\/\.#/d' \
+ -e '/\.orig$/d' \
+ -e 's/^\.\///'`"
+OIFS="$IFS" IFS="$DIFS"
+for file in $FILES; do
+ # don't use `-type f' above for find because of symlinks
+ if [ -d "$src/$file" ]; then
+ continue
+ fi
+ basename=`echo $file | sed -e 's:^.*/::'`
+ dir=`echo $file | sed -e 's:[^/]*$::' -e 's:/$::' -e 's:$:/:' -e 's:^/$::'`
+ from="$src/$file"
+ to="$dst/$dir$basename"
+ if [ "x$oneisabs" = "x0" ]; then
+ if [ "x$dir" != "x" ]; then
+ subdir=`echo $dir | sed -e 's:/$::'`
+ # (inlined fp2rp)
+ revdir=''
+ OIFS2="$IFS"; IFS='/'
+ for pe in $subdir; do
+ revdir="../$revdir"
+ done
+ IFS="$OIFS2"
+ # finalize from
+ from="$revdir$from"
+ fi
+ from="$dstrevdir$from"
+ fi
+ echo " $to"
+ ln -s $from $to
+done
+IFS="$OIFS"
+
diff --git a/APACHE_1_3_42/src/helpers/ppl.sh b/APACHE_1_3_42/src/helpers/ppl.sh
new file mode 100755
index 0000000000..544a9ac979
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/ppl.sh
@@ -0,0 +1,66 @@
+#!/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.
+#
+#
+# ppl.sh -- pretty print a colon-sperarated list by avoiding
+# `tr' and `fmt' because these tools are different
+# between Unix platforms
+#
+# Initially written by Ralf S. Engelschall <rse apache.org>
+# for pretty printing lists in the --help option of
+# Apache's Autoconf-style Interface (APACI)
+
+list=`
+IFS=:
+for entry in $*; do
+ if [ "x$entry" != "x" ]; then
+ echo $entry
+ fi
+done |\
+sort |\
+awk '
+ BEGIN { list = ""; n = 0; }
+ {
+ list = list $1;
+ n = n + 1;
+ if (n == 1 || n == 2) {
+ list = list ":";
+ }
+ if (n == 3) {
+ list = list "\n";
+ n = 0;
+ }
+ }
+ END { print list; }
+'`
+IFS='
+'
+for entry in $list; do
+ echo $entry |\
+ awk -F: '
+ { printf("%-15s %-15s %-15s\n", $1, $2, $3); }
+ '
+done |\
+awk '{
+ if (length($0) > 48) {
+ printf("%s\n", substr($0, 0, 47));
+ } else {
+ print $0;
+ }
+}' |\
+sed -e 's/^/ [/' -e 's/$/]/'
+
diff --git a/APACHE_1_3_42/src/helpers/slo.sh b/APACHE_1_3_42/src/helpers/slo.sh
new file mode 100755
index 0000000000..df48bd29b6
--- /dev/null
+++ b/APACHE_1_3_42/src/helpers/slo.sh
@@ -0,0 +1,189 @@
+#!/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.
+#
+#
+# slo.h -- (S)eparate (L)inker (O)ptions by library class
+# Initially written by Ralf S. Engelschall <rse apache.org>
+
+DIFS='
+'
+
+#
+# parse out -L and -l options from command line
+#
+DIRS=''
+LIBS=''
+ARGV=''
+optprev=""
+OIFS="$IFS" IFS="$DIFS"
+for opt
+do
+ # concatenate with previous option if exists
+ if [ "x$optprev" != "x" ]; then
+ opt="${optprev}${opt}";
+ optprev=''
+ fi
+ # remember options for arg when used stand-alone
+ if [ "x$opt" = "x-L" -o "x$opt" = "x-l" ]; then
+ optprev="$opt"
+ continue;
+ fi
+ # split argument into option plus option argument
+ arg="`echo $opt | cut -c3-`"
+ opt="`echo $opt | cut -c1-2`"
+ # store into containers
+ case $opt in
+ -L) DIRS="$DIRS:$arg" ;;
+ -l) LIBS="$LIBS:$arg" ;;
+ *) ARGV="$ARGV $opt" ;;
+ esac
+done
+IFS="$OIFS"
+
+#
+# set linker default directories
+#
+DIRS_DEFAULT='/lib:/usr/lib'
+if [ "x$LD_LIBRARY_PATH" != "x" ]; then
+ DIRS_DEFAULT="$DIRS_DEFAULT:$LD_LIBRARY_PATH"
+fi
+
+#
+# sort options by class
+#
+DIRS_OBJ=''
+LIBS_OBJ=''
+DIRS_PIC=''
+LIBS_PIC=''
+DIRS_DSO=''
+LIBS_DSO=''
+
+# for each library...
+OIFS="$IFS" IFS=':'
+for lib in $LIBS; do
+ [ "x$lib" = "x" ] && continue
+
+ found='no'
+ found_indefdir='no'
+ found_type=''
+ found_dir=''
+
+ # for each directory...
+ OIFS2="$IFS" IFS=":$DIFS"
+ for dir in ${DIRS} switch-to-defdirs ${DIRS_DEFAULT}; do
+ [ "x$dir" = "x" ] && continue
+ [ "x$dir" = "xswitch-to-defdirs" ] && found_indefdir=yes
+ [ ! -d $dir ] && continue
+
+ # search the file
+ OIFS3="$IFS" IFS="$DIFS"
+ for file in '' `cd $dir && ls lib${lib}.* 2>/dev/null`; do
+ [ "x$file" = "x" ] && continue
+ case $file in
+ *.so|*.so.[0-9]*|*.sl|*.sl.[0-9]* )
+ found=yes;
+ found_type=DSO;
+ break
+ ;;
+ *.lo|*.la )
+ found=yes;
+ found_type=PIC
+ ;;
+ *.a )
+ if [ "x$found_type" = "x" ]; then
+ found=yes
+ found_type=OBJ
+ fi
+ ;;
+ esac
+ done
+ IFS="$OIFS3"
+ if [ "x$found" = "xyes" ]; then
+ found_dir="$dir"
+ break
+ fi
+ done
+ IFS="$OIFS2"
+
+ if [ "x$found" = "xyes" ]; then
+ if [ "x$found_indefdir" != "xyes" ]; then
+ eval "dirlist=\"\${DIRS_${found_type}}:\""
+ if [ ".`echo \"$dirlist\" | fgrep :$found_dir:`" = . ]; then
+ eval "DIRS_${found_type}=\"\$DIRS_${found_type}:${found_dir}\""
+ fi
+ eval "LIBS_${found_type}=\"\$LIBS_${found_type}:$lib\""
+ else
+ eval "LIBS_${found_type}=\"\$LIBS_${found_type}:$lib\""
+ fi
+ else
+ LIBS_OBJ="$LIBS_OBJ:$lib"
+ #dirlist="`echo $DIRS $DIRS_DEFAULT | sed -e 's/:/ /g'`"
+ #echo "splitlibs:Warning: library \"$lib\" not found in any of the following dirs:" 2>&1
+ #echo "splitlibs:Warning: $dirlist" 1>&1
+ fi
+done
+IFS="$OIFS"
+
+#
+# also pass-through unused dirs even if it's useless
+#
+OIFS="$IFS" IFS=':'
+for dir in $DIRS; do
+ dirlist="${DIRS_OBJ}:${DIRS_PIC}:${DIRS_DSO}:"
+ if [ ".`echo \"$dirlist\" | fgrep :$dir:`" = . ]; then
+ DIRS_OBJ="$DIRS_OBJ:$dir"
+ fi
+done
+IFS="$OIFS"
+
+#
+# reassemble the options but seperated by type
+#
+OIFS="$IFS" IFS="$DIFS"
+for type in OBJ PIC DSO; do
+ OIFS2="$IFS" IFS=':'
+ eval "libs=\"\$LIBS_${type}\""
+ opts=''
+ for lib in $libs; do
+ [ "x$lib" = "x" ] && continue
+ opts="$opts -l$lib"
+ done
+ eval "LIBS_${type}=\"$opts\""
+
+ eval "dirs=\"\$DIRS_${type}\""
+ opts=''
+ for dir in $dirs; do
+ [ "x$dir" = "x" ] && continue
+ opts="$opts -L$dir"
+ done
+ eval "DIRS_${type}=\"$opts\""
+ IFS="$OIFS2"
+done
+IFS="$OIFS"
+
+#
+# give back results
+#
+OIFS="$IFS" IFS="$DIFS"
+for var in ARGV DIRS_OBJ LIBS_OBJ DIRS_PIC LIBS_PIC DIRS_DSO LIBS_DSO; do
+ eval "val=\"\$${var}\""
+ val="`echo $val | sed -e 's/^ *//'`"
+ echo "SLO_${var}=\"${val}\""
+done
+IFS="$OIFS"
+
+##EOF##