Re: makefile.am from --with-package option

2006-01-05 Thread Matt Hull
ok, i fixed that.  now its failing because it can not link to main.  main
is to be compiled after the gtkmain.c

does the makefile.am have to have bin_PROGRAMS = gtkmain ?

or can i have makefile.am with :

gtkmain.o: src/gtk-1.2/gtkmain.c src/gtk-1.2/gtkmain.h \
-c $(CFLAGS) $(GTK_CFLAGS) $(INCPATH) -o gtkmain.o src/gtk-1.2/gtkmain.c

i am guessing that its trying to link to main, but should do that last
after it compiles main.

thanks

matt

On Thu, 5 Jan 2006, Ralf Corsepius wrote:

> On Wed, 2006-01-04 at 16:34 -0600, Matt Hull wrote:
> > thanks, i think i got that kinda working.
> >
> > but now its compiling out of order.  i have src/main.c that calls the
> > gtkmain() in src/gtk-2.0/gtkmain.c   it tries to compile src/main.c first
> > and fails.
>
> Nope ...
>
> > gcc -DHAVE_CONFIG_H -I. -I. -I.. -Igtk-2.0 -c main.c
> > gcc-o mine  main.o -L/usr/lib -lgtk -lgdk -rdynamic -lgmodule -lglib
> > -lXi -lXext -lX11 -lm
> > main.o: In function `main':
> > main.c:(.text+0x30): undefined reference to `main_gtk'
>
> .. It doesn't fail to compile, it fails to link.
>
> > how can i fix this?
> Something is broken on your side. As it seems to me, you might have
> screwed up on mixing gtk1 and gtk2. (The line above contains -Igtk-2.0,
> but uses -lgtk (==gtk1)).
>
> Ralf
>
>
>
>
>
>
> ___
> Autoconf mailing list
> Autoconf@gnu.org
> http://lists.gnu.org/mailman/listinfo/autoconf
>




Re: makefile.am from --with-package option

2006-01-04 Thread Ralf Corsepius
On Wed, 2006-01-04 at 16:34 -0600, Matt Hull wrote:
> thanks, i think i got that kinda working.
> 
> but now its compiling out of order.  i have src/main.c that calls the
> gtkmain() in src/gtk-2.0/gtkmain.c   it tries to compile src/main.c first
> and fails.

Nope ...

> gcc -DHAVE_CONFIG_H -I. -I. -I.. -Igtk-2.0 -c main.c
> gcc-o mine  main.o -L/usr/lib -lgtk -lgdk -rdynamic -lgmodule -lglib
> -lXi -lXext -lX11 -lm
> main.o: In function `main':
> main.c:(.text+0x30): undefined reference to `main_gtk'

.. It doesn't fail to compile, it fails to link.

> how can i fix this?
Something is broken on your side. As it seems to me, you might have
screwed up on mixing gtk1 and gtk2. (The line above contains -Igtk-2.0,
but uses -lgtk (==gtk1)).

Ralf








Re: makefile.am from --with-package option

2006-01-04 Thread Matt Hull
thanks, i think i got that kinda working.

but now its compiling out of order.  i have src/main.c that calls the
gtkmain() in src/gtk-2.0/gtkmain.c   it tries to compile src/main.c first
and fails.

gcc -DHAVE_CONFIG_H -I. -I. -I.. -Igtk-2.0 -c main.c
gcc-o mine  main.o -L/usr/lib -lgtk -lgdk -rdynamic -lgmodule -lglib
-lXi -lXext -lX11 -lm
main.o: In function `main':
main.c:(.text+0x30): undefined reference to `main_gtk'

how can i fix this?  i thought that make did things in the right order ?

thanks

matt

On Wed, 4 Jan 2006, Stepan Kasal wrote:

> Hello,
>
> On Wed, Jan 04, 2006 at 01:07:50AM -0600, Matt Hull wrote:
> > SUBDIRS = src cli-fe @GTK@
>
> use Automake conditionals:
>
> SUBDIRS = src cli-fe
> if WITH_GTK
>   SUBDIRS += gtk
> endif
>
> See the Automake manual for details.
>
> Have a nice day,
>   Stepan
>




Re: makefile.am from --with-package option

2006-01-04 Thread Stepan Kasal
Hello,

On Wed, Jan 04, 2006 at 01:07:50AM -0600, Matt Hull wrote:
> SUBDIRS = src cli-fe @GTK@

use Automake conditionals:

SUBDIRS = src cli-fe
if WITH_GTK
  SUBDIRS += gtk
endif

See the Automake manual for details.

Have a nice day,
Stepan




makefile.am from --with-package option

2006-01-03 Thread Matt Hull
not sure if i sould post on autoconf or automake... sorry if i posted
wrong.

working on a hello world program.  it has the option to use gtk 1.2 or gtk
2.0 or nothing.

i think i got configure.in working, now i need to edit makefile.am.

if there the user selected --without-gtk, how do i edit the makefile.am so
that it doenst try to compile it ?

i found on google to do:

SUBDIRS = src cli-fe @GTK@

but if gtk isnt included in the makefile SUBDIRS then its not included in
the dist package.  how can i have the makefile not compile the gtk if not
selected and still be in the dist package ?

thanks

matt