The Make package contains a program for compiling packages.
The Make package can build with fairly strict compiler warnings. Add compiler warnings to Make with the following command:
find . -type f -name Makefile.in -exec \
sed 's/^CFLAGS =.*/& -Wall -Wformat-security \\\
-Werror -Wfatal-errors/' -i.orig {} \;
The -D_FORTIFY_SOURCE=2 GCC option will produce warnings about unused return values. The next command removes that warning by wrapping the function in an if statement which uses the return value of chdir():
sed 's/chdir (directory_before_chdir);/if (chdir (directory_before_chdir) != 0)\
\terror (NILF, "Failed to return to original directory %s", directory_before_chdir);/' \
-i.orig main.c
Prepare Make for compilation:
./configure --prefix=/usr
Compile the package:
make
To test the results, issue: make check.
Install the package:
make install