diff options
Diffstat (limited to 'libsanitizer/configure.ac')
-rw-r--r-- | libsanitizer/configure.ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac index 81fd46d2980..72b13a10367 100644 --- a/libsanitizer/configure.ac +++ b/libsanitizer/configure.ac @@ -335,6 +335,30 @@ fi AC_SUBST([RPC_DEFS], [$rpc_defs]) +dnl If this file is processed by autoconf-2.67 or later then the CPPFLAGS +dnl "-o conftest.iii" can disappear, conftest.iii be replaced with +dnl conftest.i in the sed command line, and the rm deleted. +dnl Not all cpp's accept -o, and gcc -E does not accept a second file +dnl argument as the output file. +AC_CACHE_CHECK([obstack params], +[libsanitizer_cv_sys_obstack], +[save_cppflags=$CPPFLAGS +CPPFLAGS="-I${srcdir}/../include -o conftest.iii $CPPFLAGS" +AC_PREPROC_IFELSE([AC_LANG_SOURCE([ +#include "obstack.h" +#ifdef _OBSTACK_SIZE_T +_OBSTACK_SIZE_T +#else +int +#endif +])], +[libsanitizer_cv_sys_obstack=`sed -e '/^#/d;/^[ ]*$/d' conftest.iii | sed -e '$!d;s/size_t/SIZE_T/'`], +[libsanitizer_cv_sys_obstack=int]) +CPPFLAGS=$save_cppflags +rm -f conftest.iii +]) +AC_SUBST([OBSTACK_DEFS], [-D_OBSTACK_SIZE_T=\"$libsanitizer_cv_sys_obstack\"]) + AM_CONDITIONAL(LIBBACKTRACE_SUPPORTED, [test "x${BACKTRACE_SUPPORTED}x${BACKTRACE_USES_MALLOC}" = "x1x0"]) |