1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
8 if [ -z $
(which gmake
2>/dev
/null
) ];then
9 makecmd
=$
(which make 2>/dev
/null
)
11 makecmd
=$
(which gmake
2>/dev
/null
)
14 if [[ $NO_ERROR != @
(0|
1) ]]; then
15 echo Please
do not invoke this
script directly
!
28 ERROR: OpenADK cannot be built in a case-insensitive file system.
37 # supported with no extra quirks at the moment
40 # supported with no extra quirks at the moment
43 # supported with no extra quirks at the moment
46 echo "Building OpenADK on $os needs a small registry change."
47 echo 'See http://www.cygwin.com/1.7/cygwin-ug-net/using-specialnames.html'
50 echo "Building OpenADK on $os is currently unsupported."
53 echo There are unresolved issues relating to ncurses not
54 echo being included
in NetBSD®
, and these provided by pkgsrc®
55 echo lack important header files.
58 # supported with no extra quirks at the moment
59 # although some packages' autoconf scripts may
60 # not properly recognise OpenBSD
64 echo "Building OpenADK on $os is currently unsupported."
73 include ${TOPDIR}/prereq.mk
78 ${HOSTCC} ${HOSTCFLAGS} -o $@ $^ ${LDADD}
88 printf("Yay! Native compiler works.\n");
92 X
=$
($makecmd TOPDIR
=$topdir 2>&1)
93 if [[ $X != *@
(Native compiler works
)* ]]; then
94 echo "$X" |
sed 's/^/| /'
95 echo Cannot compile a simple
test programme.
96 echo You must
install a
host make and C compiler
,
97 echo usually GCC
, to proceed.
103 #if ! which cpp >/dev/null 2>&1; then
104 # echo You must install a C preprocessor to continue.
109 if ! which tar >/dev
/null
2>&1; then
110 echo You must
install GNU
tar to
continue.
115 if ! (tar --version |
grep GNU
) >/dev
/null
2>&1;then
116 if ! which gtar
>/dev
/null
2>&1; then
117 echo You must
install GNU
tar to
continue.
123 if ! which gzip >/dev
/null
2>&1; then
124 echo You must
install gzip to
continue.
129 if ! which lzma
>/dev
/null
2>&1; then
130 echo You must
install lzma to
continue.
135 if ! which bzip2 >/dev
/null
2>&1; then
136 echo You must
install bzip2 to
continue.
141 if ! which cpio >/dev
/null
2>&1; then
142 echo You must
install cpio to
continue.
147 if ! which unzip >/dev
/null
2>&1; then
148 echo You must
install unzip to
continue.
153 if ! which patch >/dev
/null
2>&1; then
154 echo You must
install patch to
continue.
164 #define STDIN_FILENO 0
174 zstdin = gzdopen(STDIN_FILENO, "rb");
175 i = gzread(zstdin, buf, sizeof (buf));
176 if ((i > 0) && (i < sizeof (buf)))
178 buf[sizeof (buf) - 1] = '\0';
183 X
=$
(echo 'Yay! Native compiler works.' |
gzip | \
184 $makecmd TOPDIR
=$topdir LDADD
=-lz 2>&1)
185 if [[ $X != *@
(Native compiler works
)* ]]; then
186 echo "$X" |
sed 's/^/| /'
187 echo Cannot compile a libz
test programm.
188 echo You must
install the zlib development package
,
189 echo usually called libz-dev
, and the run-time library.
194 [[ -s /usr
/include
/ncurses.h
]] ||
if [[ -s /usr
/pkg
/include
/ncurses.h
]]; then
195 echo 'HOSTCFLAGS+= -isystem /usr/pkg/include' >>$topdir/prereq.mk
196 echo 'HOSTLDFLAGS+=-L/usr/pkg/lib -Wl,-rpath -Wl,/usr/pkg/lib' >>$topdir/prereq.mk
198 echo Install ncurses header files
, please.
203 if ! which gawk
>/dev
/null
2>&1; then
204 echo You must
install GNU
awk to
continue.
209 if ! which sed >/dev
/null
2>&1; then
210 echo You must
install GNU
sed to
continue.
215 if ! sed --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
216 if ! which gsed
>/dev
/null
2>&1; then
217 echo You must
install GNU
sed to
continue.
223 if ! which wget
>/dev
/null
2>&1; then
224 echo You must
install wget to
continue.
229 if ! which autoconf
>/dev
/null
2>&1; then
230 echo You must
install autoconf to
continue.
235 if ! which automake
>/dev
/null
2>&1; then
236 echo You must
install automake to
continue.
241 if ! which libtool
>/dev
/null
2>&1; then
242 echo You must
install libtool to
continue.
247 if ! which file >/dev
/null
2>&1; then
248 echo You must
install \"file\" to
continue.
253 if ! which perl
>/dev
/null
2>&1; then
254 echo You must
install perl to
continue.