Author: jpeach
Date: 2007-04-07 21:13:29 +0000 (Sat, 07 Apr 2007)
New Revision: 22127

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22127

Log:
Wrap the AC_TRY_RUN detection for Linux getgrouplist in an
AC_CACHE_CHECK, so it can be cross-compiled.

Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===================================================================
--- branches/SAMBA_3_0/source/configure.in      2007-04-07 19:35:13 UTC (rev 
22126)
+++ branches/SAMBA_3_0/source/configure.in      2007-04-07 21:13:29 UTC (rev 
22127)
@@ -1378,23 +1378,33 @@
 case "$host_os" in
     *linux*)
        # glibc <= 2.3.2 has a broken getgrouplist
-       AC_TRY_RUN([
+    AC_CACHE_CHECK([for a broken Linux getgrouplist API],
+           linux_getgrouplist_ok,
+           [
+               AC_TRY_RUN([
 #include <unistd.h>
 #include <sys/utsname.h>
-main() {
-       /* glibc up to 2.3 has a broken getgrouplist */
+
+                   main() {
+                          /* glibc up to 2.3 has a broken getgrouplist */
 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-       int libc_major = __GLIBC__;
-       int libc_minor = __GLIBC_MINOR__;
+                          int libc_major = __GLIBC__;
+                          int libc_minor = __GLIBC_MINOR__;
 
-       if (libc_major < 2)
-              exit(1);
-       if ((libc_major == 2) && (libc_minor <= 3))
-              exit(1);
+                          if (libc_major < 2)
+                                 exit(1);
+                          if ((libc_major == 2) && (libc_minor <= 3))
+                                 exit(1);
 #endif
-       exit(0);
-}
-], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])
+                          exit(0);
+                   }
+
+               ],
+               [linux_getgrouplist_ok=yes],
+               [linux_getgrouplist_ok=no],
+               [linux_getgrouplist_ok=cross])
+       ])
+
        if test x"$linux_getgrouplist_ok" = x"yes"; then
           AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
        fi

Reply via email to