configure

Fri, 15 Nov 2024 21:50:20 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 15 Nov 2024 21:50:20 +0100
changeset 86
8e7c57c23133
parent 55
1ce14068ef31
permissions
-rwxr-xr-x

add reference counting to download window

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

mercurial