#!/bin/sh # # Cactus build repo configure script # partially based on the Libav configure script # Copyright (c) 2000-2002 Fabrice Bellard # Copyright (c) 2005-2008 Diego Biurrun # Copyright (c) 2005-2008 Mans Rullgard # # Prevent locale nonsense from breaking basic text processing. LC_ALL=C export LC_ALL ln_s="ln -s -f" logfile="config.log" log(){ echo "$@" >> $logfile } log_file(){ log BEGIN $1 pr -n -t $1 >> $logfile log END $1 } echolog(){ log "$@" echo "$@" } die(){ echolog "$@" exit 1 } # find source path if test -f configure; then source_path=. else source_path=$(cd $(dirname "$0"); pwd) echo "$source_path" | grep -q '[[:blank:]]' && die "Out of tree builds are impossible with whitespace in source path." test -e "$source_path/config.h" && die "Out of tree builds are impossible with config.h in source dir." fi test -e arrangements || $ln_s "$source_path/arrangements" test -e lib || $ln_s "$source_path/repos/cactus/lib" test -e Makefile || $ln_s "$source_path/repos/cactus/Makefile" test -e src || $ln_s "$source_path/repos/cactus/src"