[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There is now a template named, "getopt.tpl
" that is distributed with
autoopts. With it, you will have another source file generated for you that
will utilize either the standard getopt(3C)
or the GNU
getopt_long(3GNU)
function for parsing the command line arguments.
Which is used is selected by the presence or absence of the long-opts
program attribute. It will save you from being dependent upon the
libopts
library and it produces code ready for
internationalization. However, it also carries with it some limitations on
the use of AutoOpts features:
libopts
library. You are constrained to options that
take "string
" arguments, though you may handle the option
argument with a callback procedure.
SET_OPT_XXX
macros having been defined.
In case the option definition file lives in a different directory.
Any special flags required to compile. This should minimally include
the output from running the autoopts-config cflags
script.
Any special flags required to link. This should minimally include
the output from running the autoopts-config ldflags
script.
Set this only if "cc
" cannot be found in $PATH
(or it is not the one you want).
To use this, set the exported environment variables and then invoke autogen twice, in the following order:
autogen myprog-opts.def autogen -T getopt.tpl myprog-opts.def |
and you will have three new files: `myprog-opts.h', `myprog-opts.c',
and `getopt-progname.c', where "progname" is the name specified with
the global prog-name
attribute in the option definition file.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Bruce Korb on September, 30 2006 using texi2html 1.76.