The GNU coding standards document says "[u]se getopt_long to decode
arguments, unless the argument syntax makes this unreasonable." Generally
I'm all for this and wish more programs did. However, most UNIX-like
systems don't support getopt_long() out-of-the-box, which means one should
include an implementation of the function in their source tree.
I have examined several packages that use getopt_long(), including several
GNU packages, and none of them autoconfiscate this function the same way.
Actually, few of them even autoconfiscate it at all -- most simply compile
and link it unconditionally (I find getopt.c, getopt1.c and getopt.h
thrown in with all the other source files). I have also seen a lot of
code in which the authors call AC_CHECK_FUNCS(getopt) and then make no use
of the result in their source. I have yet to see anyone explicitly check
for getopt_long().
I'm starting to think that I'm missing something....
Does anyone have a tried-and-true autoconf/getopt_long() technique? I'm
currently playing around with AC_REPLACE_FUNCS(), but I don't seem to have
the source code just right yet.
Thanks!
Matthew
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
matthew whitworth
[EMAIL PROTECTED]
Between here and there is better than either here or there!