autoconf
[Top][All Lists]
Advanced

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

Re: finding the location of header (.h) files


From: Stepan Kasal
Subject: Re: finding the location of header (.h) files
Date: Mon, 31 Jul 2006 18:36:34 +0200
User-agent: Mutt/1.4.2.1i

[omitting the Automake list]

Hello,

On Sun, Jul 30, 2006 at 02:19:50PM +1000, mick wrote:
> AC_CHECK_HEADER ([libgtkhtml/gtkhtml.h], 

the space is not allowed; in m4, the left parenthesis as to follow
the macro name immediately.

I tried to make an example.  The main trick seems to be to get all
the include directories.  `pkg-config' can help you with that.

Well, pkg-config has some Autoconf macros, but I ignore them right
now.  (Do they support the --cflags-only-I option somehow?)

Here is the example:

AC_INIT([foo], 1.0, address@hidden)
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS `pkg-config --cflags-only-I libgtkhtml-2.0`"
AC_CHECK_HEADER([libgtkhtml/gtkhtml.h],
        [],
        [AC_MSG_ERROR([BUMMER, Maybe if you install libgtkhtml-2 & 
libgtkhtml-2-dev this pig will fly])])
CPPFLAGS=$save_CPPFLAGS
AC_OUTPUT


Enjoy,
        Stepan




reply via email to

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