2012-11-12 16:53:47 +01:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2012-11-14 01:02:12 +01:00
|
|
|
AC_PREREQ([2.64])
|
2012-11-12 16:53:47 +01:00
|
|
|
AC_INIT(package-unused, version-unused, libsanitizer)
|
|
|
|
AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h])
|
2012-11-15 01:03:37 +01:00
|
|
|
|
2015-01-27 13:50:46 +01:00
|
|
|
AM_ENABLE_MULTILIB(, ..)
|
|
|
|
|
2012-11-15 01:03:37 +01:00
|
|
|
AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
|
|
|
|
AC_ARG_ENABLE(version-specific-runtime-libs,
|
|
|
|
[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
|
|
|
|
[case "$enableval" in
|
|
|
|
yes) version_specific_libs=yes ;;
|
|
|
|
no) version_specific_libs=no ;;
|
|
|
|
*) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
|
|
|
|
esac],
|
|
|
|
[version_specific_libs=no])
|
|
|
|
AC_MSG_RESULT($version_specific_libs)
|
|
|
|
|
2014-01-09 19:13:39 +01:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
|
2012-11-15 01:03:37 +01:00
|
|
|
# Do not delete or change the following two lines. For why, see
|
|
|
|
# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
target_alias=${target_alias-$host_alias}
|
|
|
|
AC_SUBST(target_alias)
|
2012-12-11 22:32:11 +01:00
|
|
|
GCC_LIBSTDCXX_RAW_CXX_FLAGS
|
2012-11-15 01:03:37 +01:00
|
|
|
|
2013-03-22 15:14:42 +01:00
|
|
|
AM_INIT_AUTOMAKE(foreign no-dist)
|
2012-11-16 16:19:15 +01:00
|
|
|
AM_MAINTAINER_MODE
|
2012-11-15 01:03:37 +01:00
|
|
|
|
|
|
|
# Calculate toolexeclibdir
|
|
|
|
# Also toolexecdir, though it's only used in toolexeclibdir
|
|
|
|
case ${version_specific_libs} in
|
|
|
|
yes)
|
|
|
|
# Need the gcc compiler version to know where to install libraries
|
|
|
|
# and header files if --enable-version-specific-runtime-libs option
|
|
|
|
# is selected.
|
|
|
|
toolexecdir='$(libdir)/gcc/$(target_alias)'
|
|
|
|
toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
|
|
|
|
;;
|
|
|
|
no)
|
|
|
|
if test -n "$with_cross_host" &&
|
|
|
|
test x"$with_cross_host" != x"no"; then
|
|
|
|
# Install a library built with a cross compiler in tooldir, not libdir.
|
|
|
|
toolexecdir='$(exec_prefix)/$(target_alias)'
|
|
|
|
toolexeclibdir='$(toolexecdir)/lib'
|
|
|
|
else
|
|
|
|
toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
|
|
|
|
toolexeclibdir='$(libdir)'
|
|
|
|
fi
|
|
|
|
multi_os_directory=`$CC -print-multi-os-directory`
|
|
|
|
case $multi_os_directory in
|
|
|
|
.) ;; # Avoid trailing /.
|
|
|
|
*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(toolexecdir)
|
|
|
|
AC_SUBST(toolexeclibdir)
|
2012-11-12 16:53:47 +01:00
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AM_PROG_AS
|
2014-01-09 19:13:39 +01:00
|
|
|
AC_PROG_RANLIB
|
2012-11-12 16:53:47 +01:00
|
|
|
|
|
|
|
AC_LIBTOOL_DLOPEN
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
2014-01-09 19:13:39 +01:00
|
|
|
AC_PROG_AWK
|
|
|
|
case "$AWK" in
|
|
|
|
"") AC_MSG_ERROR([can't build without awk]) ;;
|
|
|
|
esac
|
|
|
|
|
2012-11-12 16:53:47 +01:00
|
|
|
AC_SUBST(enable_shared)
|
|
|
|
AC_SUBST(enable_static)
|
|
|
|
|
2012-11-23 01:31:54 +01:00
|
|
|
AC_CHECK_SIZEOF([void *])
|
|
|
|
|
2012-11-15 01:03:37 +01:00
|
|
|
if test "${multilib}" = "yes"; then
|
|
|
|
multilib_arg="--enable-multilib"
|
|
|
|
else
|
|
|
|
multilib_arg=
|
|
|
|
fi
|
2012-11-23 01:31:54 +01:00
|
|
|
|
|
|
|
# Get target configury.
|
|
|
|
unset TSAN_SUPPORTED
|
re PR sanitizer/59061 (Port leaksanitizer)
PR sanitizer/59061
* common.opt (static-liblsan): Add.
* config/gnu-user.h (STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS):
Define.
* flag-types.h (enum sanitize_code): Add SANITIZE_LEAK. Renumber
SANITIZE_SHIFT, SANITIZE_DIVIDE, SANITIZE_UNREACHABLE, SANITIZE_VLA,
SANITIZE_RETURN.
* opts.c (common_handle_option): Handle -fsanitize=leak.
* gcc.c (ADD_STATIC_LIBLSAN_LIBS, LIBLSAN_SPEC): Define.
(LIBUBSAN_SPEC): Don't test LIBUBSAN_EARLY_SPEC.
(LIBUBSAN_EARLY_SPEC): Remove.
(SANITIZER_EARLY_SPEC): Don't do anything for libubsan.
(SANITIZER_SPEC): Add -fsanitize=leak handling.
(sanitize_spec_function): Handle %sanitize(leak).
* doc/invoke.texi (-static-liblsan, -fsanitize=leak): Document.
* c-c++-common/asan/no-redundant-instrumentation-7.c: Fix
cleanup-tree-dump directive.
* configure.tgt: Set LSAN_SUPPORTED=yes for x86_64-linux.
* configure.ac (LSAN_SUPPORTED): New AM_CONDITIONAL.
* configure: Regenerated.
* lsan/Makefile.am (toolexeclib_LTLIBRARIES, lsan_files,
liblsan_la_SOURCES, liblsan_la_LIBADD, liblsan_la_LDFLAGS): Add.
* lsan/Makefile.in: Regenerated.
From-SVN: r205290
2013-11-22 22:13:08 +01:00
|
|
|
unset LSAN_SUPPORTED
|
2012-11-23 01:31:54 +01:00
|
|
|
. ${srcdir}/configure.tgt
|
|
|
|
AM_CONDITIONAL(TSAN_SUPPORTED, [test "x$TSAN_SUPPORTED" = "xyes"])
|
re PR sanitizer/59061 (Port leaksanitizer)
PR sanitizer/59061
* common.opt (static-liblsan): Add.
* config/gnu-user.h (STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS):
Define.
* flag-types.h (enum sanitize_code): Add SANITIZE_LEAK. Renumber
SANITIZE_SHIFT, SANITIZE_DIVIDE, SANITIZE_UNREACHABLE, SANITIZE_VLA,
SANITIZE_RETURN.
* opts.c (common_handle_option): Handle -fsanitize=leak.
* gcc.c (ADD_STATIC_LIBLSAN_LIBS, LIBLSAN_SPEC): Define.
(LIBUBSAN_SPEC): Don't test LIBUBSAN_EARLY_SPEC.
(LIBUBSAN_EARLY_SPEC): Remove.
(SANITIZER_EARLY_SPEC): Don't do anything for libubsan.
(SANITIZER_SPEC): Add -fsanitize=leak handling.
(sanitize_spec_function): Handle %sanitize(leak).
* doc/invoke.texi (-static-liblsan, -fsanitize=leak): Document.
* c-c++-common/asan/no-redundant-instrumentation-7.c: Fix
cleanup-tree-dump directive.
* configure.tgt: Set LSAN_SUPPORTED=yes for x86_64-linux.
* configure.ac (LSAN_SUPPORTED): New AM_CONDITIONAL.
* configure: Regenerated.
* lsan/Makefile.am (toolexeclib_LTLIBRARIES, lsan_files,
liblsan_la_SOURCES, liblsan_la_LIBADD, liblsan_la_LDFLAGS): Add.
* lsan/Makefile.in: Regenerated.
From-SVN: r205290
2013-11-22 22:13:08 +01:00
|
|
|
AM_CONDITIONAL(LSAN_SUPPORTED, [test "x$LSAN_SUPPORTED" = "xyes"])
|
2012-11-12 16:53:47 +01:00
|
|
|
|
2013-11-29 13:30:36 +01:00
|
|
|
# Check for functions needed.
|
|
|
|
AC_CHECK_FUNCS(clock_getres clock_gettime clock_settime)
|
|
|
|
|
|
|
|
# Common libraries that we need to link against for all sanitizer libs.
|
2016-01-14 21:27:49 +01:00
|
|
|
link_sanitizer_common='-lpthread -lm'
|
2015-10-22 11:47:17 +02:00
|
|
|
|
|
|
|
# At least for glibc, shm_open is in librt. But don't pull that
|
|
|
|
# in if it still doesn't give us the function we want. This
|
|
|
|
# test is copied from libgomp.
|
|
|
|
AC_CHECK_LIB(rt, shm_open,
|
|
|
|
[link_sanitizer_common="-lrt $link_sanitizer_common"])
|
2013-11-29 13:30:36 +01:00
|
|
|
|
2016-01-14 21:27:49 +01:00
|
|
|
# Do a configure time check for -ldl
|
|
|
|
AC_CHECK_LIB(dl, dlsym,
|
|
|
|
[link_sanitizer_common="-ldl $link_sanitizer_common"])
|
|
|
|
|
2013-11-29 13:30:36 +01:00
|
|
|
# Set up the set of additional libraries that we need to link against for libasan.
|
|
|
|
link_libasan=$link_sanitizer_common
|
|
|
|
AC_SUBST(link_libasan)
|
|
|
|
|
|
|
|
# Set up the set of additional libraries that we need to link against for libtsan.
|
|
|
|
link_libtsan=$link_sanitizer_common
|
|
|
|
AC_SUBST(link_libtsan)
|
|
|
|
|
|
|
|
# Set up the set of additional libraries that we need to link against for libubsan.
|
|
|
|
link_libubsan=$link_sanitizer_common
|
|
|
|
AC_SUBST(link_libubsan)
|
|
|
|
|
|
|
|
# Set up the set of additional libraries that we need to link against for liblsan.
|
|
|
|
link_liblsan=$link_sanitizer_common
|
|
|
|
AC_SUBST(link_liblsan)
|
|
|
|
|
2015-10-22 11:47:17 +02:00
|
|
|
|
|
|
|
# At least for glibc, clock_gettime is in librt. But don't pull that
|
|
|
|
# in if it still doesn't give us the function we want. This
|
|
|
|
# test is copied from libgomp.
|
|
|
|
AC_CHECK_LIB(rt, clock_gettime,
|
|
|
|
[link_libasan="-lrt $link_libasan"
|
|
|
|
link_libtsan="-lrt $link_libtsan"
|
|
|
|
# Other sanitizers do not override clock_* API
|
|
|
|
])
|
|
|
|
|
2012-11-24 19:24:13 +01:00
|
|
|
case "$host" in
|
2015-10-22 11:47:17 +02:00
|
|
|
*-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ;;
|
|
|
|
*) MAC_INTERPOSE=false ;;
|
2012-11-24 19:24:13 +01:00
|
|
|
esac
|
2012-12-04 08:00:35 +01:00
|
|
|
AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE)
|
2012-11-24 19:24:13 +01:00
|
|
|
|
2014-01-09 19:13:39 +01:00
|
|
|
backtrace_supported=yes
|
|
|
|
|
2014-01-23 15:32:05 +01:00
|
|
|
AC_MSG_CHECKING([for necessary platform features])
|
|
|
|
case "$target" in
|
|
|
|
*-*-linux*)
|
|
|
|
# Some old Linux distributions miss required syscalls.
|
|
|
|
sanitizer_supported=no
|
|
|
|
AC_TRY_COMPILE([#include <sys/syscall.h>],[
|
|
|
|
syscall (__NR_gettid);
|
|
|
|
syscall (__NR_futex);
|
|
|
|
syscall (__NR_exit_group);
|
|
|
|
], [sanitizer_supported=yes])
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
sanitizer_supported=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_MSG_RESULT($sanitizer_supported)
|
|
|
|
AM_CONDITIONAL(SANITIZER_SUPPORTED, test "$sanitizer_supported" = yes)
|
|
|
|
|
2014-01-09 19:13:39 +01:00
|
|
|
# Test for __sync support.
|
|
|
|
AC_CACHE_CHECK([__sync extensions],
|
|
|
|
[libsanitizer_cv_sys_sync],
|
|
|
|
[if test -n "${with_target_subdir}"; then
|
|
|
|
libsanitizer_cv_sys_sync=yes
|
|
|
|
else
|
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([int i;],
|
|
|
|
[__sync_bool_compare_and_swap (&i, i, i);
|
|
|
|
__sync_lock_test_and_set (&i, 1);
|
|
|
|
__sync_lock_release (&i);])],
|
|
|
|
[libsanitizer_cv_sys_sync=yes],
|
|
|
|
[libsanitizer_cv_sys_sync=no])
|
|
|
|
fi])
|
|
|
|
if test "$libsanitizer_cv_sys_sync" = "yes"; then
|
|
|
|
AC_DEFINE([HAVE_SYNC_FUNCTIONS], 1,
|
|
|
|
[Define to 1 if you have the __sync functions])
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Test for __atomic support.
|
|
|
|
AC_CACHE_CHECK([__atomic extensions],
|
|
|
|
[libsanitizer_cv_sys_atomic],
|
|
|
|
[if test -n "${with_target_subdir}"; then
|
|
|
|
libsanitizer_cv_sys_atomic=yes
|
|
|
|
else
|
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([int i;],
|
|
|
|
[__atomic_load_n (&i, __ATOMIC_ACQUIRE);
|
|
|
|
__atomic_store_n (&i, 1, __ATOMIC_RELEASE);])],
|
|
|
|
[libsanitizer_cv_sys_atomic=yes],
|
|
|
|
[libsanitizer_cv_sys_atomic=no])
|
|
|
|
fi])
|
|
|
|
if test "$libsanitizer_cv_sys_atomic" = "yes"; then
|
|
|
|
AC_DEFINE([HAVE_ATOMIC_FUNCTIONS], 1,
|
|
|
|
[Define to 1 if you have the __atomic functions])
|
|
|
|
fi
|
|
|
|
|
|
|
|
# The library needs to be able to read the executable itself. Compile
|
|
|
|
# a file to determine the executable format. The awk script
|
|
|
|
# filetype.awk prints out the file type.
|
|
|
|
AC_CACHE_CHECK([output filetype],
|
|
|
|
[libsanitizer_cv_sys_filetype],
|
|
|
|
[filetype=
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([int i;], [int j;])],
|
|
|
|
[filetype=`${AWK} -f $srcdir/../libbacktrace/filetype.awk conftest.$ac_objext`],
|
|
|
|
[AC_MSG_FAILURE([compiler failed])])
|
|
|
|
libsanitizer_cv_sys_filetype=$filetype])
|
|
|
|
|
|
|
|
# Match the file type to decide what files to compile.
|
|
|
|
FORMAT_FILE=
|
|
|
|
case "$libsanitizer_cv_sys_filetype" in
|
|
|
|
elf*) FORMAT_FILE="elf.lo" ;;
|
|
|
|
*) AC_MSG_WARN([could not determine output file type])
|
|
|
|
FORMAT_FILE="unknown.lo"
|
|
|
|
backtrace_supported=no
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(FORMAT_FILE)
|
|
|
|
|
|
|
|
# ELF defines.
|
|
|
|
elfsize=
|
|
|
|
case "$libsanitizer_cv_sys_filetype" in
|
|
|
|
elf32) elfsize=32 ;;
|
|
|
|
elf64) elfsize=64 ;;
|
|
|
|
esac
|
|
|
|
AC_DEFINE_UNQUOTED([BACKTRACE_ELF_SIZE], [$elfsize], [ELF size: 32 or 64])
|
|
|
|
|
|
|
|
BACKTRACE_SUPPORTED=0
|
|
|
|
if test "$backtrace_supported" = "yes"; then
|
|
|
|
BACKTRACE_SUPPORTED=1
|
|
|
|
fi
|
|
|
|
AC_SUBST(BACKTRACE_SUPPORTED)
|
|
|
|
|
|
|
|
GCC_HEADER_STDINT(gstdint.h)
|
|
|
|
|
* sanitizer_common/sanitizer_symbolizer_libbacktrace.h
(LibbacktraceSymbolizer::Demangle): New declaration.
* sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
(POSIXSymbolizer::Demangle): Use libbacktrace_symbolizer_'s Demangle
method if possible.
* sanitizer_common/sanitizer_symbolizer_libbacktrace.cc: Include
"demangle.h" if SANITIZE_CP_DEMANGLE is defined.
(struct CplusV3DemangleData): New type.
(CplusV3DemangleCallback, CplusV3Demangle): New functions.
(SymbolizeCodePCInfoCallback, SymbolizeCodeCallback,
SymbolizeDataCallback): Use CplusV3Demangle.
* sanitizer_common/Makefile.am (AM_CXXFLAGS): Add
-DSANITIZE_CP_DEMANGLE and -I $(top_srcdir)/../include.
* libbacktrace/backtrace-rename.h (cplus_demangle_builtin_types,
cplus_demangle_fill_ctor, cplus_demangle_fill_dtor,
cplus_demangle_fill_extended_operator, cplus_demangle_fill_name,
cplus_demangle_init_info, cplus_demangle_mangled_name,
cplus_demangle_operators, cplus_demangle_print,
cplus_demangle_print_callback, cplus_demangle_type, cplus_demangle_v3,
cplus_demangle_v3_callback, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor, java_demangle_v3, java_demangle_v3_callback):
Define.
(__asan_internal_memcmp, __asan_internal_strncmp): New prototypes.
(memcmp, strncmp): Redefine.
* libbacktrace/Makefile.am (libsanitizer_libbacktrace_la_SOURCES): Add
../../libiberty/cp-demangle.c.
* libbacktrace/bridge.cc (__asan_internal_memcmp,
__asan_internal_strncmp): New functions.
* sanitizer_common/Makefile.in: Regenerated.
* libbacktrace/Makefile.in: Regenerated.
* configure: Regenerated.
* configure.ac: Regenerated.
* config.h.in: Regenerated.
From-SVN: r206477
2014-01-09 19:16:40 +01:00
|
|
|
AC_CHECK_HEADERS(sys/mman.h alloca.h)
|
2014-01-09 19:13:39 +01:00
|
|
|
if test "$ac_cv_header_sys_mman_h" = "no"; then
|
|
|
|
have_mmap=no
|
|
|
|
else
|
|
|
|
if test -n "${with_target_subdir}"; then
|
|
|
|
# When built as a GCC target library, we can't do a link test. We
|
|
|
|
# simply assume that if we have mman.h, we have mmap.
|
|
|
|
have_mmap=yes
|
|
|
|
else
|
|
|
|
AC_CHECK_FUNC(mmap, [have_mmap=yes], [have_mmap=no])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$have_mmap" = "no"; then
|
|
|
|
VIEW_FILE=read.lo
|
|
|
|
ALLOC_FILE=alloc.lo
|
|
|
|
else
|
|
|
|
VIEW_FILE=mmapio.lo
|
|
|
|
AC_PREPROC_IFELSE([
|
|
|
|
#include <sys/mman.h>
|
|
|
|
#if !defined(MAP_ANONYMOUS) && !defined(MAP_ANON)
|
|
|
|
#error no MAP_ANONYMOUS
|
|
|
|
#endif
|
|
|
|
], [ALLOC_FILE=mmap.lo], [ALLOC_FILE=alloc.lo])
|
|
|
|
fi
|
|
|
|
AC_SUBST(VIEW_FILE)
|
|
|
|
AC_SUBST(ALLOC_FILE)
|
|
|
|
|
|
|
|
BACKTRACE_USES_MALLOC=0
|
|
|
|
if test "$ALLOC_FILE" = "alloc.lo"; then
|
|
|
|
BACKTRACE_USES_MALLOC=1
|
|
|
|
fi
|
|
|
|
AC_SUBST(BACKTRACE_USES_MALLOC)
|
|
|
|
|
|
|
|
# Don't care about thread support
|
|
|
|
BACKTRACE_SUPPORTS_THREADS=0
|
|
|
|
AC_SUBST(BACKTRACE_SUPPORTS_THREADS)
|
|
|
|
|
|
|
|
# Check for dl_iterate_phdr.
|
|
|
|
AC_CHECK_HEADERS(link.h)
|
|
|
|
if test "$ac_cv_header_link_h" = "no"; then
|
|
|
|
have_dl_iterate_phdr=no
|
|
|
|
else
|
|
|
|
# When built as a GCC target library, we can't do a link test.
|
|
|
|
AC_EGREP_HEADER([dl_iterate_phdr], [link.h], [have_dl_iterate_phdr=yes],
|
|
|
|
[have_dl_iterate_phdr=no])
|
|
|
|
case "${host}" in
|
|
|
|
*-*-solaris2.10*)
|
|
|
|
# Avoid dl_iterate_phdr on Solaris 10, where it is in the
|
|
|
|
# header file but is only in -ldl.
|
|
|
|
have_dl_iterate_phdr=no ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
if test "$have_dl_iterate_phdr" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_DL_ITERATE_PHDR, 1, [Define if dl_iterate_phdr is available.])
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check for the fcntl function.
|
|
|
|
if test -n "${with_target_subdir}"; then
|
|
|
|
case "${host}" in
|
|
|
|
*-*-mingw*) have_fcntl=no ;;
|
|
|
|
*) have_fcntl=yes ;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
AC_CHECK_FUNC(fcntl, [have_fcntl=yes], [have_fcntl=no])
|
|
|
|
fi
|
|
|
|
if test "$have_fcntl" = "yes"; then
|
|
|
|
AC_DEFINE([HAVE_FCNTL], 1,
|
|
|
|
[Define to 1 if you have the fcntl function])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_DECLS(strnlen)
|
|
|
|
|
|
|
|
# Check for getexecname function.
|
|
|
|
if test -n "${with_target_subdir}"; then
|
|
|
|
case "${host}" in
|
|
|
|
*-*-solaris2*) have_getexecname=yes ;;
|
|
|
|
*) have_getexecname=no ;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
AC_CHECK_FUNC(getexecname, [have_getexecname=yes], [have_getexecname=no])
|
|
|
|
fi
|
|
|
|
if test "$have_getexecname" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_GETEXECNAME, 1, [Define if getexecname is available.])
|
|
|
|
fi
|
|
|
|
|
2015-04-13 10:59:55 +02:00
|
|
|
# Check for rpc/xdr.h
|
|
|
|
AC_CHECK_HEADERS(rpc/xdr.h)
|
|
|
|
if test x"$ac_cv_header_rpc_xdr_h" = xyes; then
|
|
|
|
rpc_defs="$rpc_defs -DHAVE_RPC_XDR_H=1"
|
|
|
|
else
|
|
|
|
rpc_defs="$rpc_defs -DHAVE_RPC_XDR_H=0"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check for tirpc/rpc/xdr.h
|
|
|
|
AC_CHECK_HEADERS(tirpc/rpc/xdr.h)
|
|
|
|
if test x"$ac_cv_header_tirpc_rpc_xdr_h" = xyes; then
|
|
|
|
rpc_defs="$rpc_defs -DHAVE_TIRPC_RPC_XDR_H=1"
|
|
|
|
else
|
|
|
|
rpc_defs="$rpc_defs -DHAVE_TIRPC_RPC_XDR_H=0"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([RPC_DEFS], [$rpc_defs])
|
|
|
|
|
2014-01-09 19:13:39 +01:00
|
|
|
AM_CONDITIONAL(LIBBACKTRACE_SUPPORTED,
|
|
|
|
[test "x${BACKTRACE_SUPPORTED}x${BACKTRACE_USES_MALLOC}" = "x1x0"])
|
|
|
|
|
|
|
|
AH_BOTTOM([#include "libbacktrace/backtrace-rename.h"])
|
|
|
|
AC_CONFIG_FILES([Makefile libsanitizer.spec libbacktrace/backtrace-supported.h])
|
|
|
|
AC_CONFIG_HEADER(config.h)
|
2012-11-12 16:53:47 +01:00
|
|
|
|
2014-01-09 19:13:39 +01:00
|
|
|
AC_CONFIG_FILES(AC_FOREACH([DIR], [interception sanitizer_common libbacktrace lsan asan ubsan], [DIR/Makefile ]),
|
2012-11-12 16:53:47 +01:00
|
|
|
[cat > vpsed$$ << \_EOF
|
|
|
|
s!`test -f '$<' || echo '$(srcdir)/'`!!
|
|
|
|
_EOF
|
|
|
|
sed -f vpsed$$ $ac_file > tmp$$
|
|
|
|
mv tmp$$ $ac_file
|
|
|
|
rm vpsed$$
|
|
|
|
echo 'MULTISUBDIR =' >> $ac_file
|
2012-11-15 17:00:47 +01:00
|
|
|
ml_norecursion=yes
|
|
|
|
. ${multi_basedir}/config-ml.in
|
|
|
|
AS_UNSET([ml_norecursion])
|
2012-11-12 16:53:47 +01:00
|
|
|
])
|
|
|
|
|
2012-11-23 01:31:54 +01:00
|
|
|
if test "x$TSAN_SUPPORTED" = "xyes"; then
|
2012-11-22 23:03:11 +01:00
|
|
|
AC_CONFIG_FILES(AC_FOREACH([DIR], [tsan], [DIR/Makefile ]),
|
|
|
|
[cat > vpsed$$ << \_EOF
|
|
|
|
s!`test -f '$<' || echo '$(srcdir)/'`!!
|
|
|
|
_EOF
|
|
|
|
sed -f vpsed$$ $ac_file > tmp$$
|
|
|
|
mv tmp$$ $ac_file
|
|
|
|
rm vpsed$$
|
|
|
|
echo 'MULTISUBDIR =' >> $ac_file
|
|
|
|
ml_norecursion=yes
|
|
|
|
. ${multi_basedir}/config-ml.in
|
|
|
|
AS_UNSET([ml_norecursion])
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
2015-01-23 12:53:04 +01:00
|
|
|
AC_SUBST([TSAN_TARGET_DEPENDENT_OBJECTS])
|
2016-11-08 23:04:09 +01:00
|
|
|
AC_SUBST([SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS])
|
2015-01-23 12:53:04 +01:00
|
|
|
|
2012-11-12 16:53:47 +01:00
|
|
|
AC_OUTPUT
|