-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·85 lines (79 loc) · 2.66 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# AUM: Airbus Unit tests with Mocks for C. AUM is a unit testing framework for C that allows the easy definition and request of mocks.
# Copyright (C) 2019 Airbus Defence and Space
#
# You should have received a copy of the AUTHORS.md file which lists all contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
configArguments=`getopt -o l:p:b:n:s:c:o: --long libdir:,prefix:,bindir:,includedir:,sdkdir:,sysconfdir:,os: -n 'configure' -- "$@"`
eval set -- "$configArguments"
while true; do
case "$1" in
-l|--libdir)
case "$2" in
"") shift 2 ;;
*) CONFIG_LIBDIR=$2 ; shift 2 ;;
esac ;;
-p|--prefix)
case "$2" in
"") shift 2 ;;
*) CONFIG_PREFIX=$2 ; shift 2 ;;
esac ;;
-b|--bindir)
case "$2" in
"") shift 2 ;;
*) CONFIG_BINDIR=$2 ; shift 2 ;;
esac ;;
-n|--includedir)
case "$2" in
"") shift 2 ;;
*) CONFIG_INCLUDEDIR=$2 ; shift 2 ;;
esac ;;
-s|--sdkdir)
case "$2" in
"") shift 2 ;;
*) CONFIG_SDKDIR=$2 ; shift 2 ;;
esac ;;
-c|--sysconfdir)
case "$2" in
"") shift 2 ;;
*) CONFIG_SYSCONFDIR=$2 ; shift 2 ;;
esac ;;
-o|--os)
case "$2" in
"") shift 2 ;;
*) CONFIG_OS=$2 ; shift 2 ;;
esac ;;
--) shift ; break ;;
*) echo "Unknown option $1" ; exit 1 ;;
esac
done
[ -z ${CONFIG_PREFIX} ] && CONFIG_PREFIX=/usr/local
[ -z ${CONFIG_LIBDIR} ] && CONFIG_LIBDIR=${CONFIG_PREFIX}/lib
[ -z ${CONFIG_BINDIR} ] && CONFIG_BINDIR=${CONFIG_PREFIX}/bin
[ -z ${CONFIG_INCLUDEDIR} ] && CONFIG_INCLUDEDIR=${CONFIG_PREFIX}/include
[ -z ${CONFIG_SDKDIR} ] && CONFIG_SDKDIR=${CONFIG_PREFIX}/share/
[ -z ${CONFIG_SYSCONFDIR} ] && CONFIG_SYSCONFDIR=${CONFIG_PREFIX}/etc
[ -z ${CONFIG_OS} ] && CONFIG_OS=
cat <<EOF >Makefile.defs
CONFIG_PREFIX=${CONFIG_PREFIX}
CONFIG_LIBDIR=${CONFIG_LIBDIR}
CONFIG_BINDIR=${CONFIG_BINDIR}
CONFIG_INCLUDEDIR=${CONFIG_INCLUDEDIR}
CONFIG_I18NDIR=${CONFIG_I18NDIR}
CONFIG_SDKDIR=${CONFIG_SDKDIR}
CONFIG_SYSCONFDIR=${CONFIG_SYSCONFDIR}
CONFIG_OS=${CONFIG_OS}
EOF