For instance,
gcc -o tex4ht tex4ht.c -DENVFILE='"~/tex4ht.dir/texmf/tex4ht/base/unix/tex4ht.env"' -DKPATHSEA -DHAVE_DIRENT_H -lkpathsea
or
gcc -O2 -DKPATHSEA -I/usr/local/teTeX/include -L/usr/local/teTeX/lib -o tex4ht tex4ht.c -DHAVE_DIRENT_H -lkpathsea
When the address of tex4ht.env is not explicitly given, the texmf.cnf file might need records similar to the following ones.
A given address may start with the character ‘~’. This character is interpreted to be the directory address of the root (as provided in an environment variable named HOME).
The file tex4ht.env may be renamed to ‘.tex4ht’, if your system allows names consisting only of the extension part.