From: Todd C. Miller Date: Mon, 2 Aug 2010 19:32:06 +0000 (-0400) Subject: Add cross-compile defaults for remaining AC_TRY_RUN usage. X-Git-Tag: SUDO_1_8_0~303 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea79ea4467388aa830d7b5e1261bb9ea991c6d1d;p=sudo Add cross-compile defaults for remaining AC_TRY_RUN usage. Also add back getgroups() check since AC_FUNC_GETGROUPS defaults to "no" when cross-compiling. --- diff --git a/aclocal.m4 b/aclocal.m4 index c357789e0..118483918 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -225,7 +225,7 @@ AC_DEFUN([SUDO_FUNC_UNSETENV_VOID], ], [sudo_cv_func_unsetenv_void=no], [sudo_cv_func_unsetenv_void=yes], - [sudo_cv_func_unsetenv_void=yes])]) + [sudo_cv_func_unsetenv_void=no])]) if test $sudo_cv_func_unsetenv_void = yes; then AC_DEFINE(UNSETENV_VOID, 1, [Define to 1 if the `unsetenv' function returns void instead of `int'.]) @@ -271,7 +271,7 @@ main() { (void) fprintf(f, "%d\n", strlen(b)); (void) fclose(f); exit(0); -}], sudo_cv_uid_t_len=`cat conftestdata`, sudo_cv_uid_t_len=10) +}], sudo_cv_uid_t_len=`cat conftestdata`, sudo_cv_uid_t_len=10, sudo_cv_uid_t_len=10) ]) rm -f conftestdata AC_MSG_RESULT($sudo_cv_uid_t_len) diff --git a/configure b/configure index 05964d9b6..5f53c2c69 100755 --- a/configure +++ b/configure @@ -14514,10 +14514,7 @@ if test "${sudo_cv_uid_t_len+set}" = set; then : else rm -f conftestdata if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } + sudo_cv_uid_t_len=10 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14750,7 +14747,7 @@ fi LIBS=$ac_save_LIBS for ac_func in strchr strrchr memchr memcpy memset sysconf tzset \ - strftime setrlimit initgroups fstat gettimeofday \ + strftime setrlimit initgroups getgroups fstat gettimeofday \ regcomp setlocale getaddrinfo vhangup \ mbr_check_membership setrlimit64 do : @@ -14962,7 +14959,7 @@ if test "${sudo_cv_func_unsetenv_void+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - sudo_cv_func_unsetenv_void=yes + sudo_cv_func_unsetenv_void=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ diff --git a/configure.in b/configure.in index f6bed9910..79eba987e 100644 --- a/configure.in +++ b/configure.in @@ -1916,7 +1916,7 @@ dnl Function checks dnl AC_FUNC_GETGROUPS AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \ - strftime setrlimit initgroups fstat gettimeofday \ + strftime setrlimit initgroups getgroups fstat gettimeofday \ regcomp setlocale getaddrinfo vhangup \ mbr_check_membership setrlimit64) AC_CHECK_FUNCS(getline, [], [