Werner LEMBERG <[EMAIL PROTECTED]> writes:

> I think it is a *bad* idea to make getopt depend on gettext
> unconditionally.

Is this because groff uses getopt but not gettext?

What about the other gnulib modules that depend on gettext?  Here is a
list.  Shouldn't they be in the same category as getopt here?

argmatch   file-type    makepath         quotearg   version-etc
c-stack    getaddrinfo  obstack          regex      wait-process
closeout   human        openat           rpmatch    xalloc-die
copy-file  javacomp     pagealign_alloc  unicodeio  xmemcoll
execute    javaexec     pipe             userspec   xsetenv


> +# ifdef NO_GETTEXT
> +#  define _(msgid) (msgid)
> +# else
> +#  include "gettext.h"
> +#  define _(msgid) gettext (msgid)
> +# endif

We shouldn't invent a new symbol NO_GETTEXT for this; there's already
a symbol ENABLE_NLS for its meaning (albeit negated).  E.g., you could
do this:

#if ENABLE_NLS
# include "gettext.h"
# define _(msgid) gettext (msgid)
#else
# define _(msgid) msgid
#endif

But here's a simpler thought: leave getopt.c alone, and simply
distribute unmodified gettext.h with groff.  That should work.
gettext.h does not need the other parts of the gettext module.

One way to do this would be to remove the dependency of the modules
listed above on "gettext", but add "gettext.h" to each of these
module's files.  That would be a simple change to gnulib, that
wouldn't require changing any source files.


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to