gtkmm and autoconf

2008-10-02 Thread Ruben Safir

Hello

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
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-headers-and-linking.html
http://www.openismus.com/documents/linux/automake/automake.shtml#ExampleFiles
http://www.elitecoders.de/mags/cscene/CS2/CS2-10.html
http://www.openismus.com/documents/linux/automake/automake.shtml
and of course the GNU manual and http://sources.redhat.com/autobook/

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 autogen.sh script
-
#! /bin/sh

# $Id: autogen.sh,v 1.4 2002/12/02 01:39:49 murrayc Exp $
#
# Copyright (c) 2002  Daniel Elstner  <[EMAIL PROTECTED]>
#
# 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`"
then
echo "This script must be executed directly from the source
directory."
exit 1
fi

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 configure.ac

AC_INIT(src/one_window.cc)

AM_INIT_AUTOMAKE(one_window,0.1)
AM_CONFIG_HEADER(config.h)

AC_PROG_CC
AC_PROG_CXX

AC_PROG_INSTALL
AC_PROG_LIBTOOL

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




This is my toplevel Makefile.am


SUBDIRS = src
EXTRA_DIST=autogen.sh





This is my src directory Makefile.am
___

bin_PROGRAMS = onewindow
onewindow_SOURCES = one_window.cc 

__


and the C++ code is very simple
one_window.cc
_
#include 

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

Gtk::Window window;

Gtk::Main::run(window);

return 0;
}
_



Everything seems to work except for the make command

[EMAIL PROTECTED]:~/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
--gnu  
src/Makefile
 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 one_window.cc; \
then mv -f ".deps/one_window.Tpo" ".deps/one_window.Po"; else rm -f
".deps/one_w
indow.Tpo"; exit 1; fi
one_window.cc:1:19: gtkmm.h: No such file or directory
one_window.cc: In function `int main(int, char**)':
one_window.cc:5: error: `Gtk' undeclared (first use this function)
one_window.cc:5: error: (Each undeclared identifier is reported only
once for 
   each function it appears in.)
one_window.cc:5: 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 Makefile.in has 

MYAPP_CFLAGS = @MYAPP_CFLAGS@
MYAPP_LIBS = @MYAPP_LIBS@


and the src level Makefile has

MYAPP_CFLAGS = -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API
-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/i

Re: gtkmm and autoconf

2008-10-03 Thread Murray Cumming
On Thu, 2008-10-02 at 12:31 -0400, Ruben Safir wrote:
> 
> This is my src directory Makefile.am
> ___
> 
> bin_PROGRAMS = onewindow
> onewindow_SOURCES = one_window.cc 

You are not specifying any libraries to link to, or any paths to headers
to use.

http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-headers-and-linking.html
says
"
PKG_CHECK_MODULES([MYAPP], [gtkmm-2.4 >= 2.8.0])

This checks for the presence of gtkmm and defines MYAPP_LIBS and
MYAPP_CFLAGS for use in your Makefile.am files.
"

You can do that as suggested here:
http://www.openismus.com/documents/linux/using_libraries/using_libraries.shtml#makefile

or this might be better:

AM_CPPFLAGS = $(MYAPP_CFLAGS)
onwindow_LDADD = $(MYAPP_LIBS)

-- 
[EMAIL PROTECTED]
www.murrayc.com
www.openismus.com

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtkmm and autoconf

2008-10-03 Thread Rafał Mużyło
On Thu, Oct 02, 2008 at 12:31:04PM -0400, Ruben Safir wrote:
> This is my src directory Makefile.am
> ___
> 
> bin_PROGRAMS = onewindow
> onewindow_SOURCES = one_window.cc 
> 
> So I'm just lost here.  What am I doing wrong?
>
Well, that's rather obvious. You're missing

onewindow_CPPFLAGS = @MYAPP_CFLAGS@
onewindow_LDADD = @MYAPP_LIBS@

in src/Makefile.am .
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtkmm and autoconf

2008-10-03 Thread dhk
Ruben Safir wrote:
> Hello
> 
> 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.
Try these links . . .
http://sources.redhat.com/automake/automake.html
http://sourceware.org/autobook/autobook/autobook_283.html

