autoconf
[Top][All Lists]
Advanced

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

Re: checking for non-standard headers


From: Guido Draheim
Subject: Re: checking for non-standard headers
Date: Tue, 12 Aug 2003 02:05:55 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313



Braden McDaniel wrote:
Quoting Larry Siden <address@hidden>:


How can I get autoconf to automatically find header files that are not
part of the standard include path, but for which *.pc files exist?


You don't need to do that; if the pkg-config metafile is on the system, the assumption is that the package installation is intact. There's not much point in trying to make broken installations work.

I'd like to agree - it's better to force users to install pkg-config
as a build-requirement, it's very very easy to do such as pkg-config
is a  standalone program written in plain and simple C. And if no
pkg-config then all its modules are not installed even when someone
did download-and-install-from-source some third-party packages
without pkg-config among them.



I want to check for non-standard headers, such as, pango/pango.h,
glib.h, and others.  AC_CHECK_HEADER seems to work only for standard
headers, i.e. headers that can be found in the standard include path.
How can I augment the include path for other headers?

The same way as it has been for the last years, via the fourth
argument of AC_CHECK_HEADER - do you develop new software with
ancient build tools like autoconf 2.13 ? That one did not have
it yet, and things had to use workarounds like assigning to
shell variables used in try-preprocess called by check-header.


I am calling "PKG_CHECK_MODULES(MODULES, pango glib-2.0)" to set
MODULES_CFLAGS, but don't know how to append this info to the include
path used by autoconf.


Assuming you're using automake, you'll have something like this in your Makefile.am:

  AM_CFLAGS = @MODULES_CFLAGS@

consider adding in configure.ac as well:
   CFLAGS="$CFLAGS $MODULE_CFLAGS"


... since MODULES is what you called it when you invoked PKG_CHECK_MODULES. You can call it anything you like. See pkg-config's man page for more information.


cheers,
-- guido                                  http://AC-Archive.sf.net
GCS/E/S/P C++/++++$ ULHS L++w- N++@ d(+-) s+a- r+@>+++ y++ 5++X-





reply via email to

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