[gtkada] GTKAda GPL 2012 built on Mac OS X, patch proposal.

Pascal p.p14 at orange.fr
Mon Jul 9 21:44:02 CEST 2012


Hello, I wish build GTKAda with opengl and debug on Mac OSX.

For opengl I use configure with options:
--with-GL=GL --with-GL-prefix=/usr/X11
but it failed in tesgtk thus I patch Makefile.in:

--- ./testgtk/Makefile.in.0	2011-03-13 19:00:52.000000000 +0100
+++ ./testgtk/Makefile.in	2012-07-08 08:42:32.000000000 +0200
@@ -21,6 +21,7 @@
 
 ifeq ($(HAVE_OPENGL),True)
 OPENGL_C_OBJECTS=lw.o
+OPENGL_FLAGS=-I/usr/X11/include
 OPENGL_LIBS= @GL_LIBS@
 GTKADA_GL_LIBS=-lgtkada_gl
 else
@@ -42,7 +43,7 @@
 	  opengl/view_gl.gpb opengl/view_gl.adb
 
 lw.o: opengl/lw.c opengl/lw.h
-	$(CC) -c opengl/lw.c -Iopengl @GTK_CFLAGS@
+	$(CC) -c opengl/lw.c -Iopengl $(OPENGL_FLAGS) @GTK_CFLAGS@
 
 install: force
 	$(MKDIR) "${DESTDIR}$(examples)"

For debug I use configurewith option:
--enable-build=Debug
but the optimizer is still on which may be a drawback. Isn't it?
Thus I patch shared.gpr and testgtk.gpr:

--- ./shared.gpr.0	2012-05-18 10:04:34.000000000 +0200
+++ ./shared.gpr	2012-07-07 19:13:46.000000000 +0200
@@ -17,7 +17,7 @@
       case Build is
          when "Debug" =>
              for Default_Switches ("Ada") use
-                ("-gnatQ", "-gnatwae", "-gnatay", "-g", "-O1");
+                ("-gnatQ", "-gnatwae", "-gnatay", "-g", "-O0");
          when "Production" =>
              for Default_Switches ("Ada") use
                 ("-gnatQ", "-O2", "-gnatn", "-gnatws");
--- ./testgtk/testgtk.gpr.0	2012-05-18 10:04:35.000000000 +0200
+++ ./testgtk/testgtk.gpr	2012-07-08 08:48:29.000000000 +0200
@@ -16,7 +16,7 @@
 
    package Compiler is
       for Default_Switches ("Ada") use
-         ("-gnatQ", "-gnatwa", "-gnatay3abcefhiklmnprt", "-g", "-O1");
+         ("-gnatQ", "-gnatwa", "-gnatay3abcefhiklmnprt", "-g", "-O0");
    end Compiler;
 
    package Binder   renames Shared.Binder;

Then now all works fine.
Does those patch apply to other platform?

HTH, Pascal.
http://blady.pagesperso-orange.fr




More information about the gtkada mailing list