blob: c61a665b2339b7cf285bc66a0ea040c5b71a78fd [file] [log] [blame]
Jason Evansb7924f52009-06-23 19:01:18 -07001dnl Process this file with autoconf to produce a configure script.
2AC_INIT([Makefile.in])
3
Jason Evansf3340ca2009-06-30 16:17:05 -07004dnl ============================================================================
5dnl Custom macro definitions.
6
7dnl JE_CFLAGS_APPEND(cflag)
8AC_DEFUN([JE_CFLAGS_APPEND],
9[
10AC_MSG_CHECKING([whether compiler supports $1])
11TCFLAGS="${CFLAGS}"
12if test "x${CFLAGS}" = "x" ; then
13 CFLAGS="$1"
14else
15 CFLAGS="${CFLAGS} $1"
16fi
17AC_RUN_IFELSE([AC_LANG_PROGRAM(
18[[
19]], [[
20 return 0;
21]])],
22 AC_MSG_RESULT([yes]),
23 AC_MSG_RESULT([no])
24 [CFLAGS="${TCFLAGS}"]
25)
26])
27
28dnl JE_COMPILABLE(label, hcode, mcode, rvar)
29AC_DEFUN([JE_COMPILABLE],
30[
31AC_MSG_CHECKING([whether $1 is compilable])
Jason Evans9f949f92011-03-22 20:44:40 -070032AC_RUN_IFELSE([AC_LANG_PROGRAM(
Jason Evansf3340ca2009-06-30 16:17:05 -070033[$2], [$3])],
34 AC_MSG_RESULT([yes])
35 [$4="yes"],
36 AC_MSG_RESULT([no])
37 [$4="no"]
38)
39])
40
41dnl ============================================================================
42
Jason Evansf576c632011-11-01 22:27:41 -070043dnl Library revision.
44rev=1
45AC_SUBST([rev])
46
Jason Evansb7924f52009-06-23 19:01:18 -070047srcroot=$srcdir
48if test "x${srcroot}" = "x." ; then
49 srcroot=""
50else
51 srcroot="${srcroot}/"
52fi
53AC_SUBST([srcroot])
54abs_srcroot="`cd \"${srcdir}\"; pwd`/"
55AC_SUBST([abs_srcroot])
56
57objroot=""
58AC_SUBST([objroot])
59abs_objroot="`pwd`/"
60AC_SUBST([abs_objroot])
61
62dnl Munge install path variables.
63if test "x$prefix" = "xNONE" ; then
64 prefix="/usr/local"
65fi
66if test "x$exec_prefix" = "xNONE" ; then
67 exec_prefix=$prefix
68fi
69PREFIX=$prefix
70AC_SUBST([PREFIX])
71BINDIR=`eval echo $bindir`
72BINDIR=`eval echo $BINDIR`
73AC_SUBST([BINDIR])
74INCLUDEDIR=`eval echo $includedir`
75INCLUDEDIR=`eval echo $INCLUDEDIR`
76AC_SUBST([INCLUDEDIR])
77LIBDIR=`eval echo $libdir`
78LIBDIR=`eval echo $LIBDIR`
79AC_SUBST([LIBDIR])
80DATADIR=`eval echo $datadir`
81DATADIR=`eval echo $DATADIR`
82AC_SUBST([DATADIR])
83MANDIR=`eval echo $mandir`
84MANDIR=`eval echo $MANDIR`
85AC_SUBST([MANDIR])
86
Jason Evansaee7fd22010-11-24 22:00:02 -080087dnl Support for building documentation.
88AC_PATH_PROG([XSLTPROC], [xsltproc], , [$PATH])
89AC_ARG_WITH([xslroot],
90 [AS_HELP_STRING([--with-xslroot=<path>], [XSL stylesheet root path])],
91if test "x$with_xslroot" = "xno" ; then
92 XSLROOT="/usr/share/xml/docbook/stylesheet/docbook-xsl"
93else
94 XSLROOT="${with_xslroot}"
95fi,
96 XSLROOT="/usr/share/xml/docbook/stylesheet/docbook-xsl"
97)
98AC_SUBST([XSLROOT])
99
Jason Evansf3340ca2009-06-30 16:17:05 -0700100dnl If CFLAGS isn't defined, set CFLAGS to something reasonable. Otherwise,
101dnl just prevent autoconf from molesting CFLAGS.
Jason Evansb7924f52009-06-23 19:01:18 -0700102CFLAGS=$CFLAGS
103AC_PROG_CC
104if test "x$CFLAGS" = "x" ; then
105 no_CFLAGS="yes"
Jason Evanscfeccd32010-03-03 15:48:20 -0800106 if test "x$GCC" = "xyes" ; then
107 JE_CFLAGS_APPEND([-std=gnu99])
108 JE_CFLAGS_APPEND([-Wall])
109 JE_CFLAGS_APPEND([-pipe])
110 JE_CFLAGS_APPEND([-g3])
111 fi
Jason Evansb7924f52009-06-23 19:01:18 -0700112fi
113dnl Append EXTRA_CFLAGS to CFLAGS, if defined.
114if test "x$EXTRA_CFLAGS" != "x" ; then
Jason Evansf3340ca2009-06-30 16:17:05 -0700115 JE_CFLAGS_APPEND([$EXTRA_CFLAGS])
Jason Evansb7924f52009-06-23 19:01:18 -0700116fi
117AC_PROG_CPP
118
Jason Evansb7924f52009-06-23 19:01:18 -0700119AC_CHECK_SIZEOF([void *])
120if test "x${ac_cv_sizeof_void_p}" = "x8" ; then
Jason Evans94ad2b52009-12-29 00:09:15 -0800121 LG_SIZEOF_PTR=3
Jason Evansb7924f52009-06-23 19:01:18 -0700122elif test "x${ac_cv_sizeof_void_p}" = "x4" ; then
Jason Evans94ad2b52009-12-29 00:09:15 -0800123 LG_SIZEOF_PTR=2
Jason Evansb7924f52009-06-23 19:01:18 -0700124else
125 AC_MSG_ERROR([Unsupported pointer size: ${ac_cv_sizeof_void_p}])
126fi
Jason Evans94ad2b52009-12-29 00:09:15 -0800127AC_DEFINE_UNQUOTED([LG_SIZEOF_PTR], [$LG_SIZEOF_PTR])
128
129AC_CHECK_SIZEOF([int])
130if test "x${ac_cv_sizeof_int}" = "x8" ; then
131 LG_SIZEOF_INT=3
132elif test "x${ac_cv_sizeof_int}" = "x4" ; then
133 LG_SIZEOF_INT=2
134else
135 AC_MSG_ERROR([Unsupported int size: ${ac_cv_sizeof_int}])
136fi
137AC_DEFINE_UNQUOTED([LG_SIZEOF_INT], [$LG_SIZEOF_INT])
Jason Evansb7924f52009-06-23 19:01:18 -0700138
Jason Evans84c8eef2011-03-16 10:30:13 -0700139AC_CHECK_SIZEOF([long])
140if test "x${ac_cv_sizeof_long}" = "x8" ; then
141 LG_SIZEOF_LONG=3
142elif test "x${ac_cv_sizeof_long}" = "x4" ; then
143 LG_SIZEOF_LONG=2
144else
145 AC_MSG_ERROR([Unsupported long size: ${ac_cv_sizeof_long}])
146fi
147AC_DEFINE_UNQUOTED([LG_SIZEOF_LONG], [$LG_SIZEOF_LONG])
148
Jason Evansb7924f52009-06-23 19:01:18 -0700149AC_CANONICAL_HOST
150dnl CPU-specific settings.
151CPU_SPINWAIT=""
152case "${host_cpu}" in
153 i[[345]]86)
154 ;;
155 i686)
Jason Evansf3340ca2009-06-30 16:17:05 -0700156 JE_COMPILABLE([__asm__], [], [[__asm__ volatile("pause"); return 0;]],
157 [asm])
158 if test "x${asm}" = "xyes" ; then
159 CPU_SPINWAIT='__asm__ volatile("pause")'
160 fi
Jason Evansb7924f52009-06-23 19:01:18 -0700161 ;;
162 x86_64)
Jason Evansf3340ca2009-06-30 16:17:05 -0700163 JE_COMPILABLE([__asm__ syntax], [],
164 [[__asm__ volatile("pause"); return 0;]], [asm])
165 if test "x${asm}" = "xyes" ; then
166 CPU_SPINWAIT='__asm__ volatile("pause")'
167 fi
Jason Evansb7924f52009-06-23 19:01:18 -0700168 ;;
169 *)
170 ;;
171esac
172AC_DEFINE_UNQUOTED([CPU_SPINWAIT], [$CPU_SPINWAIT])
173
Antony Dovgal2bd3cbc2011-10-13 09:33:33 +0400174LD_PRELOAD_VAR="LD_PRELOAD"
Jason Evansf576c632011-11-01 22:27:41 -0700175so="so"
Antony Dovgal2bd3cbc2011-10-13 09:33:33 +0400176
Jason Evans7372b152012-02-10 20:22:09 -0800177dnl Heap profiling uses the log(3) function.
178LIBS="$LIBS -lm"
179
Jason Evansb7924f52009-06-23 19:01:18 -0700180dnl Platform-specific settings. abi and RPATH can probably be determined
181dnl programmatically, but doing so is error-prone, which makes it generally
182dnl not worth the trouble.
183dnl
184dnl Define cpp macros in CPPFLAGS, rather than doing AC_DEFINE(macro), since the
185dnl definitions need to be seen before any headers are included, which is a pain
186dnl to make happen otherwise.
187case "${host}" in
188 *-*-darwin*)
189 CFLAGS="$CFLAGS -fno-common -no-cpp-precomp"
190 abi="macho"
Jason Evansce930552010-10-24 13:03:07 -0700191 AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE])
Jason Evansb7924f52009-06-23 19:01:18 -0700192 RPATH=""
Antony Dovgal2bd3cbc2011-10-13 09:33:33 +0400193 LD_PRELOAD_VAR="DYLD_INSERT_LIBRARIES"
Jason Evansf576c632011-11-01 22:27:41 -0700194 so="dylib"
Jason Evansb7924f52009-06-23 19:01:18 -0700195 ;;
196 *-*-freebsd*)
197 CFLAGS="$CFLAGS"
198 abi="elf"
Jason Evans2dbecf12010-09-05 10:35:13 -0700199 AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE])
Jason Evansb7924f52009-06-23 19:01:18 -0700200 RPATH="-Wl,-rpath,"
201 ;;
202 *-*-linux*)
203 CFLAGS="$CFLAGS"
204 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
205 abi="elf"
Jason Evans2dbecf12010-09-05 10:35:13 -0700206 AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED])
Jason Evansb7924f52009-06-23 19:01:18 -0700207 RPATH="-Wl,-rpath,"
208 ;;
209 *-*-netbsd*)
210 AC_MSG_CHECKING([ABI])
211 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
212[[#ifdef __ELF__
213/* ELF */
214#else
215#error aout
216#endif
217]])],
218 [CFLAGS="$CFLAGS"; abi="elf"],
219 [abi="aout"])
220 AC_MSG_RESULT([$abi])
Jason Evans2dbecf12010-09-05 10:35:13 -0700221 AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE])
Jason Evansb7924f52009-06-23 19:01:18 -0700222 RPATH="-Wl,-rpath,"
223 ;;
224 *-*-solaris2*)
225 CFLAGS="$CFLAGS"
226 abi="elf"
227 RPATH="-Wl,-R,"
228 dnl Solaris needs this for sigwait().
229 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
230 LIBS="$LIBS -lposix4 -lsocket -lnsl"
231 ;;
Antony Dovgal2bd3cbc2011-10-13 09:33:33 +0400232 *-ibm-aix*)
233 if "$LG_SIZEOF_PTR" = "8"; then
234 dnl 64bit AIX
235 LD_PRELOAD_VAR="LDR_PRELOAD64"
236 else
237 dnl 32bit AIX
238 LD_PRELOAD_VAR="LDR_PRELOAD"
239 fi
240 abi="xcoff"
241 RPATH="-Wl,-rpath,"
242 ;;
Jason Evansb7924f52009-06-23 19:01:18 -0700243 *)
244 AC_MSG_RESULT([Unsupported operating system: ${host}])
245 abi="elf"
246 RPATH="-Wl,-rpath,"
247 ;;
248esac
249AC_SUBST([abi])
250AC_SUBST([RPATH])
Antony Dovgal2bd3cbc2011-10-13 09:33:33 +0400251AC_SUBST([LD_PRELOAD_VAR])
Jason Evansf576c632011-11-01 22:27:41 -0700252AC_SUBST([so])
Jason Evansb7924f52009-06-23 19:01:18 -0700253
Jason Evansfa5d2452011-03-15 10:25:59 -0700254JE_COMPILABLE([__attribute__ syntax],
255 [static __attribute__((unused)) void foo(void){}],
256 [],
257 [attribute])
258if test "x${attribute}" = "xyes" ; then
259 AC_DEFINE([JEMALLOC_HAVE_ATTR], [ ])
260 if test "x${GCC}" = "xyes" -a "x${abi}" = "xelf"; then
261 JE_CFLAGS_APPEND([-fvisibility=hidden])
262 fi
263fi
264
Jason Evanscfdc8cf2010-11-30 16:50:58 -0800265JE_COMPILABLE([mremap(...MREMAP_FIXED...)], [
266#define _GNU_SOURCE
267#include <sys/mman.h>
268], [
269void *p = mremap((void *)0, 0, 0, MREMAP_MAYMOVE|MREMAP_FIXED, (void *)0);
270], [mremap_fixed])
271if test "x${mremap_fixed}" = "xyes" ; then
272 AC_DEFINE([JEMALLOC_MREMAP_FIXED])
273fi
274
Jason Evansb7924f52009-06-23 19:01:18 -0700275dnl Support optional additions to rpath.
276AC_ARG_WITH([rpath],
Jason Evans90895cf2009-12-29 00:09:15 -0800277 [AS_HELP_STRING([--with-rpath=<rpath>], [Colon-separated rpath (ELF systems only)])],
Jason Evansb7924f52009-06-23 19:01:18 -0700278if test "x$with_rpath" = "xno" ; then
279 RPATH_EXTRA=
280else
281 RPATH_EXTRA="`echo $with_rpath | tr \":\" \" \"`"
282fi,
283 RPATH_EXTRA=
284)
285AC_SUBST([RPATH_EXTRA])
286
287dnl Disable rules that do automatic regeneration of configure output by default.
288AC_ARG_ENABLE([autogen],
Jason Evans78d815c2010-01-17 14:06:20 -0800289 [AS_HELP_STRING([--enable-autogen], [Automatically regenerate configure output])],
Jason Evansb7924f52009-06-23 19:01:18 -0700290if test "x$enable_autogen" = "xno" ; then
291 enable_autogen="0"
292else
293 enable_autogen="1"
294fi
295,
296enable_autogen="0"
297)
298AC_SUBST([enable_autogen])
299
300AC_PROG_INSTALL
301AC_PROG_RANLIB
302AC_PATH_PROG([AR], [ar], , [$PATH])
303AC_PATH_PROG([LD], [ld], , [$PATH])
304AC_PATH_PROG([AUTOCONF], [autoconf], , [$PATH])
305
Jason Evans7e77eaf2012-03-02 17:47:37 -0800306public_syms="malloc_conf malloc_message malloc calloc posix_memalign realloc free malloc_usable_size malloc_stats_print mallctl mallctlnametomib mallctlbymib"
307
308dnl Check for allocator-related functions that should be wrapped.
309AC_CHECK_FUNC([memalign],
310 [AC_DEFINE([JEMALLOC_OVERRIDE_MEMALIGN])
311 public_syms="${public_syms} memalign"])
312AC_CHECK_FUNC([valloc],
313 [AC_DEFINE([JEMALLOC_OVERRIDE_VALLOC])
314 public_syms="${public_syms} valloc"])
315
316dnl Support the experimental API by default.
317AC_ARG_ENABLE([experimental],
318 [AS_HELP_STRING([--disable-experimental],
319 [Disable support for the experimental API])],
320[if test "x$enable_experimental" = "xno" ; then
321 enable_experimental="0"
322else
323 enable_experimental="1"
324fi
325],
326[enable_experimental="1"]
327)
328if test "x$enable_experimental" = "x1" ; then
329 AC_DEFINE([JEMALLOC_EXPERIMENTAL], [ ])
330 public_syms="${public_syms} allocm dallocm nallocm rallocm sallocm"
331fi
332AC_SUBST([enable_experimental])
333
Jason Evans0a5489e2012-03-01 17:19:20 -0800334dnl Perform no name mangling by default.
335AC_ARG_WITH([mangling],
336 [AS_HELP_STRING([--with-mangling=<map>], [Mangle symbols in <map>])],
337 [mangling_map="$with_mangling"], [mangling_map=""])
338for nm in `echo ${mangling_map} |tr ',' ' '` ; do
339 n="je_`echo ${nm} |tr ':' ' ' |awk '{print $1}'`"
340 m=`echo ${nm} |tr ':' ' ' |awk '{print $2}'`
341 AC_DEFINE_UNQUOTED([${n}], [${m}])
342done
343
Jason Evans90895cf2009-12-29 00:09:15 -0800344dnl Do not prefix public APIs by default.
345AC_ARG_WITH([jemalloc_prefix],
346 [AS_HELP_STRING([--with-jemalloc-prefix=<prefix>], [Prefix to prepend to all public APIs])],
Jason Evansb0fd5012010-01-17 01:49:20 -0800347 [JEMALLOC_PREFIX="$with_jemalloc_prefix"],
Jason Evans2dbecf12010-09-05 10:35:13 -0700348 [if test "x$abi" != "xmacho" ; then
349 JEMALLOC_PREFIX=""
350else
351 JEMALLOC_PREFIX="je_"
352fi]
Jason Evans90895cf2009-12-29 00:09:15 -0800353)
354if test "x$JEMALLOC_PREFIX" != "x" ; then
Jason Evanse7339702010-10-23 18:37:06 -0700355 JEMALLOC_CPREFIX=`echo ${JEMALLOC_PREFIX} | tr "a-z" "A-Z"`
356 AC_DEFINE_UNQUOTED([JEMALLOC_PREFIX], ["$JEMALLOC_PREFIX"])
357 AC_DEFINE_UNQUOTED([JEMALLOC_CPREFIX], ["$JEMALLOC_CPREFIX"])
Jason Evans90895cf2009-12-29 00:09:15 -0800358fi
Jason Evans0a5489e2012-03-01 17:19:20 -0800359dnl Generate macros to rename public symbols. All public symbols are prefixed
360dnl with je_ in the source code, so these macro definitions are needed even if
361dnl --with-jemalloc-prefix wasn't specified.
Jason Evans7e77eaf2012-03-02 17:47:37 -0800362for stem in ${public_syms}; do
Jason Evans0a5489e2012-03-01 17:19:20 -0800363 n="je_${stem}"
364 m="${JEMALLOC_PREFIX}${stem}"
365 AC_DEFINE_UNQUOTED([${n}], [${m}])
366done
Jason Evans90895cf2009-12-29 00:09:15 -0800367
Jason Evans746e77a2011-07-30 16:40:52 -0700368dnl Do not mangle library-private APIs by default.
369AC_ARG_WITH([private_namespace],
370 [AS_HELP_STRING([--with-private-namespace=<prefix>], [Prefix to prepend to all library-private APIs])],
371 [JEMALLOC_PRIVATE_NAMESPACE="$with_private_namespace"],
372 [JEMALLOC_PRIVATE_NAMESPACE=""]
373)
374AC_DEFINE_UNQUOTED([JEMALLOC_PRIVATE_NAMESPACE], ["$JEMALLOC_PRIVATE_NAMESPACE"])
375if test "x$JEMALLOC_PRIVATE_NAMESPACE" != "x" ; then
376 AC_DEFINE_UNQUOTED([JEMALLOC_N(string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix)], [${JEMALLOC_PRIVATE_NAMESPACE}##string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix])
377else
378 AC_DEFINE_UNQUOTED([JEMALLOC_N(string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix)], [string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix])
379fi
380
Jason Evansb0fd5012010-01-17 01:49:20 -0800381dnl Do not add suffix to installed files by default.
382AC_ARG_WITH([install_suffix],
383 [AS_HELP_STRING([--with-install-suffix=<suffix>], [Suffix to append to all installed files])],
384 [INSTALL_SUFFIX="$with_install_suffix"],
385 [INSTALL_SUFFIX=]
386)
387install_suffix="$INSTALL_SUFFIX"
388AC_SUBST([install_suffix])
389
Jason Evansaee7fd22010-11-24 22:00:02 -0800390cfgoutputs_in="${srcroot}Makefile.in"
391cfgoutputs_in="${cfgoutputs_in} ${srcroot}doc/html.xsl.in"
392cfgoutputs_in="${cfgoutputs_in} ${srcroot}doc/manpages.xsl.in"
393cfgoutputs_in="${cfgoutputs_in} ${srcroot}doc/jemalloc.xml.in"
Jason Evans0656ec02010-04-07 23:37:35 -0700394cfgoutputs_in="${cfgoutputs_in} ${srcroot}include/jemalloc/jemalloc.h.in"
395cfgoutputs_in="${cfgoutputs_in} ${srcroot}include/jemalloc/internal/jemalloc_internal.h.in"
Jason Evans9f3b0a72010-10-07 09:53:26 -0700396cfgoutputs_in="${cfgoutputs_in} ${srcroot}test/jemalloc_test.h.in"
Jason Evansb0fd5012010-01-17 01:49:20 -0800397
Jason Evansaee7fd22010-11-24 22:00:02 -0800398cfgoutputs_out="Makefile"
399cfgoutputs_out="${cfgoutputs_out} doc/html.xsl"
400cfgoutputs_out="${cfgoutputs_out} doc/manpages.xsl"
401cfgoutputs_out="${cfgoutputs_out} doc/jemalloc${install_suffix}.xml"
Jason Evans376b1522010-02-11 14:45:59 -0800402cfgoutputs_out="${cfgoutputs_out} include/jemalloc/jemalloc${install_suffix}.h"
403cfgoutputs_out="${cfgoutputs_out} include/jemalloc/internal/jemalloc_internal.h"
Jason Evans9f3b0a72010-10-07 09:53:26 -0700404cfgoutputs_out="${cfgoutputs_out} test/jemalloc_test.h"
Jason Evansb0fd5012010-01-17 01:49:20 -0800405
Jason Evansaee7fd22010-11-24 22:00:02 -0800406cfgoutputs_tup="Makefile"
407cfgoutputs_tup="${cfgoutputs_tup} doc/html.xsl:doc/html.xsl.in"
408cfgoutputs_tup="${cfgoutputs_tup} doc/manpages.xsl:doc/manpages.xsl.in"
409cfgoutputs_tup="${cfgoutputs_tup} doc/jemalloc${install_suffix}.xml:doc/jemalloc.xml.in"
Jason Evans376b1522010-02-11 14:45:59 -0800410cfgoutputs_tup="${cfgoutputs_tup} include/jemalloc/jemalloc${install_suffix}.h:include/jemalloc/jemalloc.h.in"
411cfgoutputs_tup="${cfgoutputs_tup} include/jemalloc/internal/jemalloc_internal.h"
Jason Evans9f3b0a72010-10-07 09:53:26 -0700412cfgoutputs_tup="${cfgoutputs_tup} test/jemalloc_test.h:test/jemalloc_test.h.in"
Jason Evansb0fd5012010-01-17 01:49:20 -0800413
Jason Evans0656ec02010-04-07 23:37:35 -0700414cfghdrs_in="${srcroot}include/jemalloc/jemalloc_defs.h.in"
Jason Evansb1726102012-02-28 16:50:47 -0800415cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/internal/size_classes.sh"
Jason Evansb0fd5012010-01-17 01:49:20 -0800416
Jason Evans376b1522010-02-11 14:45:59 -0800417cfghdrs_out="include/jemalloc/jemalloc_defs${install_suffix}.h"
Jason Evansb1726102012-02-28 16:50:47 -0800418cfghdrs_out="${cfghdrs_out} include/jemalloc/internal/size_classes.h"
Jason Evansb0fd5012010-01-17 01:49:20 -0800419
Jason Evans376b1522010-02-11 14:45:59 -0800420cfghdrs_tup="include/jemalloc/jemalloc_defs${install_suffix}.h:include/jemalloc/jemalloc_defs.h.in"
Jason Evansb0fd5012010-01-17 01:49:20 -0800421
Jason Evans355b4382010-09-20 19:20:48 -0700422dnl Do not silence irrelevant compiler warnings by default, since enabling this
423dnl option incurs a performance penalty.
424AC_ARG_ENABLE([cc-silence],
425 [AS_HELP_STRING([--enable-cc-silence],
426 [Silence irrelevant compiler warnings])],
427[if test "x$enable_cc_silence" = "xno" ; then
428 enable_cc_silence="0"
429else
430 enable_cc_silence="1"
431fi
432],
433[enable_cc_silence="0"]
434)
435if test "x$enable_cc_silence" = "x1" ; then
436 AC_DEFINE([JEMALLOC_CC_SILENCE])
437fi
438
Jason Evansb7924f52009-06-23 19:01:18 -0700439dnl Do not compile with debugging by default.
440AC_ARG_ENABLE([debug],
441 [AS_HELP_STRING([--enable-debug], [Build debugging code])],
442[if test "x$enable_debug" = "xno" ; then
443 enable_debug="0"
444else
445 enable_debug="1"
446fi
447],
448[enable_debug="0"]
449)
450if test "x$enable_debug" = "x1" ; then
451 AC_DEFINE([JEMALLOC_DEBUG], [ ])
Jason Evans2dbecf12010-09-05 10:35:13 -0700452 AC_DEFINE([JEMALLOC_IVSALLOC], [ ])
Jason Evansb7924f52009-06-23 19:01:18 -0700453fi
454AC_SUBST([enable_debug])
455
456dnl Only optimize if not debugging.
457if test "x$enable_debug" = "x0" -a "x$no_CFLAGS" = "xyes" ; then
458 dnl Make sure that an optimization flag was not specified in EXTRA_CFLAGS.
Jason Evansf3340ca2009-06-30 16:17:05 -0700459 optimize="no"
460 echo "$EXTRA_CFLAGS" | grep "\-O" >/dev/null || optimize="yes"
461 if test "x${optimize}" = "xyes" ; then
462 if test "x$GCC" = "xyes" ; then
463 JE_CFLAGS_APPEND([-O3])
464 JE_CFLAGS_APPEND([-funroll-loops])
Jason Evansf3340ca2009-06-30 16:17:05 -0700465 else
466 JE_CFLAGS_APPEND([-O])
467 fi
Jason Evansb7924f52009-06-23 19:01:18 -0700468 fi
469fi
470
Jason Evansd073a322012-02-28 20:41:16 -0800471dnl Enable statistics calculation by default.
Jason Evansb7924f52009-06-23 19:01:18 -0700472AC_ARG_ENABLE([stats],
Jason Evans777c1912012-02-28 20:49:22 -0800473 [AS_HELP_STRING([--disable-stats],
474 [Disable statistics calculation/reporting])],
Jason Evansb7924f52009-06-23 19:01:18 -0700475[if test "x$enable_stats" = "xno" ; then
476 enable_stats="0"
477else
478 enable_stats="1"
479fi
480],
Jason Evansd073a322012-02-28 20:41:16 -0800481[enable_stats="1"]
Jason Evansb7924f52009-06-23 19:01:18 -0700482)
483if test "x$enable_stats" = "x1" ; then
484 AC_DEFINE([JEMALLOC_STATS], [ ])
485fi
486AC_SUBST([enable_stats])
487
Jason Evans6109fe02010-02-10 10:37:56 -0800488dnl Do not enable profiling by default.
489AC_ARG_ENABLE([prof],
490 [AS_HELP_STRING([--enable-prof], [Enable allocation profiling])],
491[if test "x$enable_prof" = "xno" ; then
492 enable_prof="0"
493else
494 enable_prof="1"
495fi
496],
497[enable_prof="0"]
498)
Jason Evans77f350b2011-03-15 22:23:12 -0700499if test "x$enable_prof" = "x1" ; then
500 backtrace_method=""
Jason Evansb27805b2010-02-10 18:15:53 -0800501else
Jason Evans77f350b2011-03-15 22:23:12 -0700502 backtrace_method="N/A"
Jason Evansb27805b2010-02-10 18:15:53 -0800503fi
Jason Evans77f350b2011-03-15 22:23:12 -0700504
Jason Evans6109fe02010-02-10 10:37:56 -0800505AC_ARG_ENABLE([prof-libunwind],
506 [AS_HELP_STRING([--enable-prof-libunwind], [Use libunwind for backtracing])],
507[if test "x$enable_prof_libunwind" = "xno" ; then
508 enable_prof_libunwind="0"
509else
510 enable_prof_libunwind="1"
511fi
512],
513[enable_prof_libunwind="0"]
514)
Jason Evansca6bd4f2010-03-02 14:12:58 -0800515AC_ARG_WITH([static_libunwind],
516 [AS_HELP_STRING([--with-static-libunwind=<libunwind.a>],
517 [Path to static libunwind library; use rather than dynamically linking])],
518if test "x$with_static_libunwind" = "xno" ; then
519 LUNWIND="-lunwind"
520else
521 if test ! -f "$with_static_libunwind" ; then
522 AC_MSG_ERROR([Static libunwind not found: $with_static_libunwind])
523 fi
524 LUNWIND="$with_static_libunwind"
525fi,
526 LUNWIND="-lunwind"
527)
Jason Evans77f350b2011-03-15 22:23:12 -0700528if test "x$backtrace_method" = "x" -a "x$enable_prof_libunwind" = "x1" ; then
529 AC_CHECK_HEADERS([libunwind.h], , [enable_prof_libunwind="0"])
530 if test "x$LUNWIND" = "x-lunwind" ; then
531 AC_CHECK_LIB([unwind], [backtrace], [LIBS="$LIBS $LUNWIND"],
532 [enable_prof_libunwind="0"])
533 else
534 LIBS="$LIBS $LUNWIND"
535 fi
536 if test "x${enable_prof_libunwind}" = "x1" ; then
537 backtrace_method="libunwind"
538 AC_DEFINE([JEMALLOC_PROF_LIBUNWIND], [ ])
539 fi
540fi
541
542AC_ARG_ENABLE([prof-libgcc],
543 [AS_HELP_STRING([--disable-prof-libgcc],
544 [Do not use libgcc for backtracing])],
545[if test "x$enable_prof_libgcc" = "xno" ; then
546 enable_prof_libgcc="0"
547else
548 enable_prof_libgcc="1"
549fi
550],
551[enable_prof_libgcc="1"]
552)
553if test "x$backtrace_method" = "x" -a "x$enable_prof_libgcc" = "x1" \
554 -a "x$GCC" = "xyes" ; then
555 AC_CHECK_HEADERS([unwind.h], , [enable_prof_libgcc="0"])
556 AC_CHECK_LIB([gcc], [_Unwind_Backtrace], [LIBS="$LIBS -lgcc"], [enable_prof_libgcc="0"])
557 dnl The following is conservative, in that it only has entries for CPUs on
558 dnl which jemalloc has been tested.
559 AC_MSG_CHECKING([libgcc-based backtracing reliability on ${host_cpu}])
560 case "${host_cpu}" in
561 i[[3456]]86)
562 AC_MSG_RESULT([unreliable])
563 enable_prof_libgcc="0";
564 ;;
565 x86_64)
566 AC_MSG_RESULT([reliable])
567 ;;
568 *)
569 AC_MSG_RESULT([unreliable])
570 enable_prof_libgcc="0";
571 ;;
572 esac
573 if test "x${enable_prof_libgcc}" = "x1" ; then
574 backtrace_method="libgcc"
575 AC_DEFINE([JEMALLOC_PROF_LIBGCC], [ ])
576 fi
577else
578 enable_prof_libgcc="0"
579fi
580
581AC_ARG_ENABLE([prof-gcc],
582 [AS_HELP_STRING([--disable-prof-gcc],
583 [Do not use gcc intrinsics for backtracing])],
584[if test "x$enable_prof_gcc" = "xno" ; then
585 enable_prof_gcc="0"
586else
587 enable_prof_gcc="1"
588fi
589],
590[enable_prof_gcc="1"]
591)
592if test "x$backtrace_method" = "x" -a "x$enable_prof_gcc" = "x1" \
593 -a "x$GCC" = "xyes" ; then
594 backtrace_method="gcc intrinsics"
595 AC_DEFINE([JEMALLOC_PROF_GCC], [ ])
596else
597 enable_prof_gcc="0"
598fi
599
600if test "x$backtrace_method" = "x" ; then
601 backtrace_method="none (disabling profiling)"
602 enable_prof="0"
603fi
604AC_MSG_CHECKING([configured backtracing method])
605AC_MSG_RESULT([$backtrace_method])
Jason Evans2dbecf12010-09-05 10:35:13 -0700606if test "x$enable_prof" = "x1" ; then
Jason Evans2dbecf12010-09-05 10:35:13 -0700607 AC_DEFINE([JEMALLOC_PROF], [ ])
Jason Evans2dbecf12010-09-05 10:35:13 -0700608fi
609AC_SUBST([enable_prof])
Jason Evans2dbecf12010-09-05 10:35:13 -0700610
Jason Evans84cbbcb2009-12-29 00:09:15 -0800611dnl Enable thread-specific caching by default.
612AC_ARG_ENABLE([tcache],
613 [AS_HELP_STRING([--disable-tcache], [Disable per thread caches])],
614[if test "x$enable_tcache" = "xno" ; then
615 enable_tcache="0"
Jason Evansb7924f52009-06-23 19:01:18 -0700616else
Jason Evans84cbbcb2009-12-29 00:09:15 -0800617 enable_tcache="1"
Jason Evansb7924f52009-06-23 19:01:18 -0700618fi
619],
Jason Evans84cbbcb2009-12-29 00:09:15 -0800620[enable_tcache="1"]
Jason Evansb7924f52009-06-23 19:01:18 -0700621)
Jason Evans2dbecf12010-09-05 10:35:13 -0700622if test "x$enable_tcache" = "x1" ; then
623 AC_DEFINE([JEMALLOC_TCACHE], [ ])
624fi
625AC_SUBST([enable_tcache])
Jason Evansb7924f52009-06-23 19:01:18 -0700626
Jason Evansb7924f52009-06-23 19:01:18 -0700627dnl Do not enable allocation from DSS by default.
628AC_ARG_ENABLE([dss],
629 [AS_HELP_STRING([--enable-dss], [Enable allocation from DSS])],
630[if test "x$enable_dss" = "xno" ; then
631 enable_dss="0"
632else
633 enable_dss="1"
634fi
635],
636[enable_dss="0"]
637)
638if test "x$enable_dss" = "x1" ; then
639 AC_DEFINE([JEMALLOC_DSS], [ ])
640fi
641AC_SUBST([enable_dss])
642
Jason Evans777c1912012-02-28 20:49:22 -0800643dnl Support the junk/zero filling option by default.
Jason Evansb7924f52009-06-23 19:01:18 -0700644AC_ARG_ENABLE([fill],
Jason Evans777c1912012-02-28 20:49:22 -0800645 [AS_HELP_STRING([--disable-fill], [Disable support for junk/zero filling])],
Jason Evansb7924f52009-06-23 19:01:18 -0700646[if test "x$enable_fill" = "xno" ; then
647 enable_fill="0"
648else
649 enable_fill="1"
650fi
651],
Jason Evans777c1912012-02-28 20:49:22 -0800652[enable_fill="1"]
Jason Evansb7924f52009-06-23 19:01:18 -0700653)
654if test "x$enable_fill" = "x1" ; then
655 AC_DEFINE([JEMALLOC_FILL], [ ])
656fi
657AC_SUBST([enable_fill])
658
659dnl Do not support the xmalloc option by default.
660AC_ARG_ENABLE([xmalloc],
661 [AS_HELP_STRING([--enable-xmalloc], [Support xmalloc option])],
662[if test "x$enable_xmalloc" = "xno" ; then
663 enable_xmalloc="0"
664else
665 enable_xmalloc="1"
666fi
667],
668[enable_xmalloc="0"]
669)
670if test "x$enable_xmalloc" = "x1" ; then
671 AC_DEFINE([JEMALLOC_XMALLOC], [ ])
672fi
673AC_SUBST([enable_xmalloc])
674
Jason Evansb7924f52009-06-23 19:01:18 -0700675AC_MSG_CHECKING([STATIC_PAGE_SHIFT])
676AC_RUN_IFELSE([AC_LANG_PROGRAM(
677[[#include <stdio.h>
678#include <unistd.h>
679#include <strings.h>
680]], [[
681 long result;
682 FILE *f;
683
684 result = sysconf(_SC_PAGESIZE);
685 if (result == -1) {
686 return 1;
687 }
688 f = fopen("conftest.out", "w");
689 if (f == NULL) {
690 return 1;
691 }
692 fprintf(f, "%u\n", ffs((int)result) - 1);
693 close(f);
694
695 return 0;
696]])],
697 [STATIC_PAGE_SHIFT=`cat conftest.out`]
698 AC_MSG_RESULT([$STATIC_PAGE_SHIFT])
699 AC_DEFINE_UNQUOTED([STATIC_PAGE_SHIFT], [$STATIC_PAGE_SHIFT]),
700 AC_MSG_RESULT([error]))
701
702dnl ============================================================================
703dnl jemalloc configuration.
704dnl
Jason Evansa40bc7a2010-03-02 13:01:16 -0800705
706dnl Set VERSION if source directory has an embedded git repository.
Jason Evans955851f2011-03-31 22:38:51 -0700707if test -d "${srcroot}.git" ; then
Jason Evans79d660d2010-09-17 17:38:24 -0700708 git describe --long --abbrev=40 > ${srcroot}VERSION
Jason Evansa40bc7a2010-03-02 13:01:16 -0800709fi
Jason Evansb7924f52009-06-23 19:01:18 -0700710jemalloc_version=`cat ${srcroot}VERSION`
Jason Evansa40bc7a2010-03-02 13:01:16 -0800711jemalloc_version_major=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]1}'`
712jemalloc_version_minor=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]2}'`
713jemalloc_version_bugfix=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]3}'`
714jemalloc_version_nrev=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]4}'`
715jemalloc_version_gid=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]5}'`
Jason Evansb7924f52009-06-23 19:01:18 -0700716AC_SUBST([jemalloc_version])
Jason Evansa40bc7a2010-03-02 13:01:16 -0800717AC_SUBST([jemalloc_version_major])
718AC_SUBST([jemalloc_version_minor])
719AC_SUBST([jemalloc_version_bugfix])
720AC_SUBST([jemalloc_version_nrev])
721AC_SUBST([jemalloc_version_gid])
Jason Evansb7924f52009-06-23 19:01:18 -0700722
723dnl ============================================================================
724dnl Configure pthreads.
725
726AC_CHECK_HEADERS([pthread.h], , [AC_MSG_ERROR([pthread.h is missing])])
727AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS -lpthread"],
728 [AC_MSG_ERROR([libpthread is missing])])
729
730CPPFLAGS="$CPPFLAGS -D_REENTRANT"
731
Jason Evans0fee70d2012-02-13 12:36:11 -0800732dnl Disable lazy locking by default.
Jason Evansb7924f52009-06-23 19:01:18 -0700733AC_ARG_ENABLE([lazy_lock],
Jason Evans0fee70d2012-02-13 12:36:11 -0800734 [AS_HELP_STRING([--enable-lazy-lock],
735 [Enable lazy locking (only lock when multi-threaded)])],
Jason Evansb7924f52009-06-23 19:01:18 -0700736[if test "x$enable_lazy_lock" = "xno" ; then
737 enable_lazy_lock="0"
738else
739 enable_lazy_lock="1"
740fi
741],
Jason Evans0fee70d2012-02-13 12:36:11 -0800742[enable_lazy_lock="0"]
Jason Evansb7924f52009-06-23 19:01:18 -0700743)
744if test "x$enable_lazy_lock" = "x1" ; then
745 AC_CHECK_HEADERS([dlfcn.h], , [AC_MSG_ERROR([dlfcn.h is missing])])
746 AC_CHECK_LIB([dl], [dlopen], [LIBS="$LIBS -ldl"],
747 [AC_MSG_ERROR([libdl is missing])])
748 AC_DEFINE([JEMALLOC_LAZY_LOCK], [ ])
749fi
750AC_SUBST([enable_lazy_lock])
751
Jason Evans78d815c2010-01-17 14:06:20 -0800752AC_ARG_ENABLE([tls],
753 [AS_HELP_STRING([--disable-tls], [Disable thread-local storage (__thread keyword)])],
754if test "x$enable_tls" = "xno" ; then
755 enable_tls="0"
756else
757 enable_tls="1"
758fi
759,
760enable_tls="1"
761)
762if test "x${enable_tls}" = "x1" ; then
763AC_MSG_CHECKING([for TLS])
764AC_RUN_IFELSE([AC_LANG_PROGRAM(
765[[
766 __thread int x;
767]], [[
768 x = 42;
769
770 return 0;
771]])],
772 AC_MSG_RESULT([yes]),
773 AC_MSG_RESULT([no])
774 enable_tls="0")
775fi
Jason Evansb267d0f2010-08-13 15:42:29 -0700776AC_SUBST([enable_tls])
Jason Evans78d815c2010-01-17 14:06:20 -0800777if test "x${enable_tls}" = "x0" ; then
778 AC_DEFINE_UNQUOTED([NO_TLS], [ ])
779fi
780
Jason Evans2dbecf12010-09-05 10:35:13 -0700781dnl ============================================================================
Jason Evans84c8eef2011-03-16 10:30:13 -0700782dnl Check for ffsl(3), and fail if not found. This function exists on all
783dnl platforms that jemalloc currently has a chance of functioning on without
784dnl modification.
785
786AC_CHECK_FUNC([ffsl], [],
787 [AC_MSG_ERROR([Cannot build without ffsl(3)])])
788
789dnl ============================================================================
Jason Evans763baa62011-03-18 19:10:31 -0700790dnl Check for atomic(3) operations as provided on Darwin.
791
792JE_COMPILABLE([Darwin OSAtomic*()], [
793#include <libkern/OSAtomic.h>
794#include <inttypes.h>
795], [
796 {
797 int32_t x32 = 0;
798 volatile int32_t *x32p = &x32;
799 OSAtomicAdd32(1, x32p);
800 }
801 {
802 int64_t x64 = 0;
803 volatile int64_t *x64p = &x64;
804 OSAtomicAdd64(1, x64p);
805 }
806], [osatomic])
807if test "x${osatomic}" = "xyes" ; then
808 AC_DEFINE([JEMALLOC_OSATOMIC])
809fi
810
811dnl ============================================================================
Jason Evans893a0ed2011-03-18 19:30:18 -0700812dnl Check for spinlock(3) operations as provided on Darwin.
813
814JE_COMPILABLE([Darwin OSSpin*()], [
815#include <libkern/OSAtomic.h>
816#include <inttypes.h>
817], [
818 OSSpinLock lock = 0;
819 OSSpinLockLock(&lock);
820 OSSpinLockUnlock(&lock);
821], [osspin])
822if test "x${osspin}" = "xyes" ; then
823 AC_DEFINE([JEMALLOC_OSSPIN])
824fi
825
826dnl ============================================================================
Jason Evans2dbecf12010-09-05 10:35:13 -0700827dnl Darwin-related configuration.
Jason Evans78d815c2010-01-17 14:06:20 -0800828
Jason Evans2dbecf12010-09-05 10:35:13 -0700829if test "x${abi}" = "xmacho" ; then
830 AC_DEFINE([JEMALLOC_IVSALLOC])
831 AC_DEFINE([JEMALLOC_ZONE])
Jason Evans6109fe02010-02-10 10:37:56 -0800832
Jason Evans2dbecf12010-09-05 10:35:13 -0700833 dnl The szone version jumped from 3 to 6 between the OS X 10.5.x and 10.6
834 dnl releases. malloc_zone_t and malloc_introspection_t have new fields in
835 dnl 10.6, which is the only source-level indication of the change.
836 AC_MSG_CHECKING([malloc zone version])
837 AC_TRY_COMPILE([#include <stdlib.h>
838#include <malloc/malloc.h>], [
839 static malloc_zone_t zone;
840 static struct malloc_introspection_t zone_introspect;
841
842 zone.size = NULL;
843 zone.malloc = NULL;
844 zone.calloc = NULL;
845 zone.valloc = NULL;
846 zone.free = NULL;
847 zone.realloc = NULL;
848 zone.destroy = NULL;
849 zone.zone_name = "jemalloc_zone";
850 zone.batch_malloc = NULL;
851 zone.batch_free = NULL;
852 zone.introspect = &zone_introspect;
853 zone.version = 6;
854 zone.memalign = NULL;
855 zone.free_definite_size = NULL;
856
857 zone_introspect.enumerator = NULL;
858 zone_introspect.good_size = NULL;
859 zone_introspect.check = NULL;
860 zone_introspect.print = NULL;
861 zone_introspect.log = NULL;
862 zone_introspect.force_lock = NULL;
863 zone_introspect.force_unlock = NULL;
864 zone_introspect.statistics = NULL;
865 zone_introspect.zone_locked = NULL;
866], [AC_DEFINE_UNQUOTED([JEMALLOC_ZONE_VERSION], [6])
867 AC_MSG_RESULT([6])],
868 [AC_DEFINE_UNQUOTED([JEMALLOC_ZONE_VERSION], [3])
869 AC_MSG_RESULT([3])])
Jason Evansb27805b2010-02-10 18:15:53 -0800870fi
871
Jason Evansb7924f52009-06-23 19:01:18 -0700872dnl ============================================================================
873dnl Check for typedefs, structures, and compiler characteristics.
874AC_HEADER_STDBOOL
875
Jason Evansb1726102012-02-28 16:50:47 -0800876AC_CONFIG_COMMANDS([include/jemalloc/internal/size_classes.h], [
877 mkdir -p "include/jemalloc/internal"
878 "${srcdir}/include/jemalloc/internal/size_classes.sh" > "${objroot}include/jemalloc/internal/size_classes.h"
879])
880
Jason Evansb7924f52009-06-23 19:01:18 -0700881dnl Process .in files.
Jason Evansb0fd5012010-01-17 01:49:20 -0800882AC_SUBST([cfghdrs_in])
883AC_SUBST([cfghdrs_out])
Jason Evans0656ec02010-04-07 23:37:35 -0700884AC_CONFIG_HEADERS([$cfghdrs_tup])
Jason Evansb7924f52009-06-23 19:01:18 -0700885
886dnl ============================================================================
887dnl Generate outputs.
Antony Dovgal2bd3cbc2011-10-13 09:33:33 +0400888AC_CONFIG_FILES([$cfgoutputs_tup config.stamp bin/jemalloc.sh])
Jason Evansb0fd5012010-01-17 01:49:20 -0800889AC_SUBST([cfgoutputs_in])
890AC_SUBST([cfgoutputs_out])
Jason Evansb7924f52009-06-23 19:01:18 -0700891AC_OUTPUT
892
893dnl ============================================================================
894dnl Print out the results of configuration.
895AC_MSG_RESULT([===============================================================================])
Jason Evansf576c632011-11-01 22:27:41 -0700896AC_MSG_RESULT([jemalloc version : ${jemalloc_version}])
897AC_MSG_RESULT([library revision : ${rev}])
Jason Evansb7924f52009-06-23 19:01:18 -0700898AC_MSG_RESULT([])
899AC_MSG_RESULT([CC : ${CC}])
900AC_MSG_RESULT([CPPFLAGS : ${CPPFLAGS}])
901AC_MSG_RESULT([CFLAGS : ${CFLAGS}])
902AC_MSG_RESULT([LDFLAGS : ${LDFLAGS}])
903AC_MSG_RESULT([LIBS : ${LIBS}])
904AC_MSG_RESULT([RPATH_EXTRA : ${RPATH_EXTRA}])
905AC_MSG_RESULT([])
Jason Evansaee7fd22010-11-24 22:00:02 -0800906AC_MSG_RESULT([XSLTPROC : ${XSLTPROC}])
907AC_MSG_RESULT([XSLROOT : ${XSLROOT}])
908AC_MSG_RESULT([])
Jason Evansb7924f52009-06-23 19:01:18 -0700909AC_MSG_RESULT([PREFIX : ${PREFIX}])
910AC_MSG_RESULT([BINDIR : ${BINDIR}])
Jason Evans662a0172009-07-01 19:24:31 -0700911AC_MSG_RESULT([INCLUDEDIR : ${INCLUDEDIR}])
912AC_MSG_RESULT([LIBDIR : ${LIBDIR}])
Jason Evansb7924f52009-06-23 19:01:18 -0700913AC_MSG_RESULT([DATADIR : ${DATADIR}])
914AC_MSG_RESULT([MANDIR : ${MANDIR}])
915AC_MSG_RESULT([])
916AC_MSG_RESULT([srcroot : ${srcroot}])
917AC_MSG_RESULT([abs_srcroot : ${abs_srcroot}])
918AC_MSG_RESULT([objroot : ${objroot}])
919AC_MSG_RESULT([abs_objroot : ${abs_objroot}])
920AC_MSG_RESULT([])
Jason Evans90895cf2009-12-29 00:09:15 -0800921AC_MSG_RESULT([JEMALLOC_PREFIX : ${JEMALLOC_PREFIX}])
Jason Evans746e77a2011-07-30 16:40:52 -0700922AC_MSG_RESULT([JEMALLOC_PRIVATE_NAMESPACE])
923AC_MSG_RESULT([ : ${JEMALLOC_PRIVATE_NAMESPACE}])
Jason Evansb0fd5012010-01-17 01:49:20 -0800924AC_MSG_RESULT([install_suffix : ${install_suffix}])
Jason Evansb7924f52009-06-23 19:01:18 -0700925AC_MSG_RESULT([autogen : ${enable_autogen}])
Jason Evans7e77eaf2012-03-02 17:47:37 -0800926AC_MSG_RESULT([experimental : ${enable_experimental}])
Jason Evans355b4382010-09-20 19:20:48 -0700927AC_MSG_RESULT([cc-silence : ${enable_cc_silence}])
Jason Evansb7924f52009-06-23 19:01:18 -0700928AC_MSG_RESULT([debug : ${enable_debug}])
929AC_MSG_RESULT([stats : ${enable_stats}])
Jason Evans6109fe02010-02-10 10:37:56 -0800930AC_MSG_RESULT([prof : ${enable_prof}])
931AC_MSG_RESULT([prof-libunwind : ${enable_prof_libunwind}])
Jason Evans77f350b2011-03-15 22:23:12 -0700932AC_MSG_RESULT([prof-libgcc : ${enable_prof_libgcc}])
933AC_MSG_RESULT([prof-gcc : ${enable_prof_gcc}])
Jason Evans84cbbcb2009-12-29 00:09:15 -0800934AC_MSG_RESULT([tcache : ${enable_tcache}])
Jason Evansb7924f52009-06-23 19:01:18 -0700935AC_MSG_RESULT([fill : ${enable_fill}])
936AC_MSG_RESULT([xmalloc : ${enable_xmalloc}])
Jason Evansb7924f52009-06-23 19:01:18 -0700937AC_MSG_RESULT([dss : ${enable_dss}])
Jason Evansb7924f52009-06-23 19:01:18 -0700938AC_MSG_RESULT([lazy_lock : ${enable_lazy_lock}])
Jason Evans2dbecf12010-09-05 10:35:13 -0700939AC_MSG_RESULT([tls : ${enable_tls}])
Jason Evansb7924f52009-06-23 19:01:18 -0700940AC_MSG_RESULT([===============================================================================])