# fss-0002

main:
  ./configure $CONF $ST_ONLY
  echo '#define STDC_HEADERS 1' >> config.h
  echo '#define HAVE_MALLOC 1' >> config.h
  echo '#define HAVE_REALLOC 1' >> config.h
  sed -i -e '/#define malloc rpl_malloc/d' config.h
  sed -i -e '/#define realloc rpl_realloc/d' config.h
  sed -i -e '/#include <ctype.h>/d' flexdef.h yylex.c
  make
  make install
  #gcc $CFLAGS -lintl -lm -fpic -fPIC -Wl,-soname,libfl.so.2 -o libfl.so.$version ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o parse.o scan.o skel.o sym.o tblcmp.o yylex.o buf.o scanflags.o filter.o scanopt.o regex.o tables.o tables_shared.o options.o
  #cp -vf libfl.so.$version ${TO}lib/
  #ln -vsf libfl.so.$version ${TO}lib/libfl.so.2
  #ln -vsf libfl.so.2 ${TO}lib/libfl.so
  #chmod +x ${TO}lib/libfl.so*

  # do not use the flex binary as it will be broken, the purpose of this is to supply the libfl.a
  rm -v ${TO}bin/flex

second_pass:
  ./configure $CONF $SH_ONLY
  make
  make install
