autoconf-patches
[Top][All Lists]
Advanced

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

Re: Possible patch for autoconf?


From: Akim Demaille
Subject: Re: Possible patch for autoconf?
Date: 03 May 2001 17:43:27 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

Please, keep things public, so that people can suggest solutions, so
that archives hold relevant messages etc.

| Hello Akim,
|    Sorry for the long delay in getting back to you...
| 
| I've tried the following patch, and unfortunately it doesn't
| solve my problem.
| 
| > Daniel> The attached patch worked for me, though.
| > 
| > Could you try this patch instead?  I find the code somewhat hard to
| > follow, and preferred to introduce IFELSE to make it more readable.
| > 
| > I also submit this patch.
| [ ... ]
| 
| Here's what I see:
| (I've taken some liberty in re-arranging the code, to try and
|  make it a little clearer about what belongs to what...)
| 
| AC_DEFUN([_AC_PROG_PREPROC_WORKS_IFELSE],
|  [
|    ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe
|    _AC_PREPROC_IFELSE(
|         [AC_LANG_SOURCE(address@hidden:@include <assert.h> Syntax error]])],
|         [
|           _AC_PREPROC_IFELSE(
|         ^^^^^^^^^^^^^^^^^^^^^^
|              [AC_LANG_SOURCE(address@hidden:@include <ac_nonexistent.h>]])],
|              [ m4_default([$2], :) ],
|              [
|                if test "x$ac_cpp_err" = xmaybe; then
|                  ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=yes
|                else
|                  ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=
|                fi
|                $1
|              ]
|           ) # End of _AC_PREPROC_IFELSE
|         ],
|         [ m4_default([$2], :) ]
|    ) # End of _AC_PREPROC_IFELSE
|  ]
| ) # _AC_PROG_PREPROC_WORKS_IFELSE
| 
| 
| At the indicated _AC_PREPROC_IFELSE, either just inside it, or
| as the last thing before it's called, there is a check to
| see if $ac_cpp_err is blank.  For compilers that print junk
| on stdout (in my case, a copyright message), this is true, so
| $ac_cpp_err is set to "maybe".  Since "maybe" is a non-blank
| string, the script will not go down this codepath.

I'm a bit confused.  I think I understand what you mean, but first of
all, stdout is not taken into account in here, so I must be missing
something.  And secondly if I understand correctly your diagnostic,
you are referring to the innermost branch which holds $2, right?

But then, this is the case of a broken CPP, so do we care?

What is exactly the problem you face?

Would it be possible that you submit a shell script that behaves like
your cpp?  Or better yet, getting inspired by the tests named 

## --------------------------- ##
## AC_PROG_CPP with warnings.  ##
## --------------------------- ##

and

## ------------------------------ ##
## AC_PROG_CPP without warnings.  ##
## ------------------------------ ##

in tests/compile.at, could you build another test that would help us
first fixing the issue, and secondly, keep it fixed ``forever''?

Thanks!

        Akim



reply via email to

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