Paul Eggert <egg...@cs.ucla.edu> writes: > I'm not sure it'd be that much smaller than what getopt-gnu already > does. All we'd be removing is the idea of using the system getopt if > it suffices, so that we always replace the system getopt if it exists.
The old version of the getopt files I have does that by checking for __GNU_LIBRARY__, without any configure checks. "/* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. [...]". Which is why I never see warnings about missing prototypes in that code, when building on a plain gnu/linux system). That said, having a basic configure test checking for getopt_long would be perfectly fine for my use case. The preprocessor-only conditions to elide the implementation seems useful for projects that don't already use autoconf, though. > How much saving would that be, really? I was thinking about the dependencies of the getopt module, including unistd.in.h, fcntl.in.h, and the associated m4 macrology. > That being said, you don't need to use gnulib-tool to use Gnulib's > getopt-related source files. Just use 'cp'. Emacs does that, for some > (though thankfully not all) files that it gets from Gnulib; see > emacs/admin/merge-gnulib. Thanks for the pointer, I'll have a look at that. From gnulib's getopt.in.h I got the impression that plain cp wouldn't work, but maybe the autoconf-style substitutions needed in that file isn't a big obstacle. Regards, /Niels -- Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677. Internet email is subject to wholesale government surveillance.