On 07/19/2010 11:43 AM, Ralf Wildenhues wrote: > The AC_EGREP_CPP macro already allows to test preprocessor output, but > this addition can be helpful if you want to answer two questions with > only one run of the preprocessor. Also, it is in line with > AC_COMPILE_IFELSE and AC_LINK_IFELSE allowing inspection of output in > the if-true branch.
I like it! Please apply, after addressing one nit...
> IMHO the most dangerous bit of this patch is that I'm unsure why
> AC_EGREP_CPP (aka AC_PROGRAM_EGREP earlier) was introduced in the first
> place, if there was some portability issue formerly that prevented an
> AC_TRY_PREPROC or so.
I'm not entirely sure of the history on this myself, without spending my
time doing more git research.
> +++ b/tests/compile.at
> @@ -295,7 +295,7 @@ AT_DATA([configure.ac],
> AC_PROG_CC
>
> AC_PREPROC_IFELSE([AC_LANG_PROGRAM([int ok;], [])],
> - [test -f conftest.err || AS_EXIT([1])],
> + [{ test -f conftest.err && grep ok conftest.i; } ||
> AS_EXIT([1])],
This should use a longer string, more likely to be unique to our
compilation (what if a system header declares a function named choke(),
for instance), so as to avoid false positives.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
