-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·28 lines (23 loc) · 769 Bytes
/
configure
File metadata and controls
executable file
·28 lines (23 loc) · 769 Bytes
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
#!/bin/sh
echo "Checking for Bison 3.x ..."
# Find bison in PATH
BISON=$(command -v bison)
if [ -z "$BISON" ]; then
echo "Bison not found."
BISON_OK=#
else
# Get the version number
BISON_VERSION=$($BISON --version | head -n 1 | awk '{print $4}')
MAJOR_VERSION=$(echo "$BISON_VERSION" | cut -d. -f1)
# Ensure major version is 3 or greater
if [ "$MAJOR_VERSION" -ge 3 ]; then
echo "Bison version $BISON_VERSION found."
BISON_OK=
else
echo "Bison version $BISON_VERSION found, but 3.x or higher is needed"
echo "to process changes to src/parser/gramLatex.y."
echo "Will use existing src/gramLatex.tab.c."
BISON_OK=#
fi
fi
sed "s/@BISON_OK@/$BISON_OK/g" src/Makevars.in >src/Makevars