autoconf-2.71: declaration ordering problem: ac_fn_c_try_run () is defined, but after attempted use

Ondrej Dubaj <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.bugs
Message-ID <CAE6EeJPTkLLDk8vm-cHJtCDJxGfxmyt5pBde-1Ru_dgPRRLtUA@mail.gmail.com>
Hi,

experiencing configure problem

./configure: line 18777: ac_fn_c_try_run: command not found

It seems that CMU_HAVE_OPENSSL brings CMU_FIND_LIB_SUBDIR brings
AC_CHECK_SIZEOF(long) ... that brings the use of *check_int and that
brings the use of ac_fn_c_try_run ... but it doesn't bring the macro
defining it.

But since AC_CHECK_SIZEOF is working fine, it seems like something else confuses
it and makes that macro think that `ac_fn_c_try_run` is already defined.

IMO there's something wrong with calling AC_TRY_RUN in AC_CACHE_VAL.
Poking at NEWS:

*** Many macros no longer AC_REQUIRE as many other macros as they used to.

  This can expose several classes of latent bugs.  These are the ones
  we know about:

   - Make sure to explicitly invoke all of the macros that set result
     variables used later in the configure script, or in generated
     Makefiles.

   - Autoconf macros that use AC_REQUIRE are not safe to use in shell
     control-flow constructs that appear outside of macros defined by
     AC_DEFUN.  Use AS_IF, AS_CASE, etc. instead.  (See the
     “Prerequisite Macros” section of the manual for details.)

     The set of macros that use AC_REQUIRE internally may change from
     release to release.  The only macros that are guaranteed *not* to
     use AC_REQUIRE are the macros for acting on the results of a
     test: AC_DEFINE, AC_SUBST, AC_MSG_*, AC_CACHE_CHECK, etc.

   - AC_REQUIRE cannot be applied to macros that need to be used with
     arguments.  Instead, invoke the macro normally, with its arguments.

Can you please investigate this ?

More information can be available here:
https://bugzilla.redhat.com/show_bug.cgi?id=1943013


Thanks.

Ondrej
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.