From: haedener@iacrs1.unibe.ch (Konrad Haedener)
Subject: Re: elm2.4, AIX
Reply-To: haedener@iacrs1.unibe.ch
Organization: University of Berne
Date: Fri, 9 Oct 1992 16:20:36 GMT

In article <1992Oct9.104230.28204@newssrv.edvz.univie.ac.at>, tom@bim.itc.univie.ac.at (Tom Kovar) writes:
|> syd@DSI.COM (Syd Weinstein) writes:
|> : The hints in the readme file, are left over from an earlier version
|> : of AIX, are what AIX users sent to me.
|> : 
|> : So, AIX people, provide me with a new set of intructions for 2.4
|> : for the README file, and I'll replace them.
|> 
|>   All you need now is just to specify during the Configure-run, that you
|> need -U__STR__ as compiler parameter for cc. In all other questions you can
|> take the defaults. Surprising as it is, it compiles and runs. (btw., mind
|> my first posting about the change of line 40 in curses.c)

Have you come across lock files yet? Your default lock directory is set
by Configure to /usr/spool/uucp, which is owned by uucp.uucp, mode 0755; 
elm is setgid mail, but not setuid root and hence won't put lock files in your
lock directory (unless you change the protection of /usr/spool/uucp or
create /usr/spool/locks, which is actually Configure's first choice, but not
present on a virgin AIX 3.2 system).

|> 
|>   --- so far the reply to Syd. And now some small remarks:
|> 
|>   It has been stated here, that you need -lcurses instaed of -ltermcap; which
|> is actually not true. I am running with -ltermcap, and am quite satisfied;

`TERM=vt220; export TERM' and you will know the difference (that is with
/etc/termcap in place, of course :-)

|> but attention - I have already seen AIX systems, where the file /etc/termcap
|> was missing - in that case, -ltermcap won't work, right. (Even if AIX docu
|> states something else). All you need in this case is to copy /etc/termcap
|> from any other machine (needn't be AIX either). Using termcap is, in my
|> eyes at least, much simpler and transparenter than other terminal control
|> methods - well, I am biassed in favour of bsd... :-)

I don't think that access to the terminal information database could be more
transparent to the elm _user_ than it is now; as a _user_ I don't care what
elm has been linked against, my criterion is: is my terminal supported or
is it not. Using -ltermcap, vt220 is not supported (.. by the system-delivered
version of /etc/termcap; if anybody is interested in duplicating the 
information in terminfo, feel free). I just find it simpler to link against
curses :-)

|>   For those who do not find any other solution, I put my /etc/termcap onto
|> ftp.itc.univie.ac.at:/pub/AIX.
|> 
|>   Have fun,
|> 								Tom

Since all our fuzz about `Re: elm2.4, AIX' is really about Configure
(apart from the patch provided by Tom, elm really runs unmodified under
AIX 3.2), I suggest that something like the following be placed in
README, at least until Configure has learnt do deal better with this
Unix flavor:
=-=-=-=-=-=-=-=-=-=-
To install elm 2.4pl0 under AIX 3.2, patch the untarred distribution with
the following set of patches before running Configure. Apart from the first
fix (due to Tom Kovar, <tom@bim.itc.univie.ac.at>), changes are applied to
the Configure script to assist it in coping with the pecularities of AIX
and not to the elm source which is portable in itself. This was tested under
AIX 3.2.1+ with xlc 1.2.0.13, but plain 3.2 and 1.2.0.0 should work as well.
Be sure to `chmod u+w' Configure before trying to patch and follow the 
directions of the script.

*** src/curses.c	Sat Oct  3 23:58:48 1992
--- src/curses.c	Mon Oct  5 20:40:45 1992
***************
*** 37,43 ****
  
  #ifdef TERMIOS
  #  include <termios.h>
! # if __convex__
  #  include <sys/ioctl.h>	/* non-standard, for TIOCGWINSZ */
  # endif
  #else
--- 37,43 ----
  
  #ifdef TERMIOS
  #  include <termios.h>
! # if defined(__convex__) || defined(_AIX)
  #  include <sys/ioctl.h>	/* non-standard, for TIOCGWINSZ */
  # endif
  #else
*** Configure	Sat Oct  3 23:12:32 1992
--- Configure	Fri Oct  9 13:31:22 1992
***************
*** 230,239 ****
  large=''
  huge=''
  optimize=''
! ccflags=''
  cppflags=''
  ldflags=''
! cc=''
  libs=''
  nametype=''
  d_passnames=''
--- 230,239 ----
  large=''
  huge=''
  optimize=''
! ccflags='-U__STR__'
  cppflags=''
  ldflags=''
! cc='cc'
  libs=''
  nametype=''
  d_passnames=''
***************
*** 859,864 ****
--- 859,869 ----
  	: null
      else
  	echo "Nor is it Venix..."
+         echo
+         if $test "$uname_os" = "AIX" ; then
+             echo "You're running AIX, a terrific OS. Congratulations!"
+             echo "Use the default compiler and link options..."
+         fi
      fi
      echo "exit 1" >venix
  fi
***************
*** 1080,1085 ****
--- 1085,1091 ----
      fi
      ;;
  esac
+ dflt=y
  echo "Does your /etc/passwd file keep full names in Berkeley/V7 format (name first"
  $echo $n "thing after ':' in GCOS field)? [$dflt] $c"
  rp="Berkeley/V7 format full name? [$dflt]"
***************
*** 2051,2058 ****
  
  if $test -d /usr/spool/locks ; then
      lock_dir=/usr/spool/locks
! elif $test -d /usr/spool/uucp ; then
!     lock_dir=/usr/spool/uucp
  elif $test -d /var/spool/locks ; then
      lock_dir=/var/spool/locks
  elif $test -d /var/spool/uucp ; then
--- 2057,2064 ----
  
  if $test -d /usr/spool/locks ; then
      lock_dir=/usr/spool/locks
! elif $test -d /usr/spool/mail ; then
!     lock_dir=/usr/spool/mail
  elif $test -d /var/spool/locks ; then
      lock_dir=/var/spool/locks
  elif $test -d /var/spool/uucp ; then
***************
*** 4151,4157 ****
  	fi
  	case "$ans" in
  	/usr/lib*|/usr/ccs/lib*|/lib*)
! 	    termlib='-ltermcap'
  	    d_havetlib="$define"
  	    echo "Termcap library found."
  	    ;;
--- 4157,4163 ----
  	fi
  	case "$ans" in
  	/usr/lib*|/usr/ccs/lib*|/lib*)
! 	    termlib='-lcurses'
  	    d_havetlib="$define"
  	    echo "Termcap library found."
  	    ;;
=-=-=-=-=-=-=-=-=-=-

This ends the thread for me.
-- 
Konrad Haedener                             Phone: +41 31 65 42 25
Institute for Physical Chemistry            FAX:   +41 31 65 44 99
University of Berne
Switzerland                                 haedener@iacrs1.unibe.ch
Newsgroups: comp.mail.elm