Re: Help needed with autoconf and gtk+2.0 (my first configure.ac)



Hi,

Ruben Porras <nahoo82 telefonica net> writes:

> for the moment I was compiling my progam as said in the gtk+2.0 tutorial
> 
> gcc src/lilo.c  -o gtklilo `pkg-config --cflags --libs gtk+-2.0`
> 
> but now I want to add some configure stuff.
> 
> my configure.ac is
> 
> dnl Process this file with autoconf to produce a configure script
> AC_INIT(src/lilo.c)
> AM_INIT_AUTOMAKE(gtklilo, 0.1)
> AM_MAINTAINER_MODE
> 
> #AC_ISC_POSIX
> AC_PROG_CC
> #AM_PROG_CC_STDC
> #AC_HEADER_STDC
> 
> pkg_modules="gtk+-2.0"
> PKG_CHECK_MODULES(PACKAGE,[$pkg_modules])
> AC_SUBST(PACKAGE_CFLAGS)
> AC_SUBST(PACKAGE_LIBS)
> 
> AC_OUTPUT([
> Makefile
> src/Makefile
> ])

looks fine.

> The problem is that I dont know how to add the --cflags to gcc

you want to add

  INCLUDES = @PACKAGE_CFLAGS@

to your Makefile.am 


Salut, Sven



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