FreeCalypso > hg > gsm-codec-lib
comparison configure @ 453:19f1aa01ea10
new approach to config & build for ThemWi software
| author | Mychaela Falconia <falcon@freecalypso.org> | 
|---|---|
| date | Fri, 10 May 2024 05:45:46 +0000 | 
| parents | |
| children | cb1d1ea7f2c5 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 452:6e595f7d40e2 | 453:19f1aa01ea10 | 
|---|---|
| 1 #!/bin/sh | |
| 2 # This configure script is custom and hand-coded; | |
| 3 # it is NOT a product of GNU Autoconf or any other such tools! | |
| 4 | |
| 5 set -e | |
| 6 | |
| 7 if [ ! -f configure ] | |
| 8 then | |
| 9 echo "This script needs to be run from the top of the source tree" 1>&2 | |
| 10 exit 1 | |
| 11 fi | |
| 12 | |
| 13 # defaults that can be overridden | |
| 14 CC=gcc | |
| 15 CFLAGS=-O2 | |
| 16 PREFIX=/opt/themwi | |
| 17 | |
| 18 while [ $# != 0 ] | |
| 19 do | |
| 20 case "$1" in | |
| 21 --prefix=*) | |
| 22 PREFIX=`echo $1 | cut -c 10-` | |
| 23 ;; | |
| 24 CC=*) | |
| 25 CC=`echo $1 | cut -c 4-` | |
| 26 ;; | |
| 27 CFLAGS=*) | |
| 28 CFLAGS=`echo $1 | cut -c 8-` | |
| 29 ;; | |
| 30 *) | |
| 31 echo "error: non-understood option $1" 1>&2 | |
| 32 exit 1; | |
| 33 ;; | |
| 34 esac | |
| 35 shift | |
| 36 done | |
| 37 | |
| 38 # emit the Makefile include fragment | |
| 39 echo "CC=$CC" > config.defs | |
| 40 echo "CFLAGS=$CFLAGS" >> config.defs | |
| 41 echo "PREFIX=$PREFIX" >> config.defs | 
