2007-03-22 03:00:33 +00:00
|
|
|
## Process this file with autoconf to produce configure.
|
|
|
|
## In general, the safest way to proceed is to run the following:
|
|
|
|
## % aclocal -I `pwd`/../autoconf && autoconf && autoheader && automake
|
|
|
|
|
|
|
|
# make sure we're interpreted by some minimal autoconf
|
|
|
|
AC_PREREQ(2.57)
|
|
|
|
|
2007-03-22 04:42:30 +00:00
|
|
|
AC_INIT(google-perftools, 0.3, opensource@google.com)
|
2007-03-22 03:00:33 +00:00
|
|
|
# The argument here is just something that should be in the current directory
|
|
|
|
# (for sanity checking)
|
|
|
|
AC_CONFIG_SRCDIR(README)
|
|
|
|
AM_INIT_AUTOMAKE
|
2007-03-22 03:28:56 +00:00
|
|
|
AM_CONFIG_HEADER(src/config.h)
|
2007-03-22 03:00:33 +00:00
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_CXX
|
|
|
|
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_SUBST(LIBTOOL_DEPS)
|
|
|
|
|
|
|
|
AC_C_INLINE
|
|
|
|
AX_C___ATTRIBUTE__
|
|
|
|
|
|
|
|
# Check whether some low-level functions/files are available
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
|
|
|
# Here are some examples of how to check for the existence of a fn or file
|
|
|
|
AC_CHECK_TYPES([__int64]) # defined in some windows platforms
|
|
|
|
AC_CHECK_FUNCS(sbrk) # for tcmalloc to get memory
|
|
|
|
AC_CHECK_FUNCS(munmap)
|
|
|
|
AC_FUNC_MMAP
|
2007-03-22 03:28:56 +00:00
|
|
|
AC_CHECK_HEADERS(execinfo.h) # for stacktrace? and heapchecker_unittest
|
2007-03-22 03:00:33 +00:00
|
|
|
AC_CHECK_HEADERS(conflict-signal.h) # defined on some windows platforms
|
2007-03-22 03:28:56 +00:00
|
|
|
AC_CHECK_HEADERS(linux/ptrace.h)
|
|
|
|
AC_CHECK_HEADERS(syscall.h)
|
|
|
|
AC_CHECK_HEADERS(grp.h) # for heapchecker_unittest
|
|
|
|
AC_CHECK_MEMBERS([struct sigcontext.sc_eip,
|
2007-03-22 03:00:33 +00:00
|
|
|
struct ucontext.uc_mcontext,
|
|
|
|
struct sigcontext.eip,
|
2007-03-22 03:28:56 +00:00
|
|
|
struct sigcontext.rip,
|
2007-03-22 03:00:33 +00:00
|
|
|
struct sigcontext.sc_ip,
|
|
|
|
struct siginfo.si_faddr],,,
|
|
|
|
[#include <signal.h>])
|
|
|
|
|
|
|
|
# Defines PRIuS
|
|
|
|
AC_COMPILER_CHARACTERISTICS
|
|
|
|
|
2007-03-22 03:28:56 +00:00
|
|
|
# Check if __builtin_stack_pointer() is available (for elfcore.h)
|
|
|
|
AC_MSG_CHECKING([for __builtin_stack_pointer()])
|
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM(, [void *sp = __builtin_stack_pointer();])],
|
|
|
|
[AC_DEFINE(HAVE_BUILTIN_STACK_POINTER, 1,
|
|
|
|
Define to 1 if compiler supports __builtin_stack_pointer)
|
|
|
|
AC_MSG_RESULT([yes])],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
|
2007-03-22 03:00:33 +00:00
|
|
|
# A lot of the code in this directory depends on pthreads
|
|
|
|
ACX_PTHREAD
|
|
|
|
|
|
|
|
# Find out what namespace 'normal' STL code lives in
|
|
|
|
AC_CXX_STL_NAMESPACE
|
|
|
|
|
|
|
|
AC_CXX_MAKE_HASH_SET_H(src/google/perftools/hash_set.h)
|
|
|
|
|
|
|
|
# Figure out where libc has program_invocation_name
|
|
|
|
AC_PROGRAM_INVOCATION_NAME
|
|
|
|
|
|
|
|
# Make the install prefix available, to figure out where to look for pprof
|
|
|
|
AC_INSTALL_PREFIX
|
|
|
|
|
|
|
|
# Write generated configuration file
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_OUTPUT
|