FreeCalypso > hg > gsm-codec-lib
annotate configure @ 521:68fe269b4316
gsmx-to-tw5a: actually write to the output file
| author | Mychaela Falconia <falcon@freecalypso.org> | 
|---|---|
| date | Thu, 19 Sep 2024 02:21:08 +0000 | 
| parents | a53225b44ea5 | 
| children | 
| rev | line source | 
|---|---|
| 453 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 1 #!/bin/sh | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 2 # This configure script is custom and hand-coded; | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 3 # it is NOT a product of GNU Autoconf or any other such tools! | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 4 | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 5 set -e | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 6 | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 7 if [ ! -f configure ] | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 8 then | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 9 echo "This script needs to be run from the top of the source tree" 1>&2 | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 10 exit 1 | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 11 fi | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 12 | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 13 # defaults that can be overridden | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 14 CC=gcc | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 15 CFLAGS=-O2 | 
| 461 
a53225b44ea5
further refinement of build system:
 Mychaela Falconia <falcon@freecalypso.org> parents: 
460diff
changeset | 16 prefix=/usr/local | 
| 460 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 17 exec_prefix= | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 18 bindir= | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 19 includedir= | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 20 libdir= | 
| 453 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 21 | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 22 while [ $# != 0 ] | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 23 do | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 24 case "$1" in | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 25 --prefix=*) | 
| 460 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 26 prefix=`echo $1 | cut -c 10-` | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 27 ;; | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 28 --exec-prefix=*) | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 29 exec_prefix=`echo $1 | cut -c 15-` | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 30 ;; | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 31 --bindir=*) | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 32 bindir=`echo $1 | cut -c 10-` | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 33 ;; | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 34 --includedir=*) | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 35 includedir=`echo $1 | cut -c 14-` | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 36 ;; | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 37 --libdir=*) | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 38 libdir=`echo $1 | cut -c 10-` | 
| 453 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 39 ;; | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 40 CC=*) | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 41 CC=`echo $1 | cut -c 4-` | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 42 ;; | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 43 CFLAGS=*) | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 44 CFLAGS=`echo $1 | cut -c 8-` | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 45 ;; | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 46 *) | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 47 echo "error: non-understood option $1" 1>&2 | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 48 exit 1; | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 49 ;; | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 50 esac | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 51 shift | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 52 done | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 53 | 
| 460 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 54 # inheritance rules for install directories | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 55 | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 56 if [ -z "$exec_prefix" ] | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 57 then | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 58 exec_prefix="$prefix" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 59 fi | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 60 if [ -z "$bindir" ] | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 61 then | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 62 bindir="$exec_prefix/bin" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 63 fi | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 64 if [ -z "$includedir" ] | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 65 then | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 66 includedir="$prefix/include" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 67 fi | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 68 if [ -z "$libdir" ] | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 69 then | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 70 libdir="$exec_prefix/lib" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 71 fi | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 72 | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 73 # report the final configuration | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 74 | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 75 echo "C code will be compiled with:" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 76 echo " CC=$CC" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 77 echo " CFLAGS=$CFLAGS" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 78 echo "Installation directories:" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 79 echo " bindir=$bindir" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 80 echo " includedir=$includedir" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 81 echo " libdir=$libdir" | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 82 | 
| 453 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 83 # emit the Makefile include fragment | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 84 echo "CC=$CC" > config.defs | 
| 
19f1aa01ea10
new approach to config & build for ThemWi software
 Mychaela Falconia <falcon@freecalypso.org> parents: diff
changeset | 85 echo "CFLAGS=$CFLAGS" >> config.defs | 
| 460 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 86 echo "bindir=$bindir" >> config.defs | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 87 echo "includedir=$includedir" >> config.defs | 
| 
cb1d1ea7f2c5
new build system: accept more directory options
 Mychaela Falconia <falcon@freecalypso.org> parents: 
453diff
changeset | 88 echo "libdir=$libdir" >> config.defs | 
