diff options
Diffstat (limited to 'eglib/configure.ac')
-rw-r--r-- | eglib/configure.ac | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/eglib/configure.ac b/eglib/configure.ac index 7622701ef45..79af2d995bf 100644 --- a/eglib/configure.ac +++ b/eglib/configure.ac @@ -138,6 +138,17 @@ AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf) AC_CHECK_FUNCS(getrlimit) AC_CHECK_FUNCS(fork execv execve) +AC_ARG_WITH([overidable-allocators], [ --with-overridable-allocators allow g_*alloc/g_free to call custom allocators set via g_mem_set_vtable]) + +if test x$with_overridable_allocators == xyes; then + ENABLE_OVERRIDABLE_ALLOCATORS="1" + AC_MSG_NOTICE([Overridable allocator support enabled]) +else + ENABLE_OVERRIDABLE_ALLOCATORS="0" + AC_MSG_NOTICE([Overridable allocator support disabled]) +fi +AC_SUBST(ENABLE_OVERRIDABLE_ALLOCATORS) + # # Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding # the detection of strndup on OS X so Mono built on 10.7+ still runs on 10.6. This can be @@ -151,7 +162,7 @@ elif test x$target_ios = xno; then AC_CHECK_FUNCS(strndup getpwuid_r) fi -AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno ) +AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno || test x$with_overridable_allocators == xyes) AM_ICONV() AC_SEARCH_LIBS(sqrtf, m) |