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



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
])

The problem is that I dont know how to add the --cflags to gcc and when y do

make

I receive the following errors

make[1]: Entering directory `/home/bennett/Programacion/GtkLilo/src'
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"gtklilo\" -DVERSION=\"0.1\"  -I. -I.      -g -O2 -c lilo.c
lilo.c:17: gtk/gtk.h: No such file or directory
lilo.c:20: glib.h: No such file or directory
make[1]: *** [lilo.o] Error 1
make[1]: Leaving directory `/home/bennett/Programacion/GtkLilo/src'
make: *** [all-recursive] Error 1

I also atach the to Makefiles.am (one from the parent directory and the other from src)

Thanks in advice.
-- 
The chains are broken and the door is open wide
Our eyes adjusting to the light that was denied
And the voices ringing out now
Sing of freedom
And bring a sense of wonder

	http://www.es.debian.org/intro/about.es.html
##Process this file with automake to produce Makefile.in

SUBDIRS = src
## Process this file with automake to produce Makefile.in

bin_PROGRAMS = gtklilo

gtklilo_SOURCES = \
	lilo.c

gtklilo_LDADD = @PACKAGE_LIBS@
#gtklilo_LDFLAGS = @PACKAGE_CFLAGS@

Attachment: signature.asc
Description: Esta parte del mensaje esta firmada digitalmente



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