Add auto-generated version header and implement full command-line argument parsing with getopt_long support.