gengetopt 

This program generates a C function that uses getopt_long function
to parse the command line options, validate them and fill a struct.

Usage: gengetopt [OPTIONS]...

  -h, --help                  Print help and exit
  -V, --version               Print version and exit
  -i, --input=filename        input file (default std input)
  -f, --func-name=name        name of generated function  
                                (default=`cmdline_parser')
  -a, --arg-struct-name=name  name of generated args info struct  
                                (default=`gengetopt_args_info')
  -F, --file-name=name        name of generated file  (default=`cmdline')
  -c, --c-extension=ext       extension of c file  (default=`c')
  -H, --header-extension=ext  extension of header file  (default=`h')
  -l, --long-help             long usage line in help
  -u, --unamed-opts[=STRING]  accept options without names (e.g., file names)  
                                (default=`FILES')
  -n, --no-handle-help        do not handle --help|-h automatically
  -N, --no-handle-version     do not handle --version|-V automatically
  -e, --no-handle-error       do not exit on errors
  -g, --gen-version           put gengetopt version in the generated file  
                                (default=on)
  -C, --conf-parser           generate a config file parser
      --set-package=STRING    set the package name (override package defined in 
                                the .ggo file)
      --set-version=STRING    set the version number (override version defined 
                                in the .ggo file)
      --show-help             show the output of --help instead of generating 
                                code
      --show-version          show the output of --version instead of 
                                generating code
