76 |
done |
done |
77 |
|
|
78 |
|
|
79 |
|
# Find compiler |
80 |
|
|
81 |
|
compilers="$CC gcc cc" |
82 |
|
|
83 |
|
for compiler in $compilers; do |
84 |
|
if [ -x "`which $compiler`" ]; then |
85 |
|
cc=$compiler |
86 |
|
break |
87 |
|
fi |
88 |
|
done |
89 |
|
|
90 |
|
if [ -z "$cc" ]; then |
91 |
|
echo "ERROR: could not find a C compiler (tried: $compilers)" |
92 |
|
echo "You probably want to install gcc" |
93 |
|
exit 1 |
94 |
|
fi |
95 |
|
|
96 |
|
echo "CC = $cc" >>Makeconf |
97 |
|
|
98 |
|
if $cc -v 2>&1 |grep '^gcc' >/dev/null; then |
99 |
|
cflags="$cflags -Wall -O2" |
100 |
|
else |
101 |
|
cflags="$cflags -O" |
102 |
|
fi |
103 |
|
|
104 |
|
|
105 |
# Find X installation |
# Find X installation |
106 |
|
|
107 |
xdirs="$extraxdir /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local" |
xdirs="$extraxdir /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local" |