FreeCalypso > hg > sipout-test-utils
annotate configure @ 18:f7321b25195e default tip
new build system for ThemWi sw components
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 14 May 2024 18:08:35 -0800 |
parents | |
children |
rev | line source |
---|---|
18
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 #!/bin/sh |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 # This configure script is custom and hand-coded; |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 # it is NOT a product of GNU Autoconf or any other such tools! |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 set -e |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 if [ ! -f configure ] |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 then |
f7321b25195e
new build system for ThemWi sw components
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 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 exit 1 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 fi |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 # defaults that can be overridden |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 CC=gcc |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 CFLAGS=-O2 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 prefix=/usr/local |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 exec_prefix= |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 bindir= |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 while [ $# != 0 ] |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 do |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 case "$1" in |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 --prefix=*) |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 prefix=`echo $1 | cut -c 10-` |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 ;; |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 --exec-prefix=*) |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 exec_prefix=`echo $1 | cut -c 15-` |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 ;; |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 --bindir=*) |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 bindir=`echo $1 | cut -c 10-` |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 ;; |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 CC=*) |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 CC=`echo $1 | cut -c 4-` |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 ;; |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 CFLAGS=*) |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 CFLAGS=`echo $1 | cut -c 8-` |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 ;; |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 *) |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 echo "error: non-understood option $1" 1>&2 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 exit 1; |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 ;; |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 esac |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 shift |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 done |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 # inheritance rules for install directories |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 if [ -z "$exec_prefix" ] |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 then |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 exec_prefix="$prefix" |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 fi |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 if [ -z "$bindir" ] |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 then |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 bindir="$exec_prefix/bin" |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 fi |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 # report the final configuration |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 echo "C code will be compiled with:" |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 echo " CC=$CC" |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 echo " CFLAGS=$CFLAGS" |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 echo "Installation directory:" |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 echo " bindir=$bindir" |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 # emit the Makefile include fragment |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 echo "CC=$CC" > config.defs |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 echo "CFLAGS=$CFLAGS" >> config.defs |
f7321b25195e
new build system for ThemWi sw components
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 echo "bindir=$bindir" >> config.defs |