> 
> I'm working from documentation here
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-headers-and-linking.html
> http://www.openismus.com/documents/linux/automake/automake.shtml#ExampleFiles
> http://www.elitecoders.de/mags/cscene/CS2/CS2-10.html
> http://www.openismus.com/documents/linux/automake/automake.shtml
> and of course the GNU manual and http://sources.redhat.com/autobook/
> 
> 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 autogen.sh script
> -
> #! /bin/sh
> 
> # $Id: autogen.sh,v 1.4 2002/12/02 01:39:49 murrayc Exp $
> #
> # Copyright (c) 2002  Daniel Elstner  <[EMAIL PROTECTED]>
> #
> # 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`"
> then
> echo "This script must be executed directly from the source
> directory."
> exit 1
> fi
> 
> 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 configure.ac
> 
> AC_INIT(src/one_window.cc)
> 
> AM_INIT_AUTOMAKE(one_window,0.1)
> AM_CONFIG_HEADER(config.h)
> 
> AC_PROG_CC
> AC_PROG_CXX
> 
> AC_PROG_INSTALL
> AC_PROG_LIBTOOL
> 
> PKG_CHECK_MODULES([MYAPP], [gtkmm-2.4 >= 2.4.0])
> AC_OUTPUT(Makefile src/Makefile)
> --
In my configure.ac I have the following and it work fine.  Yours looks
the same except for the brackets "[]" around MYAPP.
pkg_modules="gtk+-2.0 >= 2.0.0 libglade-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])

> 
> 
> 
> 
> This is my toplevel Makefile.am
> 
> 
> SUBDIRS = src
> EXTRA_DIST=autogen.sh
> 
> 
> 
> 
> 
> This is my src directory Makefile.am
> ___
> 
> bin_PROGRAMS = onewindow
> onewindow_SOURCES = one_window.cc 
> 
> __
> 
> 
> and the C++ code is very simple
> one_window.cc
> _
> #include 
> 
> int main(int argc, char *argv[])
> {
> Gtk::Main kit(argc, argv);
> 
> Gtk::Window window;
> 
> Gtk::Main::run(window);
> 
> return 0;
> }
> _
> 
> 
> 
> Everything seems to work except for the make command
> 
> [EMAIL PROTECTED]:~/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
> --gnu  
> src/Makefile
>  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 one_window.cc; \
> then mv -f ".deps/one_window.Tpo" ".deps/one_window.Po"; else rm -f
> ".deps/one_w
> indow.Tpo"; exit 1; fi
> one_window.cc:1:19: gtkmm.h: No such file or directory
> one_window.cc: In function `int main(int, char**)':
> one_window.cc:5: error: `Gtk' undeclared (first use this function)
> one_window.cc:5: error: (Each undeclared identifier is reported only
> once for 
>each function it appears in.)
> one_window.cc:5: 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 Makefile.in h

Re: gtkmm and autoconf

2008-10-03 Thread Nicola Fontana
On Fri, 03 Oct 2008 11:00:35 +0200
Murray Cumming <[EMAIL PROTECTED]> wrote:

> or this might be better:
> 
> AM_CPPFLAGS = $(MYAPP_CFLAGS)
> onwindow_LDADD = $(MYAPP_LIBS)

I don't know the technical difference (I always seen
preprocessing and compilation in the same step), but is not
AM_CXXFLAGS a better place for MYAPP_CFLAGS?

-- 
Nicola
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtkmm and autoconf

2008-10-03 Thread Carlos Pereira
Hello Ruben,

I cannot help with this issue, sorry.

But I suggest you post it on the main list at

[EMAIL PROTECTED]

In this list there are allways many messagens, I think it will be
easier to find someone to help you.

Best regards1

Carlos




On Thu, Oct 2, 2008 at 1:31 PM, Ruben Safir <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> 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
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-headers-and-linking.html
> http://www.openismus.com/documents/linux/automake/automake.shtml#ExampleFiles
> http://www.elitecoders.de/mags/cscene/CS2/CS2-10.html
> http://www.openismus.com/documents/linux/automake/automake.shtml
> and of course the GNU manual and http://sources.redhat.com/autobook/
>
> 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 autogen.sh script
> -
> #! /bin/sh
>
> # $Id: autogen.sh,v 1.4 2002/12/02 01:39:49 murrayc Exp $
> #
> # Copyright (c) 2002  Daniel Elstner  <[EMAIL PROTECTED]>
> #
> # 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`"
> then
>echo "This script must be executed directly from the source
> directory."
>exit 1
> fi
>
> 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 configure.ac
> 
> AC_INIT(src/one_window.cc)
>
> AM_INIT_AUTOMAKE(one_window,0.1)
> AM_CONFIG_HEADER(config.h)
>
> AC_PROG_CC
> AC_PROG_CXX
>
> AC_PROG_INSTALL
> AC_PROG_LIBTOOL
>
> PKG_CHECK_MODULES([MYAPP], [gtkmm-2.4 >= 2.4.0])
> AC_OUTPUT(Makefile src/Makefile)
> --
>
>
>
>
> This is my toplevel Makefile.am
> 
>
> SUBDIRS = src
> EXTRA_DIST=autogen.sh
> 
>
>
>
>
> This is my src directory Makefile.am
> ___
>
> bin_PROGRAMS = onewindow
> onewindow_SOURCES = one_window.cc
>
> __
>
>
> and the C++ code is very simple
> one_window.cc
> _
> #include 
>
> int main(int argc, char *argv[])
> {
>Gtk::Main kit(argc, argv);
>
>Gtk::Window window;
>
>Gtk::Main::run(window);
>
>return 0;
> }
> _
>
>
>
> Everything seems to work except for the make command
>
> [EMAIL PROTECTED]:~/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
> --gnu
> src/Makefile
>  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 one_window.cc; \
> then mv -f ".deps/one_window.Tpo" ".deps/one_window.Po"; else rm -f
> ".deps/one_w
> indow.Tpo"; exit 1; fi
> one_window.cc:1:19: gtkmm.h: No such file or directory
> one_window.cc: In function `int main(int, char**)':
> one_window.cc:5: error: `Gtk' undeclared (first use this function)
> one_window.cc:5: error: (Each undeclared identifier is reported only
> once for
>   each function it appears in.)
> one_window.cc:5: 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 Makefile.in has
>
> MYAPP_CFLAGS = @MYAPP_CFLAGS@
> MYAPP_LIBS = @MYAPP_LIBS@
>
>
> and the src level Makefile has
>
> MYAPP_CFLAGS = -DX

