[gnet-dev] Patch for glib-2.0



On Sat, 2001-11-10 at 18:57, Ross Golder wrote:
> Hi,
> 
> I've created a patch which allows gnet to compile under both glib-1.2
> and glib-2.0 (plus fixes a few minor things). Shall I commit?
> 
> --
> Ross
> 

And here it is :o)

To compile under glib-1.2, just switch the comments around in
configure.in. I could make this a '--with-glib1' switch or something, I
guess.

--
Ross
? gnet-glib2.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnet/ChangeLog,v
retrieving revision 1.125
diff -u -r1.125 ChangeLog
--- ChangeLog	2001/11/09 19:44:38	1.125
+++ ChangeLog	2001/11/10 18:56:27
@@ -1,3 +1,13 @@
+Sat Nov 10 18:37:01 2001  Ross Golder  <ross golder org>
+
+	* configure.in: Switched to using PKG_CHECK_MODULES to
+	    pick up glib flags (now glib2 friendly).
+	* Makefile.am: Added glib flags. Reinstated distribution of
+	    gnet.spec file for 'rpm -t[ab] gnet-x.y.z.tar.gz'.
+	* src/Makefile.am: Added glib flags.
+	* src/gnet.h: Replaced depracated GUTILS_C_VAR definition
+	* src/inetaddr.h: Commented out argument to #endif.
+
 Fri Nov  9 14:44:09 2001  David Helder  <dhelder umich edu>
 
 	* configure.in: Check for lib socket (Needed in SunOS 5.8?)
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/gnet/Makefile.am,v
retrieving revision 1.15
diff -u -r1.15 Makefile.am
--- Makefile.am	2001/10/25 15:01:35	1.15
+++ Makefile.am	2001/11/10 18:56:27
@@ -6,7 +6,7 @@
 
 EXTRA_DIST=TODO HACKING BUGS  README.macosx gnetconfig.h.in \
 	README.win32 GNET.DSP config.h.win32 gnet.def gnet.m4 \
-	gnet.spec.in \
+	gnet.spec gnet.spec.in \
 	debian/README.Debian debian/changelog debian/control.in \
 	debian/copyright debian/dirs debian/docs debian/libgnet1.1* \
 	debian/rules.in
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnet/configure.in,v
retrieving revision 1.31
diff -u -r1.31 configure.in
--- configure.in	2001/11/09 19:44:38	1.31
+++ configure.in	2001/11/10 18:56:28
@@ -143,13 +143,19 @@
 # Check for libraries
 
 # Need GLIB
-AM_PATH_GLIB(1.2.0,
-            [LIBS="$LIBS $GLIB_LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS"],
-            AC_MSG_ERROR(Cannot find GLIB: Is glib-config in path?))
-
-glib_cflags=`$GLIB_CONFIG --cflags glib`
-glib_libs=`$GLIB_CONFIG --libs glib`
-
+dnl AM_PATH_GLIB_2_0([1.3.9],,,[gmodule gthread])
+dnl PKG_CHECK_MODULES(GLIB, glib)
+PKG_CHECK_MODULES(GLIB, glib-2.0)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+dnl PKG_CHECK_MODULES(GMODULE, gmodule)
+PKG_CHECK_MODULES(GMODULE, gmodule-2.0)
+AC_SUBST(GMODULE_CFLAGS)
+AC_SUBST(GMODULE_LIBS)
+dnl PKG_CHECK_MODULES(GTHREAD, gthread)
+PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
+AC_SUBST(GTHREAD_CFLAGS)
+AC_SUBST(GTHREAD_LIBS)
 
 # Need network libraries
 AC_CHECK_LIB(socket, main)
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/gnet/src/Makefile.am,v
retrieving revision 1.10
diff -u -r1.10 Makefile.am
--- src/Makefile.am	2001/10/23 14:46:20	1.10
+++ src/Makefile.am	2001/11/10 18:56:29
@@ -2,7 +2,8 @@
 
 @SET_MAKE@
 
-INCLUDES = -DG_LOG_DOMAIN=\"GNet\" @GNET_DEBUG_FLAGS@
+INCLUDES = -DG_LOG_DOMAIN=\"GNet\" @GNET_DEBUG_FLAGS@ \
+	$(GLIB_CFLAGS)
 
 gnetincludedir = $(includedir)/gnet
 
@@ -12,7 +13,8 @@
 
 libgnet_la_LDFLAGS = \
 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-	-release $(LT_RELEASE)
+	-release $(LT_RELEASE) \
+	$(GLIB_LIBS)
 
 libgnet_la_SOURCES = 		\
 	gnet.c			\
Index: src/gnet.h
===================================================================
RCS file: /cvs/gnome/gnet/src/gnet.h,v
retrieving revision 1.14
diff -u -r1.14 gnet.h
--- src/gnet.h	2001/10/23 14:46:20	1.14
+++ src/gnet.h	2001/11/10 18:56:29
@@ -48,7 +48,7 @@
 #ifdef GNET_WIN32
 #  define GNET_EXPORT extern __declspec(dllimport)
 #else
-#  define GNET_EXPORT GUTILS_C_VAR
+#  define GNET_EXPORT extern
 #endif
 
 GNET_EXPORT const guint gnet_major_version;
Index: src/inetaddr.c
===================================================================
RCS file: /cvs/gnome/gnet/src/inetaddr.c,v
retrieving revision 1.33
diff -u -r1.33 inetaddr.c
--- src/inetaddr.c	2001/11/09 19:43:23	1.33
+++ src/inetaddr.c	2001/11/10 18:56:35
@@ -2111,7 +2111,7 @@
 }
 
 
-#else GNET_WIN32		/* Windows specific version */
+#else /* GNET_WIN32 Windows specific version */
 
 GList* 
 gnet_inetaddr_list_interfaces (void)
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/gnome/gnet/tests/Makefile.am,v
retrieving revision 1.7
diff -u -r1.7 Makefile.am
--- tests/Makefile.am	2001/10/18 02:22:56	1.7
+++ tests/Makefile.am	2001/11/10 18:56:36
@@ -4,7 +4,9 @@
 
 EXTRA_DIST = makefile.mingw
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = \
+	-I$(top_srcdir)/src \
+	$(GLIB_CFLAGS)
 
 # Automatic tests
 TESTS = url_test


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