From 5121d3bcf501be5532e62b8c06c9a025e9d532c0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 23 Oct 2013 09:37:32 +0200 Subject: Initial commit. --- configure | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 configure (limited to 'configure') diff --git a/configure b/configure new file mode 100755 index 0000000..d274f96 --- /dev/null +++ b/configure @@ -0,0 +1,51 @@ +#!/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" -- cgit v1.2.3