1*bf6039f0SWarner LoshBuilding and installing a packaged release of jemalloc can be as simple as 2*bf6039f0SWarner Loshtyping the following while in the root directory of the source tree: 3*bf6039f0SWarner Losh 4*bf6039f0SWarner Losh ./configure 5*bf6039f0SWarner Losh make 6*bf6039f0SWarner Losh make install 7*bf6039f0SWarner Losh 8*bf6039f0SWarner LoshIf building from unpackaged developer sources, the simplest command sequence 9*bf6039f0SWarner Loshthat might work is: 10*bf6039f0SWarner Losh 11*bf6039f0SWarner Losh ./autogen.sh 12*bf6039f0SWarner Losh make dist 13*bf6039f0SWarner Losh make 14*bf6039f0SWarner Losh make install 15*bf6039f0SWarner Losh 16*bf6039f0SWarner LoshNote that documentation is not built by the default target because doing so 17*bf6039f0SWarner Loshwould create a dependency on xsltproc in packaged releases, hence the 18*bf6039f0SWarner Loshrequirement to either run 'make dist' or avoid installing docs via the various 19*bf6039f0SWarner Loshinstall_* targets documented below. 20*bf6039f0SWarner Losh 21*bf6039f0SWarner Losh 22*bf6039f0SWarner Losh## Advanced configuration 23*bf6039f0SWarner Losh 24*bf6039f0SWarner LoshThe 'configure' script supports numerous options that allow control of which 25*bf6039f0SWarner Loshfunctionality is enabled, where jemalloc is installed, etc. Optionally, pass 26*bf6039f0SWarner Loshany of the following arguments (not a definitive list) to 'configure': 27*bf6039f0SWarner Losh 28*bf6039f0SWarner Losh* `--help` 29*bf6039f0SWarner Losh 30*bf6039f0SWarner Losh Print a definitive list of options. 31*bf6039f0SWarner Losh 32*bf6039f0SWarner Losh* `--prefix=<install-root-dir>` 33*bf6039f0SWarner Losh 34*bf6039f0SWarner Losh Set the base directory in which to install. For example: 35*bf6039f0SWarner Losh 36*bf6039f0SWarner Losh ./configure --prefix=/usr/local 37*bf6039f0SWarner Losh 38*bf6039f0SWarner Losh will cause files to be installed into /usr/local/include, /usr/local/lib, 39*bf6039f0SWarner Losh and /usr/local/man. 40*bf6039f0SWarner Losh 41*bf6039f0SWarner Losh* `--with-version=(<major>.<minor>.<bugfix>-<nrev>-g<gid>|VERSION)` 42*bf6039f0SWarner Losh 43*bf6039f0SWarner Losh The VERSION file is mandatory for successful configuration, and the 44*bf6039f0SWarner Losh following steps are taken to assure its presence: 45*bf6039f0SWarner Losh 1) If --with-version=<major>.<minor>.<bugfix>-<nrev>-g<gid> is specified, 46*bf6039f0SWarner Losh generate VERSION using the specified value. 47*bf6039f0SWarner Losh 2) If --with-version is not specified in either form and the source 48*bf6039f0SWarner Losh directory is inside a git repository, try to generate VERSION via 'git 49*bf6039f0SWarner Losh describe' invocations that pattern-match release tags. 50*bf6039f0SWarner Losh 3) If VERSION is missing, generate it with a bogus version: 51*bf6039f0SWarner Losh 0.0.0-0-g0000000000000000000000000000000000000000 52*bf6039f0SWarner Losh 53*bf6039f0SWarner Losh Note that --with-version=VERSION bypasses (1) and (2), which simplifies 54*bf6039f0SWarner Losh VERSION configuration when embedding a jemalloc release into another 55*bf6039f0SWarner Losh project's git repository. 56*bf6039f0SWarner Losh 57*bf6039f0SWarner Losh* `--with-rpath=<colon-separated-rpath>` 58*bf6039f0SWarner Losh 59*bf6039f0SWarner Losh Embed one or more library paths, so that libjemalloc can find the libraries 60*bf6039f0SWarner Losh it is linked to. This works only on ELF-based systems. 61*bf6039f0SWarner Losh 62*bf6039f0SWarner Losh* `--with-mangling=<map>` 63*bf6039f0SWarner Losh 64*bf6039f0SWarner Losh Mangle public symbols specified in <map> which is a comma-separated list of 65*bf6039f0SWarner Losh name:mangled pairs. 66*bf6039f0SWarner Losh 67*bf6039f0SWarner Losh For example, to use ld's --wrap option as an alternative method for 68*bf6039f0SWarner Losh overriding libc's malloc implementation, specify something like: 69*bf6039f0SWarner Losh 70*bf6039f0SWarner Losh --with-mangling=malloc:__wrap_malloc,free:__wrap_free[...] 71*bf6039f0SWarner Losh 72*bf6039f0SWarner Losh Note that mangling happens prior to application of the prefix specified by 73*bf6039f0SWarner Losh --with-jemalloc-prefix, and mangled symbols are then ignored when applying 74*bf6039f0SWarner Losh the prefix. 75*bf6039f0SWarner Losh 76*bf6039f0SWarner Losh* `--with-jemalloc-prefix=<prefix>` 77*bf6039f0SWarner Losh 78*bf6039f0SWarner Losh Prefix all public APIs with <prefix>. For example, if <prefix> is 79*bf6039f0SWarner Losh "prefix_", API changes like the following occur: 80*bf6039f0SWarner Losh 81*bf6039f0SWarner Losh malloc() --> prefix_malloc() 82*bf6039f0SWarner Losh malloc_conf --> prefix_malloc_conf 83*bf6039f0SWarner Losh /etc/malloc.conf --> /etc/prefix_malloc.conf 84*bf6039f0SWarner Losh MALLOC_CONF --> PREFIX_MALLOC_CONF 85*bf6039f0SWarner Losh 86*bf6039f0SWarner Losh This makes it possible to use jemalloc at the same time as the system 87*bf6039f0SWarner Losh allocator, or even to use multiple copies of jemalloc simultaneously. 88*bf6039f0SWarner Losh 89*bf6039f0SWarner Losh By default, the prefix is "", except on OS X, where it is "je_". On OS X, 90*bf6039f0SWarner Losh jemalloc overlays the default malloc zone, but makes no attempt to actually 91*bf6039f0SWarner Losh replace the "malloc", "calloc", etc. symbols. 92*bf6039f0SWarner Losh 93*bf6039f0SWarner Losh* `--without-export` 94*bf6039f0SWarner Losh 95*bf6039f0SWarner Losh Don't export public APIs. This can be useful when building jemalloc as a 96*bf6039f0SWarner Losh static library, or to avoid exporting public APIs when using the zone 97*bf6039f0SWarner Losh allocator on OSX. 98*bf6039f0SWarner Losh 99*bf6039f0SWarner Losh* `--with-private-namespace=<prefix>` 100*bf6039f0SWarner Losh 101*bf6039f0SWarner Losh Prefix all library-private APIs with <prefix>je_. For shared libraries, 102*bf6039f0SWarner Losh symbol visibility mechanisms prevent these symbols from being exported, but 103*bf6039f0SWarner Losh for static libraries, naming collisions are a real possibility. By 104*bf6039f0SWarner Losh default, <prefix> is empty, which results in a symbol prefix of je_ . 105*bf6039f0SWarner Losh 106*bf6039f0SWarner Losh* `--with-install-suffix=<suffix>` 107*bf6039f0SWarner Losh 108*bf6039f0SWarner Losh Append <suffix> to the base name of all installed files, such that multiple 109*bf6039f0SWarner Losh versions of jemalloc can coexist in the same installation directory. For 110*bf6039f0SWarner Losh example, libjemalloc.so.0 becomes libjemalloc<suffix>.so.0. 111*bf6039f0SWarner Losh 112*bf6039f0SWarner Losh* `--with-malloc-conf=<malloc_conf>` 113*bf6039f0SWarner Losh 114*bf6039f0SWarner Losh Embed `<malloc_conf>` as a run-time options string that is processed prior to 115*bf6039f0SWarner Losh the malloc_conf global variable, the /etc/malloc.conf symlink, and the 116*bf6039f0SWarner Losh MALLOC_CONF environment variable. For example, to change the default decay 117*bf6039f0SWarner Losh time to 30 seconds: 118*bf6039f0SWarner Losh 119*bf6039f0SWarner Losh --with-malloc-conf=decay_ms:30000 120*bf6039f0SWarner Losh 121*bf6039f0SWarner Losh* `--enable-debug` 122*bf6039f0SWarner Losh 123*bf6039f0SWarner Losh Enable assertions and validation code. This incurs a substantial 124*bf6039f0SWarner Losh performance hit, but is very useful during application development. 125*bf6039f0SWarner Losh 126*bf6039f0SWarner Losh* `--disable-stats` 127*bf6039f0SWarner Losh 128*bf6039f0SWarner Losh Disable statistics gathering functionality. See the "opt.stats_print" 129*bf6039f0SWarner Losh option documentation for usage details. 130*bf6039f0SWarner Losh 131*bf6039f0SWarner Losh* `--enable-prof` 132*bf6039f0SWarner Losh 133*bf6039f0SWarner Losh Enable heap profiling and leak detection functionality. See the "opt.prof" 134*bf6039f0SWarner Losh option documentation for usage details. When enabled, there are several 135*bf6039f0SWarner Losh approaches to backtracing, and the configure script chooses the first one 136*bf6039f0SWarner Losh in the following list that appears to function correctly: 137*bf6039f0SWarner Losh 138*bf6039f0SWarner Losh + libunwind (requires --enable-prof-libunwind) 139*bf6039f0SWarner Losh + libgcc (unless --disable-prof-libgcc) 140*bf6039f0SWarner Losh + gcc intrinsics (unless --disable-prof-gcc) 141*bf6039f0SWarner Losh 142*bf6039f0SWarner Losh* `--enable-prof-libunwind` 143*bf6039f0SWarner Losh 144*bf6039f0SWarner Losh Use the libunwind library (http://www.nongnu.org/libunwind/) for stack 145*bf6039f0SWarner Losh backtracing. 146*bf6039f0SWarner Losh 147*bf6039f0SWarner Losh* `--disable-prof-libgcc` 148*bf6039f0SWarner Losh 149*bf6039f0SWarner Losh Disable the use of libgcc's backtracing functionality. 150*bf6039f0SWarner Losh 151*bf6039f0SWarner Losh* `--disable-prof-gcc` 152*bf6039f0SWarner Losh 153*bf6039f0SWarner Losh Disable the use of gcc intrinsics for backtracing. 154*bf6039f0SWarner Losh 155*bf6039f0SWarner Losh* `--with-static-libunwind=<libunwind.a>` 156*bf6039f0SWarner Losh 157*bf6039f0SWarner Losh Statically link against the specified libunwind.a rather than dynamically 158*bf6039f0SWarner Losh linking with -lunwind. 159*bf6039f0SWarner Losh 160*bf6039f0SWarner Losh* `--disable-fill` 161*bf6039f0SWarner Losh 162*bf6039f0SWarner Losh Disable support for junk/zero filling of memory. See the "opt.junk" and 163*bf6039f0SWarner Losh "opt.zero" option documentation for usage details. 164*bf6039f0SWarner Losh 165*bf6039f0SWarner Losh* `--disable-zone-allocator` 166*bf6039f0SWarner Losh 167*bf6039f0SWarner Losh Disable zone allocator for Darwin. This means jemalloc won't be hooked as 168*bf6039f0SWarner Losh the default allocator on OSX/iOS. 169*bf6039f0SWarner Losh 170*bf6039f0SWarner Losh* `--enable-utrace` 171*bf6039f0SWarner Losh 172*bf6039f0SWarner Losh Enable utrace(2)-based allocation tracing. This feature is not broadly 173*bf6039f0SWarner Losh portable (FreeBSD has it, but Linux and OS X do not). 174*bf6039f0SWarner Losh 175*bf6039f0SWarner Losh* `--enable-xmalloc` 176*bf6039f0SWarner Losh 177*bf6039f0SWarner Losh Enable support for optional immediate termination due to out-of-memory 178*bf6039f0SWarner Losh errors, as is commonly implemented by "xmalloc" wrapper function for malloc. 179*bf6039f0SWarner Losh See the "opt.xmalloc" option documentation for usage details. 180*bf6039f0SWarner Losh 181*bf6039f0SWarner Losh* `--enable-lazy-lock` 182*bf6039f0SWarner Losh 183*bf6039f0SWarner Losh Enable code that wraps pthread_create() to detect when an application 184*bf6039f0SWarner Losh switches from single-threaded to multi-threaded mode, so that it can avoid 185*bf6039f0SWarner Losh mutex locking/unlocking operations while in single-threaded mode. In 186*bf6039f0SWarner Losh practice, this feature usually has little impact on performance unless 187*bf6039f0SWarner Losh thread-specific caching is disabled. 188*bf6039f0SWarner Losh 189*bf6039f0SWarner Losh* `--disable-cache-oblivious` 190*bf6039f0SWarner Losh 191*bf6039f0SWarner Losh Disable cache-oblivious large allocation alignment for large allocation 192*bf6039f0SWarner Losh requests with no alignment constraints. If this feature is disabled, all 193*bf6039f0SWarner Losh large allocations are page-aligned as an implementation artifact, which can 194*bf6039f0SWarner Losh severely harm CPU cache utilization. However, the cache-oblivious layout 195*bf6039f0SWarner Losh comes at the cost of one extra page per large allocation, which in the 196*bf6039f0SWarner Losh most extreme case increases physical memory usage for the 16 KiB size class 197*bf6039f0SWarner Losh to 20 KiB. 198*bf6039f0SWarner Losh 199*bf6039f0SWarner Losh* `--disable-syscall` 200*bf6039f0SWarner Losh 201*bf6039f0SWarner Losh Disable use of syscall(2) rather than {open,read,write,close}(2). This is 202*bf6039f0SWarner Losh intended as a workaround for systems that place security limitations on 203*bf6039f0SWarner Losh syscall(2). 204*bf6039f0SWarner Losh 205*bf6039f0SWarner Losh* `--disable-cxx` 206*bf6039f0SWarner Losh 207*bf6039f0SWarner Losh Disable C++ integration. This will cause new and delete operator 208*bf6039f0SWarner Losh implementations to be omitted. 209*bf6039f0SWarner Losh 210*bf6039f0SWarner Losh* `--with-xslroot=<path>` 211*bf6039f0SWarner Losh 212*bf6039f0SWarner Losh Specify where to find DocBook XSL stylesheets when building the 213*bf6039f0SWarner Losh documentation. 214*bf6039f0SWarner Losh 215*bf6039f0SWarner Losh* `--with-lg-page=<lg-page>` 216*bf6039f0SWarner Losh 217*bf6039f0SWarner Losh Specify the base 2 log of the allocator page size, which must in turn be at 218*bf6039f0SWarner Losh least as large as the system page size. By default the configure script 219*bf6039f0SWarner Losh determines the host's page size and sets the allocator page size equal to 220*bf6039f0SWarner Losh the system page size, so this option need not be specified unless the 221*bf6039f0SWarner Losh system page size may change between configuration and execution, e.g. when 222*bf6039f0SWarner Losh cross compiling. 223*bf6039f0SWarner Losh 224*bf6039f0SWarner Losh* `--with-lg-hugepage=<lg-hugepage>` 225*bf6039f0SWarner Losh 226*bf6039f0SWarner Losh Specify the base 2 log of the system huge page size. This option is useful 227*bf6039f0SWarner Losh when cross compiling, or when overriding the default for systems that do 228*bf6039f0SWarner Losh not explicitly support huge pages. 229*bf6039f0SWarner Losh 230*bf6039f0SWarner Losh* `--with-lg-quantum=<lg-quantum>` 231*bf6039f0SWarner Losh 232*bf6039f0SWarner Losh Specify the base 2 log of the minimum allocation alignment. jemalloc needs 233*bf6039f0SWarner Losh to know the minimum alignment that meets the following C standard 234*bf6039f0SWarner Losh requirement (quoted from the April 12, 2011 draft of the C11 standard): 235*bf6039f0SWarner Losh 236*bf6039f0SWarner Losh > The pointer returned if the allocation succeeds is suitably aligned so 237*bf6039f0SWarner Losh that it may be assigned to a pointer to any type of object with a 238*bf6039f0SWarner Losh fundamental alignment requirement and then used to access such an object 239*bf6039f0SWarner Losh or an array of such objects in the space allocated [...] 240*bf6039f0SWarner Losh 241*bf6039f0SWarner Losh This setting is architecture-specific, and although jemalloc includes known 242*bf6039f0SWarner Losh safe values for the most commonly used modern architectures, there is a 243*bf6039f0SWarner Losh wrinkle related to GNU libc (glibc) that may impact your choice of 244*bf6039f0SWarner Losh <lg-quantum>. On most modern architectures, this mandates 16-byte 245*bf6039f0SWarner Losh alignment (<lg-quantum>=4), but the glibc developers chose not to meet this 246*bf6039f0SWarner Losh requirement for performance reasons. An old discussion can be found at 247*bf6039f0SWarner Losh <https://sourceware.org/bugzilla/show_bug.cgi?id=206> . Unlike glibc, 248*bf6039f0SWarner Losh jemalloc does follow the C standard by default (caveat: jemalloc 249*bf6039f0SWarner Losh technically cheats for size classes smaller than the quantum), but the fact 250*bf6039f0SWarner Losh that Linux systems already work around this allocator noncompliance means 251*bf6039f0SWarner Losh that it is generally safe in practice to let jemalloc's minimum alignment 252*bf6039f0SWarner Losh follow glibc's lead. If you specify `--with-lg-quantum=3` during 253*bf6039f0SWarner Losh configuration, jemalloc will provide additional size classes that are not 254*bf6039f0SWarner Losh 16-byte-aligned (24, 40, and 56). 255*bf6039f0SWarner Losh 256*bf6039f0SWarner Losh* `--with-lg-vaddr=<lg-vaddr>` 257*bf6039f0SWarner Losh 258*bf6039f0SWarner Losh Specify the number of significant virtual address bits. By default, the 259*bf6039f0SWarner Losh configure script attempts to detect virtual address size on those platforms 260*bf6039f0SWarner Losh where it knows how, and picks a default otherwise. This option may be 261*bf6039f0SWarner Losh useful when cross-compiling. 262*bf6039f0SWarner Losh 263*bf6039f0SWarner Losh* `--disable-initial-exec-tls` 264*bf6039f0SWarner Losh 265*bf6039f0SWarner Losh Disable the initial-exec TLS model for jemalloc's internal thread-local 266*bf6039f0SWarner Losh storage (on those platforms that support explicit settings). This can allow 267*bf6039f0SWarner Losh jemalloc to be dynamically loaded after program startup (e.g. using dlopen). 268*bf6039f0SWarner Losh Note that in this case, there will be two malloc implementations operating 269*bf6039f0SWarner Losh in the same process, which will almost certainly result in confusing runtime 270*bf6039f0SWarner Losh crashes if pointers leak from one implementation to the other. 271*bf6039f0SWarner Losh 272*bf6039f0SWarner Losh* `--disable-libdl` 273*bf6039f0SWarner Losh 274*bf6039f0SWarner Losh Disable the usage of libdl, namely dlsym(3) which is required by the lazy 275*bf6039f0SWarner Losh lock option. This can allow building static binaries. 276*bf6039f0SWarner Losh 277*bf6039f0SWarner LoshThe following environment variables (not a definitive list) impact configure's 278*bf6039f0SWarner Loshbehavior: 279*bf6039f0SWarner Losh 280*bf6039f0SWarner Losh* `CFLAGS="?"` 281*bf6039f0SWarner Losh* `CXXFLAGS="?"` 282*bf6039f0SWarner Losh 283*bf6039f0SWarner Losh Pass these flags to the C/C++ compiler. Any flags set by the configure 284*bf6039f0SWarner Losh script are prepended, which means explicitly set flags generally take 285*bf6039f0SWarner Losh precedence. Take care when specifying flags such as -Werror, because 286*bf6039f0SWarner Losh configure tests may be affected in undesirable ways. 287*bf6039f0SWarner Losh 288*bf6039f0SWarner Losh* `EXTRA_CFLAGS="?"` 289*bf6039f0SWarner Losh* `EXTRA_CXXFLAGS="?"` 290*bf6039f0SWarner Losh 291*bf6039f0SWarner Losh Append these flags to CFLAGS/CXXFLAGS, without passing them to the 292*bf6039f0SWarner Losh compiler(s) during configuration. This makes it possible to add flags such 293*bf6039f0SWarner Losh as -Werror, while allowing the configure script to determine what other 294*bf6039f0SWarner Losh flags are appropriate for the specified configuration. 295*bf6039f0SWarner Losh 296*bf6039f0SWarner Losh* `CPPFLAGS="?"` 297*bf6039f0SWarner Losh 298*bf6039f0SWarner Losh Pass these flags to the C preprocessor. Note that CFLAGS is not passed to 299*bf6039f0SWarner Losh 'cpp' when 'configure' is looking for include files, so you must use 300*bf6039f0SWarner Losh CPPFLAGS instead if you need to help 'configure' find header files. 301*bf6039f0SWarner Losh 302*bf6039f0SWarner Losh* `LD_LIBRARY_PATH="?"` 303*bf6039f0SWarner Losh 304*bf6039f0SWarner Losh 'ld' uses this colon-separated list to find libraries. 305*bf6039f0SWarner Losh 306*bf6039f0SWarner Losh* `LDFLAGS="?"` 307*bf6039f0SWarner Losh 308*bf6039f0SWarner Losh Pass these flags when linking. 309*bf6039f0SWarner Losh 310*bf6039f0SWarner Losh* `PATH="?"` 311*bf6039f0SWarner Losh 312*bf6039f0SWarner Losh 'configure' uses this to find programs. 313*bf6039f0SWarner Losh 314*bf6039f0SWarner LoshIn some cases it may be necessary to work around configuration results that do 315*bf6039f0SWarner Loshnot match reality. For example, Linux 4.5 added support for the MADV_FREE flag 316*bf6039f0SWarner Loshto madvise(2), which can cause problems if building on a host with MADV_FREE 317*bf6039f0SWarner Loshsupport and deploying to a target without. To work around this, use a cache 318*bf6039f0SWarner Loshfile to override the relevant configuration variable defined in configure.ac, 319*bf6039f0SWarner Loshe.g.: 320*bf6039f0SWarner Losh 321*bf6039f0SWarner Losh echo "je_cv_madv_free=no" > config.cache && ./configure -C 322*bf6039f0SWarner Losh 323*bf6039f0SWarner Losh 324*bf6039f0SWarner Losh## Advanced compilation 325*bf6039f0SWarner Losh 326*bf6039f0SWarner LoshTo build only parts of jemalloc, use the following targets: 327*bf6039f0SWarner Losh 328*bf6039f0SWarner Losh build_lib_shared 329*bf6039f0SWarner Losh build_lib_static 330*bf6039f0SWarner Losh build_lib 331*bf6039f0SWarner Losh build_doc_html 332*bf6039f0SWarner Losh build_doc_man 333*bf6039f0SWarner Losh build_doc 334*bf6039f0SWarner Losh 335*bf6039f0SWarner LoshTo install only parts of jemalloc, use the following targets: 336*bf6039f0SWarner Losh 337*bf6039f0SWarner Losh install_bin 338*bf6039f0SWarner Losh install_include 339*bf6039f0SWarner Losh install_lib_shared 340*bf6039f0SWarner Losh install_lib_static 341*bf6039f0SWarner Losh install_lib_pc 342*bf6039f0SWarner Losh install_lib 343*bf6039f0SWarner Losh install_doc_html 344*bf6039f0SWarner Losh install_doc_man 345*bf6039f0SWarner Losh install_doc 346*bf6039f0SWarner Losh 347*bf6039f0SWarner LoshTo clean up build results to varying degrees, use the following make targets: 348*bf6039f0SWarner Losh 349*bf6039f0SWarner Losh clean 350*bf6039f0SWarner Losh distclean 351*bf6039f0SWarner Losh relclean 352*bf6039f0SWarner Losh 353*bf6039f0SWarner Losh 354*bf6039f0SWarner Losh## Advanced installation 355*bf6039f0SWarner Losh 356*bf6039f0SWarner LoshOptionally, define make variables when invoking make, including (not 357*bf6039f0SWarner Loshexclusively): 358*bf6039f0SWarner Losh 359*bf6039f0SWarner Losh* `INCLUDEDIR="?"` 360*bf6039f0SWarner Losh 361*bf6039f0SWarner Losh Use this as the installation prefix for header files. 362*bf6039f0SWarner Losh 363*bf6039f0SWarner Losh* `LIBDIR="?"` 364*bf6039f0SWarner Losh 365*bf6039f0SWarner Losh Use this as the installation prefix for libraries. 366*bf6039f0SWarner Losh 367*bf6039f0SWarner Losh* `MANDIR="?"` 368*bf6039f0SWarner Losh 369*bf6039f0SWarner Losh Use this as the installation prefix for man pages. 370*bf6039f0SWarner Losh 371*bf6039f0SWarner Losh* `DESTDIR="?"` 372*bf6039f0SWarner Losh 373*bf6039f0SWarner Losh Prepend DESTDIR to INCLUDEDIR, LIBDIR, DATADIR, and MANDIR. This is useful 374*bf6039f0SWarner Losh when installing to a different path than was specified via --prefix. 375*bf6039f0SWarner Losh 376*bf6039f0SWarner Losh* `CC="?"` 377*bf6039f0SWarner Losh 378*bf6039f0SWarner Losh Use this to invoke the C compiler. 379*bf6039f0SWarner Losh 380*bf6039f0SWarner Losh* `CFLAGS="?"` 381*bf6039f0SWarner Losh 382*bf6039f0SWarner Losh Pass these flags to the compiler. 383*bf6039f0SWarner Losh 384*bf6039f0SWarner Losh* `CPPFLAGS="?"` 385*bf6039f0SWarner Losh 386*bf6039f0SWarner Losh Pass these flags to the C preprocessor. 387*bf6039f0SWarner Losh 388*bf6039f0SWarner Losh* `LDFLAGS="?"` 389*bf6039f0SWarner Losh 390*bf6039f0SWarner Losh Pass these flags when linking. 391*bf6039f0SWarner Losh 392*bf6039f0SWarner Losh* `PATH="?"` 393*bf6039f0SWarner Losh 394*bf6039f0SWarner Losh Use this to search for programs used during configuration and building. 395*bf6039f0SWarner Losh 396*bf6039f0SWarner Losh 397*bf6039f0SWarner Losh## Development 398*bf6039f0SWarner Losh 399*bf6039f0SWarner LoshIf you intend to make non-trivial changes to jemalloc, use the 'autogen.sh' 400*bf6039f0SWarner Loshscript rather than 'configure'. This re-generates 'configure', enables 401*bf6039f0SWarner Loshconfiguration dependency rules, and enables re-generation of automatically 402*bf6039f0SWarner Loshgenerated source files. 403*bf6039f0SWarner Losh 404*bf6039f0SWarner LoshThe build system supports using an object directory separate from the source 405*bf6039f0SWarner Loshtree. For example, you can create an 'obj' directory, and from within that 406*bf6039f0SWarner Loshdirectory, issue configuration and build commands: 407*bf6039f0SWarner Losh 408*bf6039f0SWarner Losh autoconf 409*bf6039f0SWarner Losh mkdir obj 410*bf6039f0SWarner Losh cd obj 411*bf6039f0SWarner Losh ../configure --enable-autogen 412*bf6039f0SWarner Losh make 413*bf6039f0SWarner Losh 414*bf6039f0SWarner Losh 415*bf6039f0SWarner Losh## Documentation 416*bf6039f0SWarner Losh 417*bf6039f0SWarner LoshThe manual page is generated in both html and roff formats. Any web browser 418*bf6039f0SWarner Loshcan be used to view the html manual. The roff manual page can be formatted 419*bf6039f0SWarner Loshprior to installation via the following command: 420*bf6039f0SWarner Losh 421*bf6039f0SWarner Losh nroff -man -t doc/jemalloc.3 422