test/configure2

Sun, 15 Dec 2024 14:50:19 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 15 Dec 2024 14:50:19 +0100
changeset 128
22f7262475e7
parent 127
33bc4ae5d7cf
child 129
b38ea78d842c
permissions
-rwxr-xr-x

fixes debug/release options only showing when other options are specified - fixes #528

97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 #!/bin/sh
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3
116
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
4 # some utility functions
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
5 isplatform()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
6 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
7 for p in $PLATFORM
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
8 do
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
9 if [ "$p" = "$1" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
10 return 0
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
11 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
12 done
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
13 return 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
14 }
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
15 notisplatform()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
16 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
17 for p in $PLATFORM
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
18 do
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
19 if [ "$p" = "$1" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
20 return 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
21 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
22 done
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
23 return 0
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
24 }
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
25 istoolchain()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
26 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
27 for t in $TOOLCHAIN
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
28 do
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
29 if [ "$t" = "$1" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
30 return 0
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
31 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
32 done
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
33 return 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
34 }
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
35 notistoolchain()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
36 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
37 for t in $TOOLCHAIN
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
38 do
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
39 if [ "$t" = "$1" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
40 return 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
41 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
42 done
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
43 return 0
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
44 }
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 # clean abort
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 abort_configure()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 rm -Rf "$TEMP_DIR"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 exit 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52
116
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
53 # Test for availability of pkg-config
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
54 PKG_CONFIG=`command -v pkg-config`
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
55 : ${PKG_CONFIG:="false"}
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
56
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
57 # Simple uname based platform detection
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
58 # $PLATFORM is used for platform dependent dependency selection
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
59 OS=`uname -s`
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
60 OS_VERSION=`uname -r`
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
61 printf "detect platform... "
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
62 if [ "$OS" = "SunOS" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
63 PLATFORM="solaris sunos unix svr4"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
64 elif [ "$OS" = "Linux" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
65 PLATFORM="linux unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
66 elif [ "$OS" = "FreeBSD" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
67 PLATFORM="freebsd bsd unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
68 elif [ "$OS" = "OpenBSD" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
69 PLATFORM="openbsd bsd unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
70 elif [ "$OS" = "NetBSD" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
71 PLATFORM="netbsd bsd unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
72 elif [ "$OS" = "Darwin" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
73 PLATFORM="macos osx bsd unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
74 elif echo "$OS" | grep -i "MINGW" > /dev/null; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
75 PLATFORM="windows mingw"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
76 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
77 : ${PLATFORM:="unix"}
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
78
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
79 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
80 echo "$PLATFORM_NAME"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
81
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
82
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 # help text
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 printhelp()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 echo "Usage: $0 [OPTIONS]..."
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 cat << __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 Installation directories:
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 --prefix=PREFIX path prefix for architecture-independent files
115
36e4aedd5663 fix hardcoded default for prefix in help text
Mike Becker <universe@uap-core.de>
parents: 114
diff changeset
90 [$prefix]
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 --exec-prefix=EPREFIX path prefix for architecture-dependent files
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 [PREFIX]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 --bindir=DIR user executables [EPREFIX/bin]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 --sbindir=DIR system admin executables [EPREFIX/sbin]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 --libexecdir=DIR program executables [EPREFIX/libexec]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 --sysconfdir=DIR system configuration files [PREFIX/etc]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
101 --libdir=DIR object code libraries [EPREFIX/lib]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 --includedir=DIR C header files [PREFIX/include]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
105 --infodir=DIR info documentation [DATAROOTDIR/info]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
106 --mandir=DIR man documentation [DATAROOTDIR/man]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
107 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108
128
22f7262475e7 fixes debug/release options only showing when other options are specified - fixes #528
Mike Becker <universe@uap-core.de>
parents: 127
diff changeset
109 Build Types:
22f7262475e7 fixes debug/release options only showing when other options are specified - fixes #528
Mike Becker <universe@uap-core.de>
parents: 127
diff changeset
110 --debug add extra compile flags for debug builds
22f7262475e7 fixes debug/release options only showing when other options are specified - fixes #528
Mike Becker <universe@uap-core.de>
parents: 127
diff changeset
111 --release add extra compile flags for release builds
22f7262475e7 fixes debug/release options only showing when other options are specified - fixes #528
Mike Becker <universe@uap-core.de>
parents: 127
diff changeset
112
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
113 Options:
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
114 --toolkit=(gtk3|cli|gtk2|wpf)
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
115
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
116 Optional Features:
98
4bf47ea3fc64 allow custom line breaks in help text
Mike Becker <universe@uap-core.de>
parents: 97
diff changeset
117 --disable-db Needlessly adds a completely useless SQLite database
4bf47ea3fc64 allow custom line breaks in help text
Mike Becker <universe@uap-core.de>
parents: 97
diff changeset
118 by default.
4bf47ea3fc64 allow custom line breaks in help text
Mike Becker <universe@uap-core.de>
parents: 97
diff changeset
119 Here another line to test tabs and line
4bf47ea3fc64 allow custom line breaks in help text
Mike Becker <universe@uap-core.de>
parents: 97
diff changeset
120
4bf47ea3fc64 allow custom line breaks in help text
Mike Becker <universe@uap-core.de>
parents: 97
diff changeset
121 breaks.
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 --enable-gui
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124 __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
126
116
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
127 # create temporary directory
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
128 TEMP_DIR=".tmp-`uname -n`"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
129 rm -Rf "$TEMP_DIR"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
130 if mkdir -p "$TEMP_DIR"; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
131 :
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
132 else
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
133 echo "Cannot create tmp dir $TEMP_DIR"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
134 echo "Abort"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
135 exit 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
136 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
137 touch "$TEMP_DIR/options"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
138 touch "$TEMP_DIR/features"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
139
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
140 # define standard variables
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
141 # also define standard prefix (this is where we will search for config.site)
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
142 prefix=/usr
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
143 exec_prefix=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
144 bindir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
145 sbindir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
146 libdir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
147 libexecdir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
148 datarootdir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
149 datadir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
150 sysconfdir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
151 sharedstatedir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
152 localstatedir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
153 runstatedir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
154 includedir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
155 infodir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
156 localedir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
157 mandir=
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
158
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
159 # custom variables
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
160
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
161 # features
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
162 FEATURE_DB=auto
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
163
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
164 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
165 # parse arguments
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
166 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
167 BUILD_TYPE="default"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
168 for ARG in "$@"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
169 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
170 case "$ARG" in
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
171 "--prefix="*) prefix=${ARG#--prefix=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
172 "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
173 "--bindir="*) bindir=${ARG#----bindir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
174 "--sbindir="*) sbindir=${ARG#--sbindir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
175 "--libdir="*) libdir=${ARG#--libdir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
176 "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
177 "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
178 "--datadir="*) datadir=${ARG#--datadir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
179 "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
180 "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
181 "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
182 "--includedir="*) includedir=${ARG#--includedir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
183 "--infodir="*) infodir=${ARG#--infodir=} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
184 "--mandir"*) mandir=${ARG#--mandir} ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
185 "--localedir"*) localedir=${ARG#--localedir} ;;
127
33bc4ae5d7cf improve error text when option is used without value - fixes #519
Mike Becker <universe@uap-core.de>
parents: 123
diff changeset
186 "--help"*) printhelp; abort_configure ;;
33bc4ae5d7cf improve error text when option is used without value - fixes #519
Mike Becker <universe@uap-core.de>
parents: 123
diff changeset
187 "--debug") BUILD_TYPE="debug" ;;
33bc4ae5d7cf improve error text when option is used without value - fixes #519
Mike Becker <universe@uap-core.de>
parents: 123
diff changeset
188 "--release") BUILD_TYPE="release" ;;
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
189 "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;;
127
33bc4ae5d7cf improve error text when option is used without value - fixes #519
Mike Becker <universe@uap-core.de>
parents: 123
diff changeset
190 "--toolkit") echo "option '$ARG' needs a value:"; echo " $ARG=(gtk3|cli|gtk2|wpf)"; abort_configure ;;
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
191 "--enable-db") FEATURE_DB=on ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
192 "--disable-db") unset FEATURE_DB ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
193 "--enable-gui") FEATURE_GUI=on ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
194 "--disable-gui") unset FEATURE_GUI ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
195 "-"*) echo "unknown option: $ARG"; abort_configure ;;
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
196 esac
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
197 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
198
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
199
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
200
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
201 # set defaults for dir variables
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
202 : ${exec_prefix:="$prefix"}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
203 : ${bindir:='${exec_prefix}/bin'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
204 : ${sbindir:='${exec_prefix}/sbin'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
205 : ${libdir:='${exec_prefix}/lib'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
206 : ${libexecdir:='${exec_prefix}/libexec'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
207 : ${datarootdir:='${prefix}/share'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
208 : ${datadir:='${datarootdir}'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
209 : ${sysconfdir:='${prefix}/etc'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
210 : ${sharedstatedir:='${prefix}/com'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
211 : ${localstatedir:='${prefix}/var'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
212 : ${runstatedir:='${localstatedir}/run'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
213 : ${includedir:='${prefix}/include'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
214 : ${infodir:='${datarootdir}/info'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
215 : ${mandir:='${datarootdir}/man'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
216 : ${localedir:='${datarootdir}/locale'}
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
217
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
218 # check if a config.site exists and load it
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
219 if [ -n "$CONFIG_SITE" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
220 # CONFIG_SITE may contain space separated file names
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
221 for cs in $CONFIG_SITE; do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
222 printf "loading defaults from $cs... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
223 . "$cs"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
224 echo ok
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
225 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
226 elif [ -f "$prefix/share/config.site" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
227 printf "loading site defaults... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
228 . "$prefix/share/config.site"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
229 echo ok
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
230 elif [ -f "$prefix/etc/config.site" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
231 printf "loading site defaults... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
232 . "$prefix/etc/config.site"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
233 echo ok
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
234 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
235
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
236
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
237 # generate vars.mk
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
238 cat > "$TEMP_DIR/vars.mk" << __EOF__
114
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
239 prefix=$prefix
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
240 exec_prefix=$exec_prefix
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
241 bindir=$bindir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
242 sbindir=$sbindir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
243 libdir=$libdir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
244 libexecdir=$libexecdir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
245 datarootdir=$datarootdir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
246 datadir=$datadir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
247 sysconfdir=$sysconfdir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
248 sharedstatedir=$sharedstatedir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
249 localstatedir=$localstatedir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
250 runstatedir=$runstatedir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
251 includedir=$includedir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
252 infodir=$infodir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
253 mandir=$mandir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 113
diff changeset
254 localedir=$localedir
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
255 __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
256
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
257 # toolchain detection utilities
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
258 . make/toolchain.sh
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
259
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
260 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
261 # DEPENDENCIES
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
262 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
263
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
264 # check languages
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
265 lang_c=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
266 lang_cpp=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
267 if detect_c_compiler ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
268 lang_c=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
269 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
270
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
271 # create buffer for make variables required by dependencies
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
272 echo > "$TEMP_DIR/make.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
273
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
274 test_pkg_config()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
275 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
276 if "$PKG_CONFIG" --exists "$1" ; then :
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
277 else return 1 ; fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
278 if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then :
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
279 else return 1 ; fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
280 if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then :
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
281 else return 1 ; fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
282 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
283 else return 1 ; fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
284 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
285 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
286
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
287 print_check_msg()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
288 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
289 if [ -z "$1" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
290 shift
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
291 printf "$@"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
292 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
293 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
294
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
295 dependency_error_qt4()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
296 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
297 print_check_msg "$dep_checked_qt4" "checking for qt4... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
298 # dependency qt4
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
299 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
300 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
301 if which qmake-qt4 > /dev/null ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
302 :
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
303 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
304 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
305 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
306 print_check_msg "$dep_checked_qt4" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
307 dep_checked_qt4=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
308 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
309 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
310
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
311 print_check_msg "$dep_checked_qt4" "no\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
312 dep_checked_qt4=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
313 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
314 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
315 dependency_error_curl()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
316 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
317 print_check_msg "$dep_checked_curl" "checking for curl... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
318 # dependency curl platform="windows"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
319 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
320 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
321 if notisplatform "windows"; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
322 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
323 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
324 TEMP_CFLAGS="$TEMP_CFLAGS -I/mingw/include"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
325 TEMP_LDFLAGS="$TEMP_LDFLAGS -lcurl"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
326 print_check_msg "$dep_checked_curl" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
327 dep_checked_curl=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
328 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
329 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
330
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
331 # dependency curl platform="macos"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
332 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
333 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
334 if notisplatform "macos"; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
335 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
336 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
337 if tmp_flags=`curl-config --cflags` ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
338 TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
339 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
340 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
341 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
342 if tmp_flags=`curl-config --ldflags` ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
343 TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
344 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
345 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
346 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
347 print_check_msg "$dep_checked_curl" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
348 dep_checked_curl=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
349 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
350 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
351
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
352 # dependency curl
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
353 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
354 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
355 if [ -z "$PKG_CONFIG" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
356 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
357 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
358 if test_pkg_config "libcurl" "" "" "" ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
359 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libcurl`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
360 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libcurl`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
361 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
362 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
363 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
364 print_check_msg "$dep_checked_curl" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
365 dep_checked_curl=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
366 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
367 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
368
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
369 print_check_msg "$dep_checked_curl" "no\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
370 dep_checked_curl=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
371 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
372 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
373 dependency_error_gtk2()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
374 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
375 print_check_msg "$dep_checked_gtk2" "checking for gtk2... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
376 # dependency gtk2
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
377 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
378 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
379 if [ -z "$PKG_CONFIG" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
380 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
381 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
382 if test_pkg_config "gtk+-2.0" "" "" "" ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
383 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-2.0`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
384 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-2.0`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
385 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
386 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
387 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
388 print_check_msg "$dep_checked_gtk2" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
389 dep_checked_gtk2=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
390 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
391 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
392
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
393 print_check_msg "$dep_checked_gtk2" "no\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
394 dep_checked_gtk2=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
395 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
396 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
397 dependency_error_sqlite()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
398 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
399 print_check_msg "$dep_checked_sqlite" "checking for sqlite... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
400 # dependency sqlite
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
401 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
402 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
403 if [ -z "$PKG_CONFIG" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
404 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
405 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
406 if test_pkg_config "sqlite3" "" "" "" ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
407 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sqlite3`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
408 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sqlite3`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
409 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
410 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
411 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
412 print_check_msg "$dep_checked_sqlite" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
413 dep_checked_sqlite=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
414 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
415 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
416
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
417 print_check_msg "$dep_checked_sqlite" "no\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
418 dep_checked_sqlite=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
419 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
420 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
421 dependency_error_test()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
422 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
423 print_check_msg "$dep_checked_test" "checking for test... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
424 # dependency test platform="bsd"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
425 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
426 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
427 if notisplatform "bsd"; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
428 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
429 fi
105
4b3e655339cb improve toolchain detection
Mike Becker <universe@uap-core.de>
parents: 102
diff changeset
430 if isplatform "macos" || istoolchain "macos"; then
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
431 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
432 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
433 TEMP_CFLAGS="$TEMP_CFLAGS -DBSD"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
434 print_check_msg "$dep_checked_test" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
435 dep_checked_test=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
436 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
437 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
438
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
439 # dependency test
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
440 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
441 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
442 TEMP_CFLAGS="$TEMP_CFLAGS -DTEST"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
443 print_check_msg "$dep_checked_test" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
444 dep_checked_test=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
445 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
446 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
447
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
448 print_check_msg "$dep_checked_test" "no\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
449 dep_checked_test=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
450 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
451 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
452 dependency_error_gtk3()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
453 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
454 print_check_msg "$dep_checked_gtk3" "checking for gtk3... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
455 # dependency gtk3
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
456 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
457 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
458 if [ -z "$PKG_CONFIG" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
459 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
460 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
461 if test_pkg_config "gtk+-5.0" "" "" "" ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
462 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-5.0`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
463 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-5.0`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
464 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
465 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
466 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
467 print_check_msg "$dep_checked_gtk3" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
468 dep_checked_gtk3=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
469 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
470 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
471
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
472 print_check_msg "$dep_checked_gtk3" "no\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
473 dep_checked_gtk3=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
474 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
475 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
476 dependency_error_deptest()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
477 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
478 print_check_msg "$dep_checked_deptest" "checking for deptest... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
479 # dependency deptest
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
480 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
481 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
482 TEMP_CFLAGS="$TEMP_CFLAGS -DDEPTEST"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
483 print_check_msg "$dep_checked_deptest" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
484 dep_checked_deptest=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
485 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
486 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
487
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
488 print_check_msg "$dep_checked_deptest" "no\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
489 dep_checked_deptest=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
490 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
491 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
492 dependency_error_libxml2()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
493 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
494 print_check_msg "$dep_checked_libxml2" "checking for libxml2... "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
495 # dependency libxml2
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
496 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
497 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
498 if [ -z "$PKG_CONFIG" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
499 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
500 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
501 if test_pkg_config "libxml-2.0" "2.8" "" "" ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
502 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
503 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
504 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
505 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
506 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
507 cat >> $TEMP_DIR/make.mk << __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
508 # Dependency: libxml2
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
509 xml = libxml2
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
510 __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
511 print_check_msg "$dep_checked_libxml2" "yes\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
512 dep_checked_libxml2=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
513 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
514 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
515
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
516 print_check_msg "$dep_checked_libxml2" "no\n"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
517 dep_checked_libxml2=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
518 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
519 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
520
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
521 # start collecting dependency information
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
522 echo > "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
523
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
524 DEPENDENCIES_FAILED=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
525 ERROR=0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
526 # unnamed dependencies
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
527 TEMP_CFLAGS=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
528 TEMP_CXXFLAGS=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
529 TEMP_LDFLAGS=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
530 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
531 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
532 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
533 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
534 if [ -z "$lang_c" ] ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
535 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
536 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
537 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
538
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
539 cat >> "$TEMP_DIR/make.mk" << __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
540 MVAR = 123
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
541 MVAR += 123
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
542 __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
543 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
544 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
545 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
546 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
547
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
548 # add general dependency flags to flags.mk
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
549 echo "# general flags" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
550 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
551 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
552 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
553 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
554 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
555 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
556 if [ -n "${TEMP_LDFLAGS}" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
557 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
558 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
559
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
560 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
561 # OPTION VALUES
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
562 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
563 checkopt_toolkit_gtk3()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
564 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
565 VERR=0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
566 if dependency_error_gtk3 ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
567 VERR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
568 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
569 if [ $VERR -ne 0 ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
570 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
571 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
572 TEMP_CFLAGS="$TEMP_CFLAGS -Da=b"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
573 TEMP_CXXFLAGS="$TEMP_CXXFLAGS -Da=b"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
574 cat >> "$TEMP_DIR/make.mk" << __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
575 UIOBJ += graphics_cairo.o
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
576 __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
577 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
578 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
579 checkopt_toolkit_cli()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
580 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
581 VERR=0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
582 if dependency_error_curl ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
583 VERR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
584 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
585 if dependency_error_test ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
586 VERR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
587 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
588 if [ $VERR -ne 0 ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
589 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
590 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
591 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
592 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
593 checkopt_toolkit_gtk2()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
594 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
595 VERR=0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
596 if dependency_error_gtk2 ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
597 VERR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
598 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
599 if [ $VERR -ne 0 ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
600 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
601 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
602 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
603 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
604 checkopt_toolkit_wpf()
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
605 {
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
606 VERR=0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
607 if dependency_error_test ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
608 VERR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
609 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
610 if [ $VERR -ne 0 ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
611 return 1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
612 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
613 return 0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
614 }
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
615
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
616 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
617 # TARGETS
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
618 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
619
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
620 echo >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
621 echo "configuring target: dav"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
622 echo "# flags for target dav" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
623 TEMP_CFLAGS=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
624 TEMP_CXXFLAGS=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
625 TEMP_LDFLAGS=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
626
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
627 if dependency_error_curl; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
628 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
629 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
630 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
631 if dependency_error_libxml2; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
632 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
633 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
634 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
635 if dependency_error_test; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
636 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED test "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
637 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
638 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
639
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
640 # Features
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
641 if [ -n "$FEATURE_DB" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
642 # check dependency
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
643 if dependency_error_sqlite ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
644 # "auto" features can fail and are just disabled in this case
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
645 if [ "$FEATURE_DB" = "auto" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
646 DISABLE_FEATURE_DB=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
647 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
648 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sqlite "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
649 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
650 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
651 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
652 if [ -n "$DISABLE_FEATURE_DB" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
653 unset FEATURE_DB
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
654 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
655 fi
122
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
656 if [ -n "$FEATURE_DB" ]; then
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
657 :
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
658 TEMP_CFLAGS="$TEMP_CFLAGS -DDATABASE"
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
659 TEMP_CXXFLAGS="$TEMP_CXXFLAGS -DDATABASE"
123
d89b75fdf0aa add target data for disabled features - resolves #476
Mike Becker <universe@uap-core.de>
parents: 122
diff changeset
660 else
d89b75fdf0aa add target data for disabled features - resolves #476
Mike Becker <universe@uap-core.de>
parents: 122
diff changeset
661 :
122
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
662 fi
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
663 if [ -n "$FEATURE_GUI" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
664 # check dependency
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
665 if dependency_error_gtk3 ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
666 # "auto" features can fail and are just disabled in this case
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
667 if [ "$FEATURE_GUI" = "auto" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
668 DISABLE_FEATURE_GUI=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
669 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
670 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
671 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
672 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
673 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
674 if [ -n "$DISABLE_FEATURE_GUI" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
675 unset FEATURE_GUI
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
676 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
677 fi
122
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
678 if [ -n "$FEATURE_GUI" ]; then
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
679 :
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
680 TEMP_CFLAGS="$TEMP_CFLAGS -DUI=GTK3"
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
681 TEMP_CXXFLAGS="$TEMP_CXXFLAGS -DUI=GTK3"
123
d89b75fdf0aa add target data for disabled features - resolves #476
Mike Becker <universe@uap-core.de>
parents: 122
diff changeset
682 else
d89b75fdf0aa add target data for disabled features - resolves #476
Mike Becker <universe@uap-core.de>
parents: 122
diff changeset
683 :
d89b75fdf0aa add target data for disabled features - resolves #476
Mike Becker <universe@uap-core.de>
parents: 122
diff changeset
684 TEMP_CFLAGS="$TEMP_CFLAGS -DCONSOLE"
d89b75fdf0aa add target data for disabled features - resolves #476
Mike Becker <universe@uap-core.de>
parents: 122
diff changeset
685 TEMP_CXXFLAGS="$TEMP_CXXFLAGS -DCONSOLE"
122
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
686 fi
97
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
687
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
688 # Option: --toolkit
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
689 if [ -z "$OPT_TOOLKIT" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
690 echo "auto-detecting option 'toolkit'"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
691 SAVED_ERROR="$ERROR"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
692 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
693 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
694 while true
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
695 do
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
696 if isplatform "windows"; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
697 if checkopt_toolkit_wpf ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
698 echo " toolkit: wpf" >> "$TEMP_DIR/options"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
699 ERROR=0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
700 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
701 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
702 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
703 if checkopt_toolkit_gtk3 ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
704 echo " toolkit: gtk3" >> "$TEMP_DIR/options"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
705 ERROR=0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
706 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
707 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
708 if checkopt_toolkit_gtk2 ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
709 echo " toolkit: gtk2" >> "$TEMP_DIR/options"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
710 ERROR=0
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
711 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
712 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
713 break
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
714 done
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
715 if [ $ERROR -ne 0 ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
716 SAVED_ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
717 SAVED_DEPENDENCIES_FAILED="option 'toolkit' $SAVED_DEPENDENCIES_FAILED"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
718 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
719 ERROR="$SAVED_ERROR"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
720 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
721 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
722 echo "checking option toolkit = $OPT_TOOLKIT"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
723 if false; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
724 false
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
725 elif [ "$OPT_TOOLKIT" = "gtk3" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
726 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
727 if checkopt_toolkit_gtk3 ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
728 :
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
729 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
730 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
731 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
732 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
733 elif [ "$OPT_TOOLKIT" = "cli" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
734 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
735 if checkopt_toolkit_cli ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
736 :
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
737 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
738 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
739 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
740 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
741 elif [ "$OPT_TOOLKIT" = "gtk2" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
742 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
743 if checkopt_toolkit_gtk2 ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
744 :
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
745 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
746 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
747 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
748 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
749 elif [ "$OPT_TOOLKIT" = "wpf" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
750 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
751 if checkopt_toolkit_wpf ; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
752 :
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
753 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
754 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
755 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
756 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
757 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
758 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
759
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
760 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
761 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
762 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
763 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
764 echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
765 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
766 if [ "$BUILD_TYPE" = "debug" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
767 if [ -n "$lang_c" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
768 echo 'DAV_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
769 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
770 if [ -n "$lang_cpp" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
771 echo 'DAV_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
772 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
773 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
774 if [ "$BUILD_TYPE" = "release" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
775 if [ -n "$lang_c" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
776 echo 'DAV_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
777 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
778 if [ -n "$lang_cpp" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
779 echo 'DAV_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
780 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
781 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
782 if [ -n "${TEMP_LDFLAGS}" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
783 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
784 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
785
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
786 echo >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
787 echo "configuring global target"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
788 echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
789 TEMP_CFLAGS=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
790 TEMP_CXXFLAGS=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
791 TEMP_LDFLAGS=
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
792
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
793 if dependency_error_deptest; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
794 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED deptest "
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
795 ERROR=1
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
796 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
797
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
798 # Features
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
799
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
800
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
801 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
802 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
803 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
804 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
805 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
806 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
807 if [ "$BUILD_TYPE" = "debug" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
808 if [ -n "$lang_c" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
809 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
810 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
811 if [ -n "$lang_cpp" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
812 echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
813 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
814 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
815 if [ "$BUILD_TYPE" = "release" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
816 if [ -n "$lang_c" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
817 echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
818 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
819 if [ -n "$lang_cpp" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
820 echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
821 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
822 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
823 if [ -n "${TEMP_LDFLAGS}" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
824 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
825 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
826
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
827
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
828 # final result
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
829 if [ $ERROR -ne 0 ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
830 echo
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
831 echo "Error: Unresolved dependencies"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
832 echo "$DEPENDENCIES_FAILED"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
833 abort_configure
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
834 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
835
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
836 echo "configure finished"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
837 echo
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
838 echo "Build Config:"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
839 echo " PREFIX: $prefix"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
840 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
841 echo "Options:"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
842 cat "$TEMP_DIR/options"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
843 echo "Features:"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
844 if [ -n "$FEATURE_DB" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
845 echo " db: on"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
846 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
847 echo " db: off"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
848 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
849 if [ -n "$FEATURE_GUI" ]; then
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
850 echo " gui: on"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
851 else
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
852 echo " gui: off"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
853 fi
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
854 echo
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
855
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
856 # generate the config.mk file
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
857 cat > "$TEMP_DIR/config.mk" << __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
858 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
859 # config.mk generated by configure
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
860 #
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
861
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
862 __EOF__
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
863 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
864 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
1af1bfacd25a add helptext descriptions for features
Mike Becker <universe@uap-core.de>
parents:
diff changeset
865 rm -Rf "$TEMP_DIR"

mercurial