#! /bin/sh

set -e

src=$1

$src/configure

dirs="bfd binutils gas gdb gprof ld libiberty mmalloc opcodes rda sim utils"
for i in $dirs; do
    rm -f config.cache
    (cd $i && $src/$i/configure --enable-maintainer-mode)
done

rm -f config.cache
