From hm@ix.de Wed Nov  1 22:02:06 1995
Return-Path: <hm@ix.de>
Received: from nathan (nathan.ix.de [192.54.43.58]) by idgie.ix.de (8.6.9/idgie_134) with SMTP 
          id VAA05711; Wed, 1 Nov 1995 21:59:21 +0100
Received: by nathan (Smail3.1.28.1 #4)
	id m0tAkEI-00002PC; Wed, 1 Nov 95 21:57 CET
Message-Id: <m0tAkEI-00002PC@nathan>
Subject: nas-1.2p2 for AIX
To: nas@ncd.com
Date: Wed, 1 Nov 1995 21:57:50 +0100 (CET)
From: Harald Milz <hm@nathan.ix.de>
Reply-To: hm@ix.de
X-Mailer: ELM [version 2.4 PL21]
Content-Type: text
Content-Length: 4314      
Status: RO

Hi,

being sick of the fact that nas-1.2p2 doesn't run on AIX 4.1.2 out of
the box, I patched the source to get at least the clients working. As
long as I don't have some audio output device on my 355, that's okay
for me.  The patch is a bad hack in some places, e.g. TOP is hardwired
to the current source directory (/usr/src/nas-1.2p2 in my case). I'm no
"make" guru, so someone may help me out. There should be a way.
$(CURRENT_DIR) doesn't work.

I didn't test all of the clients. auplay (the most important one for
me), auinfo, audial work fine. The other side was my Linux box at home,
running auvoxware and connected via IP over ISDN.

Here's my patch. RFC. 

--------------------------------- snip ---------------------------------

diff -cr nas-1.2p2/Imakefile nas-1.2p2-AIX/Imakefile
*** nas-1.2p2/Imakefile	Fri Jun  3 21:06:22 1994
--- nas-1.2p2-AIX/Imakefile	Wed Nov  1 20:27:54 1995
***************
*** 31,37 ****
  
     WORLDOPTS = -k
  
! SUBDIRS = include server lib clients doc
  
  MakeSubdirs($(SUBDIRS))
  DependSubdirs($(SUBDIRS))
--- 31,37 ----
  
     WORLDOPTS = -k
  
! SUBDIRS = include lib clients doc # server
  
  MakeSubdirs($(SUBDIRS))
  DependSubdirs($(SUBDIRS))
