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.

The second part of the patch delays endian checking until compile-time  
to permit cross-compiling for PPC and i386 architectures within the  
same binaries.

Mark

[~/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
@@ -25400,8 +25400,8 @@
      then
        { echo "$as_me:$LINENO: checking for $clamav_user using netinfo" >&5
  echo $ECHO_N "checking for $clamav_user using netinfo... $ECHO_C"  
 >&6; }
-        clamavuser=`/usr/bin/nidump passwd . |grep ${clamav_user}`
-        clamavgroup=`/usr/bin/nidump group . |grep ${clamav_group}`
+        clamavuser=`/usr/bin/dscl . -list /Users | grep ${clamav_user}`
+        clamavgroup=`/usr/bin/dscl . -list /Groups | grep $ 
{clamav_group}`
      fi

      if test "$use_yp" = "yes"
@@ -25827,7 +25827,7 @@
    yes)

  cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
+#define WORDS_BIGENDIAN (defined(__BIG_ENDIAN__) && __BIG_ENDIAN__)
  _ACEOF
   ;;
    no)
@@ -25843,13 +25843,13 @@
  if test $ac_cv_c_bigendian = yes; then

  cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
+#define WORDS_BIGENDIAN (defined(__BIG_ENDIAN__) && __BIG_ENDIAN__)
  _ACEOF

  else

  cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 0
+#define WORDS_BIGENDIAN (defined(__BIG_ENDIAN__) && __BIG_ENDIAN__)
  _ACEOF

  fi


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

Reply via email to