From cefd89c8b444e76e663b63734cf3c55b315ceb9f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 6 Sep 2011 11:53:21 +0200 Subject: Don't perform AC_FUNC_MALLOC and AC_FUNC_REALLOC when cross-compiling Those autoconf tests assume that the target libc doesn't have GNU-compatible malloc and realloc implementations when cross-compiling, which breaks compilation. Signed-off-by: Laurent Pinchart --- configure.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index fd4c70c..9f91313 100644 --- a/configure.in +++ b/configure.in @@ -50,8 +50,11 @@ AC_CHECK_MEMBERS([struct stat.st_rdev]) # Checks for library functions. AC_HEADER_MAJOR -AC_FUNC_MALLOC -AC_FUNC_REALLOC +AS_IF([test "x$cross_compiling" != "xyes"], + [ + AC_FUNC_MALLOC + AC_FUNC_REALLOC + ]) AC_CHECK_FUNCS([memset strerror strrchr strtoul]) AC_CONFIG_FILES([ -- cgit v1.2.3