1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 # Scan host-tool prerequisites of certain packages before building.
6 if test -z "$BASH_VERSION"; then
7 foo
=`$BASH -c 'echo "$BASH_VERSION"'`
12 if test -z "$foo"; then
13 echo OpenADK requires GNU bash to be installed.
17 test -z "$BASH_VERSION$KSH_VERSION" && exec $BASH $0 "$@"
19 [[ -n $BASH_VERSION ]] && shopt -s extglob
20 topdir
=$
(readlink
-nf $
(dirname $0)/..
2>/dev
/null ||
(cd $
(dirname $0)/..
; pwd -P))
26 if [[ -n $ADK_NATIVE ]];then
27 if [[ -n $ADK_PACKAGE_NEON ]];then
28 NEED_LIBXML2_DEV
="$NEED_LIBXML2_DEV neon"
30 if [[ -n $ADK_PACKAGE_LZOP ]];then
31 NEED_LZODEV
="$NEED_LZODEV lzop"
33 if [[ -n $ADK_PACKAGE_LIBIMAGEMAGICK ]];then
34 NEED_JPEGDEV
="$NEED_JPEGDEV libimagemagick"
35 NEED_TIFFDEV
="$NEED_TIFFDEV libimagemagick"
37 if [[ -n $ADK_PACKAGE_DISPLAY ]];then
38 NEED_X11DEV
="$NEED_X11DEV display"
39 NEED_XEXTDEV
="$NEED_XEXTDEV display"
41 if [[ -n $ADK_PACKAGE_GIT ]];then
42 NEED_CURLDEV
="$NEED_CURLDEV git"
44 if [[ -n $ADK_TARGET_PACKAGE_RPM ]]; then
45 NEED_RPM
="$NEED_RPM rpm"
47 if [[ -n $ADK_PACKAGE_WPA_SUPPLICANT_WITH_OPENSSL ]]; then
48 NEED_LIBSSLDEV
="$NEED_LIBSSLDEV wpa_supplicant"
50 if [[ -n $ADK_COMPILE_BIND ]]; then
51 NEED_LIBSSLDEV
="$NEED_LIBSSLDEV bind"
53 if [[ -n $ADK_PACKAGE_IW ]]; then
54 NEED_LIBNLDEV
="$NEED_LIBNLDEV iw"
56 if [[ -n $ADK_PACKAGE_NFS_UTILS_WITH_KERBEROS ]]; then
57 NEED_LIBKRB5DEV
="$NEED_LIBKRB5DEV nfs-utils"
59 if [[ -n $ADK_PACKAGE_NFS_UTILS_WITH_TIRPC ]]; then
60 NEED_LIBTIRPCDEV
="$NEED_LIBTIRPCDEV nfs-utils"
64 if [[ -n $ADK_PACKAGE_LIBX11 ]]; then
65 NEED_X11
="$NEED_X11 libx11"
68 if [[ -n $ADK_PACKAGE_GPSD ]]; then
69 NEED_PYTHON
="$NEED_PYTHON gpsd"
72 if [[ -n $ADK_PACKAGE_FIREFOX ]]; then
73 NEED_YASM
="$NEED_YASM firefox"
74 NEED_LIBIDL
="$NEED_LIBIDL firefox"
75 NEED_PYTHON
="$NEED_PYTHON firefox"
78 if [[ -n $ADK_COMPILE_HEIMDAL ]]; then
79 NEED_BISON
="$NEED_BISON heimdal-server"
82 if [[ -n $ADK_COMPILE_KRB5 ]]; then
83 NEED_BISON
="$NEED_BISON krb5"
86 if [[ -n $ADK_COMPILE_OPENJDK ]]; then
87 NEED_ZIP
="$NEED_ZIP openjdk"
88 NEED_GXX
="$NEED_GXX openjdk"
89 NEED_XSLTPROC
="$NEED_XSLTPROC openjdk"
92 if [[ -n $ADK_COMPILE_OPENJDK ]]; then
93 cd ${TOPDIR}/jtools
; bash prereq.sh
97 if [[ -n $ADK_PACKAGE_LIBXCB ]]; then
98 NEED_XSLTPROC
="$NEED_XSLTPROC libxcb"
101 if [[ -n $ADK_COMPILE_PCMCIAUTILS ]]; then
102 NEED_BISON
="$NEED_BISON pcmciautils"
103 NEED_FLEX
="$NEED_FLEX pcmciautils"
106 if [[ -n $ADK_PACKAGE_XKEYBOARD_CONFIG ]]; then
107 NEED_XKBCOMP
="$NEED_XKBCOMP xkeyboard-config"
110 if [[ -n $ADK_COMPILE_AUTOCONF ]]; then
111 NEED_M4
="$NEED_M4 autoconf"
114 if [[ -n $ADK_COMPILE_AUTOMAKE ]]; then
115 NEED_AUTOCONF
="$NEED_AUTOCONF automake"
118 if [[ -n $ADK_COMPILE_LIBTOOL ]]; then
119 NEED_AUTOMAKE
="$NEED_AUTOMAKE libtool"
122 if [[ -n $ADK_PACKAGE_SQUID ]]; then
123 NEED_GXX
="$NEED_GXX squid"
126 if [[ -n $ADK_PACKAGE_XKEYBOARD_CONFIG ]]; then
127 NEED_INTL
="$NEED_INTL xkeyboard-config"
130 if [[ -n $ADK_PACKAGE_LIBPCAP ]]; then
131 NEED_FLEX
="$NEED_FLEX libpcap"
132 NEED_BISON
="$NEED_BISON libpcap"
135 if [[ -n $ADK_PACKAGE_LIBXFONT ]]; then
136 NEED_WWW
="$NEED_WWW libXfont"
137 NEED_XMLTO
="$NEED_XMLTO libXfont"
140 if [[ -n $ADK_PACKAGE_PACEMAKER_MGMTD ]]; then
141 NEED_SWIG
="$NEED_SWIG pacemaker-mgmtd"
144 if [[ -n $ADK_PACKAGE_EGLIBC ]]; then
145 NEED_GPERF
="$NEED_GPERF eglibc"
148 if [[ -n $ADK_PACKAGE_GLIB ]]; then
149 NEED_GETTEXT
="$NEED_GETTEXT glib"
152 if [[ -n $ADK_PACKAGE_CONSOLEKIT ]]; then
153 NEED_DBUSGLIB
="$NEED_DBUSGLIB consolekit"
156 if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_100DPI ]]; then
157 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-100dpi"
160 if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_75DPI ]]; then
161 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-75dpi"
164 if [[ -n $ADK_PACKAGE_FONT_ADOBE_100DPI ]]; then
165 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-adobe-100dpi"
168 if [[ -n $ADK_PACKAGE_FONT_ADOBE_75DPI ]]; then
169 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-adobe-75dpi"
172 if [[ -n $NEED_GETTEXT ]]; then
173 if ! which gettext >/dev
/null
2>&1; then
174 echo >&2 You need
gettext to build
$NEED_GETTEXT
176 elif ! which msgfmt
>/dev
/null
2>&1; then
177 echo >&2 You need msgfmt to build
$NEED_GETTEXT
182 if [[ -n $NEED_LIBTIRPCDEV ]];then
183 if ! test -f /usr
/include
/tirpc
/netconfig.h
>/dev
/null
; then
184 echo >&2 You need tirpc headers to build
$NEED_LIBTIRPCDEV
189 if [[ -n $NEED_LIBXML2_DEV ]];then
190 if ! test -f /usr
/include
/libxml
2/libxml
/xmlversion.h
>/dev
/null
; then
191 echo >&2 You need libxml2 headers to build
$NEED_LIBXML2_DEV
196 if [[ -n $NEED_LIBKRB5DEV ]];then
197 if ! test -f /usr
/include
/krb5.h
>/dev
/null
; then
198 echo >&2 You need krb5 headers to build
$NEED_LIBKRB5DEV
203 if [[ -n $NEED_CURLDEV ]];then
204 if ! test -f /usr
/include
/curl
/curl.h
>/dev
/null
; then
205 if ! test -f /usr
/local
/include
/curl
/curl.h
>/dev
/null
; then
206 echo >&2 You need curl headers to build
$NEED_CURLDEV
212 if [[ -n $NEED_TIFFDEV ]];then
213 if ! test -f /usr
/include
/tiff.h
>/dev
/null
; then
214 echo >&2 You need libtiff headers to build
$NEED_TIFFDEV
219 if [[ -n $NEED_JPEGDEV ]];then
220 if ! test -f /usr
/include
/jpeglib.h
>/dev
/null
; then
221 echo >&2 You need libjpeg headers to build
$NEED_JPEGDEV
226 if [[ -n $NEED_LZODEV ]];then
227 if ! test -f /usr
/include
/lzo
/lzo1.h
>/dev
/null
; then
228 echo >&2 You need liblzo headers to build
$NEED_LZODEV
233 if [[ -n $NEED_LIBNLDEV ]];then
234 if ! test -f /usr
/include
/netlink
/netlink.h
>/dev
/null
; then
235 echo >&2 You need libnl headers to build
$NEED_LIBNLDEV
240 if [[ -n $NEED_X11DEV ]];then
241 if ! test -f /usr
/include
/X11
/Xlib.h
>/dev
/null
; then
242 echo >&2 You need X11 headers to build
$NEED_X11DEV
247 if [[ -n $NEED_X11 ]];then
248 if ! test -f /usr
/include
/X11
/X.h
>/dev
/null
; then
249 if ! test -f /usr
/local
/include
/X11
/X.h
>/dev
/null
; then
250 echo >&2 You need X11 headers to build
$NEED_X11
256 if [[ -n $NEED_XEXTDEV ]];then
257 if ! test -f /usr
/include
/X11
/extensions
/XShm.h
>/dev
/null
; then
258 echo >&2 You need X11 extensions headers to build
$NEED_XEXTDEV
263 if [[ -n $NEED_LIBSSLDEV ]]; then
264 if ! test -f /usr
/include
/openssl
/ssl.h
>/dev
/null
; then
265 echo >&2 You need openssl headers to build
$NEED_LIBSSLDEV
270 if [[ -n $NEED_MKFONTDIR ]]; then
271 if ! which mkfontdir
>/dev
/null
2>&1; then
272 echo >&2 You need mkfontdir to build
$NEED_MKFONTDIR
277 if [[ -n $NEED_M4 ]]; then
278 if ! which m4 >/dev
/null
2>&1; then
279 echo >&2 You need GNU
m4 to build
$NEED_M4
284 if [[ -n $NEED_AUTOCONF ]]; then
285 if ! which autoconf
>/dev
/null
2>&1; then
286 echo >&2 You need autoconf to build
$NEED_AUTOCONF
291 if [[ -n $NEED_AUTOMAKE ]]; then
292 if ! which automake
>/dev
/null
2>&1; then
293 echo >&2 You need automake to build
$NEED_AUTOMAKE
298 if [[ -n $NEED_INTL ]]; then
299 if ! which intltool-update
>/dev
/null
2>&1; then
300 echo >&2 You need intltool to build
$NEED_INTL
305 if [[ -n $NEED_WWW ]]; then
306 if ! which w3m
>/dev
/null
2>&1; then
307 if ! which lynx
>/dev
/null
2>&1; then
308 if ! which links
>/dev
/null
2>&1; then
309 echo >&2 You need w3m
/links
/lynx to build
$NEED_WWW
316 if [[ -n $NEED_BISON ]]; then
317 if ! which bison
>/dev
/null
2>&1; then
318 echo >&2 You need bison to build
$NEED_BISON
323 if [[ -n $NEED_ZIP ]]; then
324 if ! which zip >/dev
/null
2>&1; then
325 echo >&2 You need
zip to build
$NEED_ZIP
330 if [[ -n $NEED_LIBIDL ]]; then
331 if ! which libIDL-config-2
>/dev
/null
2>&1; then
332 echo >&2 You need libIDL-config-2 to build
$NEED_LIBIDL
337 if [[ -n $NEED_SWIG ]]; then
338 if ! which swig
>/dev
/null
2>&1; then
339 echo >&2 You need swig to build
$NEED_SWIG
344 if [[ -n $NEED_GPERF ]]; then
345 if ! which gperf
>/dev
/null
2>&1; then
346 echo >&2 You need gperf to build
$NEED_GPERF
351 if [[ -n $NEED_GXX ]]; then
352 if ! which g
++ >/dev
/null
2>&1; then
353 echo >&2 You need GNU c
++ compiler to build
$NEED_GXX
358 if [[ -n $NEED_RUBY ]]; then
359 if ! which ruby
>/dev
/null
2>&1; then
360 echo >&2 You need ruby to build
$NEED_RUBY
365 if [[ -n $NEED_XKBCOMP ]]; then
366 if ! which xkbcomp
>/dev
/null
2>&1; then
367 echo >&2 You need xkbcomp to build
$NEED_XKBCOMP
372 if [[ -n $NEED_RPM ]]; then
373 if ! which rpmbuild
>/dev
/null
2>&1; then
374 echo >&2 You need rpmbuild to to use
$NEED_RPM package backend
379 if [[ -n $NEED_FLEX ]]; then
380 if ! which flex
>/dev
/null
2>&1; then
381 echo >&2 You need flex to build
$NEED_FLEX
386 if [[ -n $NEED_YASM ]]; then
387 if ! which yasm
>/dev
/null
2>&1; then
388 echo >&2 You need yasm to build
$NEED_YASM
393 if [[ -n $NEED_XSLTPROC ]]; then
394 if ! which xsltproc
>/dev
/null
2>&1; then
395 echo >&2 You need xsltproc to build
$NEED_XSLTPROC
400 if [[ -n $NEED_DBUSGLIB ]]; then
401 if ! which dbus-binding-tool
>/dev
/null
2>&1; then
402 echo >&2 You need dbus-binding-tool to build
$NEED_DBUSGLIB
407 if [[ -n $NEED_PYTHON ]]; then
408 if ! which python
>/dev
/null
2>&1; then
409 if ! test -x /usr
/pkg
/bin
/python2.6
>/dev
/null
; then
410 echo >&2 You need python to build
$NEED_PYTHON
416 if [[ -n $ADK_USE_CCACHE ]]; then
417 if ! which ccache
>/dev
/null
2>&1; then
418 echo >&2 You have selected to build with ccache
, but ccache could not be found.