[Top][All Lists]

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

Re: autoconf

From: Ruben
Subject: Re: autoconf
Date: Thu, 02 Oct 2008 13:57:01 -0400
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

On Thu, 02 Oct 2008 15:25:54 +0900, Miles Bader wrote:

> "Alfred M. Szmidt" <> writes:
>> As for autoconf being impossible, many thousands of projects use it,
>> so it cannot be that hard (and it isn't).
> I think autoconf's reputation is not entirely deserved; it's actually
> pretty easy to use for simple everyday configuration, especially if you
> know how to write a shell script (and automake is even easier -- a
> file for a simple app is a thing of beauty).  It's when
> things break, or when you need to do something exotic, that it can get
> kinda painful...
> -Miles

Well I'm strugglingwith it and the gtk mailing lists seem to have went
down this morning

I'm really a novice at autoconf and automake and trying to learn some
gtkmm but I'm running into a problem that I just don't have the
familiarity to solve and I'd like to request some help

I've done a google search for a solution and came up blank so I hope
someone can help me here.

I'm working from documentation here
and of course the GNU manual and

I need to include the include and library flags into autoconf and
automake and it seems to fail to pickup the gtkmm and gtk library

I'm using this script
#! /bin/sh

# $Id:,v 1.4 2002/12/02 01:39:49 murrayc Exp $
# Copyright (c) 2002  Daniel Elstner  <>
# This program is free software; you can redistribute it and/or modify
dir=`echo "$0" | sed 's,[^/]*$,,'`
echo $dir
test "x${dir}" = "x" && dir='.'

if test "x`cd "${dir}" 2>/dev/null && pwd`" != "x`pwd`"
    echo "This script must be executed directly from the source
    exit 1

rm -f config.cache acconfig.h

echo "- libtoolize."            && \
libtoolize --force              && \
echo "- aclocal."               && \
aclocal                         && \
echo "- autoconf."              && \
autoconf                        && \
echo "- autoheader."            && \
autoheader                      && \
echo "- automake."              && \
automake --add-missing --gnu    && \
echo                            && \
./configure "$@"                && exit 0

exit 1

This is my top level




PKG_CHECK_MODULES([MYAPP], [gtkmm-2.4 >= 2.4.0])
AC_OUTPUT(Makefile src/Makefile)

This is my toplevel


This is my src directory

bin_PROGRAMS = onewindow
onewindow_SOURCES = 


and the C++ code is very simple
#include <gtkmm.h>

int main(int argc, char *argv[])
    Gtk::Main kit(argc, argv);

    Gtk::Window window;

    return 0;

Everything seems to work except for the make command

ruben@www2:~/cplus/pharm/gmm> make
make  all-recursive
make[1]: Entering directory `/home/ruben/cplus/pharm/gmm'
Making all in src
make[2]: Entering directory `/home/ruben/cplus/pharm/gmm/src'
 cd .. && /bin/sh /home/ruben/cplus/pharm/gmm/missing --run automake-1.9
 cd .. && /bin/sh ./config.status src/Makefile depfiles
config.status: creating src/Makefile
config.status: executing depfiles commands
make[2]: Leaving directory `/home/ruben/cplus/pharm/gmm/src'
make[2]: Entering directory `/home/ruben/cplus/pharm/gmm/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -g -O2 -MT one_window.o -MD -MP
-MF ".de
ps/one_window.Tpo" -c -o one_window.o; \
then mv -f ".deps/one_window.Tpo" ".deps/one_window.Po"; else rm -f
indow.Tpo"; exit 1; fi gtkmm.h: No such file or directory In function `int main(int, char**)': error: `Gtk' undeclared (first use this function) error: (Each undeclared identifier is reported only
once for 
   each function it appears in.) error: syntax error before `::' token
make[2]: *** [one_window.o] Error 1
make[2]: Leaving directory `/home/ruben/cplus/pharm/gmm/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ruben/cplus/pharm/gmm'
make: *** [all] Error 2

The resulting has 


and the src level Makefile has

-I/opt/gnome/include/gtkmm-2.4 -I/opt/gnome/lib/gtkmm-2.4/include
-I/opt/gnome/include/glibmm-2.4 -I/opt/gnome/lib/glibmm-2.4/include
-I/opt/gnome/include/gdkmm-2.4 -I/opt/gnome/lib/gdkmm-2.4/include
-I/opt/gnome/include/pangomm-1.4 -I/opt/gnome/include/atkmm-1.6
-I/opt/gnome/include/gtk-2.0 -I/opt/gnome/include/sigc++-2.0
-I/opt/gnome/lib/sigc++-2.0/include -I/opt/gnome/include/glib-2.0
-I/opt/gnome/lib/glib-2.0/include -I/opt/gnome/lib/gtk-2.0/include
-I/usr/X11R6/include -I/opt/gnome/include/pango-1.0
-I/usr/include/freetype2 -I/usr/include/freetype2/config
MYAPP_LIBS = -L/opt/gnome/lib -lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6
-lgtk-x11-2.0 -lpangomm-1.4 -lglibmm-2.4 -lsigc-2.0 -lgdk-x11-2.0
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  

So I'm just lost here.  What am I doing wrong?

-- - Interesting Stuff - Leadership Development in Free Software

So many immigrant groups have swept through our town that Brooklyn, like 
Atlantis, reaches mythological proportions in the mind of the world  - RI Safir 
1998  DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002

"Yeah - I write Free SUE ME"

"The tremendous problem we face is that we are becoming sharecroppers to our 
own cultural heritage -- we need the ability to participate in our own society."

"> I'm an engineer. I choose the best tool for the job, politics be damned.<
You must be a stupid engineer then, because politcs and technology have been 
attached at the hip since the 1st dynasty in Ancient Egypt.  I guess you missed 
that one."

© Copyright for the Digital Millennium

reply via email to

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