From xemacs-m  Wed Jan 22 04:08:57 1997
Received: from tarragon-et.co.uk (c1-1.tarragon-et.co.uk [194.216.137.1])
          by xemacs.org (8.8.4/8.8.4) with SMTP
	  id EAA04330 for <xemacs-beta@xemacs.org>; Wed, 22 Jan 1997 04:08:53 -0600 (CST)
Received: by tarragon-et.co.uk (8.6.10/200.15.1.2)
	id KAA28907; Wed, 22 Jan 1997 10:08:23 GMT
Sender: ijw@tarragon-et.co.uk
To: xemacs-beta@xemacs.org
Subject: xemacs 20.0-beta building on DG/UX Intel (long, gory)
From: Ian Wells <I.Wells@tarragon-et.co.uk>
Date: 22 Jan 1997 10:08:23 +0000
Message-ID: <u5u3oa3tuw.fsf@bob.tarragon-et.co.uk>
Lines: 448
X-Mailer: Gnus v5.2.25/XEmacs 19.14

Apologies if this duplicates other people's work and reports, but I
find I can't keep up with the traffic in this list, so I've just
mailed all the things I found.  Apologies also for the lack of patches
in this, but I'm afraid my first priority was to get XEmacs running on
our new machine before I have to start work on it...

In order to get xemacs 20b31 running on our DG/UX for Intel (which
differs from the most recent supported DG/UX in several ways) I've
changed the following:
dgux5-4r4.h - this is an extension of dgux5-4r3.h.  It's difficult to
know whether this is right, since the version number in uname has
given up reporting on the major version (5.4) and now only reports the
minor half (R4.11MU02, where the MU is 'maintenance upgrade' and
probably doesn't affect things).  The changes appear to be a SysV'ing
of the libraries (-lsocket -lnsl is required, and -lg doesn't exist)
plus a few minor changes to the use of some functions (see the diffs
below).  I've also removed the setting of processor type in aviion.h -
(a) it's not used anywhere in emacs, and (b) it's no longer right, so
dependencies on it wouldn't work anyway.  However, the compiler sets
m88k when appropriate.

I also got 20.0b90 running (eventually, since I couldn't get the b31
to b90 patches to work -- 19MB takes a long while to fetch from the
wrong side of the Atlantic...), but found a problem with src/Makefile:
the objs macro contains another macro, which expands to "", but with
my make, doing obj_src = $(objs:.o=.c) translates this "" to ".c" -
and it then tries to make the ".c" file using a nonexistent ".y" file
and complaining when it can't, giving a completely bizarre error.  I
can't give you a patch for this, cos I todged the Makefile rather than
fixing the configure system.

Finally, there seems to be a bug in the lib-src/update-elc.sh script:

lisp_prog='(when (featurep (quote mule)) (message "yes"))'
if test -z `$REAL -batch -no-site-file -eval "$lisp_prog" 2>&1` ; then
  ignore_dirs="$ignore_dirs mule"
fi

won't work - the `$REAL ... ` should be "`$REAL ...`", or else test
complains because it's run as test -z (i.e. short of an argument).

I haven't got diffs for the config files, but the change is
  i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
in the machine selection section - this now picks up on the uname
output properly.  (I don't understand or care to follow the
intricacies of the autoconf system, so I just altered the 'configure'
script; I'm sure, judging by the number of configure.* files, that
there's more to it than this.)

The new file dgux5-4r4.h contains:
/* Definitions file for GNU Emacs running on Data General's DG/UX
   version 5.4 Release 4.00 and above.
   Copyright (C) 1994 Free Software Foundation, Inc.

This file is part of GNU Emacs.

GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */

/* Synched up with: FSF 19.31. */

#include "dgux5-4r3.h"

/* wait() is better off not operating as a struct.  Things go a bit pear. */
#undef _BSD_WAIT_FLAVOR

/* Some things won't compile for me with these (in dgux.h): */
#undef setpgrp
/*#undef getpgrp*/

/* Symbols missing - I suspect this is the culprit... */
#define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen

/* Prevent use of a (non-existent) debugging library. */
#define LIBS_DEBUG


and the diffs for aviion.h are


*** aviion-old.h        Sun Jun  2 09:13:06 1996
--- aviion.h    Tue Jan 21 17:17:22 1997
***************
*** 37,45 ****
     Ones defined so far include vax, m68000, ns16000, pyramid,
     orion, tahoe, APOLLO and many others */
  
! #ifndef m88k
! #define m88k
! #endif
  
  /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
     the bit field into an int.  In other words, if bit fields
--- 37,45 ----
     Ones defined so far include vax, m68000, ns16000, pyramid,
     orion, tahoe, APOLLO and many others */
  
! /*#ifndef m88k*/
! /*#define m88k*/
! /*#endif*/
  
  /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
     the bit field into an int.  In other words, if bit fields

-----
Output from configure:
unknown:/mnt/20/ijw/xemacs-20.0-b90: $ ./configure --site-includes=/usr/local/include --site-libraries=/usr/local/lib --site-libraries=/usr/local/lib/X11 --extra-verbose --error-checking=none --debug=no --cflags=-O
- You did not tell me what kind of host system you want to configure.
- I will attempt to guess the kind of system this is.
- Looks like this is a i586-dg-dguxR4.11MU02
checking for ln -s
        setting LN_S to ln -s
checking the configuration name
checking for gcc
        setting CC to gcc
checking how to run the C preprocessor
        setting CPP to gcc -E
        setting RANLIB to ranlib
checking for a BSD compatible install
        setting INSTALL to /mnt/20/ijw/xemacs-20.0-b90/install.sh -c
        setting INSTALL_PROGRAM to ${INSTALL}
        setting INSTALL_DATA to ${INSTALL} -m 644
checking for bison
checking for byacc
checking for AIX
checking for mach/mach.h
conftest.c:2: mach/mach.h: No such file or directory
checking for sys/stropts.h
        defining HAVE_SYS_STROPTS_H
checking for sys/timeb.h
        defining HAVE_SYS_TIMEB_H
checking for sys/time.h
        defining HAVE_SYS_TIME_H
checking for unistd.h
        defining HAVE_UNISTD_H
checking for utime.h
        defining HAVE_UTIME_H
checking for sys/wait.h
        defining HAVE_SYS_WAIT_H
checking for libintl.h
conftest.c:2: libintl.h: No such file or directory
checking for locale.h
        defining HAVE_LOCALE_H
checking for libgen.h
        defining HAVE_LIBGEN_H
checking for linux/version.h
conftest.c:2: linux/version.h: No such file or directory
checking for kstat.h
conftest.c:2: kstat.h: No such file or directory
checking for sys/pstat.h
conftest.c:2: sys/pstat.h: No such file or directory
checking for ANSI C header files
        defining STDC_HEADERS
checking for whether time.h and sys/time.h may both be included
        defining TIME_WITH_SYS_TIME
checking for sys_siglist declaration in signal.h or unistd.h
conftest.c: In function `t':
conftest.c:8: `sys_siglist' undeclared (first use this function)
conftest.c:8: (Each undeclared identifier is reported only once
conftest.c:8: for each function it appears in.)
checking for struct utimbuf
        defining HAVE_STRUCT_UTIMBUF
checking for return type of signal handlers
        defining RETSIGTYPE to be void
checking for struct timeval
        defining HAVE_TIMEVAL
checking for struct tm in time.h
checking for tm_zone in struct tm
conftest.c: In function `t':
conftest.c:7: structure has no member named `tm_zone'
checking for tzname
        defining HAVE_TZNAME
checking for lack of working const
checking byte ordering
checking for long file names
        defining HAVE_LONG_FILE_NAMES
checking for -xildoff compiler flag
checking for specified window system
  No window system specified.  Looking for X11.
checking for X include and library files with xmkmf
  Using X11.
examining the machine- and system-dependent files to find out
 - which libraries the lib-src programs will want, and
 - whether the GNU malloc routines are usable.
checking for -ldnet
UX:ld: ERROR:  fatal error: library not found: -ldnet
checking for -lkstat
UX:ld: ERROR:  fatal error: library not found: -lkstat
checking for -lXbsd
UX:ld: ERROR:  fatal error: library not found: -lXbsd
checking for -lpthreads
UX:ld: ERROR:  fatal error: library not found: -lpthreads
checking for XFree86
        no
checking for -lX11
        yes
checking for -lXau
        defining HAVE_XAUTH
checking for -lDtSvc
UX:ld: ERROR:  fatal error: library not found: -lDtSvc
checking for -lDnd
UX:ld: ERROR:  fatal error: library not found: -lDnd
checking the version of X11 being used
        defining THIS_IS_X11R5
checking for X11/Xlocale.h
        defining HAVE_X11_XLOCALE_H
checking for -lm
        defining HAVE_LIBM
checking for -lXpm
        defining HAVE_XPM
checking for -lXmu
        defining HAVE_XMU
checking for compface.h
checking for -lcompface
        defining HAVE_XFACE
        defining HAVE_GIF
checking for jpeglib.h
conftest.c:2: jpeglib.h: No such file or directory
checking for png.h
conftest.c:2: png.h: No such file or directory
checking for -lXm
        Found Motif
        defining HAVE_MENUBARS
        defining HAVE_SCROLLBARS
        defining HAVE_DIALOGS
        defining LWLIB_MENUBARS_LUCID
        defining LWLIB_SCROLLBARS_LUCID
        defining LWLIB_DIALOGS_MOTIF
checking for declaration of h_errno in netdb.h
        defining HAVE_H_ERRNO
checking for sigsetjmp
        defining HAVE_SIGSETJMP
checking whether localtime caches TZ
checking whether cross-compiling
        no
checking for whether gettimeofday can't accept two arguments
        no
checking for whether inline functions are supported
        defining HAVE_INLINE
checking for working alloca.h
        defining HAVE_ALLOCA_H
checking for alloca
        defining HAVE_ALLOCA
checking for pid_t in sys/types.h
checking for vfork.h
conftest.c:2: vfork.h: No such file or directory
checking for working vfork
checking for strcoll
        defining HAVE_STRCOLL
checking size of short
        defining SIZEOF_SHORT to be 2
checking size of int
        defining SIZEOF_INT to be 4
checking size of long
        defining SIZEOF_LONG to be 4
checking for acosh
        defining HAVE_ACOSH
checking for asinh
        defining HAVE_ASINH
checking for atanh
        defining HAVE_ATANH
checking for cbrt
        defining HAVE_CBRT
checking for closedir
        defining HAVE_CLOSEDIR
checking for dup2
        defining HAVE_DUP2
checking for eaccess
        defining HAVE_EACCESS
checking for fmod
        defining HAVE_FMOD
checking for fpathconf
        defining HAVE_FPATHCONF
checking for frexp
        defining HAVE_FREXP
checking for ftime
        defining HAVE_FTIME
checking for gethostname
        defining HAVE_GETHOSTNAME
checking for getpagesize
        defining HAVE_GETPAGESIZE
checking for gettimeofday
        defining HAVE_GETTIMEOFDAY
checking for getcwd
        defining HAVE_GETCWD
checking for getwd
        defining HAVE_GETWD
checking for logb
        defining HAVE_LOGB
checking for lrand48
        defining HAVE_LRAND48
checking for matherr
        defining HAVE_MATHERR
checking for mkdir
        defining HAVE_MKDIR
checking for mktime
        defining HAVE_MKTIME
checking for perror
        defining HAVE_PERROR
checking for poll
        defining HAVE_POLL
checking for random
        defining HAVE_RANDOM
checking for realpath
        defining HAVE_REALPATH
checking for rename
        defining HAVE_RENAME
checking for res_init
Undefined                       first referenced
 symbol                             in file
res_init                            /var/tmp/cca004gJ1.o
UX:ld: ERROR: conftest: fatal error: Symbol referencing errors. No output written to conftest
checking for rint
        defining HAVE_RINT
checking for rmdir
        defining HAVE_RMDIR
checking for select
        defining HAVE_SELECT
checking for setitimer
        defining HAVE_SETITIMER
checking for setpgid
        defining HAVE_SETPGID
checking for setlocale
        defining HAVE_SETLOCALE
checking for setsid
        defining HAVE_SETSID
checking for sigblock
        defining HAVE_SIGBLOCK
checking for sighold
        defining HAVE_SIGHOLD
checking for sigprocmask
        defining HAVE_SIGPROCMASK
checking for strcasecmp
Undefined                       first referenced
 symbol                             in file
strcasecmp                          /var/tmp/cca004iR1.o
UX:ld: ERROR: conftest: fatal error: Symbol referencing errors. No output written to conftest
checking for strerror
        defining HAVE_STRERROR
checking for tzset
        defining HAVE_TZSET
checking for utimes
        defining HAVE_UTIMES
checking for waitpid
        defining HAVE_WAITPID
checking for mmap
        defining HAVE_MMAP
checking for socket
checking for netinet/in.h
checking for arpa/inet.h
        defining HAVE_SOCKETS
checking for sun_len member in struct sockaddr_un
conftest.c: In function `t':
conftest.c:6: structure has no member named `sun_len'
checking for dirent.h
        defining SYSV_SYSTEM_DIR
checking how to do terminal I/O
checking for termios.h
        defining HAVE_TERMIOS
checking for nlist.h
        defining NLIST_STRUCT
checking for -lncurses
UX:ld: ERROR:  fatal error: library not found: -lncurses
checking for -ldb
UX:ld: ERROR:  fatal error: library not found: -ldb
checking for dbopen
Undefined                       first referenced
 symbol                             in file
dbopen                              /var/tmp/cca004kW1.o
UX:ld: ERROR: conftest: fatal error: Symbol referencing errors. No output written to conftest
checking for -lgdbm
UX:ld: ERROR:  fatal error: library not found: -lgdbm
checking for -ldbm
        defining HAVE_LIBDBM
        defining HAVE_DBM
        defining EMACS_VERSION to be 20.0-b90
        defining EMACS_CONFIGURATION to be "i586-dg-dguxR4.11MU02"
        defining config_machfile to be "m/aviion.h"
        defining config_opsysfile to be "s/dgux5-4r4.h"
        defining LD_SWITCH_X_SITE to be 
        defining LD_SWITCH_X_SITE_AUX to be 
        defining C_SWITCH_X_SITE to be 
        defining LD_SWITCH_SITE to be  -L/usr/local/lib/X11
        defining C_SWITCH_SITE to be  -I/usr/local/include
        defining UNEXEC_SRC to be unexelf.c
        defining HAVE_X_WINDOWS
        defining GNU_MALLOC
        defining REL_ALLOC
        defining LISP_FLOAT_TYPE
        defining LWLIB_USES_MOTIF
        defining HAVE_TOOLBARS
        defining HAVE_TTY
        defining USE_GCC
        defining CONST_IS_LOSING
        defining USE_ASSERTIONS
        defining NO_UNION_TYPE


Configured for `i586-dg-dguxR4.11MU02'.

  Where should the build process find the source code?    /mnt/20/ijw/xemacs-20.0-b90
  What installation prefix should install use?            /usr/local
  What operating system and machine description files should XEmacs use?
        `s/dgux5-4r4.h' and `m/aviion.h'
  What compiler should XEmacs be built with?              gcc -O
  Should XEmacs use the GNU version of malloc?            yes
  Should XEmacs use the relocating allocator for buffers? yes
  What window system should XEmacs use?                   x11
  Additional header files:                                /usr/local/include
  Additional libraries:                                   /usr/local/lib/X11
  Compiling in support for XAUTH.
  Compiling in support for XPM.
  Compiling in support for X-Face headers.
  Compiling in support for GIF image conversion.
  Compiling in support for DBM.
  Using the Lucid menubar.
  Using the Lucid scrollbar.
  Using the Motif dialog boxes.


creating config.status
creating Makefile
creating lib-src/Makefile.in
creating src/Makefile.in
creating lwlib/Makefile.in
creating dynodump/Makefile.in
creating src/config.h
creating src/Makefile
creating lwlib/Makefile
creating lib-src/Makefile
creating dynodump/Makefile

-- 
Ian Wells                                           Tel. +44 1223 323336
Tarragon Embedded Technology Ltd., Cambridge, UK    Fax  +44 1223 323337

