configure

Sun, 16 Jun 2024 11:36:27 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 16 Jun 2024 11:36:27 +0200
changeset 42
9af327d0e0e4
parent 32
e5f4d8af567e
child 44
473954dc6b74
permissions
-rwxr-xr-x

update toolkit

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
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
75 --toolkit=(gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|motif)
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 }
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
511 dependency_error_motif()
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
512 {
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
513 print_check_msg "$dep_checked_motif" "checking for motif... "
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
514 # dependency motif platform="bsd"
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
515 while true
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
516 do
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
517 if notisplatform "bsd"; then
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
518 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
519 fi
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
520 TEMP_CFLAGS="$TEMP_CFLAGS -DUI_MOTIF -I/usr/local/include/X11"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
521 TEMP_LDFLAGS="$TEMP_LDFLAGS -lXm -lXt -lX11 -lpthread"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
522 print_check_msg "$dep_checked_motif" "yes\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
523 dep_checked_motif=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
524 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
525 done
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
526
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
527 # dependency motif
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
528 while true
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
529 do
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
530 TEMP_CFLAGS="$TEMP_CFLAGS -DUI_MOTIF"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
531 TEMP_LDFLAGS="$TEMP_LDFLAGS -lXm -lXt -lX11 -lpthread"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
532 print_check_msg "$dep_checked_motif" "yes\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
533 dep_checked_motif=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
534 return 1
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
535 done
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
536
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
537 print_check_msg "$dep_checked_motif" "no\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
538 dep_checked_motif=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
539 return 0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
540 }
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
541 dependency_error_libxml2()
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
542 {
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
543 print_check_msg "$dep_checked_libxml2" "checking for libxml2... "
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
544 # dependency libxml2 platform="windows"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
545 while true
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
546 do
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
547 if notisplatform "windows"; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
548 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
549 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
550 if tmp_flags=`xml2-config --cflags` ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
551 TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
552 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
553 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
554 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
555 if tmp_flags=`xml2-config --libs` ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
556 TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
557 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
558 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
559 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
560 print_check_msg "$dep_checked_libxml2" "yes\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
561 dep_checked_libxml2=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
562 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
563 done
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
564
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
565 # dependency libxml2 platform="macos"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
566 while true
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
567 do
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
568 if notisplatform "macos"; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
569 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
570 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
571 if tmp_flags=`xml2-config --cflags` ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
572 TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
573 else
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 --libs` ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
577 TEMP_LDFLAGS="$TEMP_LDFLAGS $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 print_check_msg "$dep_checked_libxml2" "yes\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
582 dep_checked_libxml2=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
583 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
584 done
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
585
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
586 # dependency libxml2
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
587 while true
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
588 do
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
589 if [ -z "$PKG_CONFIG" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
590 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
591 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
592 if test_pkg_config "libxml-2.0" "" "" "" ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
593 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
594 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
595 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
596 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
597 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
598 print_check_msg "$dep_checked_libxml2" "yes\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
599 dep_checked_libxml2=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
600 return 1
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
601 done
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
602
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
603 # dependency libxml2
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
604 while true
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
605 do
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
606 if tmp_flags=`xml2-config --cflags` ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
607 TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
608 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
609 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
610 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
611 if tmp_flags=`xml2-config --libs` ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
612 TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
613 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
614 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
615 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
616 print_check_msg "$dep_checked_libxml2" "yes\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
617 dep_checked_libxml2=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
618 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
619 done
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
620
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
621 print_check_msg "$dep_checked_libxml2" "no\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
622 dep_checked_libxml2=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
623 return 0
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
624 }
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
625 dependency_error_cocoa()
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
626 {
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
627 print_check_msg "$dep_checked_cocoa" "checking for cocoa... "
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
628 # dependency cocoa platform="macos"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
629 while true
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
630 do
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
631 if notisplatform "macos"; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
632 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
633 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
634 TEMP_CFLAGS="$TEMP_CFLAGS -DUI_COCOA"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
635 TEMP_LDFLAGS="$TEMP_LDFLAGS -lobjc -framework Cocoa"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
636 print_check_msg "$dep_checked_cocoa" "yes\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
637 dep_checked_cocoa=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
638 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
639 done
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
640
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
641 print_check_msg "$dep_checked_cocoa" "no\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
642 dep_checked_cocoa=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
643 return 0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
644 }
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
645 dependency_error_winui()
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_winui" "checking for winui... "
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
648 # dependency winui platform="windows"
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
649 while true
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
650 do
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
651 if notisplatform "windows"; then
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
652 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
653 fi
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
654 TEMP_CFLAGS="$TEMP_CFLAGS -DUI_WINUI"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
655 print_check_msg "$dep_checked_winui" "yes\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
656 dep_checked_winui=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
657 return 1
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
658 done
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
659
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
660 print_check_msg "$dep_checked_winui" "no\n"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
661 dep_checked_winui=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
662 return 0
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
663 }
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
664
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
665 # start collecting dependency information
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
666 echo > "$TEMP_DIR/flags.mk"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
667
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
668 DEPENDENCIES_FAILED=
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
669 ERROR=0
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
670 # unnamed dependencies
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
671 TEMP_CFLAGS=
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
672 TEMP_CXXFLAGS=
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
673 TEMP_LDFLAGS=
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
674 while true
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
675 do
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
676 while true
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
677 do
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
678 if [ -z "$lang_c" ] ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
679 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
680 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
681 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
682
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
683 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
684 done
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
685 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
686 done
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
687 while true
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
688 do
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
689 if notisplatform "macos"; then
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
690 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
691 fi
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
692 while true
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
693 do
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
694
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
695 cat >> "$TEMP_DIR/make.mk" << __EOF__
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
696 OBJ_EXT = o
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
697 LIB_EXT = .a
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
698 PACKAGE_SCRIPT = package_osx.sh
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
699 __EOF__
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
700 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
701 done
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
702 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
703 done
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
704 while true
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
705 do
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
706 if notisplatform "unix"; then
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
707 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
708 fi
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
709 if isplatform "macos" || istoolchain "macos"; then
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
710 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
711 fi
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
712 while true
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
713 do
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
714
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
715 cat >> "$TEMP_DIR/make.mk" << __EOF__
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
716 OBJ_EXT = o
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
717 LIB_EXT = .a
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
718 PACKAGE_SCRIPT = package_unix.sh
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
719 __EOF__
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
720 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
721 done
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
722 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
723 done
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
724 while true
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
725 do
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
726 if notisplatform "bsd"; then
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
727 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
728 fi
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
729 while true
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
730 do
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
731
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
732 TEMP_CFLAGS="$TEMP_CFLAGS -I/usr/local/include"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
733 TEMP_LDFLAGS="$TEMP_LDFLAGS -L/usr/local/lib"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
734 break
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
735 done
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 done
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
738
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
739 # add general dependency flags to flags.mk
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
740 echo "# general flags" >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
741 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
742 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
743 fi
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
744 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
745 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
746 fi
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
747 if [ -n "${TEMP_LDFLAGS}" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
748 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
749 fi
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
750
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
751 #
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
752 # OPTION VALUES
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
753 #
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
754 checkopt_toolkit_gtk4()
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
755 {
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
756 VERR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
757 if dependency_error_gtk4 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
758 VERR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
759 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
760 if [ $VERR -ne 0 ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
761 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
762 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
763 cat >> "$TEMP_DIR/make.mk" << __EOF__
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
764 TOOLKIT = gtk
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
765 GTKOBJ = draw_cairo.o
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
766 __EOF__
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
767 return 0
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
768 }
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
769 checkopt_toolkit_gtk3()
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
770 {
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
771 VERR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
772 if dependency_error_gtk3 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
773 VERR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
774 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
775 if [ $VERR -ne 0 ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
776 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
777 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
778 cat >> "$TEMP_DIR/make.mk" << __EOF__
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
779 TOOLKIT = gtk
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
780 GTKOBJ = draw_cairo.o
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
781 __EOF__
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
782 return 0
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
783 }
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
784 checkopt_toolkit_gtk2()
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
785 {
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
786 VERR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
787 if dependency_error_gtk2 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
788 VERR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
789 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
790 if [ $VERR -ne 0 ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
791 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
792 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
793 cat >> "$TEMP_DIR/make.mk" << __EOF__
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
794 TOOLKIT = gtk
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
795 GTKOBJ = draw_cairo.o
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
796 __EOF__
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
797 return 0
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
798 }
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
799 checkopt_toolkit_gtk2legacy()
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
800 {
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
801 VERR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
802 if dependency_error_gtk2legacy ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
803 VERR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
804 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
805 if [ $VERR -ne 0 ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
806 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
807 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
808 cat >> "$TEMP_DIR/make.mk" << __EOF__
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
809 TOOLKIT = gtk
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
810 GTKOBJ = draw_gdk.o
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
811 __EOF__
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
812 return 0
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
813 }
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
814 checkopt_toolkit_qt5()
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
815 {
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
816 VERR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
817 if dependency_error_qt5 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
818 VERR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
819 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
820 if [ $VERR -ne 0 ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
821 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
822 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
823 cat >> "$TEMP_DIR/make.mk" << __EOF__
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
824 TOOLKIT = qt
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
825 LD = $(CXX)
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
826 __EOF__
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
827 return 0
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
828 }
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
829 checkopt_toolkit_qt4()
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
830 {
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
831 VERR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
832 if dependency_error_qt4 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
833 VERR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
834 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
835 if [ $VERR -ne 0 ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
836 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
837 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
838 cat >> "$TEMP_DIR/make.mk" << __EOF__
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
839 TOOLKIT = qt
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
840 LD = $(CXX)
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
841 __EOF__
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
842 return 0
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
843 }
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
844 checkopt_toolkit_motif()
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
845 {
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
846 VERR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
847 if dependency_error_motif ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
848 VERR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
849 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
850 if [ $VERR -ne 0 ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
851 return 1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
852 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
853 cat >> "$TEMP_DIR/make.mk" << __EOF__
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
854 TOOLKIT = motif
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
855 __EOF__
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
856 return 0
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
857 }
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
858
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
859 #
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
860 # TARGETS
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
861 #
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
862
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
863 echo >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
864 echo "configuring target: dav"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
865 echo "# flags for target dav" >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
866 TEMP_CFLAGS=
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
867 TEMP_CXXFLAGS=
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
868 TEMP_LDFLAGS=
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
869
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
870 if dependency_error_curl; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
871 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl "
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
872 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
873 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
874 if dependency_error_libxml2; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
875 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 "
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
876 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
877 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
878 if dependency_error_openssl; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
879 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl "
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
880 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
881 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
882
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
883 # Features
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
884
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
885
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
886 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
887 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
888 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
889 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
890 echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
891 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
892 if [ "$BUILD_TYPE" = "debug" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
893 if [ -n "$lang_c" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
894 echo 'DAV_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
895 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
896 if [ -n "$lang_cpp" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
897 echo 'DAV_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
898 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
899 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
900 if [ "$BUILD_TYPE" = "release" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
901 if [ -n "$lang_c" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
902 echo 'DAV_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
903 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
904 if [ -n "$lang_cpp" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
905 echo 'DAV_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
906 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
907 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
908 if [ -n "${TEMP_LDFLAGS}" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
909 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
910 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
911
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
912 echo >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
913 echo "configuring target: tk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
914 echo "# flags for target tk" >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
915 TEMP_CFLAGS=
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
916 TEMP_CXXFLAGS=
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
917 TEMP_LDFLAGS=
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
918
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
919
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
920 # Features
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
921
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
922 # Option: --toolkit
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
923 if [ -z "$OPT_TOOLKIT" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
924 echo "auto-detecting option 'toolkit'"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
925 SAVED_ERROR="$ERROR"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
926 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
927 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
928 while true
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
929 do
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
930 if isplatform "windows"; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
931 if checkopt_toolkit_winui ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
932 echo " toolkit: winui" >> "$TEMP_DIR/options"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
933 ERROR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
934 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
935 fi
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 isplatform "macos"; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
938 if checkopt_toolkit_cocoa ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
939 echo " toolkit: cocoa" >> "$TEMP_DIR/options"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
940 ERROR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
941 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
942 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
943 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
944 if checkopt_toolkit_gtk3 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
945 echo " toolkit: gtk3" >> "$TEMP_DIR/options"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
946 ERROR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
947 break
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 checkopt_toolkit_qt5 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
950 echo " toolkit: qt5" >> "$TEMP_DIR/options"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
951 ERROR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
952 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
953 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
954 if checkopt_toolkit_gtk2 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
955 echo " toolkit: gtk2" >> "$TEMP_DIR/options"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
956 ERROR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
957 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
958 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
959 if checkopt_toolkit_qt4 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
960 echo " toolkit: qt4" >> "$TEMP_DIR/options"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
961 ERROR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
962 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
963 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
964 if checkopt_toolkit_motif ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
965 echo " toolkit: motif" >> "$TEMP_DIR/options"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
966 ERROR=0
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
967 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
968 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
969 break
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
970 done
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
971 if [ $ERROR -ne 0 ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
972 SAVED_ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
973 SAVED_DEPENDENCIES_FAILED="option 'toolkit' $SAVED_DEPENDENCIES_FAILED"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
974 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
975 ERROR="$SAVED_ERROR"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
976 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
977 else
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
978 echo "checking option toolkit = $OPT_TOOLKIT"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
979 if false; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
980 false
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
981 elif [ "$OPT_TOOLKIT" = "gtk4" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
982 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
983 if checkopt_toolkit_gtk4 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
984 :
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
985 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
986 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
987 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
988 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
989 elif [ "$OPT_TOOLKIT" = "gtk3" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
990 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
991 if checkopt_toolkit_gtk3 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
992 :
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
993 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
994 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
995 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
996 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
997 elif [ "$OPT_TOOLKIT" = "gtk2" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
998 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
999 if checkopt_toolkit_gtk2 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1000 :
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1001 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1002 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1003 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
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 elif [ "$OPT_TOOLKIT" = "gtk2legacy" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1006 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1007 if checkopt_toolkit_gtk2legacy ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1008 :
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1009 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1010 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1011 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1012 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1013 elif [ "$OPT_TOOLKIT" = "qt5" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1014 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1015 if checkopt_toolkit_qt5 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1016 :
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1017 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1018 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1019 DEPENDENCIES_FAILED="option 'toolkit' $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 elif [ "$OPT_TOOLKIT" = "qt4" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1022 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1023 if checkopt_toolkit_qt4 ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1024 :
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1025 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1026 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1027 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1028 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1029 elif [ "$OPT_TOOLKIT" = "motif" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1030 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1031 if checkopt_toolkit_motif ; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1032 :
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1033 else
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1034 ERROR=1
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1035 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1036 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1037 fi
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1038 fi
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1039
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1040 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1041 echo "TK_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
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 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1044 echo "TK_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1045 fi
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1046 if [ "$BUILD_TYPE" = "debug" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1047 if [ -n "$lang_c" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1048 echo 'TK_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1049 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1050 if [ -n "$lang_cpp" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1051 echo 'TK_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1052 fi
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1053 fi
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1054 if [ "$BUILD_TYPE" = "release" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1055 if [ -n "$lang_c" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1056 echo 'TK_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1057 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1058 if [ -n "$lang_cpp" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1059 echo 'TK_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1060 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1061 fi
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1062 if [ -n "${TEMP_LDFLAGS}" ]; then
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1063 echo "TK_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1064 fi
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1065
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1066
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1067 # final result
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1068 if [ $ERROR -ne 0 ]; then
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1069 echo
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1070 echo "Error: Unresolved dependencies"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1071 echo "$DEPENDENCIES_FAILED"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1072 abort_configure
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1073 fi
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1074
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1075 echo "configure finished"
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1076 echo
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1077 echo "Build Config:"
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1078 echo " PREFIX: $prefix"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1079 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1080 echo "Options:"
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1081 cat "$TEMP_DIR/options"
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1082 echo
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1083
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1084 # generate the config.mk file
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1085 cat > "$TEMP_DIR/config.mk" << __EOF__
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 # config.mk generated by configure
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1088 #
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1089
32
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1090 __EOF__
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1091 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
e5f4d8af567e update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
1092 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
1093 rm -Rf "$TEMP_DIR"

mercurial