Re: *.h files not found in obgtk and obgnome



Christopher Blizzard <blizzard@appliedtheory.com> writes:
> Soren Harward wrote:
> > I'm having a problem compiling 'gpostit' from gnome-utils and 'gulp' from
> > gnome-admin.  Here's the dump:
> > 
> > Making all in gulp
> > make[2]: Entering directory `/home/gnomecvs/gnome-admin/gulp'
> > gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -I/usr/local/include
> > -DNEED_GNOMESUPPORT_H -I/usr/local/lib/gnome-libs/include
> > -I/usr/X11R6/include -I/usr/local/lib/glib/include -I/usr/local/include
> > -I/usr/X11R6/include -I/usr/local/lib/glib/include -I/usr/local/include -g
> > -O2 -c gulp.m
> > 
> > [etc...]
> > 
> > Did I forget something (I already installed gnome-objc), or is this a bug?
> > 
> 
> Odds are that you're running redhat 5.1.  The problem is that the gcc
> that ships with RedHat doesn't do objc, you have to use egcs.  I've
> already "fixed" this for the gnome-objc packages.
> 
> If some automake genius can fix this it would be good.  :)

The best way is to go into the Makefile.am of each program compiled with
Objective C, remove any rules like

	SUFFIXES = .m
	.m.o:
		$(COMPILE) -c $<

and replace it with:

#-----------------------------------------------------------------------------
## Rules similar to `automake 1.2f' for building ObjC files, with dependencies
SUFFIXES = .m

OBJCFLAGS = $(CFLAGS)
OBJCCOMPILE = $(OBJC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(OBJCFLAGS)
LTOBJCCOMPILE = $(LIBTOOL) --mode=compile $(OBJCCOMPILE)

# ** This has to be called `LINK', not `OBJCLINK'
LINK = $(LIBTOOL) --mode=link $(OBJC) $(OBJCFLAGS) $(LDFLAGS) -o $@

gen_deps_o = @MAINT@-Wp,-MD,.deps/$(*F).P
gen_deps_lo = @MAINT@-Wp,-MD,.deps/$(*F).p

.m.o:
        $(OBJCCOMPILE) $(gen_deps_o) -c $<

.m.lo:
        $(LTOBJCCOMPILE) $(gen_deps_lo) -c $<
        @MAINT@@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
        @MAINT@ < .deps/$(*F).p > .deps/$(*F).P
        @MAINT@@-rm -f .deps/$(*F).p
#-----------------------------------------------------------------------------

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



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