annotate configure @ 14:e7f43262efa1

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