Re: the *-config scripts



> > It might be useful to have PKG_CHECK_MODULES set FOO_VERSION
> > variables for each package.
> 
> Could you explain why?

Well, like for

	if test $GLIB_VERSION \>= 1.3.0; then
		AC_MSG_ERROR (No, you can't use CVS glib)
	fi

(Not that that would actually work, syntactically.)

Or various other things. It just seemed like something that would be
simple to add and could be useful.

> > You need to provide a way to deal with the IDL include path problem.
> 
> The current way of handling this is by creating an idl.pc, and filling
> IDL_CFLAGS with the include paths.

But that doesn't work, because multiple packages install IDL files.
You need to be able to say

	PKG_CHECK_MODULES(EVOLUTION, bonobo:0.15)

and then use EVOLUTION_IDL_FLAGS (or whatever) and have that include
both the ORBit IDL and the Bonobo IDL directories.

> > > AC_SUBST(GTK_CFLAGS)
> > 
> > Should be CPPFLAGS, or if there are cases where you'll need CFLAGS,
> > you should separate out CPPFLAGS from CFLAGS. (For the case where you
> > make sure a library exists, then need to run some additional autoconf
> > test that will use $CPP rather than $CC.)
> 
> Why does this need to be CPPFLAGS? you just add the $(GTK_CFLAGS) to
> the INCLUDES variable in your Makefile.am

I'm talking about configure.in, not Makefile stuff. If you want to do
AC_CHECK_HEADER or AC_EGREP_HEADER or various other things on the
package's include files, for instance, you need to first set CPPFLAGS
to have the right -I flags. And as explained by autoconf.info:

     This macro uses `CPPFLAGS', but not `CFLAGS', because `-g', `-O',
     etc. are not valid options to many C preprocessors.

So you don't want to assume you can do "CPPFLAGS="$CPPFLAGS $GTK_CFLAGS",
because maybe you can't. So you want a known-cpp-safe GTK_CPPFLAGS.

-- Dan




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