Lines 24-30
Link Here
|
24 |
[ -f /xenix ] && CPP="${CC} -E" |
24 |
[ -f /xenix ] && CPP="${CC} -E" |
25 |
[ -f /lynx.os ] && CPP="${CC} -E" |
25 |
[ -f /lynx.os ] && CPP="${CC} -E" |
26 |
|
26 |
|
27 |
@@ -244,7 +241,7 @@ if eval "$CPP match.S > _match.s 2>/dev/ |
27 |
@@ -244,7 +241,7 @@ if eval "$CPP match.S > _match.s 2>/dev/null"; then |
28 |
echo "int foo() { return 0;}" > conftest.c |
28 |
echo "int foo() { return 0;}" > conftest.c |
29 |
$CC -c conftest.c >/dev/null 2>/dev/null |
29 |
$CC -c conftest.c >/dev/null 2>/dev/null |
30 |
echo Check if compiler generates underlines |
30 |
echo Check if compiler generates underlines |
Lines 33-35
Link Here
|
33 |
[ $? -eq 0 ] && CPP="${CPP} -DNO_UNDERLINE" |
33 |
[ $? -eq 0 ] && CPP="${CPP} -DNO_UNDERLINE" |
34 |
if eval "$CPP crc_i386.S > _crc_i386.s 2>/dev/null"; then |
34 |
if eval "$CPP crc_i386.S > _crc_i386.s 2>/dev/null"; then |
35 |
if eval "$CC -c _crc_i386.s >/dev/null 2>/dev/null" && [ -f _crc_i386.o ] |
35 |
if eval "$CC -c _crc_i386.s >/dev/null 2>/dev/null" && [ -f _crc_i386.o ] |
|
|
36 |
@@ -519,7 +516,10 @@ done |
37 |
|
38 |
|
39 |
echo Check for memset |
40 |
-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c |
41 |
+cat > conftest.c << _EOF_ |
42 |
+#include <string.h> |
43 |
+int main(){ char k; memset(&k,0,0); return 0; } |
44 |
+_EOF_ |
45 |
$CC -o conftest conftest.c >/dev/null 2>/dev/null |
46 |
[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM" |
47 |
|
48 |
@@ -556,6 +556,7 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null |
49 |
|
50 |
echo Check for directory libraries |
51 |
cat > conftest.c << _EOF_ |
52 |
+#include <dirent.h> |
53 |
int main() { return closedir(opendir(".")); } |
54 |
_EOF_ |
55 |
|
56 |
@@ -578,7 +579,10 @@ fi |
57 |
# Dynix/ptx 1.3 needed this |
58 |
|
59 |
echo Check for readlink |
60 |
-echo "int main(){ return readlink(); }" > conftest.c |
61 |
+cat > conftest.c << _EOF_ |
62 |
+#include <unistd.h> |
63 |
+int main() { return readlink(); } |
64 |
+_EOF_ |
65 |
$CC -o conftest conftest.c >/dev/null 2>/dev/null |
66 |
if [ $? -ne 0 ]; then |
67 |
$CC -o conftest conftest.c -lseq >/dev/null 2>/dev/null |
68 |
@@ -621,6 +625,7 @@ CFLAGS="${CFLAGS} ${OPT}" |
69 |
|
70 |
echo Check for valloc |
71 |
cat > conftest.c << _EOF_ |
72 |
+#include <unistd.h> |
73 |
main() |
74 |
{ |
75 |
#ifdef MMAP |