Hello!

Having gtk-2.22.1 here, and a wrapper script 'gtk-config' to emulate the gtk-1 
script:
  #!/bin/sh
  exec pkg-config gtk+-2.0 $(printf "%s" "$*" | sed s:--version:--modversion:)

This basically allows to build mico with gtk support even with gtk-2.

However, "checking for GTK version >= 0.99.7" fails here with recent gcc due to 
bugs in the check:

> checking for gtk-config... 
> /var/tmp/portage/net-misc/mico-9999/work/helpers/gtk-config
> checking for GTK - version >= 0.99.7... no
> *** Could not run GTK test program, checking why...
> *** The test program compiled, but did not run. This usually means
> *** that the run-time linker is not finding GTK or finding the wrong
> *** version of GTK. If it is not finding GTK, you'll need to set your
> *** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
> *** to the installed location  Also, make sure you have run ldconfig if that
> *** is required on your system
> ***
> *** If you have an old version installed, it is best to remove it, although
> *** you may also be able to get things to work by modifying LD_LIBRARY_PATH
> ***
> *** If you have a RedHat 5.0 system, you should remove the GTK package that
> *** came with the system with the command
> ***
> ***    rpm --erase --nodeps gtk gtk-devel
> configure: WARNING: cannot find gtk-config. GTK parts disabled

And in config.log:

> configure:7270: checking for GTK - version >= 0.99.7
> configure:7356: x86_64-pc-linux-gnu-g++ -o conftest -Wall -Wwrite-strings 
> -pthread -O2 -pipe -fno-strict-aliasing -D_REENTRANT -D_GNU_SOURCE -pthread 
> -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 
> -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/libdrm    
> -pthread -Wl,-O1 -Wl,--as-needed conftest.cpp  -pthread -lgtk-x11-2.0 
> -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 
> -lgdk_pixbuf-2.0 -lm -lcairo -lpng14 -lpango-1.0 -lfreetype -lfontconfig 
> -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   >&5
> conftest.cpp: In function 'int main()':
> conftest.cpp:26:31: error: 'system' was not declared in this scope
> conftest.cpp:30:12: error: 'exit' was not declared in this scope
> conftest.cpp:51:32: warning: comparison between signed and unsigned integer 
> expressions [-Wsign-compare]
> conftest.cpp:52:32: warning: comparison between signed and unsigned integer 
> expressions [-Wsign-compare]
> conftest.cpp:52:63: warning: comparison between signed and unsigned integer 
> expressions [-Wsign-compare]
> conftest.cpp:53:32: warning: comparison between signed and unsigned integer 
> expressions [-Wsign-compare]
> conftest.cpp:53:64: warning: comparison between signed and unsigned integer 
> expressions [-Wsign-compare]
> conftest.cpp:53:96: warning: comparison between signed and unsigned integer 
> expressions [-Wsign-compare]
> configure:7356: $? = 1
> configure: program exited with status 1
> configure: failed program was:
> ...
> configure:7374: result: no

Please find the attached patch that fixes these errors and warnings.

Thank you!

/haubi/
-- 
Michael Haubenwallner
Gentoo on a different level

Recent gcc is more strict against undeclared function calls
like system() and exit(), breaking gtk version check.
--- aclocal.m4.orig     2011-05-25 16:55:15.609086191 +0200
+++ aclocal.m4  2011-05-25 16:55:22.999136294 +0200
@@ -765,6 +765,7 @@
       AC_TRY_RUN([
 #include <gtk/gtk.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 int 
 main ()
 {
-  int major, minor, micro;
+  guint major, minor, micro;
 
   system ("touch conf.gtktest");
 
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Mico-devel mailing list
Mico-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mico-devel

Reply via email to