FreeCalypso > hg > sms-coding-utils
comparison configure @ 25:2a19b44c272e
convert to new ThemWi configure and build system
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 21 May 2024 01:59:17 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
24:f0139d74d3aa | 25:2a19b44c272e |
---|---|
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=/usr/local | |
17 exec_prefix= | |
18 bindir= | |
19 | |
20 while [ $# != 0 ] | |
21 do | |
22 case "$1" in | |
23 --prefix=*) | |
24 prefix=`echo $1 | cut -c 10-` | |
25 ;; | |
26 --exec-prefix=*) | |
27 exec_prefix=`echo $1 | cut -c 15-` | |
28 ;; | |
29 --bindir=*) | |
30 bindir=`echo $1 | cut -c 10-` | |
31 ;; | |
32 CC=*) | |
33 CC=`echo $1 | cut -c 4-` | |
34 ;; | |
35 CFLAGS=*) | |
36 CFLAGS=`echo $1 | cut -c 8-` | |
37 ;; | |
38 *) | |
39 echo "error: non-understood option $1" 1>&2 | |
40 exit 1; | |
41 ;; | |
42 esac | |
43 shift | |
44 done | |
45 | |
46 # inheritance rules for install directories | |
47 | |
48 if [ -z "$exec_prefix" ] | |
49 then | |
50 exec_prefix="$prefix" | |
51 fi | |
52 if [ -z "$bindir" ] | |
53 then | |
54 bindir="$exec_prefix/bin" | |
55 fi | |
56 | |
57 # report the final configuration | |
58 | |
59 echo "C code will be compiled with:" | |
60 echo " CC=$CC" | |
61 echo " CFLAGS=$CFLAGS" | |
62 echo "Installation directory:" | |
63 echo " bindir=$bindir" | |
64 | |
65 # emit the Makefile include fragment | |
66 echo "CC=$CC" > config.defs | |
67 echo "CFLAGS=$CFLAGS" >> config.defs | |
68 echo "bindir=$bindir" >> config.defs |