diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-12-07 20:27:10 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-12-07 20:27:10 +0100 |
commit | c2f77d08fb15feb5f0f5826c55fa525f3659d986 (patch) | |
tree | a2a0a86b4e845fa3e729e604b4a62cc9ec054ff3 /configure | |
parent | 70399f1c8cae6e9ddd43cd28ecdaf17c96274c65 (diff) |
Add the option of configuring the BPT key and bitmask sizes.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure b/configure new file mode 100755 index 0000000..7e9d15e --- /dev/null +++ b/configure @@ -0,0 +1,25 @@ +#! /bin/sh + +if [ sed --version >/dev/null 2>&1 ]; then + GSED=sed +else + GSED=gsed +fi + +if [ "$#" -lt 2 ]; then + echo "Usage:" + echo " ./configure <bpt_key_t> <bpt_key_bitmask_t>" + echo + echo "Example:" + echo " ./configure intptr_t int64_t" + exit 2 +fi + +KEY_T=$1 +BITMASK_T=$2 + +make config ADDITIONAL_CFLAGS="-DBPT_KEY_T=$KEY_T -DBPT_KEY_BITMASK_T=$BITMASK_T" +CONFIG_CFLAGS=$(./config) +make clean + +"$GSED" --in-place "s/ADDITIONAL_CFLAGS =.*\$/ADDITIONAL_CFLAGS = $CONFIG_CFLAGS -DBPT_EXPLICIT_CONFIGURATION -DBPT_KEY_T=$KEY_T -DBPT_KEY_BITMASK_T=$BITMASK_T/" Makefile |