Re: Patches for Solaris and separate compilation



davidk@lysator.liu.se (David Kågedal) writes:
> Balsa creates header files in the build directory, and since my build
> directory is not the same as my source directory, I had to add it to
> the include path.
> 
> Index: balsa/libbalsa/Makefile.am
> ===================================================================
> RCS file: /cvs/gnome/balsa/libbalsa/Makefile.am,v
> retrieving revision 1.10
> diff -u -r1.10 Makefile.am
> --- Makefile.am	1998/08/13 01:15:26	1.10
> +++ Makefile.am	1998/08/20 15:26:12
> @@ -9,5 +9,5 @@
>  
>  libbalsa_a_LIBADD = @LIBOBJS@
>  
> -INCLUDES=-I. -I${top_srcdir}/src -I${top_srcdir}/libmutt \
> +INCLUDES=-I. -I${top_srcdir}/src -I${top_srcdir}/libmutt -I${top_builddir}/libmutt -I$(top_srcdir) \
>  	$(GNOME_INCLUDEDIR)
> 

Looks OK.
 
> sys_errlist was not in any header file I could find, but it worked to
> just declare it.  This probably needs a better solution.

Yep.  balsa/configure.in should look for `strerror'.

> Index: balsa/libmutt/protos.h
> ===================================================================
> RCS file: /cvs/gnome/balsa/libmutt/protos.h,v
> retrieving revision 1.6
> diff -u -r1.6 protos.h
> --- protos.h	1998/08/12 22:57:41	1.6
> +++ protos.h	1998/08/20 15:26:12
> @@ -317,11 +317,11 @@
>  #ifndef HAVE_STRERROR
>  #ifndef STDC_HEADERS
>  extern int sys_nerr;
> -extern char *sys_errlist[];
>  #endif
>  
>  #define strerror(x) ((x) > 0 && (x) < sys_nerr) ? sys_errlist[(x)] : 0
>  #endif /* !HAVE_STRERROR */
> +extern char *sys_errlist[];
>  
>  /* AIX doesn't define these in any headers (sigh) */
>  int strcasecmp (const char *, const char *);
> 
> Again, I had to fix the include path.  This is a little ugly, but it
> is caused by header files being in both the source and build
> directories, and also by the fact that the mutt header files are
> included both using <mutt.h> and <libmutt/mutt.h>.

Looks OK.
 
> There was a symbol (some obstack function) used, which wasn't in
> libc.  I found it in libiberty, and added -liberty to balsa_LDADD.

Not totally portable.  I think I'll add obstacks to gnomesupport.

> Index: balsa/src/Makefile.am
> ===================================================================
> RCS file: /cvs/gnome/balsa/src/Makefile.am,v
> retrieving revision 1.28
> diff -u -r1.28 Makefile.am
> --- Makefile.am	1998/08/12 00:53:50	1.28
> +++ Makefile.am	1998/08/20 15:26:12
> @@ -16,7 +16,7 @@
>  	save-restore.c		\
>  	sendmsg-window.c
>  
> -INCLUDES=-I. -I${top_srcdir}/libbalsa -I${top_srcdir}/libmutt $(GNOME_INCLUDEDIR)
> +INCLUDES=-I. -I$(top_srcdir) -I../libmutt -I$(top_srcdir)/libbalsa -I${top_srcdir}/libmutt $(GNOME_INCLUDEDIR)
>  
>  balsa_LDADD = \
>  	$(top_builddir)/libbalsa/libbalsa.a \
> @@ -25,4 +25,5 @@
>  	$(GNOME_LIBDIR) \
>  	$(GNOMEUI_LIBS) \
>  	$(GTKXMHTML_LIBS) \
> -	$(INTLLIBS)
> +	$(INTLLIBS)\
> +	-liberty
> 
> MKINSTALLDIRS already has the right path.
> 
> Index: gnome-admin/gxsnmp/po/Makefile.in.in
> ===================================================================
> RCS file: /cvs/gnome/gnome-admin/gxsnmp/po/Makefile.in.in,v
> retrieving revision 1.1
> diff -u -r1.1 Makefile.in.in
> --- Makefile.in.in	1998/05/08 09:10:39	1.1
> +++ Makefile.in.in	1998/08/20 15:27:01
> @@ -26,7 +26,7 @@
>  
>  INSTALL = @INSTALL@
>  INSTALL_DATA = @INSTALL_DATA@
> -MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
> +MKINSTALLDIRS = @MKINSTALLDIRS@
>  
>  CC = @CC@
>  GENCAT = @GENCAT@

OK.
 
> builddir/sourcedir fix for control-center
> 
> Index: gnome-core/control-center/Makefile.am
> ===================================================================
> RCS file: /cvs/gnome/gnome-core/control-center/Makefile.am,v
> retrieving revision 1.2
> diff -u -r1.2 Makefile.am
> --- Makefile.am	1998/08/12 18:51:57	1.2
> +++ Makefile.am	1998/08/20 15:27:05
> @@ -29,4 +29,4 @@
>  
>  $(CORBA_SRCLIST): control-center.idl
>  	orbit-idl $(srcdir)/control-center.idl
> -main.c: $(CORBA_SRCLIST)
> +$(srcdir)/main.c: $(CORBA_SRCLIST)

Doesn't look right.  Are you using GNU make?  I think I'd fixed it by
adding CORBA_SRCLIST to BUILT_SOURCES.
 
> Use strrchr instead of rindex.  This is just a workaround using a
> define.  The hardcoded path names are changed too...

Should probably be edited s/rindex/strrchr/g.
 
> @@ -190,8 +192,8 @@
>          gtk_signal_connect( GTK_OBJECT (retval),"tree_select_row", GTK_SIGNAL_FUNC (selected_row_callback), NULL);
>  
>          /*hard_coded for now... */
> -        global_node = read_directory ("/home/jrb/gnomedevel/test1");
> -        user_node = read_directory ("/home/jrb/gnomedevel/test2");
> +        global_node = read_directory ("/home/davidk/src/gnome/cc-test1");
> +        user_node = read_directory ("/home/davidk/src/gnome/cc-test2");

Yuck.

- 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]