configure

7 days ago

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 30 Mar 2025 17:06:27 +0200 (7 days ago)
changeset 540
d8b86f66721c
parent 518
45ed276ba7a4
permissions
-rwxr-xr-x

another textview/scrollview layout fix (Cocoa)

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

mercurial