freebsd-dev/contrib/serf/buildconf
Peter Wemm 937a200089 Introduce svnlite so that we can check out our source code again.
This is actually a fully functional build except:
* All internal shared libraries are static linked to make sure there
  is no interference with ports (and to reduce build time).
* It does not have the python/perl/etc plugin or API support.
* By default, it installs as "svnlite" rather than "svn".
* If WITH_SVN added in make.conf, you get "svn".
* If WITHOUT_SVNLITE is in make.conf, this is completely disabled.

To be absolutely clear, this is not intended for any use other than
checking out freebsd source and committing, like we once did with cvs.

It should be usable for small scale local repositories that don't
need the python/perl plugin architecture.
2013-06-18 02:53:45 +00:00

120 lines
2.9 KiB
Bash
Executable File

#!/bin/sh
#
# Copyright 2005 Justin Erenkrantz and Greg Stein
# Copyright 2005 The Apache Software Foundation or its licensors, as
# applicable.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# buildconf: Build the support scripts needed to compile from a
# checked-out version of the source code.
# set a couple of defaults for where we should be looking for our support libs.
# can be overridden with --with-apr=[dir] and --with-apr-util=[dir]
apr_src_dir="apr ../apr"
apu_src_dir="apr-util ../apr-util"
while test $# -gt 0
do
# Normalize
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case "$1" in
--with-apr=*)
apr_src_dir=$optarg
;;
esac
case "$1" in
--with-apr-util=*)
apu_src_dir=$optarg
;;
esac
shift
done
#
# Check to be sure that we have the srclib dependencies checked-out
#
should_exit=0
apr_found=0
apu_found=0
for dir in $apr_src_dir
do
if [ -d "${dir}" -a -f "${dir}/build/apr_common.m4" ]; then
echo "found apr source: ${dir}"
apr_src_dir=$dir
apr_found=1
break
fi
done
if [ $apr_found -lt 1 ]; then
echo ""
echo "You don't have a copy of the apr source in srclib/apr. "
echo "Please get the source using the following instructions,"
echo "or specify the location of the source with "
echo "--with-apr=[path to apr] :"
echo ""
echo " svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr"
echo ""
should_exit=1
fi
for dir in $apu_src_dir
do
if [ -d "${dir}" -a -f "${dir}/Makefile.in" ]; then
echo "found apr-util source: ${dir}"
apu_src_dir=$dir
apu_found=1
break
fi
done
if [ $apu_found -lt 1 ]; then
echo ""
echo "APR-util not found. Assuming you are using APR 2.x."
echo ""
apu_src_dir=
fi
if [ $should_exit -gt 0 ]; then
exit 1
fi
echo copying build files
cp $apr_src_dir/build/config.guess $apr_src_dir/build/config.sub \
$apr_src_dir/build/install.sh $apr_src_dir/build/apr_common.m4 \
$apr_src_dir/build/find_apr.m4 $apr_src_dir/build/get-version.sh build
if [ -n "$apu_src_dir" -a -d "$apu_src_dir" ] ; then
cp $apu_src_dir/build/find_apu.m4 build
fi
echo generating configure
${AUTOCONF:-autoconf}
# Remove autoconf 2.5x's cache directory
rm -rf autom4te*.cache
echo generating serf.def
./build/gen_def.py serf.h serf_bucket_*.h > build/serf.def