diff -cr nas-1.2p2/config/NetAudio.tmpl nas-1.2p2-AIX/config/NetAudio.tmpl
*** nas-1.2p2/config/NetAudio.tmpl	Tue Sep 27 17:51:26 1994
--- nas-1.2p2-AIX/config/NetAudio.tmpl	Wed Nov  1 21:24:30 1995
***************
*** 22,27 ****
--- 22,29 ----
   * $NCDId: @(#)NetAudio.tmpl,v 1.24 1994/09/27 16:51:26 greg Exp $
   */
  
+ _NULLCMD_ = ":"
+ 
  #if WantAutoSharedAudioLibrary
  #define NormalLibAudio          NormalLibX
  #define SharedLibAudio          SharedLibX
***************
*** 74,80 ****
  #endif
  #endif
  
!          AUSRC = $(TOP)/lib/audio
  
  #if SharedLibAudio
  /*
--- 76,83 ----
  #endif
  #endif
  
!         TOP = /usr/src/nas-1.2p2
!         AUSRC = $(TOP)/lib/audio
  
  #if SharedLibAudio
  /*
***************
*** 107,119 ****
  #else /* SunArchitecture */
  
  /* place #ifdef's for other architectures around these lines */
   LOCAL_LDFLAGS = _AuUse(-L$(USRLIBDIR), -L$(AUSRC) -L$(USRLIBDIR))
        DEPAULIB =
           AULIB = -laudio
  
  #endif /* SunArchitecture */
  
- 
  #else /* SharedLibAudio */
   LOCAL_LDFLAGS =
        DEPAULIB = _AuUseCat($(USRLIBDIR),$(AUSRC),/libaudio.a)
--- 110,123 ----
  #else /* SunArchitecture */
  
  /* place #ifdef's for other architectures around these lines */
+ #ifdef AIXArchitecture
   LOCAL_LDFLAGS = _AuUse(-L$(USRLIBDIR), -L$(AUSRC) -L$(USRLIBDIR))
        DEPAULIB =
           AULIB = -laudio
+ #endif
  
  #endif /* SunArchitecture */
  
  #else /* SharedLibAudio */
   LOCAL_LDFLAGS =
        DEPAULIB = _AuUseCat($(USRLIBDIR),$(AUSRC),/libaudio.a)
***************
*** 122,128 ****
  
    AUDIODEPLIBS = $(DEPAULIB) $(DEPXTOOLLIB) $(DEPXLIB)
       AUDIOLIBS = $(AULIB) $(XTOOLLIB) $(XLIB) -lm
!   BUILDINCROOT = $(TOP)/usr.include
     BUILDINCDIR = $(BUILDINCROOT)
  EXTRA_INCLUDES = -I$(BUILDINCROOT)
      INCLUDESRC = $(TOP)/usr.include
--- 126,132 ----
  
    AUDIODEPLIBS = $(DEPAULIB) $(DEPXTOOLLIB) $(DEPXLIB)
       AUDIOLIBS = $(AULIB) $(XTOOLLIB) $(XLIB) -lm
!   BUILDINCROOT = $(TOP)/usr.include 
     BUILDINCDIR = $(BUILDINCROOT)
  EXTRA_INCLUDES = -I$(BUILDINCROOT)
      INCLUDESRC = $(TOP)/usr.include
diff -cr nas-1.2p2/lib/audio/Alibint.c nas-1.2p2-AIX/lib/audio/Alibint.c
*** nas-1.2p2/lib/audio/Alibint.c	Fri Aug 12 19:17:04 1994
--- nas-1.2p2-AIX/lib/audio/Alibint.c	Wed Nov  1 21:09:58 1995
***************
*** 55,60 ****
--- 55,63 ----
  #ifdef SYSV	/* fd_set */
  #include <sys/socket.h>
  #endif
+ #ifdef _AIX
+ #include <sys/select.h>
+ #endif
  
  /* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
   * systems are broken and return EWOULDBLOCK when they should return EAGAIN
 
--------------------------------- snip ---------------------------------

BTW IBM had announced to support /dev/audio with the new Ultimedia
version coming with AIX 4.1.3. I couldn't verify this, but if this is
true, the Sun server may run on AIX.

Have fun!

Ciao,
hm

-- 
Harald Milz (hm@ix.de)   WWW: http://www.ix.de/ix/editors/hm.html
iX Multiuser Multitasking Magazine      phone +49 (511) 53 52-377
Helstorfer Str. 7, D-30625 Hannover     fax   +49 (511) 53 52-361
void main() { while (1) fork(); }

From hm@ix.de Thu Nov  2 09:06:50 1995
Return-Path: <hm@ix.de>
Received: from nathan (nathan.ix.de [192.54.43.58]) by idgie.ix.de (8.6.9/idgie_134) with SMTP 
          id JAA05904; Thu, 2 Nov 1995 09:06:03 +0100
Received: by nathan (Smail3.1.28.1 #4)
	id m0tAudV-00002QC; Thu, 2 Nov 95 09:04 CET
Message-Id: <m0tAudV-00002QC@nathan>
Date: Thu, 2 Nov 95 09:04 CET
From: hm@ix.de (Harald Milz)
To: nas@ncd.com
Subject: nas-1.2p2 on AIX again
Reply-to: hm@ix.de
Status: O

Hi,

I'm afraid I forgot to add that
/usr/lpp/X11/lib/X11/config/Imake.rules is broken at
least in AIX 4.1.2 and 4.1.3. According to the AIX
4.1.3 release notes, you have to patch Imake.rules as
follows to get nas-1.2p2 compiled cleanly:

--------------------------------- snip ---------------------------------

*** Imake.rules.old	Thu Nov  2 08:55:40 1995
--- Imake.rules	Thu Nov  2 08:55:53 1995
***************
*** 1158,1164 ****
   */
  #ifndef NamedMakeSubdirs
  #define NamedMakeSubdirs(name,dirs) \
! NamedTargetSubdirs(name,dirs,"Making",name,PassCDebugFlags,all)
  #endif /* NamedMakeSubdirs */
  
  #ifndef MakeSubdirs
--- 1158,1164 ----
   */
  #ifndef NamedMakeSubdirs
  #define NamedMakeSubdirs(name,dirs) \
! NamedTargetSubdirs(name,dirs,"Making" name,PassCDebugFlags,all)
  #endif /* NamedMakeSubdirs */
  
  #ifndef MakeSubdirs

--------------------------------- snip ---------------------------------

Hope this helps.

Ciao,
hm

--
Harald Milz (hm@ix.de)   WWW: http://www.ix.de/ix/editors/hm.html
iX Multiuser Multitasking Magazine      phone +49 (511) 53 52-377
Helstorfer Str. 7, D-30625 Hannover     fax   +49 (511) 53 52-361
void main() { while (1) fork(); }

