gnome-utils autoconf mess and some patches



I was trying to compile gnome-utils 1.0.13 on Solaris, but configure
script didn't like my system at all. First, checking for sched_yield() failed.
On Solaris 2.6 that function is in libposix4, which was checked by the
configure script, but on Solaris 7 it was moved to librt, which was not
checked.

Then everything failed because Objective C compiler was not working.
Configure script passed CFLAGS to Objective C compiler, which is an
entirely wrong thing to do. Gcc couldn't grok cc flags, so it screamed
and died in pains. As far as I could see, there was no environment
variable or anything else which would specify flags only for Objective C
compiler. This is a bug. Besides, configure script should not stop if
the Objective C compiler was not working.

So, second try, without CFLAGS specified. Objective C compiler failed
because sched_yield() was not linked in the executable.

Third try with LIBS="-lrt"... but the configure script doesn't pass LIBS
to Objective C compiler when it's checking it. Bad configure.

Fourth try, with LDFLAGS="-lrt". Worked this time, but I got:

configure: warning: Could not find the obGnomeConf.sh file that is generated by gnome-objc install

Of course it wasn't installed. README file didn't mention it. It only says
I needed gnome-libs and gnome-guile. Going on without gnome-objc to see
what happens... BTW, Sun's C compiler doesn't like Guile's include
files. So the check "whether guile works" fails. Beautiful.

If I was using g++ as C++ compiler, I would have needed different LDFLAGS
for it. I don't see how I could achieve that. I don't know if this is
autoconf bug or something else, but assuming that LDFLAGS and LIBS would
be the same for different compilers (and different programs in the tarball)
is somewhat extreme.

Anyway, I was finally allowed to type make, so the patches are below.
While compiling gdialog stuff, incremental linker was utterly confused,
because several files include dialog.h which has function definitions
in it, so the poor thing didn't know how to handle two object files
with the same function in it. I normally disable incremental linker
when I'm compiling programs which I intend to install, but the configure
script didn't allow me to choose CFLAGS to my liking. Ah, well...
make CFLAGS=-xildoff. Then the normal linker didn't want to link, because,
for example:

ld: fatal: symbol `mouse_open' is multiply defined:
           (file checklist.o and file yesno.o);

Include files should really contain prototypes only. Hacks like this
are not exactly the world's most appealing things...
Back to the top level Makefile, remove gdialog from the targets. I could
live without it, I suppose.

The funny thing is that C++ compiler and Objective C compiler were never
invoked. All that trouble for nothing? Hmmm... There isn't a single file
ending with .m in the tarball, so it really looks like there are no
Objective C sources. And there are no .C or .cpp files either. Strange...


--- ghex/main.c.orig	Mon Sep 20 23:13:28 1999
+++ ghex/main.c	Mon Sep 20 23:13:51 1999
@@ -140,7 +140,7 @@
 		}
 		gnome_uri_list_free_strings (list);
 		break;
-	default:
+	default:break;
 	}
 }
 
--- gsearchtool/gsearchtool.c.orig	Mon Sep 20 23:14:47 1999
+++ gsearchtool/gsearchtool.c	Mon Sep 20 23:16:13 1999
@@ -94,6 +94,7 @@
 				g_warning(_("grep options found in find list bad bad!"));
 				break;
 			default:
+				break;
 			}
 		}
 	}
@@ -149,6 +150,7 @@
 				g_warning(_("grep options found in find list bad bad!"));
 				break;
 			default:
+				break;
 			}
 		}
 	}
@@ -376,6 +378,7 @@
 		opt->data.time=empty_str;
 		break;
 	default:
+		break;
 	}
 }
 
@@ -420,6 +423,7 @@
 		gtk_box_pack_start(GTK_BOX(option),w,TRUE,TRUE,0);
 		break;
 	default:
+		break;
 	}
 	gtk_container_add(GTK_CONTAINER(frame),option);
 
--- gstripchart/gstripchart.c.orig	Mon Sep 20 23:17:04 1999
+++ gstripchart/gstripchart.c	Mon Sep 20 23:18:56 1999
@@ -1589,7 +1589,11 @@
     {
       Param *p = chart_glob.parray[n];
       char val_str[100], top_str[100];
-      char *row_strs[] = { _(p->ident), val_str, top_str };
+      char *row_strs[3];
+
+      row_strs[0] = _(p->ident);
+      row_strs[1] = val_str;
+      row_strs[2] = top_str;
       hi_lo_fmt(p->top, top_str, p->val[chart_glob.new_val], val_str);
       gtk_clist_append(GTK_CLIST(txt), row_strs);
       gtk_clist_set_foreground(GTK_CLIST(txt), n, &p->gdk_color);
--- mini-utils/guname/info.c.orig	Mon Sep 20 23:20:42 1999
+++ mini-utils/guname/info.c	Mon Sep 20 23:21:23 1999
@@ -214,7 +214,7 @@
 {
   FILE * f;
   static const gint bufsize = 80;
-  gchar buffer[bufsize + 1];
+  gchar buffer[81];
   gint chars_read;
   int i = 0;
 
--- mini-utils/gw/gw.c.orig	Mon Sep 20 23:22:08 1999
+++ mini-utils/gw/gw.c	Mon Sep 20 23:22:41 1999
@@ -289,7 +289,7 @@
   gchar * token;
   gint col = 0;
   static const gint bufsize = 255;
-  gchar buffer[bufsize+1]; /* For a single line */
+  gchar buffer[256]; /* For a single line */
   FILE * f;
   gchar * returned;
 
@@ -332,7 +332,7 @@
   gint col;
   gchar ** row_text; 
   static const gint bufsize = 255;
-  gchar buffer[bufsize+1]; /* For a single line */
+  gchar buffer[256]; /* For a single line */
   FILE * f;
   gchar * returned;
   gint total_width;



-- 
 .-.   .-.    Life is a sexually transmitted disease.
(_  \ /  _)
     |        dave@srce.hr
     |        dave@fly.srk.fer.hr



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