summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-04-07 21:13:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:15 -0500
commit8c34aab0084d4bfb38796a0d6d9aea542fe185e2 (patch)
tree5c4ec09e4d6dbcffda4e7a00f7fee3206042f047
parentd1103534ba70cfda457165a2d80071e9b2bcd9c5 (diff)
downloadsamba-8c34aab0084d4bfb38796a0d6d9aea542fe185e2.tar.gz
samba-8c34aab0084d4bfb38796a0d6d9aea542fe185e2.tar.bz2
samba-8c34aab0084d4bfb38796a0d6d9aea542fe185e2.zip
r22127: Wrap the AC_TRY_RUN detection for Linux getgrouplist in an
AC_CACHE_CHECK, so it can be cross-compiled. (This used to be commit f9fb07d2f9f142b4bcef02b8b3fc40789a6995d7)
-rw-r--r--source3/configure.in34
1 files changed, 22 insertions, 12 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 5df423832f..810ab6bced 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1378,23 +1378,33 @@ AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[])
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