8 days ago
re-enable qt5 toolkit option
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
1 | #!/bin/sh |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
2 | |
277 | 3 | # create temporary directory |
4 | TEMP_DIR=".tmp-`uname -n`" | |
5 | rm -Rf "$TEMP_DIR" | |
6 | if mkdir -p "$TEMP_DIR"; then | |
7 | : | |
8 | else | |
9 | echo "Cannot create tmp dir $TEMP_DIR" | |
10 | echo "Abort" | |
11 | exit 1 | |
12 | fi | |
13 | touch "$TEMP_DIR/options" | |
14 | touch "$TEMP_DIR/features" | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
15 | |
277 | 16 | # define standard variables |
17 | # also define standard prefix (this is where we will search for config.site) | |
18 | prefix=/usr | |
19 | exec_prefix= | |
20 | bindir= | |
21 | sbindir= | |
22 | libdir= | |
23 | libexecdir= | |
24 | datarootdir= | |
25 | datadir= | |
26 | sysconfdir= | |
27 | sharedstatedir= | |
28 | localstatedir= | |
29 | runstatedir= | |
30 | includedir= | |
31 | infodir= | |
32 | localedir= | |
33 | mandir= | |
0 | 34 | |
277 | 35 | # custom variables |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
36 | |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
37 | # features |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
38 | |
277 | 39 | # clean abort |
40 | abort_configure() | |
41 | { | |
42 | rm -Rf "$TEMP_DIR" | |
43 | exit 1 | |
44 | } | |
45 | ||
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
46 | # help text |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
47 | printhelp() |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
48 | { |
277 | 49 | echo "Usage: $0 [OPTIONS]..." |
50 | cat << __EOF__ | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
51 | Installation directories: |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
52 | --prefix=PREFIX path prefix for architecture-independent files |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
53 | [/usr] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
54 | --exec-prefix=EPREFIX path prefix for architecture-dependent files |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
55 | [PREFIX] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
56 | |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
57 | --bindir=DIR user executables [EPREFIX/bin] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
58 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
59 | --libexecdir=DIR program executables [EPREFIX/libexec] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
60 | --sysconfdir=DIR system configuration files [PREFIX/etc] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
61 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
62 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
277 | 63 | --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run] |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
64 | --libdir=DIR object code libraries [EPREFIX/lib] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
65 | --includedir=DIR C header files [PREFIX/include] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
66 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
67 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
68 | --infodir=DIR info documentation [DATAROOTDIR/info] |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
69 | --mandir=DIR man documentation [DATAROOTDIR/man] |
277 | 70 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
71 | |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
72 | Options: |
277 | 73 | --debug add extra compile flags for debug builds |
74 | --release add extra compile flags for release builds | |
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
75 | --toolkit=(libadwaita|gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|cocoa|motif) |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
76 | |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
77 | __EOF__ |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
78 | } |
0 | 79 | |
80 | # | |
277 | 81 | # parse arguments |
0 | 82 | # |
277 | 83 | BUILD_TYPE="default" |
84 | for ARG in "$@" | |
0 | 85 | do |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
86 | case "$ARG" in |
277 | 87 | "--prefix="*) prefix=${ARG#--prefix=} ;; |
88 | "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;; | |
89 | "--bindir="*) bindir=${ARG#----bindir=} ;; | |
90 | "--sbindir="*) sbindir=${ARG#--sbindir=} ;; | |
91 | "--libdir="*) libdir=${ARG#--libdir=} ;; | |
92 | "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;; | |
93 | "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;; | |
94 | "--datadir="*) datadir=${ARG#--datadir=} ;; | |
95 | "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;; | |
96 | "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;; | |
97 | "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;; | |
98 | "--includedir="*) includedir=${ARG#--includedir=} ;; | |
99 | "--infodir="*) infodir=${ARG#--infodir=} ;; | |
100 | "--mandir"*) mandir=${ARG#--mandir} ;; | |
101 | "--localedir"*) localedir=${ARG#--localedir} ;; | |
102 | "--help"*) printhelp; abort_configure ;; | |
103 | "--debug") BUILD_TYPE="debug" ;; | |
104 | "--release") BUILD_TYPE="release" ;; | |
105 | "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;; | |
106 | "-"*) echo "unknown option: $ARG"; abort_configure ;; | |
107 | esac | |
0 | 108 | done |
109 | ||
277 | 110 | |
111 | ||
112 | # set defaults for dir variables | |
113 | : ${exec_prefix:="$prefix"} | |
114 | : ${bindir:='${exec_prefix}/bin'} | |
115 | : ${sbindir:='${exec_prefix}/sbin'} | |
116 | : ${libdir:='${exec_prefix}/lib'} | |
117 | : ${libexecdir:='${exec_prefix}/libexec'} | |
118 | : ${datarootdir:='${prefix}/share'} | |
119 | : ${datadir:='${datarootdir}'} | |
120 | : ${sysconfdir:='${prefix}/etc'} | |
121 | : ${sharedstatedir:='${prefix}/com'} | |
122 | : ${localstatedir:='${prefix}/var'} | |
123 | : ${runstatedir:='${localstatedir}/run'} | |
124 | : ${includedir:='${prefix}/include'} | |
125 | : ${infodir:='${datarootdir}/info'} | |
126 | : ${mandir:='${datarootdir}/man'} | |
127 | : ${localedir:='${datarootdir}/locale'} | |
128 | ||
129 | # check if a config.site exists and load it | |
130 | if [ -n "$CONFIG_SITE" ]; then | |
131 | # CONFIG_SITE may contain space separated file names | |
132 | for cs in $CONFIG_SITE; do | |
133 | printf "loading defaults from $cs... " | |
134 | . "$cs" | |
135 | echo ok | |
136 | done | |
137 | elif [ -f "$prefix/share/config.site" ]; then | |
138 | printf "loading site defaults... " | |
139 | . "$prefix/share/config.site" | |
140 | echo ok | |
141 | elif [ -f "$prefix/etc/config.site" ]; then | |
142 | printf "loading site defaults... " | |
143 | . "$prefix/etc/config.site" | |
144 | echo ok | |
0 | 145 | fi |
146 | ||
277 | 147 | # Test for availability of pkg-config |
148 | PKG_CONFIG=`command -v pkg-config` | |
149 | : ${PKG_CONFIG:="false"} | |
0 | 150 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
151 | # Simple uname based platform detection |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
152 | # $PLATFORM is used for platform dependent dependency selection |
277 | 153 | OS=`uname -s` |
154 | OS_VERSION=`uname -r` | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
155 | printf "detect platform... " |
277 | 156 | if [ "$OS" = "SunOS" ]; then |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
157 | PLATFORM="solaris sunos unix svr4" |
277 | 158 | elif [ "$OS" = "Linux" ]; then |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
159 | PLATFORM="linux unix" |
277 | 160 | elif [ "$OS" = "FreeBSD" ]; then |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
161 | PLATFORM="freebsd bsd unix" |
277 | 162 | elif [ "$OS" = "OpenBSD" ]; then |
163 | PLATFORM="openbsd bsd unix" | |
164 | elif [ "$OS" = "NetBSD" ]; then | |
165 | PLATFORM="netbsd bsd unix" | |
166 | elif [ "$OS" = "Darwin" ]; then | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
167 | PLATFORM="macos osx bsd unix" |
277 | 168 | elif echo "$OS" | grep -i "MINGW" > /dev/null; then |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
169 | PLATFORM="windows mingw" |
105
86d729874ff4
added FreeBSD support and fixed gtk2 build
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
170 | fi |
277 | 171 | : ${PLATFORM:="unix"} |
0 | 172 | |
277 | 173 | PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -` |
174 | echo "$PLATFORM_NAME" | |
0 | 175 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
176 | isplatform() |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
177 | { |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
178 | for p in $PLATFORM |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
179 | do |
277 | 180 | if [ "$p" = "$1" ]; then |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
181 | return 0 |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
182 | fi |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
183 | done |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
184 | return 1 |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
185 | } |
277 | 186 | notisplatform() |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
187 | { |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
188 | for p in $PLATFORM |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
189 | do |
277 | 190 | if [ "$p" = "$1" ]; then |
191 | return 1 | |
192 | fi | |
193 | done | |
194 | return 0 | |
195 | } | |
196 | istoolchain() | |
197 | { | |
198 | for t in $TOOLCHAIN | |
199 | do | |
200 | if [ "$t" = "$1" ]; then | |
201 | return 0 | |
202 | fi | |
203 | done | |
204 | return 1 | |
205 | } | |
206 | notistoolchain() | |
207 | { | |
208 | for t in $TOOLCHAIN | |
209 | do | |
210 | if [ "$t" = "$1" ]; then | |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
211 | return 1 |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
212 | fi |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
213 | done |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
214 | return 0 |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
215 | } |
0 | 216 | |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
217 | |
277 | 218 | # generate vars.mk |
219 | cat > "$TEMP_DIR/vars.mk" << __EOF__ | |
220 | prefix=$prefix | |
221 | exec_prefix=$exec_prefix | |
222 | bindir=$bindir | |
223 | sbindir=$sbindir | |
224 | libdir=$libdir | |
225 | libexecdir=$libexecdir | |
226 | datarootdir=$datarootdir | |
227 | datadir=$datadir | |
228 | sysconfdir=$sysconfdir | |
229 | sharedstatedir=$sharedstatedir | |
230 | localstatedir=$localstatedir | |
231 | runstatedir=$runstatedir | |
232 | includedir=$includedir | |
233 | infodir=$infodir | |
234 | mandir=$mandir | |
235 | localedir=$localedir | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
236 | __EOF__ |
0 | 237 | |
277 | 238 | # toolchain detection utilities |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
239 | . make/toolchain.sh |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
240 | |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
241 | # |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
242 | # DEPENDENCIES |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
243 | # |
0 | 244 | |
277 | 245 | # check languages |
246 | lang_c= | |
247 | lang_cpp= | |
514
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
248 | if detect_cpp_compiler ; then |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
249 | lang_cpp=1 |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
250 | fi |
277 | 251 | if detect_c_compiler ; then |
252 | lang_c=1 | |
253 | fi | |
254 | ||
255 | # create buffer for make variables required by dependencies | |
256 | echo > "$TEMP_DIR/make.mk" | |
257 | ||
258 | test_pkg_config() | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
259 | { |
277 | 260 | if "$PKG_CONFIG" --exists "$1" ; then : |
261 | else return 1 ; fi | |
262 | if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then : | |
263 | else return 1 ; fi | |
264 | if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then : | |
265 | else return 1 ; fi | |
266 | if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : | |
267 | else return 1 ; fi | |
268 | return 0 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
269 | } |
277 | 270 | |
271 | print_check_msg() | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
272 | { |
277 | 273 | if [ -z "$1" ]; then |
274 | shift | |
275 | printf "$@" | |
276 | fi | |
277 | } | |
278 | ||
279 | dependency_error_gtk2legacy() | |
280 | { | |
281 | print_check_msg "$dep_checked_gtk2legacy" "checking for gtk2legacy... " | |
282 | # dependency gtk2legacy | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
283 | while true |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
284 | do |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
285 | if [ -z "$PKG_CONFIG" ]; then |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
286 | break |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
287 | fi |
277 | 288 | if test_pkg_config "gtk+-2.0" "" "" "" ; then |
289 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-2.0`" | |
290 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-2.0`" | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
291 | else |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
292 | break |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
293 | fi |
277 | 294 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_GTK2 -DUI_GTK2LEGACY" |
295 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread" | |
296 | print_check_msg "$dep_checked_gtk2legacy" "yes\n" | |
297 | dep_checked_gtk2legacy=1 | |
298 | return 1 | |
299 | done | |
300 | ||
301 | print_check_msg "$dep_checked_gtk2legacy" "no\n" | |
302 | dep_checked_gtk2legacy=1 | |
303 | return 0 | |
304 | } | |
514
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
305 | dependency_error_qt5() |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
306 | { |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
307 | print_check_msg "$dep_checked_qt5" "checking for qt5... " |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
308 | # dependency qt5 |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
309 | while true |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
310 | do |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
311 | if [ -z "$lang_cpp" ] ; then |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
312 | break |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
313 | fi |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
314 | if which qmake-qt5 > /dev/null ; then |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
315 | : |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
316 | else |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
317 | break |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
318 | fi |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
319 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_QT5" |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
320 | if tmp_flags=`qmake-qt5 -o - /dev/null | grep "DEFINES " | sed "s/DEFINES[ ]*=//g"` ; then |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
321 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
322 | else |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
323 | break |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
324 | fi |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
325 | if tmp_flags=`qmake-qt5 -o - /dev/null | grep "INCPATH " | sed "s/INCPATH[ ]*=//g"` ; then |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
326 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
327 | else |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
328 | break |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
329 | fi |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
330 | if tmp_flags=`qmake-qt5 -o - /dev/null | grep "LIBS " | sed "s/LIBS[ ]*=//g"` ; then |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
331 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
332 | else |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
333 | break |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
334 | fi |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
335 | print_check_msg "$dep_checked_qt5" "yes\n" |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
336 | dep_checked_qt5=1 |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
337 | return 1 |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
338 | done |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
339 | |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
340 | print_check_msg "$dep_checked_qt5" "no\n" |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
341 | dep_checked_qt5=1 |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
342 | return 0 |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
343 | } |
277 | 344 | dependency_error_gtk2() |
345 | { | |
346 | print_check_msg "$dep_checked_gtk2" "checking for gtk2... " | |
347 | # dependency gtk2 | |
348 | while true | |
349 | do | |
350 | if [ -z "$PKG_CONFIG" ]; then | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
351 | break |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
352 | fi |
277 | 353 | if pkg-config --atleast-version=2.20 gtk+-2.0 > /dev/null ; then |
354 | : | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
355 | else |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
356 | break |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
357 | fi |
277 | 358 | if test_pkg_config "gtk+-2.0" "" "" "" ; then |
359 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-2.0`" | |
360 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-2.0`" | |
361 | else | |
362 | break | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
363 | fi |
277 | 364 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_GTK2" |
365 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread" | |
366 | print_check_msg "$dep_checked_gtk2" "yes\n" | |
367 | dep_checked_gtk2=1 | |
368 | return 1 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
369 | done |
277 | 370 | |
371 | print_check_msg "$dep_checked_gtk2" "no\n" | |
372 | dep_checked_gtk2=1 | |
373 | return 0 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
374 | } |
277 | 375 | dependency_error_gtk3() |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
376 | { |
277 | 377 | print_check_msg "$dep_checked_gtk3" "checking for gtk3... " |
378 | # dependency gtk3 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
379 | while true |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
380 | do |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
381 | if [ -z "$PKG_CONFIG" ]; then |
277 | 382 | break |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
383 | fi |
277 | 384 | if test_pkg_config "gtk+-3.0" "" "" "" ; then |
385 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-3.0`" | |
386 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-3.0`" | |
387 | else | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
388 | break |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
389 | fi |
277 | 390 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_GTK3" |
391 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread" | |
392 | print_check_msg "$dep_checked_gtk3" "yes\n" | |
393 | dep_checked_gtk3=1 | |
394 | return 1 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
395 | done |
277 | 396 | |
397 | print_check_msg "$dep_checked_gtk3" "no\n" | |
398 | dep_checked_gtk3=1 | |
399 | return 0 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
400 | } |
277 | 401 | dependency_error_gtk4() |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
402 | { |
277 | 403 | print_check_msg "$dep_checked_gtk4" "checking for gtk4... " |
404 | # dependency gtk4 | |
170
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
405 | while true |
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
406 | do |
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
407 | if [ -z "$PKG_CONFIG" ]; then |
277 | 408 | break |
170
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
409 | fi |
292
8e5e7adf5372
add gtk4 option to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
277
diff
changeset
|
410 | if test_pkg_config "gtk4" "" "" "" ; then |
8e5e7adf5372
add gtk4 option to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
277
diff
changeset
|
411 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk4`" |
8e5e7adf5372
add gtk4 option to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
277
diff
changeset
|
412 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk4`" |
277 | 413 | else |
170
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
414 | break |
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
415 | fi |
292
8e5e7adf5372
add gtk4 option to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
277
diff
changeset
|
416 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_GTK4" |
277 | 417 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread" |
418 | print_check_msg "$dep_checked_gtk4" "yes\n" | |
419 | dep_checked_gtk4=1 | |
420 | return 1 | |
170
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
421 | done |
277 | 422 | |
423 | print_check_msg "$dep_checked_gtk4" "no\n" | |
424 | dep_checked_gtk4=1 | |
425 | return 0 | |
170
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
426 | } |
302
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
427 | dependency_error_libadwaita() |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
428 | { |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
429 | print_check_msg "$dep_checked_libadwaita" "checking for libadwaita... " |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
430 | # dependency libadwaita |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
431 | while true |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
432 | do |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
433 | if [ -z "$PKG_CONFIG" ]; then |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
434 | break |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
435 | fi |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
436 | if test_pkg_config "libadwaita-1" "" "" "" ; then |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
437 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libadwaita-1`" |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
438 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libadwaita-1`" |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
439 | else |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
440 | break |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
441 | fi |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
442 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_GTK4 -DUI_LIBADWAITA" |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
443 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread" |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
444 | print_check_msg "$dep_checked_libadwaita" "yes\n" |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
445 | dep_checked_libadwaita=1 |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
446 | return 1 |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
447 | done |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
448 | |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
449 | print_check_msg "$dep_checked_libadwaita" "no\n" |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
450 | dep_checked_libadwaita=1 |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
451 | return 0 |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
452 | } |
463
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
453 | dependency_error_webkitgtk6() |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
454 | { |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
455 | print_check_msg "$dep_checked_webkitgtk6" "checking for webkitgtk6... " |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
456 | # dependency webkitgtk6 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
457 | while true |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
458 | do |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
459 | if [ -z "$PKG_CONFIG" ]; then |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
460 | break |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
461 | fi |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
462 | if test_pkg_config "webkitgtk-6.0" "" "" "" ; then |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
463 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags webkitgtk-6.0`" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
464 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs webkitgtk-6.0`" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
465 | else |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
466 | break |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
467 | fi |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
468 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_WEBVIEW" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
469 | print_check_msg "$dep_checked_webkitgtk6" "yes\n" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
470 | dep_checked_webkitgtk6=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
471 | return 1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
472 | done |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
473 | |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
474 | # dependency webkitgtk6 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
475 | while true |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
476 | do |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
477 | print_check_msg "$dep_checked_webkitgtk6" "yes\n" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
478 | dep_checked_webkitgtk6=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
479 | return 1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
480 | done |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
481 | |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
482 | print_check_msg "$dep_checked_webkitgtk6" "no\n" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
483 | dep_checked_webkitgtk6=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
484 | return 0 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
485 | } |
277 | 486 | dependency_error_motif() |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
487 | { |
277 | 488 | print_check_msg "$dep_checked_motif" "checking for motif... " |
176
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
489 | # dependency motif platform="bsd" |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
490 | while true |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
491 | do |
277 | 492 | if notisplatform "bsd"; then |
176
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
493 | break |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
494 | fi |
277 | 495 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_MOTIF -I/usr/local/include/X11" |
496 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lXm -lXt -lX11 -lpthread" | |
497 | print_check_msg "$dep_checked_motif" "yes\n" | |
498 | dep_checked_motif=1 | |
499 | return 1 | |
176
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
500 | done |
277 | 501 | |
502 | # dependency motif | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
503 | while true |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
504 | do |
277 | 505 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_MOTIF" |
506 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lXm -lXt -lX11 -lpthread" | |
507 | print_check_msg "$dep_checked_motif" "yes\n" | |
508 | dep_checked_motif=1 | |
509 | return 1 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
510 | done |
277 | 511 | |
512 | print_check_msg "$dep_checked_motif" "no\n" | |
513 | dep_checked_motif=1 | |
514 | return 0 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
515 | } |
463
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
516 | dependency_error_webkit2gtk4() |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
517 | { |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
518 | print_check_msg "$dep_checked_webkit2gtk4" "checking for webkit2gtk4... " |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
519 | # dependency webkit2gtk4 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
520 | while true |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
521 | do |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
522 | if [ -z "$PKG_CONFIG" ]; then |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
523 | break |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
524 | fi |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
525 | if test_pkg_config "webkit2gtk-4.1" "" "" "" ; then |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
526 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags webkit2gtk-4.1`" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
527 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs webkit2gtk-4.1`" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
528 | else |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
529 | break |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
530 | fi |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
531 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_WEBVIEW" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
532 | print_check_msg "$dep_checked_webkit2gtk4" "yes\n" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
533 | dep_checked_webkit2gtk4=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
534 | return 1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
535 | done |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
536 | |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
537 | # dependency webkit2gtk4 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
538 | while true |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
539 | do |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
540 | if [ -z "$PKG_CONFIG" ]; then |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
541 | break |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
542 | fi |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
543 | if test_pkg_config "webkit2gtk-4.0" "" "" "" ; then |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
544 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags webkit2gtk-4.0`" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
545 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs webkit2gtk-4.0`" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
546 | else |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
547 | break |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
548 | fi |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
549 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_WEBVIEW" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
550 | print_check_msg "$dep_checked_webkit2gtk4" "yes\n" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
551 | dep_checked_webkit2gtk4=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
552 | return 1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
553 | done |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
554 | |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
555 | # dependency webkit2gtk4 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
556 | while true |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
557 | do |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
558 | print_check_msg "$dep_checked_webkit2gtk4" "yes\n" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
559 | dep_checked_webkit2gtk4=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
560 | return 1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
561 | done |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
562 | |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
563 | print_check_msg "$dep_checked_webkit2gtk4" "no\n" |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
564 | dep_checked_webkit2gtk4=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
565 | return 0 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
566 | } |
277 | 567 | dependency_error_cocoa() |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
568 | { |
277 | 569 | print_check_msg "$dep_checked_cocoa" "checking for cocoa... " |
570 | # dependency cocoa platform="macos" | |
571 | while true | |
572 | do | |
573 | if notisplatform "macos"; then | |
574 | break | |
575 | fi | |
576 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_COCOA" | |
577 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lobjc -framework Cocoa" | |
578 | print_check_msg "$dep_checked_cocoa" "yes\n" | |
579 | dep_checked_cocoa=1 | |
580 | return 1 | |
581 | done | |
582 | ||
583 | print_check_msg "$dep_checked_cocoa" "no\n" | |
584 | dep_checked_cocoa=1 | |
585 | return 0 | |
586 | } | |
587 | dependency_error_winui() | |
588 | { | |
589 | print_check_msg "$dep_checked_winui" "checking for winui... " | |
171
5065d0d52680
replace wpf with winui in the configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
170
diff
changeset
|
590 | # dependency winui platform="windows" |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
591 | while true |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
592 | do |
277 | 593 | if notisplatform "windows"; then |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
594 | break |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
595 | fi |
277 | 596 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_WINUI" |
597 | print_check_msg "$dep_checked_winui" "yes\n" | |
598 | dep_checked_winui=1 | |
599 | return 1 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
600 | done |
277 | 601 | |
602 | print_check_msg "$dep_checked_winui" "no\n" | |
603 | dep_checked_winui=1 | |
604 | return 0 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
605 | } |
277 | 606 | |
607 | # start collecting dependency information | |
608 | echo > "$TEMP_DIR/flags.mk" | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
609 | |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
610 | DEPENDENCIES_FAILED= |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
611 | ERROR=0 |
277 | 612 | # unnamed dependencies |
613 | TEMP_CFLAGS= | |
614 | TEMP_CXXFLAGS= | |
615 | TEMP_LDFLAGS= | |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
616 | while true |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
617 | do |
277 | 618 | while true |
619 | do | |
620 | if [ -z "$lang_c" ] ; then | |
621 | ERROR=1 | |
622 | break | |
623 | fi | |
624 | ||
514
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
625 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
626 | LD = \$(CC) |
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
627 | __EOF__ |
277 | 628 | break |
629 | done | |
630 | break | |
631 | done | |
632 | while true | |
633 | do | |
634 | if notisplatform "macos"; then | |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
635 | break |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
636 | fi |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
637 | while true |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
638 | do |
277 | 639 | |
640 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
174 | 641 | OBJ_EXT = .o |
642 | LIB_EXT = .a | |
511
11004f307eae
add LIB_PREFIX to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
463
diff
changeset
|
643 | LIB_PREFIX = lib |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
644 | PACKAGE_SCRIPT = package_osx.sh |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
645 | __EOF__ |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
646 | break |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
647 | done |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
648 | break |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
649 | done |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
650 | while true |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
651 | do |
277 | 652 | if notisplatform "unix"; then |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
653 | break |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
654 | fi |
277 | 655 | if isplatform "macos" || istoolchain "macos"; then |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
656 | break |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
657 | fi |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
658 | while true |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
659 | do |
277 | 660 | |
661 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
174 | 662 | OBJ_EXT = .o |
663 | LIB_EXT = .a | |
511
11004f307eae
add LIB_PREFIX to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
463
diff
changeset
|
664 | LIB_PREFIX = lib |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
665 | PACKAGE_SCRIPT = package_unix.sh |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
666 | __EOF__ |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
667 | break |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
668 | done |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
669 | break |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
670 | done |
176
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
671 | while true |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
672 | do |
277 | 673 | if notisplatform "bsd"; then |
176
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
674 | break |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
675 | fi |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
676 | while true |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
677 | do |
277 | 678 | |
679 | TEMP_CFLAGS="$TEMP_CFLAGS -I/usr/local/include" | |
680 | TEMP_LDFLAGS="$TEMP_LDFLAGS -L/usr/local/lib" | |
176
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
681 | break |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
682 | done |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
683 | break |
bc63cb601f6d
port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
174
diff
changeset
|
684 | done |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
685 | |
277 | 686 | # add general dependency flags to flags.mk |
687 | echo "# general flags" >> "$TEMP_DIR/flags.mk" | |
688 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then | |
689 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" | |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
690 | fi |
277 | 691 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
692 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" | |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
693 | fi |
277 | 694 | if [ -n "${TEMP_LDFLAGS}" ]; then |
695 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" | |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
696 | fi |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
697 | |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
698 | # |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
699 | # OPTION VALUES |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
700 | # |
302
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
701 | checkopt_toolkit_libadwaita() |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
702 | { |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
703 | VERR=0 |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
704 | if dependency_error_libadwaita ; then |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
705 | VERR=1 |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
706 | fi |
463
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
707 | if dependency_error_webkitgtk6 ; then |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
708 | VERR=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
709 | fi |
302
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
710 | if [ $VERR -ne 0 ]; then |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
711 | return 1 |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
712 | fi |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
713 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
714 | TOOLKIT = gtk |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
715 | GTKOBJ = draw_cairo.o |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
716 | __EOF__ |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
717 | return 0 |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
718 | } |
170
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
719 | checkopt_toolkit_gtk4() |
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
720 | { |
277 | 721 | VERR=0 |
722 | if dependency_error_gtk4 ; then | |
723 | VERR=1 | |
724 | fi | |
463
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
725 | if dependency_error_webkitgtk6 ; then |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
726 | VERR=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
727 | fi |
277 | 728 | if [ $VERR -ne 0 ]; then |
729 | return 1 | |
730 | fi | |
731 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
170
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
732 | TOOLKIT = gtk |
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
733 | GTKOBJ = draw_cairo.o |
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
734 | __EOF__ |
277 | 735 | return 0 |
170
ad9edb497857
enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
159
diff
changeset
|
736 | } |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
737 | checkopt_toolkit_gtk3() |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
738 | { |
277 | 739 | VERR=0 |
740 | if dependency_error_gtk3 ; then | |
741 | VERR=1 | |
742 | fi | |
463
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
743 | if dependency_error_webkit2gtk4 ; then |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
744 | VERR=1 |
e8ee57cc052e
prepare webview
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
745 | fi |
277 | 746 | if [ $VERR -ne 0 ]; then |
747 | return 1 | |
748 | fi | |
749 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
750 | TOOLKIT = gtk |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
751 | GTKOBJ = draw_cairo.o |
0 | 752 | __EOF__ |
277 | 753 | return 0 |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
754 | } |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
755 | checkopt_toolkit_gtk2() |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
756 | { |
277 | 757 | VERR=0 |
758 | if dependency_error_gtk2 ; then | |
759 | VERR=1 | |
760 | fi | |
761 | if [ $VERR -ne 0 ]; then | |
762 | return 1 | |
763 | fi | |
764 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
765 | TOOLKIT = gtk |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
766 | GTKOBJ = draw_cairo.o |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
767 | __EOF__ |
277 | 768 | return 0 |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
769 | } |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
770 | checkopt_toolkit_gtk2legacy() |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
771 | { |
277 | 772 | VERR=0 |
773 | if dependency_error_gtk2legacy ; then | |
774 | VERR=1 | |
775 | fi | |
776 | if [ $VERR -ne 0 ]; then | |
777 | return 1 | |
778 | fi | |
779 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
780 | TOOLKIT = gtk |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
781 | GTKOBJ = draw_gdk.o |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
782 | __EOF__ |
277 | 783 | return 0 |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
784 | } |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
785 | checkopt_toolkit_qt5() |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
786 | { |
277 | 787 | VERR=0 |
788 | if dependency_error_qt5 ; then | |
789 | VERR=1 | |
790 | fi | |
791 | if [ $VERR -ne 0 ]; then | |
792 | return 1 | |
793 | fi | |
794 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
795 | TOOLKIT = qt |
514
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
796 | LD = \$(CXX) |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
797 | __EOF__ |
277 | 798 | return 0 |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
799 | } |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
800 | checkopt_toolkit_qt4() |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
801 | { |
277 | 802 | VERR=0 |
803 | if dependency_error_qt4 ; then | |
804 | VERR=1 | |
805 | fi | |
806 | if [ $VERR -ne 0 ]; then | |
807 | return 1 | |
808 | fi | |
809 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
810 | TOOLKIT = qt |
514
f1662be4eab6
re-enable qt5 toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
511
diff
changeset
|
811 | LD = \$(CXX) |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
812 | __EOF__ |
277 | 813 | return 0 |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
814 | } |
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
815 | checkopt_toolkit_cocoa() |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
816 | { |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
817 | VERR=0 |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
818 | if dependency_error_cocoa ; then |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
819 | VERR=1 |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
820 | fi |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
821 | if [ $VERR -ne 0 ]; then |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
822 | return 1 |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
823 | fi |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
824 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
825 | TOOLKIT = cocoa |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
826 | __EOF__ |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
827 | return 0 |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
828 | } |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
829 | checkopt_toolkit_motif() |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
830 | { |
277 | 831 | VERR=0 |
832 | if dependency_error_motif ; then | |
833 | VERR=1 | |
834 | fi | |
835 | if [ $VERR -ne 0 ]; then | |
836 | return 1 | |
837 | fi | |
838 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
839 | TOOLKIT = motif |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
840 | __EOF__ |
277 | 841 | return 0 |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
842 | } |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
843 | |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
844 | # |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
845 | # TARGETS |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
846 | # |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
847 | |
277 | 848 | echo >> "$TEMP_DIR/flags.mk" |
849 | echo "configuring target: tk" | |
850 | echo "# flags for target tk" >> "$TEMP_DIR/flags.mk" | |
851 | TEMP_CFLAGS= | |
852 | TEMP_CXXFLAGS= | |
853 | TEMP_LDFLAGS= | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
854 | |
0 | 855 | |
158
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
856 | # Features |
4bde241c49b1
update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
156
diff
changeset
|
857 | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
858 | # Option: --toolkit |
277 | 859 | if [ -z "$OPT_TOOLKIT" ]; then |
860 | echo "auto-detecting option 'toolkit'" | |
861 | SAVED_ERROR="$ERROR" | |
862 | SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" | |
863 | ERROR=1 | |
864 | while true | |
865 | do | |
866 | if isplatform "windows"; then | |
867 | if checkopt_toolkit_winui ; then | |
868 | echo " toolkit: winui" >> "$TEMP_DIR/options" | |
869 | ERROR=0 | |
870 | break | |
871 | fi | |
872 | fi | |
873 | if isplatform "macos"; then | |
874 | if checkopt_toolkit_cocoa ; then | |
875 | echo " toolkit: cocoa" >> "$TEMP_DIR/options" | |
876 | ERROR=0 | |
877 | break | |
878 | fi | |
879 | fi | |
292
8e5e7adf5372
add gtk4 option to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
277
diff
changeset
|
880 | if checkopt_toolkit_gtk4 ; then |
8e5e7adf5372
add gtk4 option to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
277
diff
changeset
|
881 | echo " toolkit: gtk4" >> "$TEMP_DIR/options" |
277 | 882 | ERROR=0 |
883 | break | |
884 | fi | |
292
8e5e7adf5372
add gtk4 option to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
277
diff
changeset
|
885 | if checkopt_toolkit_gtk3 ; then |
8e5e7adf5372
add gtk4 option to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
277
diff
changeset
|
886 | echo " toolkit: gtk3" >> "$TEMP_DIR/options" |
277 | 887 | ERROR=0 |
888 | break | |
889 | fi | |
890 | if checkopt_toolkit_gtk2 ; then | |
891 | echo " toolkit: gtk2" >> "$TEMP_DIR/options" | |
892 | ERROR=0 | |
893 | break | |
894 | fi | |
895 | if checkopt_toolkit_qt4 ; then | |
896 | echo " toolkit: qt4" >> "$TEMP_DIR/options" | |
897 | ERROR=0 | |
898 | break | |
899 | fi | |
900 | if checkopt_toolkit_motif ; then | |
901 | echo " toolkit: motif" >> "$TEMP_DIR/options" | |
902 | ERROR=0 | |
903 | break | |
904 | fi | |
905 | break | |
906 | done | |
907 | if [ $ERROR -ne 0 ]; then | |
908 | SAVED_ERROR=1 | |
909 | SAVED_DEPENDENCIES_FAILED="option 'toolkit' $SAVED_DEPENDENCIES_FAILED" | |
910 | fi | |
911 | ERROR="$SAVED_ERROR" | |
912 | DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
913 | else |
277 | 914 | echo "checking option toolkit = $OPT_TOOLKIT" |
915 | if false; then | |
916 | false | |
302
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
917 | elif [ "$OPT_TOOLKIT" = "libadwaita" ]; then |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
918 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
919 | if checkopt_toolkit_libadwaita ; then |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
920 | : |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
921 | else |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
922 | ERROR=1 |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
923 | DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
924 | fi |
277 | 925 | elif [ "$OPT_TOOLKIT" = "gtk4" ]; then |
926 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options | |
927 | if checkopt_toolkit_gtk4 ; then | |
928 | : | |
929 | else | |
930 | ERROR=1 | |
931 | DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" | |
932 | fi | |
933 | elif [ "$OPT_TOOLKIT" = "gtk3" ]; then | |
934 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options | |
935 | if checkopt_toolkit_gtk3 ; then | |
936 | : | |
937 | else | |
938 | ERROR=1 | |
939 | DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" | |
940 | fi | |
941 | elif [ "$OPT_TOOLKIT" = "gtk2" ]; then | |
942 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options | |
943 | if checkopt_toolkit_gtk2 ; then | |
944 | : | |
945 | else | |
946 | ERROR=1 | |
947 | DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" | |
948 | fi | |
949 | elif [ "$OPT_TOOLKIT" = "gtk2legacy" ]; then | |
950 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options | |
951 | if checkopt_toolkit_gtk2legacy ; then | |
952 | : | |
953 | else | |
954 | ERROR=1 | |
955 | DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" | |
956 | fi | |
957 | elif [ "$OPT_TOOLKIT" = "qt5" ]; then | |
958 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options | |
959 | if checkopt_toolkit_qt5 ; then | |
960 | : | |
961 | else | |
962 | ERROR=1 | |
963 | DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" | |
964 | fi | |
965 | elif [ "$OPT_TOOLKIT" = "qt4" ]; then | |
966 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options | |
967 | if checkopt_toolkit_qt4 ; then | |
968 | : | |
969 | else | |
970 | ERROR=1 | |
971 | DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" | |
972 | fi | |
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
973 | elif [ "$OPT_TOOLKIT" = "cocoa" ]; then |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
974 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
975 | if checkopt_toolkit_cocoa ; then |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
976 | : |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
977 | else |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
978 | ERROR=1 |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
979 | DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
980 | fi |
277 | 981 | elif [ "$OPT_TOOLKIT" = "motif" ]; then |
982 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options | |
983 | if checkopt_toolkit_motif ; then | |
984 | : | |
985 | else | |
986 | ERROR=1 | |
987 | DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" | |
988 | fi | |
989 | fi | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
990 | fi |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
991 | |
277 | 992 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
993 | echo "TK_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" | |
994 | fi | |
995 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then | |
996 | echo "TK_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
997 | fi |
277 | 998 | if [ "$BUILD_TYPE" = "debug" ]; then |
999 | if [ -n "$lang_c" ]; then | |
1000 | echo 'TK_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" | |
1001 | fi | |
1002 | if [ -n "$lang_cpp" ]; then | |
1003 | echo 'TK_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" | |
1004 | fi | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
1005 | fi |
277 | 1006 | if [ "$BUILD_TYPE" = "release" ]; then |
1007 | if [ -n "$lang_c" ]; then | |
1008 | echo 'TK_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" | |
1009 | fi | |
1010 | if [ -n "$lang_cpp" ]; then | |
1011 | echo 'TK_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" | |
1012 | fi | |
1013 | fi | |
1014 | if [ -n "${TEMP_LDFLAGS}" ]; then | |
1015 | echo "TK_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
1016 | fi |
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
1017 | |
277 | 1018 | |
1019 | # final result | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
1020 | if [ $ERROR -ne 0 ]; then |
277 | 1021 | echo |
1022 | echo "Error: Unresolved dependencies" | |
1023 | echo "$DEPENDENCIES_FAILED" | |
1024 | abort_configure | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
1025 | fi |
0 | 1026 | |
1027 | echo "configure finished" | |
1028 | echo | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
1029 | echo "Build Config:" |
277 | 1030 | echo " PREFIX: $prefix" |
1031 | echo " TOOLCHAIN: $TOOLCHAIN_NAME" | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
1032 | echo "Options:" |
277 | 1033 | cat "$TEMP_DIR/options" |
0 | 1034 | echo |
1035 | ||
277 | 1036 | # generate the config.mk file |
1037 | cat > "$TEMP_DIR/config.mk" << __EOF__ | |
1038 | # | |
1039 | # config.mk generated by configure | |
1040 | # | |
156
62f1a55535e7
new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
105
diff
changeset
|
1041 | |
277 | 1042 | __EOF__ |
1043 | write_toolchain_defaults "$TEMP_DIR/toolchain.mk" | |
1044 | cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk | |
1045 | rm -Rf "$TEMP_DIR" |