I'm doing a cross-compiler for the i686-elf architecture with a Debian host 8 86_64 bits already uninstalled and installed the flex but the error continues! I'll leave the terminal output.
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 ) works... yes
checking whether the C compiler (gcc -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for bison... no
checking for byacc... no
checking for flex... lex
checking for yywrap in -ll... no
checking how to run the C preprocessor... (cached) gcc -E
checking lex output file root... ../../binutils-2.9/binutils/configure: 1701: ../../binutils-2.9/binutils/configure: lex: not found
configure: error: cannot find output from lex; giving up
Configure in /home/hikkarin/Documentos/GCC-4.9.0-CROSS/SRC/build-binutils/binutils failed, exiting.
I've circled this with the command:
linux32 ../binutils-2.9/configure --target = $ TARGET --prefix="$ PREFIX" --with-sysroot --disable-nls --disable-werror