Can't compile gpa, getting error in make

Miguel Coca e970095@zipi.fi.upm.es
Tue Jun 4 11:39:02 2002


--PuGuTyElPB9bOcsM
Content-Type: multipart/mixed; boundary="3uo+9/B/ebqu+fSQ"
Content-Disposition: inline


--3uo+9/B/ebqu+fSQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jun 03, 2002 at 07:31:56PM +0200, Peter Gerwinski wrote:
> Stefan Beckers wrote:
> > I tried to compile gpa 0.5.0 but make exits. Here is what it says:
> > [...]
> > gpa.c:124: `G_FILE_TEST_EXISTS' undeclared (first use in this function)
>=20
> You need a newer version of GLIB (1.3+).

I've managed to compile GPA 0.5.0 under GNU/Linux (Debian Woody, to be
exact), and it just doesn't work out of the box. As you say, you need GLib
1.3 (actually, right now it makes more sense to require 2.0, since that's
the stable release), but the configure script still sets it up to use 1.2.

After fixing that (requires GTK 2.0: I don't think it makes sense to use
different versions of GTK and GLib, although GPA needs GTK 1.2 compatibility
with GTK_ENABLE_BROKEN), it turns out that two Win32 specific libraries
(-lwsock32 and -liberty) are hard-coded into the src/Makefile.am

After removing those, it seems to compile and run allright, as far as I can
tell. I attach a patch with my changes, although I'm sure this isn't the
perfect way to do it, this has been tested to at least compile on Linux and
as far as I can tell, it should also compile under Mingw32 (I don't have=20
access to a working installation right now, it would be good if someone
tried it).

Mostly, what I've done is removing the hardcoded libraries and turned them
into tests in configure, as well as upgrading to GTK+ 2.0.

Maybe I'm the only one finding these problems, but I thought it might help.

By the way, several months ago I offered my help to port GPA to Gpgme.
However at the time Gpgme lacked the needed key management functions, and it
looked like GPA development was dead. Right now it seems that has changed
somewhat. So, if there is any interest, and someone could point me to the
right place to start, I could try to work on it (although at the moment I'm
a bit overwhelmed with exams, so don't expect a lot of progress for the next
three weeks).

I do have experience on GTK programming, and am willing to sign assignments
to the FSF if needed (they already have a program of mine).

Cheers,
--=20
Miguel Coca                                         e970095@zipi.fi.upm.es
PGP Key 0x27FC3CA8                         http://zipi.fi.upm.es/~e970095/

--3uo+9/B/ebqu+fSQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=gpa-config-patch
Content-Transfer-Encoding: quoted-printable

--- gpa-0.5.0.orig/configure.ac	Tue Feb 26 00:05:56 2002
+++ gpa-0.5.0/configure.ac	Mon Jun  3 23:31:28 2002
@@ -32,7 +32,9 @@
 ])
 AM_MAINTAINER_MODE
=20
-
+dnl Check for libraries
+AC_CHECK_LIB(m, sin)
+AC_CHECK_LIB(z, compress)
=20
 dnl
 dnl Setup some stuff depending on host/target.
@@ -54,6 +56,8 @@
                   [because the Unix gettext has too much overhead on
                    MingW32 systems and these systems lack Posix functions,
                    we use a simplified version of gettext])
+	AC_CHECK_LIB(wsock32, connect)
+	AC_CHECK_LIB(iberty, getopt_long)
         GPG=3D'c:\\gnupg\\gpg.exe'
         ;;
     *)
@@ -109,12 +113,10 @@
 fi
=20
 dnl Where is the GTK+ toolkit
-AM_PATH_GTK(1.2.1,
+AM_PATH_GTK_2_0(2.0.0,
             [LIBS=3D"$LIBS $GTK_LIBS"
-            CFLAGS=3D"$CFLAGS $GTK_CFLAGS"],
-            AC_MSG_ERROR(Cannot find GTK+: Is gtk-config in executable pat=
h ?))
-
-
+            CFLAGS=3D"$CFLAGS $GTK_CFLAGS -DGTK_ENABLE_BROKEN"],
+            AC_MSG_ERROR(Cannot find GTK+ 2.0))
=20
 dnl
 dnl Checks for header files
--- gpa-0.5.0.orig/src/Makefile.am	Sun Feb 24 12:11:30 2002
+++ gpa-0.5.0/src/Makefile.am	Mon Jun  3 23:05:14 2002
@@ -11,7 +11,7 @@
 bin_PROGRAMS =3D gpa
=20
 INCLUDES =3D -I$(top_srcdir)/jnlib -I$(top_srcdir)/gpapa	-I$(top_srcdir)/i=
ntl
-LDADD =3D -L ../gpapa -lgpapa -L ../jnlib -ljnlib @INTLLIBS@ -lm -lz -lwso=
ck32 -liberty
+LDADD =3D -L ../gpapa -lgpapa -L ../jnlib -ljnlib @INTLLIBS@
=20
 gpa_SOURCES =3D gpa.c gpa.h i18n.h options.h \
 	      keysmenu.c keysmenu.h	    \

--3uo+9/B/ebqu+fSQ--

--PuGuTyElPB9bOcsM
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8/IrdjE3Htif8PKgRAnFKAJ4g2Glo0G0DBT/BXn6jB31pUzGFJgCeKNCm
GtyC+mIR5lQhvgQhCj9PixQ=
=++Kk
-----END PGP SIGNATURE-----

--PuGuTyElPB9bOcsM--