Gengetopt is a tool to write command line option parsing code for C programs.