2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

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.
This commit is contained in:
Todd C. Miller 2010-08-02 15:32:06 -04:00
parent 24a755bfe7
commit ea79ea4467
3 changed files with 6 additions and 9 deletions

4
aclocal.m4 vendored
View File

@ -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)

9
configure vendored
View File

@ -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. */

View File

@ -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, [], [