]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Give advice about AC_GNU_SOURCE.
authorBruno Haible <bruno@clisp.org>
Mon, 19 Jun 2006 10:51:13 +0000 (10:51 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:25 +0000 (12:13 +0200)
gettext-tools/doc/ChangeLog
gettext-tools/doc/gettext.texi
gettext-tools/doc/gettextize.texi

index 2f60c3d0c3a5be1748545c32d9bf901a1faa8055..feccd627c427a06dac5b6016a539d1933f0c8ac4 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-18  Bruno Haible  <bruno@clisp.org>
+
+       * gettext.texi (configure.in): Document where to put AC_GNU_SOURCE.
+       * gettextize.texi: Refer to this explanation.
+
 2006-06-15  Bruno Haible  <bruno@clisp.org>
 
        * gettext.texi (po/Makevars): Mention real purpose of this file.
index 6a246e0f23aa3aa19dc25bad98ad4d4b9bb56475..c61efd6b0f675cf725ace1c2fb8a9b4578994fd6 100644 (file)
@@ -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
 
index e6536506c1be52a05478f0f2257f3cf556148638..def8bd2b14d9a129295c949bbe81dedd1fab3a46 100644 (file)
@@ -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