Avoid adding a slash to path '/'.
[rsync/rsync.git] / configure
CommitLineData
2909586e
WD
1#!/bin/sh -e
2# This configure script ensures that the configure.sh script exists, and
3# if not, it tries to fetch rsync's generated files or build them. We
4# then transfer control to the configure.sh script to do the real work.
5
6dir=`dirname $0`
7realconfigure="$dir/configure.sh"
8
85cdbb6b 9if test ! -f "$realconfigure"; then
85cdbb6b 10 if test -f "$HOME/build_farm/build_test.fns"; then
4ab61252
WD
11 # Test the included popt
12 set -- --with-included-popt "${@}"
3005a12b 13 # Allow the build farm to grab latest files via rsync.
9203c8d2 14 actions='build fetch'
85cdbb6b 15 else
9203c8d2 16 actions='build'
85cdbb6b 17 fi
9203c8d2 18 if "$dir/prepare-source" $actions; then
85cdbb6b 19 :
3005a12b
WD
20 else
21 echo 'Failed to build configure.sh and/or config.h.in -- giving up.' >&2
dc2815c1 22 rm -f "$realconfigure"
3005a12b 23 exit 1
2909586e 24 fi
2909586e
WD
25fi
26
27exec "$realconfigure" "${@}"