bug-autoconf
[Top][All Lists]
Advanced

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

Re: [sr #110215] AC_EGREP_HEADER appears to be broken in master


From: Ross Burton
Subject: Re: [sr #110215] AC_EGREP_HEADER appears to be broken in master
Date: Tue, 24 Mar 2020 11:55:54 +0000

On Mon, 23 Mar 2020 at 23:20, Nick Bowler <address@hidden> wrote:
> Can you expand more on what is failing for you?  I just copy+pasted the
> above code into the following configure script:

I did a bit more digging.  At no point is autoconf looking for egrep
for some reason with master.  Specifically these lines are missing
when ran with autoconf master:

checking for grep that handles long lines and -e... /scratch/poky/hosttools/grep
checking for egrep... /scratch/poky/hosttools/grep -E

And echoing $EGREP before the test shows that it isn't set.

This is odd because AC_EGREP_CPP which is actually doing the work
should be searching for it:

AC_DEFUN([AC_EGREP_CPP],
[AC_LANG_PREPROC_REQUIRE()dnl
AC_REQUIRE([AC_PROG_EGREP])dnl
...

Looking at the generated configure, some code isn't being executed in
the right place.  The first instance of the AC_EGREP* calls are
earlier in the configure.ac, like this:

AC_CHECK_FUNC(statvfs,[HAVE_STATVFS=yes])
dnl Arg, linux and bsd put their statfs function in different places
if test x"$HAVE_STATVFS" != x"yes"; then
   AC_EGREP_HEADER(statfs,sys/vfs.h,[AC_DEFINE(HAVE_VFS_H)],[
   
AC_EGREP_HEADER(statfs,sys/mount.h,[AC_DEFINE(HAVE_MOUNT_H)],[AC_MSG_ERROR(failed:
Need statvfs)])
   ])
fi
(and later looks for h_errno then fails)

And the generated code does this:

if test x"$HAVE_STATVFS" != x"yes"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that
handles long lines and
-e" >&5
printf %s "checking for grep that handles long lines and -e... " >&6; }
...

So the search for egrep only happens if statvfs isn't found by
AC_CHECK_FUNC.  My understanding is that this isn't how AC_REQUIRE
should be working, right?

Ross



reply via email to

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