ref: 4e2a253a02cd6cf934f2acbb4b725db5971cd337
parent: 2894f41c107da1c708a72ad82d1d321997fd9468
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Sep 23 09:19:24 EDT 2014
Add missing configure script.
--- /dev/null
+++ b/configure
@@ -1,0 +1,57 @@
+#!/bin/sh
+
+prefix="/usr/local"
+
+for i in `seq 300`; do
+ echo "Lots of output to emulate automake... ok"
+ echo "Testing for things you'll never use... fail"
+ echo "Satisfying the fortran77 lobby... ok"
+ echo "Burning CPU time checking for the bloody obvious... ok"
+done
+echo "Automake emulated successfully"
+
+INST_ROOT='/usr/local'
+
+for arg in $*; do
+ shift 1
+ case $arg in
+ "--prefix" | "-p")
+ prefix=shift $*
+ ;;
+ --prefix=*)
+ prefix=`echo $arg | sed 's/^--prefix=//g'`
+ ;;
+ "--help" | "-h")
+ echo "Usage:"
+ echo " --prefix | -p: The prefix to install to"
+ break;
+ ;;
+ *) echo "Unrecognized argument $arg";;
+ esac
+done
+
+OS=`uname`
+
+echo "pkg config = " > config.myr
+echo "const Instroot = \"$prefix\"" >> config.myr
+echo export INST_ROOT=$prefix > config.mk
+case $OS in
+ *Linux*)
+ echo 'export SYS=linux' >> config.mk
+ echo 'const Sys = "Linux"' >> config.myr
+ ;;
+ *Darwin*)
+ echo 'export SYS=osx' >> config.mk
+ echo 'const Sys = "OSX"' >> config.myr
+ ;;
+ *)
+ echo 'Unknown architecture.'
+ ;;
+esac
+echo ";;" >> config.myr
+
+cat << EOF
+ Building with:
+ prefix=$prefix
+EOF
+