annotate configure @ 456:4c458145e793

PACKAGING: new guidelines
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 10 May 2024 07:35:36 +0000
parents 19f1aa01ea10
children cb1d1ea7f2c5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 PREFIX=/opt/themwi
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 while [ $# != 0 ]
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 do
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 case "$1" in
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 --prefix=*)
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 PREFIX=`echo $1 | cut -c 10-`
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 ;;
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 CC=*)
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 CC=`echo $1 | cut -c 4-`
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 ;;
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 CFLAGS=*)
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 CFLAGS=`echo $1 | cut -c 8-`
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 ;;
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 *)
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 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
32 exit 1;
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 ;;
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 esac
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 shift
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 done
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 # emit the Makefile include fragment
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 echo "CC=$CC" > config.defs
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 echo "CFLAGS=$CFLAGS" >> config.defs
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 echo "PREFIX=$PREFIX" >> config.defs