On Fri, 24 Jul 2009 12:13:44 +0300, Serge wrote:

Hi,

>It just won't compile. Problem was in
>geany-plugins-0.17.1/geanygdb/src/gdb-ui-main.c, there we have include
>line,
>
>> #include <elf.h>
>
>and my openbsd system does not have that file.
>
>After an hour or so I found these structs in other include file, called
>elf_abi.h; so then I change 'include <elf.h>' to 'include <elf_abi.h>'
>and everything's now just fine.
>
>I don't know how to trick this in 'configure' script, so there isn't
>any patches attached. Hope you know how to fix it.

Attached is a possible solution for the Waf build system. I'm not sure
whether it's the best approach or whether there might be some better
checks. But in theory it should work.

Please note that the support for the autotools based build system is
still missing, it seems it misses even the check for elf.h. Chow,
Dominic, it'd be cool if you could have a look.

Dominic, if you like the attached changes, take them, otherwise ignore
them :).

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
Index: geany-plugins/geanygdb/src/gdb-ui-main.c
===================================================================
--- geany-plugins/geanygdb/src/gdb-ui-main.c	(revision 864)
+++ geany-plugins/geanygdb/src/gdb-ui-main.c	(working copy)
@@ -9,7 +9,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
-#include <elf.h>
 #include <gtk/gtk.h>

 #include "gdb-io.h"
@@ -17,6 +16,13 @@

 #include "support.h"

+#ifdef HAVE_ELF_H
+# include <elf.h>
+#elif defined(HAVE_ELF_ABI_H)
+# include <elf_abi.h>
+#else
+# error Missing Elf header
+#endif


 GdbUiSetup gdbui_setup;
Index: geany-plugins/wscript
===================================================================
--- geany-plugins/wscript	(revision 865)
+++ geany-plugins/wscript	(working copy)
@@ -67,9 +67,7 @@ plugins = [
 	Plugin('codenav', None, [ 'codenav/src' ]),
 	Plugin('geanylatex', None, [ 'geanylatex/src']),
 	Plugin('geanylipsum', None, [ 'geanylipsum/src']),
-	Plugin('geanysendmail',
-		[ 'geanysendmail/src/geanysendmail.c' ],
-		[ 'geanysendmail/src' ]),
+	Plugin('geanysendmail', None, [ 'geanysendmail/src' ]),
 	Plugin('geanyvc', None, [ 'geanyvc/src/'], [ [ 'gtkspell-2.0', '2.0', False ] ]),
 	Plugin('shiftcolumn', None, [ 'shiftcolumn/src']),
 	Plugin('spellcheck', None, [ 'spellcheck/src' ], [ [ 'enchant', '1.3', True ] ]),
@@ -80,7 +78,7 @@ plugins = [
 		   'gdb-ui-frame.c',  'gdb-ui-locn.c', 'gdb-ui-main.c',
 		   'geanydebug.c']), # source files
 		 [ 'geanygdb', 'geanygdb/src' ], # include dirs
-		 [ [ 'elf.h', '', True ] ]
+		 [ [ 'elf.h', '', False ], [ 'elf_abi.h', '', False ] ]
 		 ),
 	Plugin('geanylua',
 		 [ 'geanylua/geanylua.c' ], # the other source files are listed in build_lua()
@@ -250,7 +248,10 @@ def configure(conf):
 							enabled_plugins.remove(p.name)

 	if 'geanygdb' in enabled_plugins:
-		conf.define('TTYHELPERDIR', conf.env['LIBEXECDIR'] + '/geany-plugins/geanygdb', 1)
+		if not conf.env['HAVE_ELF_H'] and not conf.env['HAVE_ELF_ABI_H']:
+			enabled_plugins.remove('geanygdb')
+		else:
+			conf.define('TTYHELPERDIR', conf.env['LIBEXECDIR'] + '/geany-plugins/geanygdb', 1)

 	# Windows specials
 	if is_win32:

Attachment: pgp42y9BAbzO0.pgp
Description: PGP signature

_______________________________________________
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to