Making GTK+2.0 application



Does anyone know why I get a "gtk/gtk.h: file not found" error? I don't see where anything is wrong, here is my
configure.in, it's about the same as in the "aptivate" application:
-----------------------------------------------------------
dnl Process this file with autoconf to produce a configure script.

AC_INIT(pkgmgr.c)
dnl Every other copy of the package version number gets its value from here
AM_INIT_AUTOMAKE(pkgmgr, 0.1.0)

dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
AM_CONFIG_HEADER(config.h)

AC_SUBST(VERSION)

ISODATE=`date +%Y-%m-%d`
AC_SUBST(ISODATE)

AC_CANONICAL_HOST

dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC

dnl Checks for pkg-config.
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test x$PKG_CONFIG = xno ; then
  AC_MSG_ERROR([*** pkg-config not found. See http://pkgconfig.sourceforge.net])
fi

dnl Checks for gtk+.
GTK_REQUIRED_VERSION=1.3.6
GTK_PACKAGES="gtk+-2.0"
AC_MSG_CHECKING(Gtk+ version)
if $PKG_CONFIG --atleast-version $GTK_REQUIRED_VERSION gtk+-2.0 ; then
      GTK_CFLAGS=`$PKG_CONFIG --cflags $GTK_PACKAGES`
      GTK_LIBS=`$PKG_CONFIG --libs $GTK_PACKAGES`
else
      AC_MSG_ERROR([
*** GTK $GTK_REQUIRED_VERSION or newer is required. The latest version of GTK
*** is always available from ftp://ftp.gtk.org/.
      ])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.

AC_OUTPUT(Makefile pkgmgr.lsm pkgmgr.spec)
-----------------------------------------------------------

The corresponding part of the Makefile is
-----------------------------------------------------------
...
prefix = /usr/local
exec_prefix = ${prefix}
...
GTK_CFLAGS =  -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/glib-2.0
-I/usr/local/lib/glib-2.0/include -I/usr/local/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2
-I/usr/local/include/atk-1.0  
GTK_LIBS =  -L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib -lgtk-x11-1.3 -lgdk-x11-1.3 -lgdk_pixbuf-1.3 -lm -lpangox
-lpangoxft -lXft -lXrender -lXext -lX11 -lfreetype -latk -lpango -lgobject-1.3 -lgmodule-1.3 -ldl -lglib-1.3  
...
-----------------------------------------------------------

O. Wyss




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