diff options
author | Ori Bernstein <ori@eigenstate.org> | 2012-09-19 01:20:50 -0400 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2012-09-19 01:20:50 -0400 |
commit | b80e9fa019f244bf9e562f629aeffaded103dec7 (patch) | |
tree | 9b5c9bbcaafe296589e7fc9e34a6955c57f914af /configure | |
parent | 5ce1ef188530525a21db822bafcd7886d96fcb92 (diff) | |
download | mc-b80e9fa019f244bf9e562f629aeffaded103dec7.tar.gz |
Improve build system flexibility a bit.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -10,6 +10,8 @@ for i in `seq 300`; do done echo "Automake emulated successfully" +INST_ROOT='/usr/local' + for arg in $*; do shift 1 case $arg in @@ -28,9 +30,29 @@ for arg in $*; do esac done +OS=`uname` + +echo export INST_ROOT=$prefix > config.mk +echo \#define Instroot "\"$prefix\"" > config.h + +case $OS in + *Linux*) + echo '#define Asmcmd "as -g -o %s %s"' >> config.h + echo '#define Fprefix ""' >> config.h + ;; + *Darwin*) + echo '\#define Asmcmd "as -g -o %s %s"' >> config.h + echo '\#define Fprefix "_"' >> config.h + ;; + *) + echo 'Unknown architecture. Assuming Linux ABI.' + echo '#define Asmcmd "as -g -o %s %s"' >> config.h + echo '#define Fprefix "' >> config.h + ;; +esac + cat << EOF Building with: prefix=$prefix EOF -echo export INST_ROOT=$prefix > config.mk |