autoconf
[Top][All Lists]
Advanced

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

RE: 2.49e problems with gcc


From: Tim Van Holder
Subject: RE: 2.49e problems with gcc
Date: Thu, 10 May 2001 20:05:19 +0200

> Again, I think it is just miscommunication.  I really understood
> `changequote is broken' (which is likely since we do redefine it),
> while it should read `people were used to change arbitrarily the
> quotes, i.e., change deeply the environment and were expecting the
> macros invoked in between to be robust to this'.
>
> So, yes, that a problem related to quotes, but not changequote in my
> sense.
OK - got it :-)

> But in the case you presented, really, I see _nothing_ dangerous with
> changequote.
The code I sent had nothing to do with the changequote issue; it is the
code that caused problems for autoheader even after all changequote's
were stripped.

In fact, this macro (also from gcc/aclocal.m4) seems to be the cause
of the recursion problem:

dnl Locate a program and check that its version is acceptable.
dnl AC_PROG_CHECK_VER(var, name, version-switch,
dnl                  version-extract-regexp, version-glob)
AC_DEFUN(gcc_AC_CHECK_PROG_VER,
[AC_CHECK_PROG([$1], [$2], [$2])
if test -n "[$]$1"; then
  # Found it, now check the version.
  AC_CACHE_CHECK(for modern $2, gcc_cv_prog_$2_modern,
[changequote(<<,>>)dnl
  ac_prog_version=`<<$>>$1 $3 2>&1 |
                   sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'`
  echo "configure:__oline__: version of $2 is $ac_prog_version" >&AC_FD_CC
  case $ac_prog_version in
    '')     gcc_cv_prog_$2_modern=no;;
    <<$5>>)
            gcc_cv_prog_$2_modern=yes;;
    *)      gcc_cv_prog_$2_modern=no;;
  esac
changequote([,])dnl
])
else
  gcc_cv_prog_$2_modern=no
fi
])

Removing the changequotes here (and replacing <</>> by [/]) makes
autoconf run properly (NOTE: This is with a fresh aclocal.m4 but
a configure.in stripped of changequotes; there may be similar
showstoppers in the stock configure.in).

> changequote(, )dnl
>   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz'
> 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
> changequote([, ])dnl
>
> and actually these changequote are *totally* useless.  There is only
> m4-dead code in between, we don't care at all what the quotes are in
> there.
I agree - I expect they used to have [a-z] / [A-Z].  Again, this is just
the macro autoheader barfed on, not a demonstration of evil changequotes.

> Tim> And as for the autoheader problem: is it supposed to fail
> Tim> silently (as it does for me),
>
> No, it should not.
OK - I'll look into possible problems (I expect there'll be some issue
with FDs/redirection again).  For further evidence, is autoheader
supposed to clean up after itself if traces.sh fails (for me, traces.sh
gets left behind).

> Tim> or is it supposed to tell me what went wrong (running the
> Tim> traces.sh it leaves behind _does_ give me output telling me where
> Tim> to look for problems; running autoheader gives no output).
>
> `What went wrong' is, IMHO, overkill, but it should report that m4
> failed, and leave m4's stderr visible (if possible, which might not be
> the case since currently we use stderr to get the traces).
>
I'd be happy if it just printed whatever traces.sh prints; that had enough
info for me to identify the macro I posted as the culprit.

For your reference, the error printed by traces.sh is:

E:\Tmp\ah4342\traces.sh: ac_verbatim_HAVE_DECL_&=/* Define to 1 if we found
this declaration otherwise define to 0. */
#undef HAVE_DECL_\&: command not found
E:\Tmp\ah4342\traces.sh: ac_verbatim_HAVE_DECL_&=/* Define to 1 if we found
this declaration otherwise define to 0. */
#undef HAVE_DECL_\&: command not found




reply via email to

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