From xemacs-m  Wed Jun 18 03:17:04 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id DAA18823
	for <xemacs-beta@xemacs.org>; Wed, 18 Jun 1997 03:17:04 -0500 (CDT)
Received: from Eng.Sun.COM ([129.146.1.25]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id BAA12541; Wed, 18 Jun 1997 01:38:14 -0700
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id BAA27172; Wed, 18 Jun 1997 01:16:34 -0700
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id BAA20197; Wed, 18 Jun 1997 01:16:33 -0700
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id BAA02672; Wed, 18 Jun 1997 01:16:32 -0700
Date: Wed, 18 Jun 1997 01:16:32 -0700
Message-Id: <199706180816.BAA02672@xemacs.eng.sun.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: jaeger@informatik.uni-kl.de
Cc: xemacs-beta@xemacs.org
Subject: Build Success 20.3b7 "Oslo" - with one problem
In-Reply-To: <m0wduFc-0001oEC@arthur.rhein-neckar.de>
References: <m0wduFc-0001oEC@arthur.rhein-neckar.de>
X-Mailer: VM 6.32 under 20.3 "Moscow" XEmacs Lucid (beta6)
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>

>>>>> "aj" == Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:

aj> After removing the definition of GETPGRP_NEEDS_ARG in
aj> src/s/linux.h (see my mail about the definition of _BSD_SOURCE which
aj> is defined at the wrong place) "Oslo" compiled without further
aj> problems.

The whole point of using autoconf is to have it auto-detect such
things as whether getpgrp takes an arg.  I have changed the sources to
ignore any definition of GETPGRP_NEEDS_ARG or GETPGRP_NO_ARG in the
header files.  Death to s&m!

Regarding #define _BSD_SOURCE :
this seems completely bogus to me.  XEmacs is basically a
standards-abiding ANSI-POSIX application (with willingness to use
available extensions), and Linux is alleged to be
basically a POSIX-compliant OS.  _BSD_SOURCE implies that we favor BSD 
over POSIX, a mistake IMO.  Let's fix the code so that it's not
necessary.  We should use _GNU_SOURCE (the default).  See /usr/include/features.h.

If something like compface really needs _BSD_SOURCE, we can always do
something like:

#undef _BSD_SOURCE
#define _BSD_SOURCE
#include <compface.h>
#undef _BSD_SOURCE

I really think we should try as hard as possible to avoid BSDisms.

aj> My system: i486, Linux 2.0.30-pre2, glibc 2.1 snapshot, X11R6.3 (XFree
aj> 3.3).

aj> The linking stage in src-lib looks strange to me:

aj> gcc -O3 -g -Demacs -I../src  -DHAVE_CONFIG_H -I/usr/local/include -I/usr/X11R6/include  /mnt/xemacs/xemacs-20.3-betaXX/lib-src/movemail.c /mnt/xemacs/xemacs-20.3-betaXX/lib-src/pop.c  -L/usr/local/lib -L/usr/X11R6/lib -lgpm -lncurses -lm  -o movemail
aj> gcc -O3 -g -Demacs -I../src  -DHAVE_CONFIG_H -I/usr/local/include -I/usr/X11R6/include /mnt/xemacs/xemacs-20.3-betaXX/lib-src/fakemail.c  -L/usr/local/lib -L/usr/X11R6/lib -lgpm -lncurses -lm -o fakemail

aj> The programs are linked against libncurses, libgpm and libm since
aj> lib-src/Makefile has:
aj> ld_libs_general=-lgpm -lncurses -lm

aj> I don't think that these libraries are needed in general.

This is really painful to autodetect.  How come gnu ld can't figure
out which libraries are not needed and provide a flag to not reference
them in the resulting object file?

Martin

