6.19. Flex-2.5.37

The Flex package contains a utility for generating programs that recognize patterns in text.

6.19.1. Installation of Flex

When cross compiling, the configure script does not determine the correct values for the following. Set the values manually:

cat > config.cache << EOF
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes
EOF

Prepare Flex for compilation:

CC="${CC} ${BUILD64}" M4=m4 ./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --cache-file=config.cache

Compile the package:

make

Install the package:

make install

Details on this package are located in Section 10.29.2, “Contents of Flex.”