annotate configure @ 10:9499d41fc393 default tip

daemon: change config file name to themwi-rtp-mgr.cfg
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 27 May 2024 22:47:19 +0000
parents 9e7e9ba22e42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #!/bin/sh
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 # This configure script is custom and hand-coded;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 # it is NOT a product of GNU Autoconf or any other such tools!
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 set -e
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 if [ ! -f configure ]
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 then
9e7e9ba22e42 starting project with public header files
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
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 exit 1
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 fi
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 # defaults that can be overridden
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 CC=gcc
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 CFLAGS=-O2
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 prefix=/usr/local
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 exec_prefix=
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 bindir=
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 includedir=
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 libdir=
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 while [ $# != 0 ]
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 do
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 case "$1" in
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 --prefix=*)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 prefix=`echo $1 | cut -c 10-`
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 ;;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 --exec-prefix=*)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 exec_prefix=`echo $1 | cut -c 15-`
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 ;;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 --bindir=*)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 bindir=`echo $1 | cut -c 10-`
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 ;;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 --includedir=*)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 includedir=`echo $1 | cut -c 14-`
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 ;;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 --libdir=*)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 libdir=`echo $1 | cut -c 10-`
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 ;;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 CC=*)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 CC=`echo $1 | cut -c 4-`
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 ;;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 CFLAGS=*)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 CFLAGS=`echo $1 | cut -c 8-`
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 ;;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 *)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 echo "error: non-understood option $1" 1>&2
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 exit 1;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 ;;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 esac
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 shift
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 done
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 # inheritance rules for install directories
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 if [ -z "$exec_prefix" ]
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 then
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 exec_prefix="$prefix"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 fi
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 if [ -z "$bindir" ]
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 then
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 bindir="$exec_prefix/bin"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 fi
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 if [ -z "$includedir" ]
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 then
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 includedir="$prefix/include"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 fi
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 if [ -z "$libdir" ]
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 then
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 libdir="$exec_prefix/lib"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 fi
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 # report the final configuration
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 echo "C code will be compiled with:"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 echo " CC=$CC"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 echo " CFLAGS=$CFLAGS"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 echo "Installation directories:"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 echo " bindir=$bindir"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 echo " includedir=$includedir"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 echo " libdir=$libdir"
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 # emit the Makefile include fragment
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 echo "CC=$CC" > config.defs
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 echo "CFLAGS=$CFLAGS" >> config.defs
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 echo "bindir=$bindir" >> config.defs
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 echo "includedir=$includedir" >> config.defs
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 echo "libdir=$libdir" >> config.defs