Fixes compilation with -nls useflag on FreeBSD (and probably others). See http://bugs.gentoo.org/253777. --- grep-2.5.3.orig/lib/error.c +++ grep-2.5.3/lib/error.c @@ -26,8 +26,8 @@ #endif #include -#if HAVE_LIBINTL_H -# include +#if defined(HAVE_LIBINTL_H) && defined(ENABLE_NLS) +# include #endif #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC --- grep-2.5.3.orig/lib/getopt.c +++ grep-2.5.3/lib/getopt.c @@ -77,7 +77,7 @@ #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ -# ifdef HAVE_LIBINTL_H +# if defined(HAVE_LIBINTL_H) && defined(ENABLE_NLS) # include # define _(msgid) gettext (msgid) # else --- grep-2.5.3.orig/lib/obstack.c +++ grep-2.5.3/lib/obstack.c @@ -451,7 +451,7 @@ /* Define the error handler. */ #ifndef _ -# ifdef HAVE_LIBINTL_H +# if defined(HAVE_LIBINTL_H) && defined(ENABLE_NLS) # include # ifndef _ # define _(Str) gettext (Str) --- grep-2.5.3.orig/lib/regex.c +++ grep-2.5.3/lib/regex.c @@ -116,7 +116,7 @@ #endif /* This is for other GNU distributions with internationalized messages. */ -#if HAVE_LIBINTL_H || defined _LIBC +#if ENABLE_NLS && (HAVE_LIBINTL_H || defined _LIBC) # include # ifdef _LIBC # undef gettext