Look for a compiler out of $CC gcc cc, check if gcc (to use -Wall -O2)
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@257 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
14c59b0d93
commit
2f7c863973
26
configure
vendored
26
configure
vendored
@ -76,6 +76,32 @@ esac
|
||||
done
|
||||
|
||||
|
||||
# Find compiler
|
||||
|
||||
compilers="$CC gcc cc"
|
||||
|
||||
for compiler in $compilers; do
|
||||
if [ -x "`which $compiler`" ]; then
|
||||
cc=$compiler
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$cc" ]; then
|
||||
echo "ERROR: could not find a C compiler (tried: $compilers)"
|
||||
echo "You probably want to install gcc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "CC = $cc" >>Makeconf
|
||||
|
||||
if $cc -v 2>&1 |grep '^gcc' >/dev/null; then
|
||||
cflags="$cflags -Wall -O2"
|
||||
else
|
||||
cflags="$cflags -O"
|
||||
fi
|
||||
|
||||
|
||||
# Find X installation
|
||||
|
||||
xdirs="$extraxdir /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local"
|
||||
|
Loading…
Reference in New Issue
Block a user