[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-
- checking for non-standard headers, Larry Siden, 2003/08/11
- Re: checking for non-standard headers, Braden McDaniel, 2003/08/11
- Re: checking for non-standard headers,
Guido Draheim <=
- Message not available
- Re: checking for non-standard headers, Guido Draheim, 2003/08/12
- Re: checking for non-standard headers, Thomas Dickey, 2003/08/12
- re: new vs old autoconf / Re: checking for non-standard headers, Guido Draheim, 2003/08/12
- re: new vs old autoconf / Re: checking for non-standard headers, Thomas E. Dickey, 2003/08/12
- Re: new vs old autoconf / Re: checking for non-standard headers, Guido Draheim, 2003/08/12
- Re: new vs old autoconf / Re: checking for non-standard headers, Thomas E. Dickey, 2003/08/12
- Re: new vs old autoconf / Re: checking for non-standard headers, Guido Draheim, 2003/08/13
- Re: new vs old autoconf / Re: checking for non-standard headers, Thomas E. Dickey, 2003/08/13
- Re: new vs old autoconf / Re: checking for non-standard headers, Russ Allbery, 2003/08/12