From: Bruno Haible Date: Mon, 19 Jun 2006 10:51:13 +0000 (+0000) Subject: Give advice about AC_GNU_SOURCE. X-Git-Tag: v0.15~91 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6702e5f3b19a34876a09f1cfd2c0162c95ee5fb;p=thirdparty%2Fgettext.git Give advice about AC_GNU_SOURCE. --- diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog index 2f60c3d0c..feccd627c 100644 --- a/gettext-tools/doc/ChangeLog +++ b/gettext-tools/doc/ChangeLog @@ -1,3 +1,8 @@ +2006-06-18 Bruno Haible + + * gettext.texi (configure.in): Document where to put AC_GNU_SOURCE. + * gettextize.texi: Refer to this explanation. + 2006-06-15 Bruno Haible * gettext.texi (po/Makevars): Mention real purpose of this file. diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index 6a246e0f2..c61efd6b0 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -6766,6 +6766,28 @@ add @code{intl/Makefile} to the @code{AC_OUTPUT} line. @end enumerate +If, after doing the recommended modifications, a command like +@samp{aclocal -I m4} or @samp{autoconf} or @samp{autoreconf} fails with +a trace similar to this: + +@smallexample +configure.ac:44: warning: AC_COMPILE_IFELSE was called before AC_GNU_SOURCE +../../lib/autoconf/specific.m4:335: AC_GNU_SOURCE is expanded from... +m4/lock.m4:224: gl_LOCK is expanded from... +m4/gettext.m4:571: gt_INTL_SUBDIR_CORE is expanded from... +m4/gettext.m4:472: AM_INTL_SUBDIR is expanded from... +m4/gettext.m4:347: AM_GNU_GETTEXT is expanded from... +configure.ac:44: the top level +configure.ac:44: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE +@end smallexample + +@noindent +you need to add an explicit invocation of @samp{AC_GNU_SOURCE} in the +@file{configure.ac} file - after @samp{AC_PROG_CC} but before +@samp{AM_GNU_GETTEXT}, most likely very close to the @samp{AC_PROG_CC} +invocation. This is necessary because of ordering restrictions imposed +by GNU autoconf. + @node config.guess, mkinstalldirs, configure.in, Adjusting Files @subsection @file{config.guess}, @file{config.sub} at top level diff --git a/gettext-tools/doc/gettextize.texi b/gettext-tools/doc/gettextize.texi index e6536506c..def8bd2b1 100644 --- a/gettext-tools/doc/gettextize.texi +++ b/gettext-tools/doc/gettextize.texi @@ -173,6 +173,11 @@ amount of remaining work depends on whether the package uses GNU @code{automake} or not. But in any case, the maintainer should still read the section @ref{Adjusting Files} after invoking @code{gettextize}. +In particular, if after using @samp{gettexize}, you get an error +@samp{AC_COMPILE_IFELSE was called before AC_GNU_SOURCE} or +@samp{AC_RUN_IFELSE was called before AC_GNU_SOURCE}, you can fix it +by modifying @file{configure.ac}, as described in @ref{configure.in}. + It is also important to understand that @code{gettextize} is not part of the GNU build system, in the sense that it should not be invoked automatically, and not be invoked by someone who doesn't assume the