The Bison package contains a parser generator.
Prepare Bison for compilation:
./configure --prefix=/usr --enable-gcc-warnings
The meaning of the new configure option:
This switch builds Bison with additional compiler warnings, including -Werror in the src/ directory.
The configure system causes bison to be built without support for internationalization of error messages if a bison program is not already in $PATH. The following addition will correct this.
echo '#define YYENABLE_NLS 1' >> config.h
Compile the package:
make
To test the results, issue: make check.
Install the package:
make install
Bison installs the static library liby.a. We can replace this with a shared version with the following commands:
cd lib/ gcc -shared -Wl,-soname,liby.so.2.3 -o liby.so.2.3 -fPIC main.o yyerror.o rm -v /usr/lib/liby.a install -v liby.so.2.3 /usr/lib/liby.so.2.3 ln -vsf liby.so.2.3 /usr/lib/liby.so