forked from asyncvlsi/act
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck
executable file
·97 lines (80 loc) · 1.62 KB
/
check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/sh
#
# initialize config params
#
. $VLSI_TOOLS_SRC/scripts/config
cat > '__tst0.c' <<EOM
#include <stdio.h>
int main (void)
{
printf ("Hello!\n");
return 0;
}
EOM
echo " ... looking for $C_COMPILER_NAME"
if ! $C_COMPILER_NAME -c __tst0.c >/dev/null 2>&1
then
rm -f __tst0.c
echo "Did not find $C_COMPILER_NAME on the system"
exit 1
fi
rm -f __tst0.c
cat > '__tst0.cc' <<EOM
#include <iostream>
using namespace std;
int main (void)
{
cout << "Hello, world" << endl;
return 0;
}
EOM
echo " ... looking for $CXX_COMPILER_NAME"
if ! $CXX_COMPILER_NAME -c __tst0.cc >/dev/null 2>&1
then
rm -f __tst0.cc
echo "Did not find $CXX_COMPILER_NAME on the system"
exit 1
fi
rm -f __tst0.cc
rm -f __tst0.o
echo " ... looking for make"
if ! make -f $VLSI_TOOLS_SRC/scripts/makedummy > /dev/null 2>&1
then
echo "Did not find make on the system"
exit 1
fi
cat > '__tst1.c' <<EOM
#include <stdio.h>
#include <histedit.h>
int main (void)
{
printf ("Hello!\n");
return 0;
}
EOM
# the $C_COMPILER_FLAGS enable to load so files form a custom path
echo " ... looking for editline"
if ! $C_COMPILER_NAME $C_COMPILER_FLAGS -c __tst1.c >/dev/null 2>&1
then
rm -f __tst1.c
echo "Did not find libeditline on the system"
exit 1
fi
echo " ... looking for zlib"
if ! $C_COMPILER_NAME $C_COMPILER_FLAGS __tst1.o -lz >/dev/null 2>&1
then
rm -f __tst1.c
echo "Did not find zlib on the system"
exit 1
fi
rm -f __tst1.o
rm -f a.out
echo " ... looking for m4 macro preprocessor"
if ! m4 __tst1.c >/dev/null 2>&1
then
rm -f __tst1.c
echo "Did not find the m4 macro preprocessor package on the system"
exit 1
fi
rm -f __tst1.c
exit 0