Re: gtkmm and autoconf

2008-10-03 Thread Ruben Safir
On Fri, Oct 03, 2008 at 01:44:54PM +0200, Nicola Fontana wrote:
> On Fri, 03 Oct 2008 11:00:35 +0200
> Murray Cumming <[EMAIL PROTECTED]> wrote:
> 
> > or this might be better:
> > 
> > AM_CPPFLAGS = $(MYAPP_CFLAGS)
> > onwindow_LDADD = $(MYAPP_LIBS)
> 
> I don't know the technical difference (I always seen
> preprocessing and compilation in the same step), but is not
> AM_CXXFLAGS a better place for MYAPP_CFLAGS?
> 


I believe your right.  I hope to become fluent in this rather quickly
through intense usage ;)

Ruben

> -- 
> Nicola
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 
http://www.mrbrklyn.com - Interesting Stuff
http://www.nylxs.com - 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

http://fairuse.nylxs.com  DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002

"Yeah - I write Free Software...so 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
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


[EMAIL PROTECTED]: Re: gtkmm and autoconf]

2008-10-03 Thread Rafał Mużyło
- Forwarded message from Rafał Mużyło <[EMAIL PROTECTED]> -

Date: Sat, 4 Oct 2008 01:18:15 +0200
From: Rafał Mużyło <[EMAIL PROTECTED]>
To: Nicola Fontana <[EMAIL PROTECTED]>
Subject: Re: gtkmm and autoconf
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.5.16 (2007-06-09)
Status: RO

This message was meant for the list. I accidentally sent
it only to a private email.


On Sat, Oct 04, 2008 at 12:42:29AM +0200, Nicola Fontana wrote:
> On Fri, 3 Oct 2008 19:18:11 +0200
> Rafał Mużyło <[EMAIL PROTECTED]> wrote:
> 
> > On Fri, Oct 03, 2008 at 01:44:54PM +0200, Nicola Fontana wrote:
> > > On Fri, 03 Oct 2008 11:00:35 +0200
> > > Murray Cumming <[EMAIL PROTECTED]> wrote:
> > > 
> > > > or this might be better:
> > > > 
> > > > AM_CPPFLAGS = $(MYAPP_CFLAGS)
> > > > onwindow_LDADD = $(MYAPP_LIBS)
> > > 
> > > I don't know the technical difference (I always seen
> > > preprocessing and compilation in the same step), but is not
> > > AM_CXXFLAGS a better place for MYAPP_CFLAGS?
> > >
> > That's the whole point. Nearly all of 'pkg-config 
> > --cflags' I've seen were actually CPPFLAGS. So, placing them in CPPFLAGS
> > is more correct (if i.e. somebody wanted to separate preprocessing and
> > compilation). It's just like LDADD/LIBADD and LDFLAGS,
> > if the user adds -Wl,--as-needed to $LDFLAGS, things tend to break
> > if upstream put libs in LDFLAGS instead of LIBS.
> 
> maybe this is the common approach in C++ (for some unknown
> reason), but in C I'm seeing the reverse. Two notable examples
> are the Gtk+ itsself, that set the global CFLAGS in configure,
> and cairo, that use library specific CFLAGS. I always used
> AM_CFLAGS without problems.
>
I'm not saying that there are problems, it's just that i.e.
`pkg-config gtk+-2.0 --cflags` returns:
-D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb
-I/usr/include/libpng12

All of those are preprocessor flags.

