3 # script documenting fixes for flex-2.5.4 and gcc-3.1
9 if [ -z "$FLEXLEXER" ]; then
11 includes="$HOME/usr/include $PREFIX/include /usr/local/include /usr/include"
13 for i in $includes; do
15 if [ -f "$file" ]; then
22 if [ -z "$file" ]; then
24 FlexLexer.h not found in $includes
26 Please install flex, or find and fix FlexLexer.h by hand.
33 if [ -n "$CONF" ]; then
37 ENABLECONFIG="--enable-config=$CONF "
39 outdir=out$CONFIGSUFFIX
41 if [ -z "$FLEXLEXER" ]; then
43 echo -n "Copying and fixing $file... "
45 rm -f lily/$outdir/FlexLexer.h
46 perl -p -e 's/iostream.h/iostream/g;' \
47 -e 's/\bistream\b/std::istream/g;' \
48 -e 's/\bostream\b/std::ostream/' \
49 $file > lily/$outdir/FlexLexer.h
54 if [ -f GNUmakefile ]; then
55 file=lily/$outdir/lexer.cc
56 echo -n "Generating and fixing $file... "
58 make conf=$CONF -C lily $outdir/lexer.cc > /dev/null 2>&1 || true
61 perl -p -e 's/\bcin\b/std::cin/g;' \
62 -e 's/\bcout\b/std::cout/g;' \
63 -e 's/\bcerr\b/std::cerr/g' \
70 Remove config.cache before rerunning ./configure
72 Reconfigure, refix, and make doing something like:
75 CPPFLAGS=-I$(pwd)/lily/$outdir ./configure $ENABLECONFIG