Fri 28 May 2004 01:01:01 PM UTC, original submission:
From: Michael Schloh von Bennewitz <michael.schloh@cw.com>
In screen-4.0.2, configure attempts to detect if it is being run on a
Solaris platform. This test fails, because it checks for a 'SVR4' identifier
at buildtime. Compilers on Solaris consistently define '__sun' and '__SVR4'
identifiers, so it's probably best to try to compile a small program using
those. The configure.in distributed with screen comes close, but not
close enough (see attached patch).
A more important problem involves a call to 'setenv(3)' on platforms which
the configure script has determined to have a 'setenv(3)' system call
available. Newer versions of Solaris (like Solaris 10) do have setenv(3) and
configure thus detects it. Unfortunately setenv(3) will be called with two
parameters, although the setenv(3) distributed with Solaris 10 specifies
three parameters. My patch fixes this by checking for the presence of
Solaris before calling setenv(3), just as already done when checking for the
presence of Linux. Here's my environment, and how I'm building screen on
around 20 different platforms:
Compiler: GCC 3.4.0
CPPFLAGS: None
CFLAGS: -O2 -pipe
Make: GNU Make 3.80
LDFLAGS: None
$ ./configure --prefix=/opkg --with-sys-screenrc=/opkg/etc/screen/screenrc --enable-colors256 --disable
-socket-dir --disable-locale
[...]
$make -j4
[...]
By the way, the patch I've attached only corrects configure.in and misc.c
(the source containing the problem reference to setenv(3)). Should you
choose to integrate these changes to a future distribution you'll need to
run autoconf of course, to regenerate the configure script which will only
then have the corresponding (and correct) tests for __SVR4 and __sun.
Our comprehensive patch for screen (with 'configure' as well) is available
http://cvs.openpkg.org/rlog?f=openpkg-src/screen/screen.patch
|