> Regardling LDADD/LIBADD and LDFLAGS the distinction between the
> two are quite clear: -l -L go into the former, the rest in the
> latter, always. Anyway, I can understand there could be corner
> cases when you would add libraries to LDFLAGS, and maybe you hit
> one of them.
> 
Those aren't exactly corner cases, I've seen many packages abusing
LDFLAGS in this way (meaning - adding libs to it), among other 
this causes AC_CHECK_LIB to fail when -Wl,--as-needed is in LDFLAGS.
(just make note that LDFLAGS may be both env var and automake var
and depending on context I'm refering to both those meanings).

> I'm talking from the C world: I wonder if the C++ world is so
> different but all can be possible.
>
OK, I've got no idea where is this coming from (especially
C++ part).

- End forwarded message -
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: [EMAIL PROTECTED]: Re: gtkmm and autoconf]

2008-10-03 Thread Ruben Safir
On Sat, Oct 04, 2008 at 01:21:39AM +0200, Rafał Mużyło wrote:
> - Forwarded message from Rafał Mużyło <[EMAIL PROTECTED]> -
> 
> Date: Sat, 4 Oct 2008 01:18:15 +0200
> From: Rafał Mużyło <[EMAIL PROTECTED]>
> To: Nicola Fontana <[EMAIL PROTECTED]>
> Subject: Re: gtkmm and autoconf
> Message-ID: <[EMAIL PROTECTED]>
> References: <[EMAIL PROTECTED]>
>   <[EMAIL PROTECTED]>
>   <[EMAIL PROTECTED]>
>   <[EMAIL PROTECTED]>
>   <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Content-Disposition: inline
> Content-Transfer-Encoding: 8bit
> In-Reply-To: <[EMAIL PROTECTED]>
> User-Agent: Mutt/1.5.16 (2007-06-09)
> Status: RO
> 
> This message was meant for the list. I accidentally sent
> it only to a private email.

I didn't see the message your replying to.  Did it hit the list?

Ruben

> 
> 
> On Sat, Oct 04, 2008 at 12:42:29AM +0200, Nicola Fontana wrote:
> > On Fri, 3 Oct 2008 19:18:11 +0200
> > Rafał Mużyło <[EMAIL PROTECTED]> wrote:
> > 
> > > On Fri, Oct 03, 2008 at 01:44:54PM +0200, Nicola Fontana wrote:
> > > > On Fri, 03 Oct 2008 11:00:35 +0200
> > > > Murray Cumming <[EMAIL PROTECTED]> wrote:
> > > > 
> > > > > or this might be better:
> > > > > 
> > > > > AM_CPPFLAGS = $(MYAPP_CFLAGS)
> > > > > onwindow_LDADD = $(MYAPP_LIBS)
> > > > 
> > > > I don't know the technical difference (I always seen
> > > > preprocessing and compilation in the same step), but is not
> > > > AM_CXXFLAGS a better place for MYAPP_CFLAGS?
> > > >
> > > That's the whole point. Nearly all of 'pkg-config 
> > > --cflags' I've seen were actually CPPFLAGS. So, placing them in CPPFLAGS
> > > is more correct (if i.e. somebody wanted to separate preprocessing and
> > > compilation). It's just like LDADD/LIBADD and LDFLAGS,
> > > if the user adds -Wl,--as-needed to $LDFLAGS, things tend to break
> > > if upstream put libs in LDFLAGS instead of LIBS.
> > 
> > maybe this is the common approach in C++ (for some unknown
> > reason), but in C I'm seeing the reverse. Two notable examples
> > are the Gtk+ itsself, that set the global CFLAGS in configure,
> > and cairo, that use library specific CFLAGS. I always used
> > AM_CFLAGS without problems.
> >
> I'm not saying that there are problems, it's just that i.e.
> `pkg-config gtk+-2.0 --cflags` returns:
> -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
> -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb
> -I/usr/include/libpng12
> 
> All of those are preprocessor flags.
> 
> > Regardling LDADD/LIBADD and LDFLAGS the distinction between the
> > two are quite clear: -l -L go into the former, the rest in the
> > latter, always. Anyway, I can understand there could be corner
> > cases when you would add libraries to LDFLAGS, and maybe you hit
> > one of them.
> > 
> Those aren't exactly corner cases, I've seen many packages abusing
> LDFLAGS in this way (meaning - adding libs to it), among other 
> this causes AC_CHECK_LIB to fail when -Wl,--as-needed is in LDFLAGS.
> (just make note that LDFLAGS may be both env var and automake var
> and depending on context I'm refering to both those meanings).
> 
> > I'm talking from the C world: I wonder if the C++ world is so
> > different but all can be possible.
> >
> OK, I've got no idea where is this coming from (especially
> C++ part).
> 
> - End forwarded message -
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 
http://www.mrbrklyn.com - Interesting Stuff
http://www.nylxs.com - 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

http://fairuse.nylxs.com  DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002

"Yeah - I write Free Software...so 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
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list