[vsipl++] [patch] argument processing header dependency

Mark Mitchell mark at codesourcery.com
Wed Apr 26 15:48:23 UTC 2006


Stefan Seefeld wrote:
> Don McCoy wrote:
>> The attached patch checks for the presence of the required header
>> before using it in tests/fft_ext/fft_ext.cpp.  If not present, then it
>> defaults to accepting a file name only.
> 
> Don,
> 
> since we do need to make this work without argp.h at least on those
> systems that don't have that header, why not make it work without it
> uniformly ? Each branch point requires additional logic to test that
> each branch works correctly, and configure.ac gets longer with each
> additional test.

I think the thing to do is to choose which option-processing
functionality to emulate (UNIX getopt, getopt_long, or argp), and then
emulate it everywhere.  Since implementations of argp and getopt_long
are probably going to be GPL'd, or at least LGPL'd, we'd probably have
to roll our own.  Rolling our own getopt implementation (for Windows,
say) would be easy, so I guess I'd suggest we stick with that limited
interface, even though clearly argp is the coolest of the three.

The toolchain group has recently been having an active debate about how
to make things work on Windows, and one of the lessons is that sticking
to lowest common denominators from the outset makes things easier. :-)

-- 
Mark Mitchell
CodeSourcery
mark at codesourcery.com
(650) 331-3385 x713



More information about the vsipl++ mailing list