summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-09-06 11:53:21 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-09-06 11:55:07 +0200
commitcefd89c8b444e76e663b63734cf3c55b315ceb9f (patch)
treeeba1b145424321e8844dfca8d1eaf46d6c451b6f /configure.in
parent15b777fbc66042f5a7a356535aebfc7eeff47627 (diff)
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 <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in7
1 files 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([