mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Support building with jemalloc memory allocator, from Romain Francoise.
This commit is contained in:
		
							
								
								
									
										18
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								configure.ac
									
									
									
									
									
								
							@@ -548,6 +548,24 @@ if test "x$found_malloc_trim" = xyes; then
 | 
			
		||||
	AC_DEFINE(HAVE_MALLOC_TRIM)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Build against jemalloc if requested.
 | 
			
		||||
AC_ARG_ENABLE(
 | 
			
		||||
	jemalloc,
 | 
			
		||||
	AS_HELP_STRING(--enable-jemalloc, use jemalloc if it is installed)
 | 
			
		||||
)
 | 
			
		||||
if test "x$enable_jemalloc" = xyes; then
 | 
			
		||||
	PKG_CHECK_MODULES(
 | 
			
		||||
		JEMALLOC,
 | 
			
		||||
		jemalloc,
 | 
			
		||||
		[
 | 
			
		||||
			AM_CPPFLAGS="$JEMALLOC_CFLAGS $AM_CPPFLAGS"
 | 
			
		||||
			CPPFLAGS="$AM_CPPFLAGS $SAVED_CPPFLAGS"
 | 
			
		||||
			LIBS="$LIBS $JEMALLOC_LIBS"
 | 
			
		||||
		],
 | 
			
		||||
		AC_MSG_ERROR("jemalloc not found")
 | 
			
		||||
	)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Check for CMSG_DATA. On some platforms like HP-UX this requires UNIX 95
 | 
			
		||||
# (_XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED) (see xopen_networking(7)). On
 | 
			
		||||
# others, UNIX 03 (_XOPEN_SOURCE 600, see standards(7) on Solaris).
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user