configure

Fri, 16 Feb 2024 19:17:30 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 16 Feb 2024 19:17:30 +0100
branch
newapi
changeset 265
3756725aeaf4
parent 176
bc63cb601f6d
child 277
5099a34747c4
permissions
-rwxr-xr-x

implement new icon API (GTK)

156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
1 #!/bin/sh
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
2
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
3
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
4 PREFIX=/usr
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
5 EPREFIX=$PREFIX
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
6
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
7 BINDIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
8 SBINDIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
9 LIBDIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
10 LIBEXECDIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
11 DATADIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
12 SYSCONFDIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
13 SHAREDSTATEDIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
14 LOCALSTATEDIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
15 INCLUDEDIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
16 INFODIR=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
17 MANDIR=
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 OS=`uname -s`
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 OS_VERSION=`uname -r`
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
21
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
22 TEMP_DIR=".tmp-`uname -n`"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
23 mkdir -p $TEMP_DIR
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
24 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
25 echo "Cannot create tmp dir"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
26 echo "Abort"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
27 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
28 touch $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
29 touch $TEMP_DIR/features
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
30
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
31 # features
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
32
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
33 # help text
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
34 printhelp()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
35 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
36 echo "Usage: $0 [OPTIONS]..."
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
37 cat << __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
38 Installation directories:
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
39 --prefix=PREFIX path prefix for architecture-independent files
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
40 [/usr]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
41 --exec-prefix=EPREFIX path prefix for architecture-dependent files
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
42 [PREFIX]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
43
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
44 --bindir=DIR user executables [EPREFIX/bin]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
45 --sbindir=DIR system admin executables [EPREFIX/sbin]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
46 --libexecdir=DIR program executables [EPREFIX/libexec]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
47 --sysconfdir=DIR system configuration files [PREFIX/etc]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
48 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
49 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
50 --libdir=DIR object code libraries [EPREFIX/lib]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
51 --includedir=DIR C header files [PREFIX/include]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
52 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
53 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
54 --infodir=DIR info documentation [DATAROOTDIR/info]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
55 --mandir=DIR man documentation [DATAROOTDIR/man]
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
56
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
57 Options:
170
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
58 --toolkit=(gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|motif)
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
59
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
60 __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
61 }
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
62
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
63 #
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
64 # parse arguments
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
65 #
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
66 for ARG in $@
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 do
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
68 case "$ARG" in
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
69 "--prefix="*) PREFIX=${ARG#--prefix=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
70 "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
71 "--bindir="*) BINDIR=${ARG#----bindir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
72 "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
73 "--libdir="*) LIBDIR=${ARG#--libdir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
74 "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
75 "--datadir="*) DATADIR=${ARG#--datadir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
76 "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
77 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
78 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
79 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
80 "--infodir="*) INFODIR=${ARG#--infodir=} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
81 "--mandir"*) MANDIR=${ARG#--mandir} ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
82 "--help"*) printhelp; exit 1 ;;
159
84a6e7a7b457 fix configure target options
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 158
diff changeset
83 "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;;
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
84 "-"*) echo "unknown option: $ARG"; exit 1 ;;
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
85 esac
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
86 done
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
87
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
88 # set dir variables
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
89 if [ -z "$BINDIR" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
90 BINDIR=$EPREFIX/bin
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
91 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
92 if [ -z "$SBINDIR" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
93 SBINDIR=$EPREFIX/sbin
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
94 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
95 if [ -z "$LIBDIR" ]; then
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
96 LIBDIR=$EPREFIX/lib
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
97 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
98 if [ -z "$LIBEXEC" ]; then
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
99 LIBEXECDIR=$EPREFIX/libexec
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
100 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
101 if [ -z "$DATADIR" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
102 DATADIR=$PREFIX/share
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
103 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
104 if [ -z "$SYSCONFDIR" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
105 SYSCONFDIR=$PREFIX/etc
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
106 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
107 if [ -z "$SHAREDSTATEDIR" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
108 SHAREDSTATEDIR=$PREFIX/com
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
109 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
110 if [ -z "$LOCALSTATEDIR" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
111 LOCALSTATEDIR=$PREFIX/var
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
112 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
113 if [ -z "$INCLUDEDIR" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
114 INCLUDEDIR=$PREFIX/include
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
115 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
116 if [ -z "$INFODIR" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
117 INFODIR=$PREFIX/info
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
118 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
119 if [ -z "$MANDIR" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
120 MANDIR=$PREFIX/man
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
121 fi
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
122
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
123 which pkg-config > /dev/null
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
124 if [ $? -eq 0 ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
125 PKG_CONFIG=pkg-config
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
126 else
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
127 PKG_CONFIG=false
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
128 fi
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
129
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
130 # Simple uname based platform detection
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
131 # $PLATFORM is used for platform dependent dependency selection
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
132 printf "detect platform... "
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
133 if [ $OS = SunOS ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
134 PLATFORM="solaris sunos unix svr4"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
135 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
136 if [ $OS = Linux ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
137 PLATFORM="linux unix"
79
052224670baf configure script updated
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
138 fi
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
139 if [ $OS = FreeBSD ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
140 PLATFORM="freebsd bsd unix"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
141 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
142 if [ $OS = Darwin ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
143 PLATFORM="macos osx bsd unix"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
144 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
145 echo $OS | grep "MINGW" > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
146 if [ $? -eq 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
147 PLATFORM="windows mingw"
105
86d729874ff4 added FreeBSD support and fixed gtk2 build
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 79
diff changeset
148 fi
86d729874ff4 added FreeBSD support and fixed gtk2 build
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 79
diff changeset
149
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
150 if [ -z "$PLATFORM" ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
151 PLATFORM="unix"
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
152 fi
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
153
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
154 for p in $PLATFORM
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
155 do
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
156 PLATFORM_NAME=$p
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
157 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
158 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
159 echo $PLATFORM_NAME
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
160
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
161 isplatform()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
162 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
163 for p in $PLATFORM
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
164 do
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
165 if [ $p = $1 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
166 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
167 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
168 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
169 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
170 }
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
171 isnotplatform()
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
172 {
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
173 for p in $PLATFORM
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
174 do
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
175 if [ $p = $1 ]; then
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
176 return 1
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
177 fi
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
178 done
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
179 return 0
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
180 }
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
181
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
182 # generate config.mk and config.h
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
183 cat > $TEMP_DIR/config.mk << __EOF__
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
184 #
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
185 # config.mk generated by configure
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
186 #
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
187
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
188 # general vars
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
189
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
190 PREFIX=$PREFIX
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
191 EPREFIX=$EPREFIX
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
192
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
193 BINDIR=$BINDIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
194 SBINDIR=$SBINDIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
195 LIBDIR=$LIBDIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
196 LIBEXECDIR=$LIBEXECDIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
197 DATADIR=$DATADIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
198 SYSCONFDIR=$SYSCONFDIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
199 SHAREDSTATEDIR=$SHAREDSTATEDIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
200 LOCALSTATEDIR=$LOCALSTATEDIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
201 INCLUDEDIR=$INCLUDEDIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
202 INFODIR=$INFODIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
203 MANDIR=$MANDIR
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
204
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
205 __EOF__
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
206
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
207 echo > $TEMP_DIR/make.mk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
208
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
209 ENV_CFLAGS=$CFLAGS
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
210 ENV_LDFLAGS=$LDFLAGS
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
211 ENV_CXXFLAGS=$CXXFLAGS
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
212
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
213 # Toolchain detection
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
214 # this will insert make vars to config.mk
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
215 . make/toolchain.sh
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
216
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
217 # add user specified flags to config.mk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
218 echo >> $TEMP_DIR/config.mk
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
219 if [ ! -z "${ENV_CFLAGS}" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
220 echo "CFLAGS += $ENV_CFLAGS" >> $TEMP_DIR/config.mk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
221 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
222 if [ ! -z "${ENV_CXXFLAGS}" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
223 echo "CXXFLAGS += $ENV_CXXFLAGS" >> $TEMP_DIR/config.mk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
224 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
225 if [ ! -z "${ENV_LDFLAGS}" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
226 echo "LDFLAGS += $ENV_LDFLAGS" >> $TEMP_DIR/config.mk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
227 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
228
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
229 #
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
230 # DEPENDENCIES
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
231 #
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
232
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
233 dependency_qt4()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
234 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
235 printf "checking for qt4... "
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
236 # dependency qt4
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
237 while true
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
238 do
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
239 qmake-qt4 -o - /dev/null | grep DEFINES\ > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
240 if [ $? -eq 0 ]; then
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
241 CFLAGS="$CFLAGS `qmake-qt4 -o - /dev/null | grep DEFINES\ `"
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
242 else
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
243 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
244 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
245 qmake-qt4 -o - /dev/null | grep INCPATH\ > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
246 if [ $? -eq 0 ]; then
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
247 CFLAGS="$CFLAGS `qmake-qt4 -o - /dev/null | grep INCPATH\ `"
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
248 else
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
249 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
250 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
251 > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
252 if [ $? -eq 0 ]; then
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
253 LDFLAGS="$LDFLAGS ``"
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
254 else
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
255 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
256 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
257 which qmake-qt4 > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
258 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
259 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
260 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
261 echo yes
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
262 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
263 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
264
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
265 echo no
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
266 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
267 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
268 dependency_gtk2legacy()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
269 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
270 printf "checking for gtk2legacy... "
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
271 # dependency gtk2legacy
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
272 while true
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
273 do
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
274 if [ -z "$PKG_CONFIG" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
275 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
276 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
277 $PKG_CONFIG gtk+-2.0
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
278 if [ $? -ne 0 ] ; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
279 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
280 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
281 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gtk+-2.0`"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
282 LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs gtk+-2.0`"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
283 CFLAGS="$CFLAGS -DUI_GTK2 -DUI_GTK2LEGACY"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
284 LDFLAGS="$LDFLAGS -lpthread"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
285 echo yes
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
286 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
287 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
288
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
289 echo no
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
290 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
291 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
292 dependency_qt5()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
293 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
294 printf "checking for qt5... "
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
295 # dependency qt5
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
296 while true
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
297 do
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
298 qmake-qt5 -o - /dev/null | grep DEFINES\ > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
299 if [ $? -eq 0 ]; then
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
300 CFLAGS="$CFLAGS `qmake-qt5 -o - /dev/null | grep DEFINES\ `"
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
301 else
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
302 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
303 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
304 qmake-qt5 -o - /dev/null | grep INCPATH\ > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
305 if [ $? -eq 0 ]; then
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
306 CFLAGS="$CFLAGS `qmake-qt5 -o - /dev/null | grep INCPATH\ `"
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
307 else
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
308 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
309 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
310 > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
311 if [ $? -eq 0 ]; then
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
312 LDFLAGS="$LDFLAGS ``"
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
313 else
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
314 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
315 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
316 which qmake-qt5 > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
317 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
318 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
319 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
320 echo yes
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
321 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
322 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
323
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
324 echo no
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
325 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
326 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
327 dependency_gtk2()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
328 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
329 printf "checking for gtk2... "
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
330 # dependency gtk2
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
331 while true
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
332 do
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
333 if [ -z "$PKG_CONFIG" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
334 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
335 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
336 $PKG_CONFIG gtk+-2.0
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
337 if [ $? -ne 0 ] ; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
338 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
339 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
340 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gtk+-2.0`"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
341 LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs gtk+-2.0`"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
342 CFLAGS="$CFLAGS -DUI_GTK2"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
343 LDFLAGS="$LDFLAGS -lpthread"
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
344 pkg-config --atleast-version=2.20 gtk+-2.0 > /dev/null
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
345 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
346 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
347 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
348 echo yes
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
349 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
350 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
351
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
352 echo no
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
353 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
354 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
355 dependency_gtk3()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
356 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
357 printf "checking for gtk3... "
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
358 # dependency gtk3
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
359 while true
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
360 do
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
361 if [ -z "$PKG_CONFIG" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
362 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
363 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
364 $PKG_CONFIG gtk+-3.0
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
365 if [ $? -ne 0 ] ; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
366 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
367 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
368 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gtk+-3.0`"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
369 LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs gtk+-3.0`"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
370 CFLAGS="$CFLAGS -DUI_GTK3"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
371 LDFLAGS="$LDFLAGS -lpthread"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
372 echo yes
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
373 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
374 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
375
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
376 echo no
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
377 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
378 }
170
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
379 dependency_gtk4()
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
380 {
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
381 printf "checking for gtk4... "
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
382 # dependency gtk4
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
383 while true
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
384 do
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
385 if [ -z "$PKG_CONFIG" ]; then
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
386 break
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
387 fi
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
388 $PKG_CONFIG gtk+-4.0
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
389 if [ $? -ne 0 ] ; then
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
390 break
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
391 fi
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
392 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gtk+-4.0`"
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
393 LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs gtk+-4.0`"
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
394 CFLAGS="$CFLAGS -DUI_GTK3"
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
395 LDFLAGS="$LDFLAGS -lpthread"
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
396 echo yes
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
397 return 0
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
398 done
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
399
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
400 echo no
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
401 return 1
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
402 }
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
403 dependency_motif()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
404 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
405 printf "checking for motif... "
176
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
406 # dependency motif platform="bsd"
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
407 while true
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
408 do
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
409 if isnotplatform "bsd"; then
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
410 break
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
411 fi
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
412 CFLAGS="$CFLAGS -DUI_MOTIF -I/usr/local/include/X11"
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
413 LDFLAGS="$LDFLAGS -lXm -lXt -lX11 -lpthread"
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
414 echo yes
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
415 return 0
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
416 done
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
417
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
418 # dependency motif
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
419 while true
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
420 do
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
421 CFLAGS="$CFLAGS -DUI_MOTIF"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
422 LDFLAGS="$LDFLAGS -lXm -lXt -lX11 -lpthread"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
423 echo yes
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
424 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
425 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
426
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
427 echo no
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
428 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
429 }
171
5065d0d52680 replace wpf with winui in the configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 170
diff changeset
430 dependency_winui()
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
431 {
171
5065d0d52680 replace wpf with winui in the configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 170
diff changeset
432 printf "checking for winui... "
5065d0d52680 replace wpf with winui in the configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 170
diff changeset
433 # dependency winui platform="windows"
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
434 while true
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
435 do
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
436 if isnotplatform "windows"; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
437 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
438 fi
171
5065d0d52680 replace wpf with winui in the configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 170
diff changeset
439 CFLAGS="$CFLAGS -DUI_WINUI"
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
440 echo yes
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
441 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
442 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
443
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
444 echo no
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
445 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
446 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
447 dependency_cocoa()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
448 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
449 printf "checking for cocoa... "
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
450 # dependency cocoa platform="macos"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
451 while true
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
452 do
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
453 if isnotplatform "macos"; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
454 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
455 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
456 CFLAGS="$CFLAGS -DUI_COCOA"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
457 LDFLAGS="$LDFLAGS -lobjc -framework Cocoa"
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
458 echo yes
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
459 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
460 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
461
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
462 echo no
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
463 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
464 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
465
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
466 DEPENDENCIES_FAILED=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
467 ERROR=0
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
468 # general dependencies
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
469 CFLAGS=
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
470 LDFLAGS=
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
471 while true
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
472 do
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
473 if isnotplatform "macos"; then
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
474 break
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
475 fi
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
476 while true
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
477 do
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
478
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
479 cat >> $TEMP_DIR/make.mk << __EOF__
174
0358f1d9c506 upgrade ucx
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 171
diff changeset
480 OBJ_EXT = .o
0358f1d9c506 upgrade ucx
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 171
diff changeset
481 LIB_EXT = .a
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
482 PACKAGE_SCRIPT = package_osx.sh
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
483
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
484 __EOF__
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
485
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
486 break
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
487 done
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
488
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
489 break
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
490 done
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
491 while true
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
492 do
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
493 if isnotplatform "unix"; then
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
494 break
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
495 fi
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
496 if isplatform "macos"; then
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
497 break
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
498 fi
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
499 while true
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
500 do
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
501
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
502 cat >> $TEMP_DIR/make.mk << __EOF__
174
0358f1d9c506 upgrade ucx
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 171
diff changeset
503 OBJ_EXT = .o
0358f1d9c506 upgrade ucx
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 171
diff changeset
504 LIB_EXT = .a
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
505 PACKAGE_SCRIPT = package_unix.sh
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
506
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
507 __EOF__
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
508
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
509 break
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
510 done
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
511
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
512 break
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
513 done
176
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
514 while true
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
515 do
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
516 if isnotplatform "bsd"; then
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
517 break
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
518 fi
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
519 while true
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
520 do
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
521
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
522 CFLAGS="$CFLAGS -I/usr/local/include"
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
523 LDFLAGS="$LDFLAGS -L/usr/local/lib"
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
524
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
525 break
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
526 done
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
527
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
528 break
bc63cb601f6d port motif code to ucx 3
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 174
diff changeset
529 done
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
530
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
531 # add general dependency flags to config.mk
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
532 echo >> $TEMP_DIR/config.mk
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
533 if [ ! -z "${CFLAGS}" ]; then
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
534 echo "CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
535 fi
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
536 if [ ! -z "${CXXFLAGS}" ]; then
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
537 echo "CXXFLAGS += $CXXFLAGS" >> $TEMP_DIR/config.mk
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
538 fi
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
539 if [ ! -z "${LDFLAGS}" ]; then
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
540 echo "LDFLAGS += $LDFLAGS" >> $TEMP_DIR/config.mk
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
541 fi
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
542
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
543 #
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
544 # OPTION VALUES
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
545 #
170
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
546 checkopt_toolkit_gtk4()
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
547 {
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
548 VERR=0
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
549 dependency_gtk4
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
550 if [ $? -ne 0 ]; then
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
551 VERR=1
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
552 fi
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
553 if [ $VERR -ne 0 ]; then
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
554 return 1
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
555 fi
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
556 cat >> $TEMP_DIR/make.mk << __EOF__
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
557 TOOLKIT = gtk
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
558 GTKOBJ = draw_cairo.o
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
559
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
560 __EOF__
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
561 return 0
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
562 }
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
563 checkopt_toolkit_gtk3()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
564 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
565 VERR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
566 dependency_gtk3
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
567 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
568 VERR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
569 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
570 if [ $VERR -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
571 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
572 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
573 cat >> $TEMP_DIR/make.mk << __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
574 TOOLKIT = gtk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
575 GTKOBJ = draw_cairo.o
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
576
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
577 __EOF__
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
578 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
579 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
580 checkopt_toolkit_gtk2()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
581 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
582 VERR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
583 dependency_gtk2
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
584 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
585 VERR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
586 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
587 if [ $VERR -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
588 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
589 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
590 cat >> $TEMP_DIR/make.mk << __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
591 TOOLKIT = gtk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
592 GTKOBJ = draw_cairo.o
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
593
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
594 __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
595 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
596 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
597 checkopt_toolkit_gtk2legacy()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
598 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
599 VERR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
600 dependency_gtk2legacy
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
601 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
602 VERR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
603 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
604 if [ $VERR -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
605 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
606 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
607 cat >> $TEMP_DIR/make.mk << __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
608 TOOLKIT = gtk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
609 GTKOBJ = draw_gdk.o
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
610
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
611 __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
612 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
613 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
614 checkopt_toolkit_qt5()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
615 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
616 VERR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
617 dependency_qt5
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
618 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
619 VERR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
620 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
621 if [ $VERR -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
622 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
623 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
624 cat >> $TEMP_DIR/make.mk << __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
625 TOOLKIT = qt
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
626 LD = $(CXX)
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
627
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
628 __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
629 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
630 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
631 checkopt_toolkit_qt4()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
632 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
633 VERR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
634 dependency_qt4
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
635 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
636 VERR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
637 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
638 if [ $VERR -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
639 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
640 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
641 cat >> $TEMP_DIR/make.mk << __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
642 TOOLKIT = qt
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
643 LD = $(CXX)
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
644
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
645 __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
646 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
647 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
648 checkopt_toolkit_motif()
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
649 {
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
650 VERR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
651 dependency_motif
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
652 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
653 VERR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
654 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
655 if [ $VERR -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
656 return 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
657 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
658 cat >> $TEMP_DIR/make.mk << __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
659 TOOLKIT = motif
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
660
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
661 __EOF__
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
662 return 0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
663 }
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
664
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
665 #
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
666 # TARGETS
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
667 #
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
668 CFLAGS=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
669 CXXFLAGS=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
670 LDFLAGS=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
671
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
672 # Target: tk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
673 CFLAGS=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
674 LDFLAGS=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
675 CXXFLAGS=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
676
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
677
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
678 # Features
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
679
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
680 # Option: --toolkit
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
681 if [ -z $OPT_TOOLKIT ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
682 SAVED_ERROR=$ERROR
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
683 SAVED_DEPENDENCIES_FAILED=$DEPENDENCIES_FAILED
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
684 ERROR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
685 while true
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
686 do
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
687 if isplatform "windows"; then
171
5065d0d52680 replace wpf with winui in the configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 170
diff changeset
688 checkopt_toolkit_winui
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
689 if [ $? -eq 0 ]; then
171
5065d0d52680 replace wpf with winui in the configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 170
diff changeset
690 echo " toolkit: winui" >> $TEMP_DIR/options
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
691 ERROR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
692 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
693 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
694 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
695 if isplatform "macos"; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
696 checkopt_toolkit_cocoa
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
697 if [ $? -eq 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
698 echo " toolkit: cocoa" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
699 ERROR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
700 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
701 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
702 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
703 checkopt_toolkit_gtk3
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
704 if [ $? -eq 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
705 echo " toolkit: gtk3" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
706 ERROR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
707 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
708 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
709 checkopt_toolkit_qt5
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
710 if [ $? -eq 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
711 echo " toolkit: qt5" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
712 ERROR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
713 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
714 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
715 checkopt_toolkit_gtk2
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
716 if [ $? -eq 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
717 echo " toolkit: gtk2" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
718 ERROR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
719 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
720 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
721 checkopt_toolkit_qt4
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
722 if [ $? -eq 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
723 echo " toolkit: qt4" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
724 ERROR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
725 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
726 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
727 checkopt_toolkit_motif
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
728 if [ $? -eq 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
729 echo " toolkit: motif" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
730 ERROR=0
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
731 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
732 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
733 break
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
734 done
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
735 if [ $ERROR -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
736 SAVED_ERROR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
737 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
738 ERROR=$SAVED_ERROR
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
739 DEPENDENCIES_FAILED=$SAVED_DEPENDENCIES_FAILED=
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
740 else
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
741 if false; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
742 false
170
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
743 elif [ $OPT_TOOLKIT = "gtk4" ]; then
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
744 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
745 checkopt_toolkit_gtk4
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
746 if [ $? -ne 0 ]; then
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
747 ERROR=1
ad9edb497857 enable gtk4 configure option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 159
diff changeset
748 fi
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
749 elif [ $OPT_TOOLKIT = "gtk3" ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
750 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
751 checkopt_toolkit_gtk3
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
752 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
753 ERROR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
754 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
755 elif [ $OPT_TOOLKIT = "gtk2" ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
756 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
757 checkopt_toolkit_gtk2
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
758 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
759 ERROR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
760 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
761 elif [ $OPT_TOOLKIT = "gtk2legacy" ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
762 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
763 checkopt_toolkit_gtk2legacy
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
764 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
765 ERROR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
766 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
767 elif [ $OPT_TOOLKIT = "qt5" ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
768 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
769 checkopt_toolkit_qt5
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
770 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
771 ERROR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
772 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
773 elif [ $OPT_TOOLKIT = "qt4" ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
774 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
775 checkopt_toolkit_qt4
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
776 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
777 ERROR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
778 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
779 elif [ $OPT_TOOLKIT = "motif" ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
780 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
781 checkopt_toolkit_motif
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
782 if [ $? -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
783 ERROR=1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
784 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
785 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
786 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
787
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
788 echo >> $TEMP_DIR/config.mk
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
789 if [ ! -z "${CFLAGS}" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
790 echo "TK_CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
791 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
792 if [ ! -z "${CXXFLAGS}" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
793 echo "TK_CXXFLAGS += $CXXFLAGS" >> $TEMP_DIR/config.mk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
794 fi
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
795 if [ ! -z "${LDFLAGS}" ]; then
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
796 echo "TK_LDFLAGS += $LDFLAGS" >> $TEMP_DIR/config.mk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
797 fi
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
798
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
799 if [ $ERROR -ne 0 ]; then
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
800 echo
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
801 echo "Error: Unresolved dependencies"
158
4bde241c49b1 update build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 156
diff changeset
802 echo $DEPENDENCIES_FAILED
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
803 rm -Rf $TEMP_DIR
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
804 exit 1
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
805 fi
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
806
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
807 echo "configure finished"
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
808 echo
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
809 echo "Build Config:"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
810 echo " PREFIX: $PREFIX"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
811 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
812 echo "Options:"
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
813 cat $TEMP_DIR/options
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
814 echo
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
815 cat $TEMP_DIR/config.mk $TEMP_DIR/make.mk > config.mk
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
816 rm -Rf $TEMP_DIR
0
1f419bd32da1 added files
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
817
156
62f1a55535e7 new build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 105
diff changeset
818

mercurial