FreeCalypso > hg > gsm-codec-lib
annotate configure @ 530:96c4ed5529bf
libgsmfr2 preproc: implement support for DTXd
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 19 Sep 2024 20:15:54 +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:
460
diff
changeset
|
16 prefix=/usr/local |
460
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
17 exec_prefix= |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
18 bindir= |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
19 includedir= |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
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:
453
diff
changeset
|
26 prefix=`echo $1 | cut -c 10-` |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
27 ;; |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
28 --exec-prefix=*) |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
29 exec_prefix=`echo $1 | cut -c 15-` |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
30 ;; |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
31 --bindir=*) |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
32 bindir=`echo $1 | cut -c 10-` |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
33 ;; |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
34 --includedir=*) |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
35 includedir=`echo $1 | cut -c 14-` |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
36 ;; |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
37 --libdir=*) |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
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:
453
diff
changeset
|
54 # inheritance rules for install directories |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
55 |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
56 if [ -z "$exec_prefix" ] |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
57 then |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
58 exec_prefix="$prefix" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
59 fi |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
60 if [ -z "$bindir" ] |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
61 then |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
62 bindir="$exec_prefix/bin" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
63 fi |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
64 if [ -z "$includedir" ] |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
65 then |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
66 includedir="$prefix/include" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
67 fi |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
68 if [ -z "$libdir" ] |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
69 then |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
70 libdir="$exec_prefix/lib" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
71 fi |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
72 |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
73 # report the final configuration |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
74 |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
75 echo "C code will be compiled with:" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
76 echo " CC=$CC" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
77 echo " CFLAGS=$CFLAGS" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
78 echo "Installation directories:" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
79 echo " bindir=$bindir" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
80 echo " includedir=$includedir" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
81 echo " libdir=$libdir" |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
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:
453
diff
changeset
|
86 echo "bindir=$bindir" >> config.defs |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
87 echo "includedir=$includedir" >> config.defs |
cb1d1ea7f2c5
new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents:
453
diff
changeset
|
88 echo "libdir=$libdir" >> config.defs |