Mark Allan wrote:
> Hi folks,
>
> Here's a patch to allow ClamAV to configure properly on Mac OS X  
> 10.5.  The nidump tool was deprecated a long time ago and is no longer  
> included in 10.5 as netinfo doesn't exist any more.  The dscl tool is  
> the preferred method from at least 10.3 onwards.  Unfortunately I  
> don't have any machines with 10.2 on which I can test to see if it  
> works there too.
>
> The patch is against the release version of ClamAV 0.92 and doesn't  
> check which Mac OS version is in use, I've simply replaced the nidump  
> call with the correct dscl call.  FWIW, 10.2 is almost 6 years old now  
> so I doubt very much if anyone is still running it.
>   

Thanks, but this is already in the SVN version:

Tue Jan 22 15:29:15 CET 2008 (tk)
---------------------------------
  * configure: if available use dscl on Mac OS X (bb#753)

> The second part of the patch delays endian checking until compile-time  
> to permit cross-compiling for PPC

If you are cross-compiling for PPC the AC_C_BIGENDIAN macro from
autoconf just works.

>  and i386 architectures within the  
> same binaries.
>   

You mean Mac OSX Universal Binaries?
One solution would be to compile for PPC and i386 separately then glue
those 2 together, see:
http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/compiling/chapter_4_section_3.html

There is also a check for FPU endianness, which can't be done using
preprocessor macros, and needs to be done during ./configure, so
I think that compiling 2 executables, one for each architecture is the
safest choice.

If you want to solve this in the AC_C_BIGENDIAN macro, please raise the
issue with the autoconf developers.

> Mark
> try to guess the endianness by grepping values into an object file
>
> [~/Desktop/clamav_0.92] > diff -Naur configureOrig configure
>
> --- configureOrig     2008-02-08 21:38:58.000000000 +0000
> +++ configure 2008-02-08 21:53:43.000000000 +0000
>   

You should change configure.in, and not configure directly. When
autoconf is run it will regenerate configure from configure.in,
thus any changes to configure will be overwritten.

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

Reply via email to