+if [ ! -z "$missing" ]; then
+ echo "The following libraries were not found:$missing"
+ echo "I looked for them in $LIBPATH"
+ echo "If they are somewhere else, please add --libpath=PATH to the command line."
+ exit 1
+fi
+
+echo "Compiling builder-stage1. This may take several minutes."
+objects=""
+for i in $sources; do
+ obj=`mktemp --tmpdir=temp/bootstrap XXXXXX.o`
+ dir=${i%/*}
+ dir=${dir%/unix}
+ flags="$CFLAGS"
+ if [ -d "$dir/unix" ]; then
+ flags="$flags -iquote $dir -iquote $dir/unix"
+ fi
+ g++ -c $i -o $obj $flags
+ objects="$objects $obj"
+done
+g++ $objects -o builder-stage1 $LIBS
+
+if [ "$KEEP_TEMP" != "yes" ]; then
+ echo "Cleaning up"
+ rm -r temp/bootstrap
+fi
+
+echo "Using builder-stage1 to compile builder."
+ARGS=
+if [ "$PREFIX" ]; then
+ ARGS="$ARGS --prefix='$PREFIX'"
+fi
+eval "./builder-stage1 $ARGS"