Instructions to compile fileutils-3.9 on IBM RT running AIX-2.2.1

0) Prerequisites: you need gzip and patch.

1) Get fileutils-3.9.tar.gz from you favorite ftp site for GNU softwares
(for example prep.ai.mit.edu:/pub/gnu).

2) Unarchive fileutils-3.9 and go into this directory.

3) Copy fileutils.diff here.

4) Apply the patch (patch < fileutl39.diff)

5) Read README and INSTALL.

6) Under csh, issue the command
	(setenv CC cc ; setenv CFLAGS "-O -DNO_MODE_T"; configure)

7) Run make and make install

This patch is brought to you by Mark Whetzel (markw@airgun.wg.waii.com).


Francois Normant (fn@mathappl.polymtl.ca).
---------------------------------------------------------------------------


I have been porting the GNU fileutils-3.9 to the IBM PC RT
running AIX V2.2.1, and have found the following problems, and I have
included context diffs to correct the problems with compiling on that 
version of AIX.  I have tested the 'df' command extensively, but I have 
not tested the other utilities as much.


./configure

1) Does not recognize properly that AIX V2 requires the mntctl,
   and vmount facilities, in a similar fashion to IBM AIX V3 on the
   Risc System/6000.

2) Configure finds the AIX V2 on the IBM RT has a <stdlib.h>, but there
   is a problem with the RT version.  If it is included multiple times,
   compile errors will result from multiply defined structs.
   I changed the place where it was being included to only include
   it once if the RT envionment is detected (AIX is defined by the
   RT compiler)

./Makefile

1) No way to propogate the 'CFLAGS' parameter from out of the
   top level Makefile, except at configure time, not at make time..
   I.E   make CFLAGS=-O  will not be propogated to lower makefiles
   (at least on the RT with its standard supplied make command).
   I DID discover that 'CFLAGS' in the envrionment PRIOR to the
   configure did work however.

2) No way to specifiy the needed define 'NO_MODE_T' needed for compiling
   the library routine 'filemode.c'.  Override of DEFS with environment,
   does not work in a similar fashion to 'CFLAGS'.
   Mabey this should be discovered in 'configure' above.
   I had to hand edit the lib/Makefile to include the -DNO_MODE_T flag.

./lib/system.h

1) Changed to detect AIX envrioment, and let stdlib.h define the
   utimbuf stuct.  Also skip multiple includes of stdlib.h to correct
   for lame stdlib.h that is included on AIX/RT.

./lib/mountlist.c

1) Added code to understand how to type the AIX V2 RT filesystems, and
   include the needed headers instead of <fshelp.h> which does NOT
   exist on AIX V2 on the RT.  The REST of the vmount code operates
   in an identical fashion to AIX V3 on the RS6000.


Source code modules changed:
./configure
./lib/mountlist.c
./lib/system.h


-- 
Mark Whetzel     My comments are my own, not my company's.
Western Geophysical - A division of Western Atlas International,
A Litton/Dresser Company           DOMAIN addr: markw@airgun.wg.waii.com
VOICE: (713) 963-2544		   UUNET address:  uunet!airgun!markw
