Commit d7cf0d58 authored by Hao Chen's avatar Hao Chen

add bison/flex checking function

exit if bison/flex is not found
parent c2401733
......@@ -154,6 +154,33 @@ EOF
echo $result
}
#}}}
#{{{ test_for_bison
test_for_bison () {
bison --help > /dev/null
if [ $? -eq 0 ]
then
result=0
else
result=1
fi
echo $result
}
#}}}
#{{{ test_for_flex
test_for_flex () {
flex --help > /dev/null
if [ $? -eq 0 ]
then
result=0
else
result=1
fi
echo $result
}
#}}}
#{{{ usage
usage () {
cat <<EOF;
......@@ -300,6 +327,22 @@ if [ $use_bzip_mbox = "yes" ]; then
fi
fi
printf "Checking for bison : "
if [ `test_for_bison` -eq 0 ]; then
printf "Yes\n";
else
printf "No\n";
exit 1;
fi
printf "Checking for flex : "
if [ `test_for_flex` -eq 0 ]; then
printf "Yes\n";
else
printf "No\n";
exit 1;
fi
#{{{ Determine version number of the program.
if [ -f version.txt ]; then
revision=`cat version.txt`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment