autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_EGREP and $EGREP_TRADITIONAL and shell conditional statement


From: Nick Bowler
Subject: Re: AC_PROG_EGREP and $EGREP_TRADITIONAL and shell conditional statements
Date: Tue, 28 Mar 2023 13:04:03 -0400

On 2023-03-28, Zack Weinberg <zack@owlfolio.org> wrote:
> Can someone who understands the problem described at
> https://lists.gnu.org/archive/html/autoconf/2022-11/msg00129.html
> please construct a minimal, self-contained configure.ac that
> reproduces that problem?  It is difficult for me to tell whether
> anything needs to be fixed in Autoconf from this report, and I don't
> have time in the foreseeable future to try to cut down APR's gigantic
> configure.ac myself.

This should be a good approximation:

  % cat >configure.ac <<'EOF'
  AC_INIT([test], [0])

  AC_PROG_CPP
  AC_PROG_EGREP

  # uncomment to make this work on new autoconf
  # m4_ifdef([_AC_PROG_EGREP_TRADITIONAL], [_AC_PROG_EGREP_TRADITIONAL])

  if false; then
    AC_EGREP_HEADER([printf], [stdio.h])
  else
    AC_MSG_CHECKING([if stuff works])
    AC_EGREP_HEADER([malloc], [stdlib.h],
      [AC_MSG_RESULT([ok])], [AC_MSG_RESULT([nope])])
  fi

  AC_OUTPUT
EOF

This works in autoconf 2.69, not in current master (though it works if
you uncomment the indicated line).

IMO it is reasonable to fix this in Autoconf, because it just seems
weird to me that AC_PROG_EGREP does not include the necessary egrep
setup for AC_EGREP_HEADER to work (it used to).

Cheers,
  Nick



reply via email to

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