FreeCalypso > hg > ice1-trau-tester
annotate configure @ 37:26c9535df39e
rm abis subdir: moved to e1-fake-trau repository
The present code repository is meant to contain code for talking
to a TRAU DUT, hence the name ice1-trau-tester. The different and
separate function of talking to an E1 BTS (Abis instead of Ater,
and in the opposite role) was never in scope for this project, but
that code got added here in a haste when the InSite BTS arrived
while the TRAU bring-up was still blocked. Now that we have our
Nokia TCSM2 system working and are doing TRAU experiments, let's
keep the code clean.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 29 Aug 2024 19:02:02 +0000 |
parents | 99426da5603d |
children |
rev | line source |
---|---|
0
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 #!/bin/sh |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 # This configure script is custom and hand-coded; |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 # it is NOT a product of GNU Autoconf or any other such tools! |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 set -e |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 if [ ! -f configure ] |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 then |
76b593a6265c
starting project with 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 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 exit 1 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 fi |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 # defaults that can be overridden |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 CC=gcc |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 CFLAGS=-O2 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 prefix=/usr/local |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 exec_prefix= |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 bindir= |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 osmo_prefix= |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 while [ $# != 0 ] |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 do |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 case "$1" in |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 --prefix=*) |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 prefix=`echo $1 | cut -c 10-` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 ;; |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 --exec-prefix=*) |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 exec_prefix=`echo $1 | cut -c 15-` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 ;; |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 --bindir=*) |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 bindir=`echo $1 | cut -c 10-` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 ;; |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 --with-osmo=*) |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 osmo_prefix=`echo $1 | cut -c 13-` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 ;; |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 CC=*) |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 CC=`echo $1 | cut -c 4-` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 ;; |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 CFLAGS=*) |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 CFLAGS=`echo $1 | cut -c 8-` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 ;; |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 *) |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 echo "error: non-understood option $1" 1>&2 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 exit 1; |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 ;; |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 esac |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 shift |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 done |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 # find Osmocom dependencies |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 if [ -n "$osmo_prefix" ] |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 then |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 PKG_CONFIG_PATH="$osmo_prefix/lib/pkgconfig" |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 export PKG_CONFIG_PATH |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 fi |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 |
14
99426da5603d
configure: add libosmoisdn and libosmotrau dependencies
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
58 osmo_depend="libosmocore libosmoisdn libosmotrau libosmo-e1d" |
0
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 OSMO_INCLUDE=`pkg-config --cflags-only-I $osmo_depend` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 OSMO_LIBS=`pkg-config --libs-only-l $osmo_depend` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 OSMO_LPATH=`pkg-config --libs-only-L $osmo_depend` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 OSMO_RPATH=`echo "$OSMO_LPATH" | sed -e s/-L/-Wl,-rpath,/` |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 # inheritance rules for install directories |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 if [ -z "$exec_prefix" ] |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 then |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 exec_prefix="$prefix" |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 fi |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 if [ -z "$bindir" ] |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 then |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 bindir="$exec_prefix/bin" |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 fi |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 # report the final configuration |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 echo "C code will be compiled with:" |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 echo " CC=$CC" |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 echo " CFLAGS=$CFLAGS" |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 echo "Installation directory:" |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 echo " bindir=$bindir" |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 echo "See config.defs output for Osmocom dependencies" |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 # emit the Makefile include fragment |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 echo "CC=$CC" > config.defs |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 echo "CFLAGS=$CFLAGS" >> config.defs |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 echo "OSMO_INCLUDE=$OSMO_INCLUDE" >> config.defs |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 echo "OSMO_LIBS=$OSMO_LIBS" >> config.defs |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 echo "OSMO_LPATH=$OSMO_LPATH" >> config.defs |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 echo "OSMO_RPATH=$OSMO_RPATH" >> config.defs |
76b593a6265c
starting project with configure script
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 echo "bindir=$bindir" >> config.defs |