[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CHECK_HEADER question
From: |
Eric Blake |
Subject: |
Re: AC_CHECK_HEADER question |
Date: |
Mon, 18 Mar 2013 13:05:14 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
On 03/18/2013 02:50 AM, Jan van Dijk wrote:
> Would it be possible to provide a new macro AC_WHICH_HEADER, say, which
> informs it user what header has been/will be picked up by the preprocessor?
I'm not sure that it is a common enough action to need to know where a
header lives. Knowing that a particular spelling for an include name
compiled should generally be enough.
That said, check out gnulib's m4/absolute-header.m4, which is about as
portable as you can get across multiple compilers at determining the
absolute name for any header's location, provided that header had some
non-trivial content after pre-processing (so headers like <assert.h>
cannot always be found, but headers like <stdio.h> are fair game).
http://git.sv.gnu.org/cgit/gnulib.git/tree/m4/absolute-header.m4
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature