Hi Matt,

* Matt Hull wrote on Mon, Jan 09, 2006 at 10:30:03PM CET:
> hi, thanks for your patience with my questions and sorry for posting on
> the wrong list.

No problem.  It's not always easy for new users to know which is the
right one.  If your mailer allows it, it would be helpful though if you
replied to mails, so that references are kept.  Not much of an issue
either, though.

> i am trying to use a top level configure script in ./ with all sources in
> ./src and ./src/gtk2
> 
> directory :
> -----------
> src/main.c
> src/gtk1/gtk1.c
> 
> makefile.am :
> -------------
> bin_PROGRAMS = mine
> mine_SOURCES = src/main.c
> 
> if WITH_GTK1
>       mine_sources += src/gtk2/gtk1.c src/gtk2/gtk1.h

This should be mine_SOURCES.  Case is important.

> endif
> 
> DIST_SUBDIRS = src src/gtk1 src/gtk2

> [EMAIL PROTECTED] ~/mine-0.0.9 $ aclocal -I aclocal.include/ && autoheader && 
> autoconf && automake && ./configure && make
> automake: makefile.am: not supported: source file `src/main.c' is in 
> subdirectory

I believe you use aclocal/automake from Automake-1.4.x.  This is a very
old version.  Please update to a new one, current is 1.9.6, but anything
above 1.5 should support sources in subdirectories.  If you use a
distribution, you should just be able to install a newer package.

> if i change mine_SOURCES = src/main.c to mine_SOURCES = main.c :
> 
> [EMAIL PROTECTED] ~/mine-0.0.9 $ aclocal -I aclocal.include/ && autoheader && 
> autoconf && automake && ./configure && make

> make: *** No rule to make target `main.c', needed by `main.o'.  Stop.

That's to be expected.

Another note: you may want to use the Automake option subdir-objects.
Again, with newer Automake versions, you can stick that into the first
argument of AM_INIT_AUTOMAKE in configure.ac if you use the new form of
that and AC_INIT, or you can stick it into each Makefile.am as
  AUTOMAKE_OPTIONS = subdir-objects

Please also see the corresponding Automake documentation about this, you
should likely also use AM_PROG_CC_C_O after AC_PROG_CC then.

Cheers,
Ralf


Reply via email to