From: Jehan Date: Fri, 1 Jan 2016 17:35:14 +0000 (+0100) Subject: configure: check realloc with AC_CHECK_FUNCS() to fix cross-compilation. X-Git-Tag: json-c-0.13-20171207~168^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F216%2Fhead;p=thirdparty%2Fjson-c.git configure: check realloc with AC_CHECK_FUNCS() to fix cross-compilation. AC_FUNC_REALLOC is messed up when cross-compiling, ending up in failed build with "undefined reference to `rpl_realloc'" error. AC_CHECK_FUNCS will work both with native and cross builds. --- diff --git a/configure.ac b/configure.ac index 2f3c92ff..cdae2924 100644 --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,7 @@ AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_VPRINTF AC_FUNC_MEMCMP -AC_FUNC_REALLOC +AC_CHECK_FUNCS([realloc]) AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale) AC_CHECK_DECLS([INFINITY], [], [], [[#include ]]) AC_CHECK_DECLS([nan], [], [], [[#include ]])