On 03/17/2010 08:24 AM, Ludovic Courtès wrote:
>> Yes, you have to unset the cache variable before the second test,
>> ac_cv_have_decl_forkpty.
> 
> Then I think this patch should fix it:
> 
> 2010-03-17  Ludovic Courtès <l...@gnu.org>  (tiny change)
> 
>       * m4/pty.m4: Unset $ac_cv_have_decl_forkpty before the second
>       `AC_CHECK_DECL' invocation.

Except that you no longer benefit from caching on platforms that really
do lack forkpty; if the cache contains ac_cv_have_decl_forkpty=no, then
you are forcing the user to waste time repeating the check to reset it
back to no.

A better fix would be to test for the existence of both headers
(<util.h> and <libutil.h>), then write a single AC_CHECK_DECL with a
prefix of:

#if HAVE_UTIL_H
# include <util.h>
#endif
#if HAVE_LIBUTIL_H
# include <libutil.h>
#endif

I'll try and write a patch along these lines shortly...

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to