From: Duncan C. <dun...@us...> - 2004-07-26 12:15:03
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24664 Modified Files: ChangeLog configure.in Makefile Log Message: add gconf to build. cleanup hierarchy.list and the prog that processes it. no longer use cpp over hierarchy.list. detect gtk versions in configure make TypeGenerator work with hierarchical module names. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.181 retrieving revision 1.182 diff -u -d -r1.181 -r1.182 --- ChangeLog 24 Jul 2004 02:31:05 -0000 1.181 +++ ChangeLog 26 Jul 2004 12:14:46 -0000 1.182 @@ -1,5 +1,43 @@ 2004-07-24 Duncan Coutts <du...@co...> + * configure.in: use relative $(TOP) variable rather than absolute $TOP + variable, so Makefiles use relative paths. Add test for gconf package. + Test for particular versions of gtk API. + + * Makefile: add gconf to list of dirs to build + + * tools/hierarchyGen/hierarchy.list: add GConf object. + Remove preprocessor annotations, build classes conditionally using + tags like 'gtk-2.4'. Remove unnecessary annotations by taking advantage + of changes in the TypeGenerator. + + * tools/hierarchyGen/TypeGen.hs: be a bit cleverer with dealing with + type prefixes, less hard coded knowledge of Gtk types. No not require + _get_type annotations when they can be worked out automatically. Allow + tags like 'gtk-2.4'. Extra command line option to specify module name. + + * tools/callbackGen/gtkmarshal.list: add callback spec needed by gconf + + * sourceview/Makefile: do not run cpp over hierarchy.list + + * mk/config.mk.in: remove absolute path TOP variable. Add gconf flags. + Add gtk version check flags. + + * gtk/Makefile: do not run cpp over hierarchy.list. Add gtk-2.x tags + conditional on appropriate config flags. + + * c2hs/chs/CHS.hs: parse hierarchical module names ok. + + * c2hs/base/syntax/Parsers.hs, c2hs/c/CParser.hs: Manuel Chakravarty's + patch to fix the space leak I found. c2hs runs much faster now. + + * gconf/Makefile, gconf/System/Gnome/GConf.hs, + gconf/System/Gnome/GConf/GConfClient.chs, + gconf/System/Gnome/GConf/GConfValue.chs: new binding to GConf config + system. Uses hierarchical module names. + +2004-07-24 Duncan Coutts <du...@co...> + * gtk/glib/GError.chs, gtk/abstract/FileChooser.chs: spelling fix propogateGError to propagateGError Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Makefile 7 May 2004 16:40:01 -0000 1.28 +++ Makefile 26 Jul 2004 12:14:46 -0000 1.29 @@ -23,7 +23,7 @@ endif ifeq ($(strip $(ENABLE_GNOME)),yes) -MAKE_LIBS += sourceview +MAKE_LIBS += sourceview gconf endif MAKE_LIBS += mogul Index: configure.in =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.in,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- configure.in 5 May 2004 16:16:19 -0000 1.36 +++ configure.in 26 Jul 2004 12:14:46 -0000 1.37 @@ -200,7 +200,7 @@ dnl suite in-place. AC_ARG_WITH(pkgconf, [ --with-pkgconf=pkg.conf use another package.conf file for building in-place], - [LOCALPKGCONF=$withval],[LOCALPKGCONF=$TOP/localpackage.conf]) + [LOCALPKGCONF=$withval],[LOCALPKGCONF='$(TOP)/localpackage.conf']) dnl Check for pkg-config which holds information about all Gtk related dnl libraries. @@ -263,9 +263,15 @@ PKG_CHECK_MODULES(LIBGLADE,[libglade-2.0 >= 2.0.0]) fi if test x$ENABLE_GNOME = xyes; then + PKG_CHECK_MODULES(GCONF,[gconf-2.0 >= 2.0.0]) PKG_CHECK_MODULES(SOURCEVIEW,[gtksourceview-1.0 >= 0.6.0]) fi +dnl Some APIs only appeared in later versions of libraries, so check if we're +dnl using later than particular versions. +GTK_VERSION_2_2=`$PKG_CONFIG gtk+-2.0 --atleast-version=2.2 && echo yes || echo no` +GTK_VERSION_2_4=`$PKG_CONFIG gtk+-2.0 --atleast-version=2.4 && echo yes || echo no` + dnl The configuration program for GTK is kind of stupid in that it dnl lists directories which don't exist. ghc-pkg in ghc 5.04 or greater dnl does not like that, so we need to filter out non-existent directories. @@ -326,6 +332,26 @@ esac; done; +TMPGCONF_CFLAGS=$GCONF_CFLAGS; +GCONF_CFLAGS=; +for FLAG in $TMPGCONF_CFLAGS; do + case $FLAG in + -I*) DIR=`echo $FLAG | $SED "s/-I//"`; + if test -d $DIR; then GCONF_CFLAGS="$GCONF_CFLAGS -I$DIR"; fi;; + *) GCONF_CFLAGS="$GCONF_CFLAGS $FLAG";; + esac; +done; +TMPGCONF_LIBS=$GCONF_LIBS; +GCONF_LIBS=; +for FLAG in $TMPGCONF_LIBS; do + case $FLAG in + -L*) DIR=`echo $FLAG | $SED "s/-L//"`; + if test -d $DIR; then GCONF_LIBS="$GCONF_LIBS -L$DIR"; fi;; + *) GCONF_LIBS="$GCONF_LIBS $FLAG";; + esac; +done; + + dnl Have a special marshall list (available in the source tree of Gtk+ under dnl gtk/gtkmarshal.list) @@ -334,7 +360,7 @@ [ --with-mlist=GTK-SOURCE use special marshall list from GTK+ sources], [MARSHALLDEFS=$withval; AC_MSG_RESULT($withval)], - [MARSHALLDEFS=$TOP/tools/callbackGen/gtkmarshal.list; + [MARSHALLDEFS='$(TOP)/tools/callbackGen/gtkmarshal.list'; AC_MSG_RESULT(built-in)]) @@ -383,7 +409,7 @@ if test $BUILT_IN_C2HS = yes; then AC_MSG_RESULT([built-in]) dnl Use the local c2hs. - C2HS=$TOP/c2hs/c2hs; + C2HS='$(TOP)/c2hs/c2hs'; MULTIPLE_CHS=yes; dnl These are the settings needed to compile c2hs. @@ -528,6 +554,9 @@ dnl AC_SUBST(GTK_MAJOR_VERSION) dnl AC_SUBST(GTK_MINOR_VERSION) dnl AC_SUBST(GTK_MICRO_VERSION) +AC_SUBST(GTK_VERSION_2_2) +AC_SUBST(GTK_VERSION_2_4) +dnl Optional packages AC_SUBST(ENABLE_OPENGL) AC_SUBST(ENABLE_LIBGLADE) AC_SUBST(ENABLE_GNOME) @@ -535,6 +564,8 @@ AC_SUBST(SOURCEVIEW_LIBS) AC_SUBST(LIBGLADE_CFLAGS) AC_SUBST(LIBGLADE_LIBS) +AC_SUBST(GCONF_CFLAGS) +AC_SUBST(GCONF_LIBS) dnl Documentation AC_SUBST(BUILDDOCS) AC_SUBST(XSLTTRANS) |