bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFH] macro ordering problems in sed


From: Jim Meyering
Subject: Re: [RFH] macro ordering problems in sed
Date: Fri, 03 Oct 2008 09:12:00 +0200

Paolo Bonzini <address@hidden> wrote:
> Hi all, git sed gives this problem when running "sh autoboot":
>
> configure.ac:17: warning: AC_COMPILE_IFELSE was called before AC_GNU_SOURCE
> ../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from...
...
>
> Can anyone help?  Also, I would like the current master branch to become
> sed 4.2, so any help squishing out portability problems is welcome.

Hi Paolo,

Here's a patch that does the job, at the expense of
switching to AM_GNU_GETTEXT([external]).  I switched coreutils
to that approach a long time ago and haven't looked back.
No one has complained, either.

This patch eliminates explicit use of macros that are guaranteed to
be AC_REQUIRED either due to gl_EARLY and gl_INIT or to gnulib modules
you require (like mkstemp that pulls in AC_SYS_LARGEFILE):

  AC_USE_SYSTEM_EXTENSIONS
  AC_GNU_SOURCE
  AC_SYS_LARGEFILE

Also, it moves gl_DISABLE_THREADS and
AC_SYS_LONG_FILE_NAMEs to follow gl_INIT.


diff --git a/configure.ac b/configure.ac
index d7a6a1a..f4391b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,14 +12,10 @@ AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, 
"$SED_FEATURE_VERSION",
 AC_SUBST(SED_FEATURE_VERSION)

 AC_PROG_CC
-gl_DISABLE_THREADS
-AC_USE_SYSTEM_EXTENSIONS
-AC_GNU_SOURCE
 gl_EARLY
-AC_SYS_LARGEFILE
-AC_SYS_LONG_FILE_NAMES
-
 gl_INIT
+gl_DISABLE_THREADS
+AC_SYS_LONG_FILE_NAMES
 AC_CACHE_CHECK([whether -lcP is needed], [sed_cv_libcp_needed], [
 AC_TRY_RUN([
 #include <stdio.h>
@@ -55,7 +51,7 @@ AC_FUNC_VPRINTF

 AC_DEFUN([AM_MKINSTALLDIRS], [MKINSTALLDIRS="$mkdir_p" 
AC_SUBST(MKINSTALLDIRS)])
 AM_GNU_GETTEXT_VERSION(0.15)
-AM_GNU_GETTEXT(no-libtool, need-ngettext, ../intl)
+AM_GNU_GETTEXT([external])

 AC_CHECK_FUNCS_ONCE(isatty bcopy bzero isascii memcpy memset strchr strtoul
                    popen pathconf isblank fchown fchmod setlocale wcrtomb

--------------------------
Of course, if you go for the above, you'll also
have to remove intl from SUBDIRS in Makefile.am
and Makefile.intl from configure.ac.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]