configure

Mon, 04 Feb 2019 17:49:50 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 04 Feb 2019 17:49:50 +0100
changeset 157
0b33b9396851
parent 156
62f1a55535e7
child 158
4bde241c49b1
permissions
-rwxr-xr-x

ucx update

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

mercurial