[nas] nas on Mac OS X?

Erik Auerswald auerswal at unix-ag.uni-kl.de
Wed Jan 26 09:08:59 MST 2011

Hi Jon,

On Wed, Jan 26, 2011 at 08:54:17AM -0700, Jon Trulson wrote:
> On Wed, 26 Jan 2011, Erik Auerswald wrote:
>> On Tue, Jan 25, 2011 at 05:28:32PM -0500, Raymond Toy wrote:
>>> On 1/25/11 2:12 PM, Erik Auerswald wrote:
>>>> In NetAudio.tmpl we have:
>>>> #define SharedLibAudio          SharedLibX
> [...]
>>>> But SharedLibX is not mentioned anywhere in /usr/lib/X11/config/. There
>>>> is a definition for SharedLibX11 and changing NetAudio.tmpl to use this
>>>> instead of SharedLibX results in linking dynamically against libaudio.
>>>> Ray, could you test if this works for you as well? See the attached patch.
>>> Yes, this works.  The sample clients are linked against shared libaudio
>>> and everything works.  And, surprisingly, -lXau isn't on the link
>>> command.  otool indicates the libaudio depends on -lXau, so that's
>>> working as expected.
>> Great! Thanks for testing. :-)
>> Now I know that I can test my changes on linux. I'll try to find a generic
>> solution without breaking older systems (assuming that once upon a time
>> SharedLibX and friends were actually used).
>  Can you guys try the attached patch and see if this works properly?  I
>  am now getting shared libaudio built on linux in my case now.
>  And yes, once upon a time, SharedLibX was used.  Way back in the
>  before-times, long-long ago :)
>  This is a diff against current svn.  If it works for you, I'll commit
>  it.

I'll test it in a minute, just a quick few questions:

> Index: config/NetAudio.tmpl

Why here and not (also) in lib/audio/Imakefile? Just curious.

A cursory review tells me that you implemented what I planned to do. :-)

> [...]
> Index: lib/audio/Imakefile
> ===================================================================
> --- lib/audio/Imakefile	(revision 280)
> +++ lib/audio/Imakefile	(working copy)
> @@ -150,7 +150,11 @@
>  XAULIB = -lXau
>  #endif
> -#if defined(LinuxArchitecture) || defined(GNUArchitecture) || defined(SunArchitecture) || defined(__FreeBSD_kernel__) || defined(DarwinArchitecture)
> +/* 'moinakg' added SunArchitecture here, but this seems to break 64b builds 
> + * using libXau, so removing for now until someone (or myself) can get 
> + * access to a solaris 64b box and fix it properly. 
> + */
> +#if defined(LinuxArchitecture) || defined(GNUArchitecture) || defined(__FreeBSD_kernel__)
>  #endif

Why did you revert my change to add defined(DarwinArchitecture)?

Since my tests showed that defined(LinuxArchitecture) is _not_ needed on my
linux box, why did you keep it? I kept it to be defensive about not breaking
the setup that some time ago seemed to have needed this...

There are two ways of constructing a software design: One way is to make
it so simple that there are obviously no deficiencies and the other way
is to make it so complicated that there are no obvious deficiencies.
                        -- C.A.R. Hoare

More information about the Nas mailing list