mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Remove automatic use of gperftools on non-Linux systems.
--enable-perftools must now explicity be supplied to ./configure on non-Linux systems to link against the tcmalloc library that a gperftools installation provides. Linux systems still automatically link it if it's found. The rationale is that gperftools was developed and most throroughly tested on Linux so it's safer there. There especially seems to be potential problems with gperftools on OS X (e.g. see http://code.google.com/p/gperftools/issues/detail?id=413), and Bro currently doesn't work with gpertools there using clang or gcc.
This commit is contained in:
parent
b815b7ca5c
commit
cc49193f93
2 changed files with 25 additions and 11 deletions
|
@ -88,25 +88,31 @@ if (LIBGEOIP_FOUND)
|
||||||
list(APPEND OPTLIBS ${LibGeoIP_LIBRARY})
|
list(APPEND OPTLIBS ${LibGeoIP_LIBRARY})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(USE_PERFTOOLS false)
|
set(HAVE_PERFTOOLS false)
|
||||||
set(USE_PERFTOOLS_DEBUG false)
|
set(USE_PERFTOOLS_DEBUG false)
|
||||||
|
set(USE_PERFTOOLS_TCMALLOC false)
|
||||||
|
|
||||||
if (NOT DISABLE_PERFTOOLS)
|
if (NOT DISABLE_PERFTOOLS)
|
||||||
find_package(GooglePerftools)
|
find_package(GooglePerftools)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (GOOGLEPERFTOOLS_FOUND)
|
if (GOOGLEPERFTOOLS_FOUND)
|
||||||
include_directories(BEFORE ${GooglePerftools_INCLUDE_DIR})
|
set(HAVE_PERFTOOLS true)
|
||||||
set(USE_PERFTOOLS true)
|
# Non-Linux systems may not be well-supported by gperftools, so
|
||||||
|
# require explicit request from user to enable it in that case.
|
||||||
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ENABLE_PERFTOOLS)
|
||||||
|
set(USE_PERFTOOLS_TCMALLOC true)
|
||||||
|
|
||||||
if (ENABLE_PERFTOOLS_DEBUG)
|
if (ENABLE_PERFTOOLS_DEBUG)
|
||||||
# Enable heap debugging with perftools.
|
# Enable heap debugging with perftools.
|
||||||
set(USE_PERFTOOLS_DEBUG true)
|
set(USE_PERFTOOLS_DEBUG true)
|
||||||
|
include_directories(BEFORE ${GooglePerftools_INCLUDE_DIR})
|
||||||
list(APPEND OPTLIBS ${GooglePerftools_LIBRARIES_DEBUG})
|
list(APPEND OPTLIBS ${GooglePerftools_LIBRARIES_DEBUG})
|
||||||
else ()
|
else ()
|
||||||
# Link in tcmalloc for better performance.
|
# Link in tcmalloc for better performance.
|
||||||
list(APPEND OPTLIBS ${GooglePerftools_LIBRARIES})
|
list(APPEND OPTLIBS ${GooglePerftools_LIBRARIES})
|
||||||
endif ()
|
endif ()
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(USE_DATASERIES false)
|
set(USE_DATASERIES false)
|
||||||
|
@ -224,7 +230,8 @@ message(
|
||||||
"\nAux. Tools: ${INSTALL_AUX_TOOLS}"
|
"\nAux. Tools: ${INSTALL_AUX_TOOLS}"
|
||||||
"\n"
|
"\n"
|
||||||
"\nGeoIP: ${USE_GEOIP}"
|
"\nGeoIP: ${USE_GEOIP}"
|
||||||
"\nGoogle perftools: ${USE_PERFTOOLS}"
|
"\ngperftools found: ${HAVE_PERFTOOLS}"
|
||||||
|
"\n tcmalloc: ${USE_PERFTOOLS_TCMALLOC}"
|
||||||
"\n debugging: ${USE_PERFTOOLS_DEBUG}"
|
"\n debugging: ${USE_PERFTOOLS_DEBUG}"
|
||||||
"\ncURL: ${USE_CURL}"
|
"\ncURL: ${USE_CURL}"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
7
configure
vendored
7
configure
vendored
|
@ -29,6 +29,8 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
Optional Features:
|
Optional Features:
|
||||||
--enable-debug compile in debugging mode
|
--enable-debug compile in debugging mode
|
||||||
--enable-mobile-ipv6 analyze mobile IPv6 features defined by RFC 6275
|
--enable-mobile-ipv6 analyze mobile IPv6 features defined by RFC 6275
|
||||||
|
--enable-perftools force use of Google perftools on non-Linux systems
|
||||||
|
(automatically on when perftools is present on Linux)
|
||||||
--enable-perftools-debug use Google's perftools for debugging
|
--enable-perftools-debug use Google's perftools for debugging
|
||||||
--disable-broccoli don't build or install the Broccoli library
|
--disable-broccoli don't build or install the Broccoli library
|
||||||
--disable-broctl don't install Broctl
|
--disable-broctl don't install Broctl
|
||||||
|
@ -98,6 +100,7 @@ append_cache_entry PY_MOD_INSTALL_DIR PATH $prefix/lib/broctl
|
||||||
append_cache_entry BRO_SCRIPT_INSTALL_PATH STRING $prefix/share/bro
|
append_cache_entry BRO_SCRIPT_INSTALL_PATH STRING $prefix/share/bro
|
||||||
append_cache_entry BRO_ETC_INSTALL_DIR PATH $prefix/etc
|
append_cache_entry BRO_ETC_INSTALL_DIR PATH $prefix/etc
|
||||||
append_cache_entry ENABLE_DEBUG BOOL false
|
append_cache_entry ENABLE_DEBUG BOOL false
|
||||||
|
append_cache_entry ENABLE_PERFTOOLS BOOL false
|
||||||
append_cache_entry ENABLE_PERFTOOLS_DEBUG BOOL false
|
append_cache_entry ENABLE_PERFTOOLS_DEBUG BOOL false
|
||||||
append_cache_entry BinPAC_SKIP_INSTALL BOOL true
|
append_cache_entry BinPAC_SKIP_INSTALL BOOL true
|
||||||
append_cache_entry BUILD_SHARED_LIBS BOOL true
|
append_cache_entry BUILD_SHARED_LIBS BOOL true
|
||||||
|
@ -146,7 +149,11 @@ while [ $# -ne 0 ]; do
|
||||||
--enable-mobile-ipv6)
|
--enable-mobile-ipv6)
|
||||||
append_cache_entry ENABLE_MOBILE_IPV6 BOOL true
|
append_cache_entry ENABLE_MOBILE_IPV6 BOOL true
|
||||||
;;
|
;;
|
||||||
|
--enable-perftools)
|
||||||
|
append_cache_entry ENABLE_PERFTOOLS BOOL true
|
||||||
|
;;
|
||||||
--enable-perftools-debug)
|
--enable-perftools-debug)
|
||||||
|
append_cache_entry ENABLE_PERFTOOLS BOOL true
|
||||||
append_cache_entry ENABLE_PERFTOOLS_DEBUG BOOL true
|
append_cache_entry ENABLE_PERFTOOLS_DEBUG BOOL true
|
||||||
;;
|
;;
|
||||||
--disable-broccoli)
|
--disable-broccoli)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue