2
0

configure.ac 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT([Makefile.in])
  3. dnl ============================================================================
  4. dnl Custom macro definitions.
  5. dnl JE_CFLAGS_APPEND(cflag)
  6. AC_DEFUN([JE_CFLAGS_APPEND],
  7. [
  8. AC_MSG_CHECKING([whether compiler supports $1])
  9. TCFLAGS="${CFLAGS}"
  10. if test "x${CFLAGS}" = "x" ; then
  11. CFLAGS="$1"
  12. else
  13. CFLAGS="${CFLAGS} $1"
  14. fi
  15. AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
  16. [[
  17. ]], [[
  18. return 0;
  19. ]])],
  20. [je_cv_cflags_appended=$1]
  21. AC_MSG_RESULT([yes]),
  22. [je_cv_cflags_appended=]
  23. AC_MSG_RESULT([no])
  24. [CFLAGS="${TCFLAGS}"]
  25. )
  26. ])
  27. dnl JE_COMPILABLE(label, hcode, mcode, rvar)
  28. dnl
  29. dnl Use AC_LINK_IFELSE() rather than AC_COMPILE_IFELSE() so that linker errors
  30. dnl cause failure.
  31. AC_DEFUN([JE_COMPILABLE],
  32. [
  33. AC_CACHE_CHECK([whether $1 is compilable],
  34. [$4],
  35. [AC_LINK_IFELSE([AC_LANG_PROGRAM([$2],
  36. [$3])],
  37. [$4=yes],
  38. [$4=no])])
  39. ])
  40. dnl ============================================================================
  41. dnl Library revision.
  42. rev=1
  43. AC_SUBST([rev])
  44. srcroot=$srcdir
  45. if test "x${srcroot}" = "x." ; then
  46. srcroot=""
  47. else
  48. srcroot="${srcroot}/"
  49. fi
  50. AC_SUBST([srcroot])
  51. abs_srcroot="`cd \"${srcdir}\"; pwd`/"
  52. AC_SUBST([abs_srcroot])
  53. objroot=""
  54. AC_SUBST([objroot])
  55. abs_objroot="`pwd`/"
  56. AC_SUBST([abs_objroot])
  57. dnl Munge install path variables.
  58. if test "x$prefix" = "xNONE" ; then
  59. prefix="/usr/local"
  60. fi
  61. if test "x$exec_prefix" = "xNONE" ; then
  62. exec_prefix=$prefix
  63. fi
  64. PREFIX=$prefix
  65. AC_SUBST([PREFIX])
  66. BINDIR=`eval echo $bindir`
  67. BINDIR=`eval echo $BINDIR`
  68. AC_SUBST([BINDIR])
  69. INCLUDEDIR=`eval echo $includedir`
  70. INCLUDEDIR=`eval echo $INCLUDEDIR`
  71. AC_SUBST([INCLUDEDIR])
  72. LIBDIR=`eval echo $libdir`
  73. LIBDIR=`eval echo $LIBDIR`
  74. AC_SUBST([LIBDIR])
  75. DATADIR=`eval echo $datadir`
  76. DATADIR=`eval echo $DATADIR`
  77. AC_SUBST([DATADIR])
  78. MANDIR=`eval echo $mandir`
  79. MANDIR=`eval echo $MANDIR`
  80. AC_SUBST([MANDIR])
  81. dnl Support for building documentation.
  82. AC_PATH_PROG([XSLTPROC], [xsltproc], [false], [$PATH])
  83. if test -d "/usr/share/xml/docbook/stylesheet/docbook-xsl" ; then
  84. DEFAULT_XSLROOT="/usr/share/xml/docbook/stylesheet/docbook-xsl"
  85. elif test -d "/usr/share/sgml/docbook/xsl-stylesheets" ; then
  86. DEFAULT_XSLROOT="/usr/share/sgml/docbook/xsl-stylesheets"
  87. else
  88. dnl Documentation building will fail if this default gets used.
  89. DEFAULT_XSLROOT=""
  90. fi
  91. AC_ARG_WITH([xslroot],
  92. [AS_HELP_STRING([--with-xslroot=<path>], [XSL stylesheet root path])], [
  93. if test "x$with_xslroot" = "xno" ; then
  94. XSLROOT="${DEFAULT_XSLROOT}"
  95. else
  96. XSLROOT="${with_xslroot}"
  97. fi
  98. ],
  99. XSLROOT="${DEFAULT_XSLROOT}"
  100. )
  101. AC_SUBST([XSLROOT])
  102. dnl If CFLAGS isn't defined, set CFLAGS to something reasonable. Otherwise,
  103. dnl just prevent autoconf from molesting CFLAGS.
  104. CFLAGS=$CFLAGS
  105. AC_PROG_CC
  106. if test "x$GCC" != "xyes" ; then
  107. AC_CACHE_CHECK([whether compiler is MSVC],
  108. [je_cv_msvc],
  109. [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
  110. [
  111. #ifndef _MSC_VER
  112. int fail[-1];
  113. #endif
  114. ])],
  115. [je_cv_msvc=yes],
  116. [je_cv_msvc=no])])
  117. fi
  118. if test "x$CFLAGS" = "x" ; then
  119. no_CFLAGS="yes"
  120. if test "x$GCC" = "xyes" ; then
  121. JE_CFLAGS_APPEND([-std=gnu99])
  122. if test "x$je_cv_cflags_appended" = "x-std=gnu99" ; then
  123. AC_DEFINE_UNQUOTED([JEMALLOC_HAS_RESTRICT])
  124. fi
  125. JE_CFLAGS_APPEND([-Wall])
  126. JE_CFLAGS_APPEND([-pipe])
  127. JE_CFLAGS_APPEND([-g3])
  128. elif test "x$je_cv_msvc" = "xyes" ; then
  129. CC="$CC -nologo"
  130. JE_CFLAGS_APPEND([-Zi])
  131. JE_CFLAGS_APPEND([-MT])
  132. JE_CFLAGS_APPEND([-W3])
  133. CPPFLAGS="$CPPFLAGS -I${srcroot}/include/msvc_compat"
  134. fi
  135. fi
  136. dnl Append EXTRA_CFLAGS to CFLAGS, if defined.
  137. if test "x$EXTRA_CFLAGS" != "x" ; then
  138. JE_CFLAGS_APPEND([$EXTRA_CFLAGS])
  139. fi
  140. AC_PROG_CPP
  141. AC_C_BIGENDIAN([ac_cv_big_endian=1], [ac_cv_big_endian=0])
  142. if test "x${ac_cv_big_endian}" = "x1" ; then
  143. AC_DEFINE_UNQUOTED([JEMALLOC_BIG_ENDIAN], [ ])
  144. fi
  145. AC_CHECK_SIZEOF([void *])
  146. if test "x${ac_cv_sizeof_void_p}" = "x8" ; then
  147. LG_SIZEOF_PTR=3
  148. elif test "x${ac_cv_sizeof_void_p}" = "x4" ; then
  149. LG_SIZEOF_PTR=2
  150. else
  151. AC_MSG_ERROR([Unsupported pointer size: ${ac_cv_sizeof_void_p}])
  152. fi
  153. AC_DEFINE_UNQUOTED([LG_SIZEOF_PTR], [$LG_SIZEOF_PTR])
  154. AC_CHECK_SIZEOF([int])
  155. if test "x${ac_cv_sizeof_int}" = "x8" ; then
  156. LG_SIZEOF_INT=3
  157. elif test "x${ac_cv_sizeof_int}" = "x4" ; then
  158. LG_SIZEOF_INT=2
  159. else
  160. AC_MSG_ERROR([Unsupported int size: ${ac_cv_sizeof_int}])
  161. fi
  162. AC_DEFINE_UNQUOTED([LG_SIZEOF_INT], [$LG_SIZEOF_INT])
  163. AC_CHECK_SIZEOF([long])
  164. if test "x${ac_cv_sizeof_long}" = "x8" ; then
  165. LG_SIZEOF_LONG=3
  166. elif test "x${ac_cv_sizeof_long}" = "x4" ; then
  167. LG_SIZEOF_LONG=2
  168. else
  169. AC_MSG_ERROR([Unsupported long size: ${ac_cv_sizeof_long}])
  170. fi
  171. AC_DEFINE_UNQUOTED([LG_SIZEOF_LONG], [$LG_SIZEOF_LONG])
  172. AC_CHECK_SIZEOF([intmax_t])
  173. if test "x${ac_cv_sizeof_intmax_t}" = "x16" ; then
  174. LG_SIZEOF_INTMAX_T=4
  175. elif test "x${ac_cv_sizeof_intmax_t}" = "x8" ; then
  176. LG_SIZEOF_INTMAX_T=3
  177. elif test "x${ac_cv_sizeof_intmax_t}" = "x4" ; then
  178. LG_SIZEOF_INTMAX_T=2
  179. else
  180. AC_MSG_ERROR([Unsupported intmax_t size: ${ac_cv_sizeof_intmax_t}])
  181. fi
  182. AC_DEFINE_UNQUOTED([LG_SIZEOF_INTMAX_T], [$LG_SIZEOF_INTMAX_T])
  183. AC_CANONICAL_HOST
  184. dnl CPU-specific settings.
  185. CPU_SPINWAIT=""
  186. case "${host_cpu}" in
  187. i[[345]]86)
  188. ;;
  189. i686|x86_64)
  190. JE_COMPILABLE([pause instruction], [],
  191. [[__asm__ volatile("pause"); return 0;]],
  192. [je_cv_pause])
  193. if test "x${je_cv_pause}" = "xyes" ; then
  194. CPU_SPINWAIT='__asm__ volatile("pause")'
  195. fi
  196. dnl emmintrin.h fails to compile unless MMX, SSE, and SSE2 are
  197. dnl supported.
  198. JE_COMPILABLE([SSE2 intrinsics], [
  199. #include <emmintrin.h>
  200. ], [], [je_cv_sse2])
  201. if test "x${je_cv_sse2}" = "xyes" ; then
  202. AC_DEFINE_UNQUOTED([HAVE_SSE2], [ ])
  203. fi
  204. ;;
  205. powerpc)
  206. AC_DEFINE_UNQUOTED([HAVE_ALTIVEC], [ ])
  207. ;;
  208. *)
  209. ;;
  210. esac
  211. AC_DEFINE_UNQUOTED([CPU_SPINWAIT], [$CPU_SPINWAIT])
  212. LD_PRELOAD_VAR="LD_PRELOAD"
  213. so="so"
  214. importlib="${so}"
  215. o="$ac_objext"
  216. a="a"
  217. exe="$ac_exeext"
  218. libprefix="lib"
  219. DSO_LDFLAGS='-shared -Wl,-soname,$(@F)'
  220. RPATH='-Wl,-rpath,$(1)'
  221. SOREV="${so}.${rev}"
  222. PIC_CFLAGS='-fPIC -DPIC'
  223. CTARGET='-o $@'
  224. LDTARGET='-o $@'
  225. EXTRA_LDFLAGS=
  226. ARFLAGS='crus'
  227. AROUT=' $@'
  228. CC_MM=1
  229. AN_MAKEVAR([AR], [AC_PROG_AR])
  230. AN_PROGRAM([ar], [AC_PROG_AR])
  231. AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
  232. AC_PROG_AR
  233. dnl Platform-specific settings. abi and RPATH can probably be determined
  234. dnl programmatically, but doing so is error-prone, which makes it generally
  235. dnl not worth the trouble.
  236. dnl
  237. dnl Define cpp macros in CPPFLAGS, rather than doing AC_DEFINE(macro), since the
  238. dnl definitions need to be seen before any headers are included, which is a pain
  239. dnl to make happen otherwise.
  240. default_munmap="1"
  241. JEMALLOC_USABLE_SIZE_CONST="const"
  242. case "${host}" in
  243. *-*-darwin*)
  244. CFLAGS="$CFLAGS"
  245. abi="macho"
  246. AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
  247. RPATH=""
  248. LD_PRELOAD_VAR="DYLD_INSERT_LIBRARIES"
  249. so="dylib"
  250. importlib="${so}"
  251. force_tls="0"
  252. DSO_LDFLAGS='-shared -Wl,-dylib_install_name,$(@F)'
  253. SOREV="${rev}.${so}"
  254. sbrk_deprecated="1"
  255. ;;
  256. *-*-freebsd*)
  257. CFLAGS="$CFLAGS"
  258. abi="elf"
  259. AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
  260. force_lazy_lock="1"
  261. ;;
  262. *-*-linux*)
  263. CFLAGS="$CFLAGS"
  264. CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
  265. abi="elf"
  266. AC_DEFINE([JEMALLOC_HAS_ALLOCA_H])
  267. AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED], [ ])
  268. AC_DEFINE([JEMALLOC_THREADED_INIT], [ ])
  269. JEMALLOC_USABLE_SIZE_CONST=""
  270. default_munmap="0"
  271. ;;
  272. *-*-netbsd*)
  273. AC_MSG_CHECKING([ABI])
  274. AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
  275. [[#ifdef __ELF__
  276. /* ELF */
  277. #else
  278. #error aout
  279. #endif
  280. ]])],
  281. [CFLAGS="$CFLAGS"; abi="elf"],
  282. [abi="aout"])
  283. AC_MSG_RESULT([$abi])
  284. AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
  285. ;;
  286. *-*-solaris2*)
  287. CFLAGS="$CFLAGS"
  288. abi="elf"
  289. AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
  290. RPATH='-Wl,-R,$(1)'
  291. dnl Solaris needs this for sigwait().
  292. CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
  293. LIBS="$LIBS -lposix4 -lsocket -lnsl"
  294. ;;
  295. *-ibm-aix*)
  296. if "$LG_SIZEOF_PTR" = "8"; then
  297. dnl 64bit AIX
  298. LD_PRELOAD_VAR="LDR_PRELOAD64"
  299. else
  300. dnl 32bit AIX
  301. LD_PRELOAD_VAR="LDR_PRELOAD"
  302. fi
  303. abi="xcoff"
  304. ;;
  305. *-*-mingw*)
  306. abi="pecoff"
  307. force_tls="0"
  308. RPATH=""
  309. so="dll"
  310. if test "x$je_cv_msvc" = "xyes" ; then
  311. importlib="lib"
  312. DSO_LDFLAGS="-LD"
  313. EXTRA_LDFLAGS="-link -DEBUG"
  314. CTARGET='-Fo$@'
  315. LDTARGET='-Fe$@'
  316. AR='lib'
  317. ARFLAGS='-nologo -out:'
  318. AROUT='$@'
  319. CC_MM=
  320. else
  321. importlib="${so}"
  322. DSO_LDFLAGS="-shared"
  323. fi
  324. a="lib"
  325. libprefix=""
  326. SOREV="${so}"
  327. PIC_CFLAGS=""
  328. ;;
  329. *)
  330. AC_MSG_RESULT([Unsupported operating system: ${host}])
  331. abi="elf"
  332. ;;
  333. esac
  334. AC_DEFINE_UNQUOTED([JEMALLOC_USABLE_SIZE_CONST], [$JEMALLOC_USABLE_SIZE_CONST])
  335. AC_SUBST([abi])
  336. AC_SUBST([RPATH])
  337. AC_SUBST([LD_PRELOAD_VAR])
  338. AC_SUBST([so])
  339. AC_SUBST([importlib])
  340. AC_SUBST([o])
  341. AC_SUBST([a])
  342. AC_SUBST([exe])
  343. AC_SUBST([libprefix])
  344. AC_SUBST([DSO_LDFLAGS])
  345. AC_SUBST([EXTRA_LDFLAGS])
  346. AC_SUBST([SOREV])
  347. AC_SUBST([PIC_CFLAGS])
  348. AC_SUBST([CTARGET])
  349. AC_SUBST([LDTARGET])
  350. AC_SUBST([MKLIB])
  351. AC_SUBST([ARFLAGS])
  352. AC_SUBST([AROUT])
  353. AC_SUBST([CC_MM])
  354. JE_COMPILABLE([__attribute__ syntax],
  355. [static __attribute__((unused)) void foo(void){}],
  356. [],
  357. [je_cv_attribute])
  358. if test "x${je_cv_attribute}" = "xyes" ; then
  359. AC_DEFINE([JEMALLOC_HAVE_ATTR], [ ])
  360. if test "x${GCC}" = "xyes" -a "x${abi}" = "xelf"; then
  361. JE_CFLAGS_APPEND([-fvisibility=hidden])
  362. fi
  363. fi
  364. dnl Check for tls_model attribute support (clang 3.0 still lacks support).
  365. SAVED_CFLAGS="${CFLAGS}"
  366. JE_CFLAGS_APPEND([-Werror])
  367. JE_COMPILABLE([tls_model attribute], [],
  368. [static __thread int
  369. __attribute__((tls_model("initial-exec"))) foo;
  370. foo = 0;],
  371. [je_cv_tls_model])
  372. CFLAGS="${SAVED_CFLAGS}"
  373. if test "x${je_cv_tls_model}" = "xyes" ; then
  374. AC_DEFINE([JEMALLOC_TLS_MODEL],
  375. [__attribute__((tls_model("initial-exec")))])
  376. else
  377. AC_DEFINE([JEMALLOC_TLS_MODEL], [ ])
  378. fi
  379. dnl Support optional additions to rpath.
  380. AC_ARG_WITH([rpath],
  381. [AS_HELP_STRING([--with-rpath=<rpath>], [Colon-separated rpath (ELF systems only)])],
  382. if test "x$with_rpath" = "xno" ; then
  383. RPATH_EXTRA=
  384. else
  385. RPATH_EXTRA="`echo $with_rpath | tr \":\" \" \"`"
  386. fi,
  387. RPATH_EXTRA=
  388. )
  389. AC_SUBST([RPATH_EXTRA])
  390. dnl Disable rules that do automatic regeneration of configure output by default.
  391. AC_ARG_ENABLE([autogen],
  392. [AS_HELP_STRING([--enable-autogen], [Automatically regenerate configure output])],
  393. if test "x$enable_autogen" = "xno" ; then
  394. enable_autogen="0"
  395. else
  396. enable_autogen="1"
  397. fi
  398. ,
  399. enable_autogen="0"
  400. )
  401. AC_SUBST([enable_autogen])
  402. AC_PROG_INSTALL
  403. AC_PROG_RANLIB
  404. AC_PATH_PROG([LD], [ld], [false], [$PATH])
  405. AC_PATH_PROG([AUTOCONF], [autoconf], [false], [$PATH])
  406. public_syms="malloc_conf malloc_message malloc calloc posix_memalign aligned_alloc realloc free mallocx rallocx xallocx sallocx dallocx nallocx mallctl mallctlnametomib mallctlbymib malloc_stats_print malloc_usable_size"
  407. dnl Check for allocator-related functions that should be wrapped.
  408. AC_CHECK_FUNC([memalign],
  409. [AC_DEFINE([JEMALLOC_OVERRIDE_MEMALIGN], [ ])
  410. public_syms="${public_syms} memalign"])
  411. AC_CHECK_FUNC([valloc],
  412. [AC_DEFINE([JEMALLOC_OVERRIDE_VALLOC], [ ])
  413. public_syms="${public_syms} valloc"])
  414. dnl Support the experimental API by default.
  415. AC_ARG_ENABLE([experimental],
  416. [AS_HELP_STRING([--disable-experimental],
  417. [Disable support for the experimental API])],
  418. [if test "x$enable_experimental" = "xno" ; then
  419. enable_experimental="0"
  420. else
  421. enable_experimental="1"
  422. fi
  423. ],
  424. [enable_experimental="1"]
  425. )
  426. if test "x$enable_experimental" = "x1" ; then
  427. AC_DEFINE([JEMALLOC_EXPERIMENTAL], [ ])
  428. public_syms="${public_syms} allocm dallocm nallocm rallocm sallocm"
  429. fi
  430. AC_SUBST([enable_experimental])
  431. dnl Do not compute test code coverage by default.
  432. GCOV_FLAGS=
  433. AC_ARG_ENABLE([code-coverage],
  434. [AS_HELP_STRING([--enable-code-coverage],
  435. [Enable code coverage])],
  436. [if test "x$enable_code_coverage" = "xno" ; then
  437. enable_code_coverage="0"
  438. else
  439. enable_code_coverage="1"
  440. fi
  441. ],
  442. [enable_code_coverage="0"]
  443. )
  444. if test "x$enable_code_coverage" = "x1" ; then
  445. deoptimize="no"
  446. echo "$CFLAGS $EXTRA_CFLAGS" | grep '\-O' >/dev/null || deoptimize="yes"
  447. if test "x${deoptimize}" = "xyes" ; then
  448. JE_CFLAGS_APPEND([-O0])
  449. fi
  450. JE_CFLAGS_APPEND([-fprofile-arcs -ftest-coverage])
  451. EXTRA_LDFLAGS="$EXTRA_LDFLAGS -fprofile-arcs -ftest-coverage"
  452. AC_DEFINE([JEMALLOC_CODE_COVERAGE], [ ])
  453. fi
  454. AC_SUBST([enable_code_coverage])
  455. dnl Perform no name mangling by default.
  456. AC_ARG_WITH([mangling],
  457. [AS_HELP_STRING([--with-mangling=<map>], [Mangle symbols in <map>])],
  458. [mangling_map="$with_mangling"], [mangling_map=""])
  459. dnl Do not prefix public APIs by default.
  460. AC_ARG_WITH([jemalloc_prefix],
  461. [AS_HELP_STRING([--with-jemalloc-prefix=<prefix>], [Prefix to prepend to all public APIs])],
  462. [JEMALLOC_PREFIX="$with_jemalloc_prefix"],
  463. [if test "x$abi" != "xmacho" -a "x$abi" != "xpecoff"; then
  464. JEMALLOC_PREFIX=""
  465. else
  466. JEMALLOC_PREFIX="je_"
  467. fi]
  468. )
  469. if test "x$JEMALLOC_PREFIX" != "x" ; then
  470. JEMALLOC_CPREFIX=`echo ${JEMALLOC_PREFIX} | tr "a-z" "A-Z"`
  471. AC_DEFINE_UNQUOTED([JEMALLOC_PREFIX], ["$JEMALLOC_PREFIX"])
  472. AC_DEFINE_UNQUOTED([JEMALLOC_CPREFIX], ["$JEMALLOC_CPREFIX"])
  473. fi
  474. AC_ARG_WITH([export],
  475. [AS_HELP_STRING([--without-export], [disable exporting jemalloc public APIs])],
  476. [if test "x$with_export" = "xno"; then
  477. AC_DEFINE([JEMALLOC_EXPORT],[])
  478. fi]
  479. )
  480. dnl Mangle library-private APIs.
  481. AC_ARG_WITH([private_namespace],
  482. [AS_HELP_STRING([--with-private-namespace=<prefix>], [Prefix to prepend to all library-private APIs])],
  483. [JEMALLOC_PRIVATE_NAMESPACE="${with_private_namespace}je_"],
  484. [JEMALLOC_PRIVATE_NAMESPACE="je_"]
  485. )
  486. AC_DEFINE_UNQUOTED([JEMALLOC_PRIVATE_NAMESPACE], [$JEMALLOC_PRIVATE_NAMESPACE])
  487. private_namespace="$JEMALLOC_PRIVATE_NAMESPACE"
  488. AC_SUBST([private_namespace])
  489. dnl Do not add suffix to installed files by default.
  490. AC_ARG_WITH([install_suffix],
  491. [AS_HELP_STRING([--with-install-suffix=<suffix>], [Suffix to append to all installed files])],
  492. [INSTALL_SUFFIX="$with_install_suffix"],
  493. [INSTALL_SUFFIX=]
  494. )
  495. install_suffix="$INSTALL_SUFFIX"
  496. AC_SUBST([install_suffix])
  497. dnl Substitute @je_@ in jemalloc_protos.h.in, primarily to make generation of
  498. dnl jemalloc_protos_jet.h easy.
  499. je_="je_"
  500. AC_SUBST([je_])
  501. cfgoutputs_in="${srcroot}Makefile.in"
  502. cfgoutputs_in="${cfgoutputs_in} ${srcroot}doc/html.xsl.in"
  503. cfgoutputs_in="${cfgoutputs_in} ${srcroot}doc/manpages.xsl.in"
  504. cfgoutputs_in="${cfgoutputs_in} ${srcroot}doc/jemalloc.xml.in"
  505. cfgoutputs_in="${cfgoutputs_in} ${srcroot}include/jemalloc/jemalloc_macros.h.in"
  506. cfgoutputs_in="${cfgoutputs_in} ${srcroot}include/jemalloc/jemalloc_protos.h.in"
  507. cfgoutputs_in="${cfgoutputs_in} ${srcroot}include/jemalloc/internal/jemalloc_internal.h.in"
  508. cfgoutputs_in="${cfgoutputs_in} ${srcroot}test/test.sh.in"
  509. cfgoutputs_in="${cfgoutputs_in} ${srcroot}test/include/test/jemalloc_test.h.in"
  510. cfgoutputs_out="Makefile"
  511. cfgoutputs_out="${cfgoutputs_out} doc/html.xsl"
  512. cfgoutputs_out="${cfgoutputs_out} doc/manpages.xsl"
  513. cfgoutputs_out="${cfgoutputs_out} doc/jemalloc.xml"
  514. cfgoutputs_out="${cfgoutputs_out} include/jemalloc/jemalloc_macros.h"
  515. cfgoutputs_out="${cfgoutputs_out} include/jemalloc/jemalloc_protos.h"
  516. cfgoutputs_out="${cfgoutputs_out} include/jemalloc/internal/jemalloc_internal.h"
  517. cfgoutputs_out="${cfgoutputs_out} test/test.sh"
  518. cfgoutputs_out="${cfgoutputs_out} test/include/test/jemalloc_test.h"
  519. cfgoutputs_tup="Makefile"
  520. cfgoutputs_tup="${cfgoutputs_tup} doc/html.xsl:doc/html.xsl.in"
  521. cfgoutputs_tup="${cfgoutputs_tup} doc/manpages.xsl:doc/manpages.xsl.in"
  522. cfgoutputs_tup="${cfgoutputs_tup} doc/jemalloc.xml:doc/jemalloc.xml.in"
  523. cfgoutputs_tup="${cfgoutputs_tup} include/jemalloc/jemalloc_macros.h:include/jemalloc/jemalloc_macros.h.in"
  524. cfgoutputs_tup="${cfgoutputs_tup} include/jemalloc/jemalloc_protos.h:include/jemalloc/jemalloc_protos.h.in"
  525. cfgoutputs_tup="${cfgoutputs_tup} include/jemalloc/internal/jemalloc_internal.h"
  526. cfgoutputs_tup="${cfgoutputs_tup} test/test.sh:test/test.sh.in"
  527. cfgoutputs_tup="${cfgoutputs_tup} test/include/test/jemalloc_test.h:test/include/test/jemalloc_test.h.in"
  528. cfghdrs_in="${srcroot}include/jemalloc/jemalloc_defs.h.in"
  529. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/internal/jemalloc_internal_defs.h.in"
  530. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/internal/private_namespace.sh"
  531. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/internal/private_unnamespace.sh"
  532. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/internal/private_symbols.txt"
  533. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/internal/public_namespace.sh"
  534. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/internal/public_unnamespace.sh"
  535. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/internal/size_classes.sh"
  536. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/jemalloc_rename.sh"
  537. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/jemalloc_mangle.sh"
  538. cfghdrs_in="${cfghdrs_in} ${srcroot}include/jemalloc/jemalloc.sh"
  539. cfghdrs_in="${cfghdrs_in} ${srcroot}test/include/test/jemalloc_test_defs.h.in"
  540. cfghdrs_out="include/jemalloc/jemalloc_defs.h"
  541. cfghdrs_out="${cfghdrs_out} include/jemalloc/jemalloc${install_suffix}.h"
  542. cfghdrs_out="${cfghdrs_out} include/jemalloc/internal/private_namespace.h"
  543. cfghdrs_out="${cfghdrs_out} include/jemalloc/internal/private_unnamespace.h"
  544. cfghdrs_out="${cfghdrs_out} include/jemalloc/internal/public_symbols.txt"
  545. cfghdrs_out="${cfghdrs_out} include/jemalloc/internal/public_namespace.h"
  546. cfghdrs_out="${cfghdrs_out} include/jemalloc/internal/public_unnamespace.h"
  547. cfghdrs_out="${cfghdrs_out} include/jemalloc/internal/size_classes.h"
  548. cfghdrs_out="${cfghdrs_out} include/jemalloc/jemalloc_protos_jet.h"
  549. cfghdrs_out="${cfghdrs_out} include/jemalloc/jemalloc_rename.h"
  550. cfghdrs_out="${cfghdrs_out} include/jemalloc/jemalloc_mangle.h"
  551. cfghdrs_out="${cfghdrs_out} include/jemalloc/jemalloc_mangle_jet.h"
  552. cfghdrs_out="${cfghdrs_out} include/jemalloc/internal/jemalloc_internal_defs.h"
  553. cfghdrs_out="${cfghdrs_out} test/include/test/jemalloc_test_defs.h"
  554. cfghdrs_tup="include/jemalloc/jemalloc_defs.h:include/jemalloc/jemalloc_defs.h.in"
  555. cfghdrs_tup="${cfghdrs_tup} include/jemalloc/internal/jemalloc_internal_defs.h:${srcroot}include/jemalloc/internal/jemalloc_internal_defs.h.in"
  556. cfghdrs_tup="${cfghdrs_tup} test/include/test/jemalloc_test_defs.h:${srcroot}test/include/test/jemalloc_test_defs.h.in"
  557. dnl Do not silence irrelevant compiler warnings by default, since enabling this
  558. dnl option incurs a performance penalty.
  559. AC_ARG_ENABLE([cc-silence],
  560. [AS_HELP_STRING([--enable-cc-silence],
  561. [Silence irrelevant compiler warnings])],
  562. [if test "x$enable_cc_silence" = "xno" ; then
  563. enable_cc_silence="0"
  564. else
  565. enable_cc_silence="1"
  566. fi
  567. ],
  568. [enable_cc_silence="0"]
  569. )
  570. if test "x$enable_cc_silence" = "x1" ; then
  571. AC_DEFINE([JEMALLOC_CC_SILENCE], [ ])
  572. fi
  573. dnl Do not compile with debugging by default.
  574. AC_ARG_ENABLE([debug],
  575. [AS_HELP_STRING([--enable-debug], [Build debugging code (implies --enable-ivsalloc)])],
  576. [if test "x$enable_debug" = "xno" ; then
  577. enable_debug="0"
  578. else
  579. enable_debug="1"
  580. fi
  581. ],
  582. [enable_debug="0"]
  583. )
  584. if test "x$enable_debug" = "x1" ; then
  585. AC_DEFINE([JEMALLOC_DEBUG], [ ])
  586. enable_ivsalloc="1"
  587. fi
  588. AC_SUBST([enable_debug])
  589. dnl Do not validate pointers by default.
  590. AC_ARG_ENABLE([ivsalloc],
  591. [AS_HELP_STRING([--enable-ivsalloc], [Validate pointers passed through the public API])],
  592. [if test "x$enable_ivsalloc" = "xno" ; then
  593. enable_ivsalloc="0"
  594. else
  595. enable_ivsalloc="1"
  596. fi
  597. ],
  598. [enable_ivsalloc="0"]
  599. )
  600. if test "x$enable_ivsalloc" = "x1" ; then
  601. AC_DEFINE([JEMALLOC_IVSALLOC], [ ])
  602. fi
  603. dnl Only optimize if not debugging.
  604. if test "x$enable_debug" = "x0" -a "x$no_CFLAGS" = "xyes" ; then
  605. dnl Make sure that an optimization flag was not specified in EXTRA_CFLAGS.
  606. optimize="no"
  607. echo "$CFLAGS $EXTRA_CFLAGS" | grep '\-O' >/dev/null || optimize="yes"
  608. if test "x${optimize}" = "xyes" ; then
  609. if test "x$GCC" = "xyes" ; then
  610. JE_CFLAGS_APPEND([-O3])
  611. JE_CFLAGS_APPEND([-funroll-loops])
  612. elif test "x$je_cv_msvc" = "xyes" ; then
  613. JE_CFLAGS_APPEND([-O2])
  614. else
  615. JE_CFLAGS_APPEND([-O])
  616. fi
  617. fi
  618. fi
  619. dnl Enable statistics calculation by default.
  620. AC_ARG_ENABLE([stats],
  621. [AS_HELP_STRING([--disable-stats],
  622. [Disable statistics calculation/reporting])],
  623. [if test "x$enable_stats" = "xno" ; then
  624. enable_stats="0"
  625. else
  626. enable_stats="1"
  627. fi
  628. ],
  629. [enable_stats="1"]
  630. )
  631. if test "x$enable_stats" = "x1" ; then
  632. AC_DEFINE([JEMALLOC_STATS], [ ])
  633. fi
  634. AC_SUBST([enable_stats])
  635. dnl Do not enable profiling by default.
  636. AC_ARG_ENABLE([prof],
  637. [AS_HELP_STRING([--enable-prof], [Enable allocation profiling])],
  638. [if test "x$enable_prof" = "xno" ; then
  639. enable_prof="0"
  640. else
  641. enable_prof="1"
  642. fi
  643. ],
  644. [enable_prof="0"]
  645. )
  646. if test "x$enable_prof" = "x1" ; then
  647. backtrace_method=""
  648. else
  649. backtrace_method="N/A"
  650. fi
  651. AC_ARG_ENABLE([prof-libunwind],
  652. [AS_HELP_STRING([--enable-prof-libunwind], [Use libunwind for backtracing])],
  653. [if test "x$enable_prof_libunwind" = "xno" ; then
  654. enable_prof_libunwind="0"
  655. else
  656. enable_prof_libunwind="1"
  657. fi
  658. ],
  659. [enable_prof_libunwind="0"]
  660. )
  661. AC_ARG_WITH([static_libunwind],
  662. [AS_HELP_STRING([--with-static-libunwind=<libunwind.a>],
  663. [Path to static libunwind library; use rather than dynamically linking])],
  664. if test "x$with_static_libunwind" = "xno" ; then
  665. LUNWIND="-lunwind"
  666. else
  667. if test ! -f "$with_static_libunwind" ; then
  668. AC_MSG_ERROR([Static libunwind not found: $with_static_libunwind])
  669. fi
  670. LUNWIND="$with_static_libunwind"
  671. fi,
  672. LUNWIND="-lunwind"
  673. )
  674. if test "x$backtrace_method" = "x" -a "x$enable_prof_libunwind" = "x1" ; then
  675. AC_CHECK_HEADERS([libunwind.h], , [enable_prof_libunwind="0"])
  676. if test "x$LUNWIND" = "x-lunwind" ; then
  677. AC_CHECK_LIB([unwind], [backtrace], [LIBS="$LIBS $LUNWIND"],
  678. [enable_prof_libunwind="0"])
  679. else
  680. LIBS="$LIBS $LUNWIND"
  681. fi
  682. if test "x${enable_prof_libunwind}" = "x1" ; then
  683. backtrace_method="libunwind"
  684. AC_DEFINE([JEMALLOC_PROF_LIBUNWIND], [ ])
  685. fi
  686. fi
  687. AC_ARG_ENABLE([prof-libgcc],
  688. [AS_HELP_STRING([--disable-prof-libgcc],
  689. [Do not use libgcc for backtracing])],
  690. [if test "x$enable_prof_libgcc" = "xno" ; then
  691. enable_prof_libgcc="0"
  692. else
  693. enable_prof_libgcc="1"
  694. fi
  695. ],
  696. [enable_prof_libgcc="1"]
  697. )
  698. if test "x$backtrace_method" = "x" -a "x$enable_prof_libgcc" = "x1" \
  699. -a "x$GCC" = "xyes" ; then
  700. AC_CHECK_HEADERS([unwind.h], , [enable_prof_libgcc="0"])
  701. AC_CHECK_LIB([gcc], [_Unwind_Backtrace], [LIBS="$LIBS -lgcc"], [enable_prof_libgcc="0"])
  702. if test "x${enable_prof_libgcc}" = "x1" ; then
  703. backtrace_method="libgcc"
  704. AC_DEFINE([JEMALLOC_PROF_LIBGCC], [ ])
  705. fi
  706. else
  707. enable_prof_libgcc="0"
  708. fi
  709. AC_ARG_ENABLE([prof-gcc],
  710. [AS_HELP_STRING([--disable-prof-gcc],
  711. [Do not use gcc intrinsics for backtracing])],
  712. [if test "x$enable_prof_gcc" = "xno" ; then
  713. enable_prof_gcc="0"
  714. else
  715. enable_prof_gcc="1"
  716. fi
  717. ],
  718. [enable_prof_gcc="1"]
  719. )
  720. if test "x$backtrace_method" = "x" -a "x$enable_prof_gcc" = "x1" \
  721. -a "x$GCC" = "xyes" ; then
  722. JE_CFLAGS_APPEND([-fno-omit-frame-pointer])
  723. backtrace_method="gcc intrinsics"
  724. AC_DEFINE([JEMALLOC_PROF_GCC], [ ])
  725. else
  726. enable_prof_gcc="0"
  727. fi
  728. if test "x$backtrace_method" = "x" ; then
  729. backtrace_method="none (disabling profiling)"
  730. enable_prof="0"
  731. fi
  732. AC_MSG_CHECKING([configured backtracing method])
  733. AC_MSG_RESULT([$backtrace_method])
  734. if test "x$enable_prof" = "x1" ; then
  735. if test "x${force_tls}" = "x0" ; then
  736. AC_MSG_ERROR([Heap profiling requires TLS]);
  737. fi
  738. force_tls="1"
  739. if test "x$abi" != "xpecoff"; then
  740. dnl Heap profiling uses the log(3) function.
  741. LIBS="$LIBS -lm"
  742. fi
  743. AC_DEFINE([JEMALLOC_PROF], [ ])
  744. fi
  745. AC_SUBST([enable_prof])
  746. dnl Enable thread-specific caching by default.
  747. AC_ARG_ENABLE([tcache],
  748. [AS_HELP_STRING([--disable-tcache], [Disable per thread caches])],
  749. [if test "x$enable_tcache" = "xno" ; then
  750. enable_tcache="0"
  751. else
  752. enable_tcache="1"
  753. fi
  754. ],
  755. [enable_tcache="1"]
  756. )
  757. if test "x$enable_tcache" = "x1" ; then
  758. AC_DEFINE([JEMALLOC_TCACHE], [ ])
  759. fi
  760. AC_SUBST([enable_tcache])
  761. dnl Disable mremap() for huge realloc() by default.
  762. AC_ARG_ENABLE([mremap],
  763. [AS_HELP_STRING([--enable-mremap], [Enable mremap(2) for huge realloc()])],
  764. [if test "x$enable_mremap" = "xno" ; then
  765. enable_mremap="0"
  766. else
  767. enable_mremap="1"
  768. fi
  769. ],
  770. [enable_mremap="0"]
  771. )
  772. if test "x$enable_mremap" = "x1" ; then
  773. JE_COMPILABLE([mremap(...MREMAP_FIXED...)], [
  774. #define _GNU_SOURCE
  775. #include <sys/mman.h>
  776. ], [
  777. void *p = mremap((void *)0, 0, 0, MREMAP_MAYMOVE|MREMAP_FIXED, (void *)0);
  778. ], [je_cv_mremap_fixed])
  779. if test "x${je_cv_mremap_fixed}" = "xno" ; then
  780. enable_mremap="0"
  781. fi
  782. fi
  783. if test "x$enable_mremap" = "x1" ; then
  784. AC_DEFINE([JEMALLOC_MREMAP], [ ])
  785. fi
  786. AC_SUBST([enable_mremap])
  787. dnl Enable VM deallocation via munmap() by default.
  788. AC_ARG_ENABLE([munmap],
  789. [AS_HELP_STRING([--disable-munmap], [Disable VM deallocation via munmap(2)])],
  790. [if test "x$enable_munmap" = "xno" ; then
  791. enable_munmap="0"
  792. else
  793. enable_munmap="1"
  794. fi
  795. ],
  796. [enable_munmap="${default_munmap}"]
  797. )
  798. if test "x$enable_munmap" = "x1" ; then
  799. AC_DEFINE([JEMALLOC_MUNMAP], [ ])
  800. fi
  801. AC_SUBST([enable_munmap])
  802. dnl Do not enable allocation from DSS by default.
  803. AC_ARG_ENABLE([dss],
  804. [AS_HELP_STRING([--enable-dss], [Enable allocation from DSS])],
  805. [if test "x$enable_dss" = "xno" ; then
  806. enable_dss="0"
  807. else
  808. enable_dss="1"
  809. fi
  810. ],
  811. [enable_dss="0"]
  812. )
  813. dnl Check whether the BSD/SUSv1 sbrk() exists. If not, disable DSS support.
  814. AC_CHECK_FUNC([sbrk], [have_sbrk="1"], [have_sbrk="0"])
  815. if test "x$have_sbrk" = "x1" ; then
  816. if test "x$sbrk_deprecated" == "x1" ; then
  817. AC_MSG_RESULT([Disabling dss allocation because sbrk is deprecated])
  818. enable_dss="0"
  819. else
  820. AC_DEFINE([JEMALLOC_HAVE_SBRK], [ ])
  821. fi
  822. else
  823. enable_dss="0"
  824. fi
  825. if test "x$enable_dss" = "x1" ; then
  826. AC_DEFINE([JEMALLOC_DSS], [ ])
  827. fi
  828. AC_SUBST([enable_dss])
  829. dnl Support the junk/zero filling option by default.
  830. AC_ARG_ENABLE([fill],
  831. [AS_HELP_STRING([--disable-fill],
  832. [Disable support for junk/zero filling, quarantine, and redzones])],
  833. [if test "x$enable_fill" = "xno" ; then
  834. enable_fill="0"
  835. else
  836. enable_fill="1"
  837. fi
  838. ],
  839. [enable_fill="1"]
  840. )
  841. if test "x$enable_fill" = "x1" ; then
  842. AC_DEFINE([JEMALLOC_FILL], [ ])
  843. fi
  844. AC_SUBST([enable_fill])
  845. dnl Disable utrace(2)-based tracing by default.
  846. AC_ARG_ENABLE([utrace],
  847. [AS_HELP_STRING([--enable-utrace], [Enable utrace(2)-based tracing])],
  848. [if test "x$enable_utrace" = "xno" ; then
  849. enable_utrace="0"
  850. else
  851. enable_utrace="1"
  852. fi
  853. ],
  854. [enable_utrace="0"]
  855. )
  856. JE_COMPILABLE([utrace(2)], [
  857. #include <sys/types.h>
  858. #include <sys/param.h>
  859. #include <sys/time.h>
  860. #include <sys/uio.h>
  861. #include <sys/ktrace.h>
  862. ], [
  863. utrace((void *)0, 0);
  864. ], [je_cv_utrace])
  865. if test "x${je_cv_utrace}" = "xno" ; then
  866. enable_utrace="0"
  867. fi
  868. if test "x$enable_utrace" = "x1" ; then
  869. AC_DEFINE([JEMALLOC_UTRACE], [ ])
  870. fi
  871. AC_SUBST([enable_utrace])
  872. dnl Support Valgrind by default.
  873. AC_ARG_ENABLE([valgrind],
  874. [AS_HELP_STRING([--disable-valgrind], [Disable support for Valgrind])],
  875. [if test "x$enable_valgrind" = "xno" ; then
  876. enable_valgrind="0"
  877. else
  878. enable_valgrind="1"
  879. fi
  880. ],
  881. [enable_valgrind="1"]
  882. )
  883. if test "x$enable_valgrind" = "x1" ; then
  884. JE_COMPILABLE([valgrind], [
  885. #include <valgrind/valgrind.h>
  886. #include <valgrind/memcheck.h>
  887. #if !defined(VALGRIND_RESIZEINPLACE_BLOCK)
  888. # error "Incompatible Valgrind version"
  889. #endif
  890. ], [], [je_cv_valgrind])
  891. if test "x${je_cv_valgrind}" = "xno" ; then
  892. enable_valgrind="0"
  893. fi
  894. if test "x$enable_valgrind" = "x1" ; then
  895. AC_DEFINE([JEMALLOC_VALGRIND], [ ])
  896. fi
  897. fi
  898. AC_SUBST([enable_valgrind])
  899. dnl Do not support the xmalloc option by default.
  900. AC_ARG_ENABLE([xmalloc],
  901. [AS_HELP_STRING([--enable-xmalloc], [Support xmalloc option])],
  902. [if test "x$enable_xmalloc" = "xno" ; then
  903. enable_xmalloc="0"
  904. else
  905. enable_xmalloc="1"
  906. fi
  907. ],
  908. [enable_xmalloc="0"]
  909. )
  910. if test "x$enable_xmalloc" = "x1" ; then
  911. AC_DEFINE([JEMALLOC_XMALLOC], [ ])
  912. fi
  913. AC_SUBST([enable_xmalloc])
  914. AC_CACHE_CHECK([STATIC_PAGE_SHIFT],
  915. [je_cv_static_page_shift],
  916. AC_RUN_IFELSE([AC_LANG_PROGRAM(
  917. [[
  918. #include <strings.h>
  919. #ifdef _WIN32
  920. #include <windows.h>
  921. #else
  922. #include <unistd.h>
  923. #endif
  924. #include <stdio.h>
  925. ]],
  926. [[
  927. int result;
  928. FILE *f;
  929. #ifdef _WIN32
  930. SYSTEM_INFO si;
  931. GetSystemInfo(&si);
  932. result = si.dwPageSize;
  933. #else
  934. result = sysconf(_SC_PAGESIZE);
  935. #endif
  936. if (result == -1) {
  937. return 1;
  938. }
  939. result = ffsl(result) - 1;
  940. f = fopen("conftest.out", "w");
  941. if (f == NULL) {
  942. return 1;
  943. }
  944. fprintf(f, "%d\n", result);
  945. fclose(f);
  946. return 0;
  947. ]])],
  948. [je_cv_static_page_shift=`cat conftest.out`],
  949. [je_cv_static_page_shift=undefined]))
  950. if test "x$je_cv_static_page_shift" != "xundefined"; then
  951. AC_DEFINE_UNQUOTED([STATIC_PAGE_SHIFT], [$je_cv_static_page_shift])
  952. else
  953. AC_MSG_ERROR([cannot determine value for STATIC_PAGE_SHIFT])
  954. fi
  955. dnl ============================================================================
  956. dnl jemalloc configuration.
  957. dnl
  958. dnl Set VERSION if source directory has an embedded git repository.
  959. if test -d "${srcroot}.git" ; then
  960. git describe --long --abbrev=40 > ${srcroot}VERSION
  961. fi
  962. jemalloc_version=`cat ${srcroot}VERSION`
  963. jemalloc_version_major=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]1}'`
  964. jemalloc_version_minor=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]2}'`
  965. jemalloc_version_bugfix=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]3}'`
  966. jemalloc_version_nrev=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]4}'`
  967. jemalloc_version_gid=`echo ${jemalloc_version} | tr ".g-" " " | awk '{print [$]5}'`
  968. AC_SUBST([jemalloc_version])
  969. AC_SUBST([jemalloc_version_major])
  970. AC_SUBST([jemalloc_version_minor])
  971. AC_SUBST([jemalloc_version_bugfix])
  972. AC_SUBST([jemalloc_version_nrev])
  973. AC_SUBST([jemalloc_version_gid])
  974. dnl ============================================================================
  975. dnl Configure pthreads.
  976. if test "x$abi" != "xpecoff" ; then
  977. AC_CHECK_HEADERS([pthread.h], , [AC_MSG_ERROR([pthread.h is missing])])
  978. dnl Some systems may embed pthreads functionality in libc; check for libpthread
  979. dnl first, but try libc too before failing.
  980. AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS -lpthread"],
  981. [AC_SEARCH_LIBS([pthread_create], , ,
  982. AC_MSG_ERROR([libpthread is missing]))])
  983. fi
  984. CPPFLAGS="$CPPFLAGS -D_REENTRANT"
  985. dnl Check whether the BSD-specific _malloc_thread_cleanup() exists. If so, use
  986. dnl it rather than pthreads TSD cleanup functions to support cleanup during
  987. dnl thread exit, in order to avoid pthreads library recursion during
  988. dnl bootstrapping.
  989. AC_CHECK_FUNC([_malloc_thread_cleanup],
  990. [have__malloc_thread_cleanup="1"],
  991. [have__malloc_thread_cleanup="0"]
  992. )
  993. if test "x$have__malloc_thread_cleanup" = "x1" ; then
  994. AC_DEFINE([JEMALLOC_MALLOC_THREAD_CLEANUP], [ ])
  995. force_tls="1"
  996. fi
  997. dnl Check whether the BSD-specific _pthread_mutex_init_calloc_cb() exists. If
  998. dnl so, mutex initialization causes allocation, and we need to implement this
  999. dnl callback function in order to prevent recursive allocation.
  1000. AC_CHECK_FUNC([_pthread_mutex_init_calloc_cb],
  1001. [have__pthread_mutex_init_calloc_cb="1"],
  1002. [have__pthread_mutex_init_calloc_cb="0"]
  1003. )
  1004. if test "x$have__pthread_mutex_init_calloc_cb" = "x1" ; then
  1005. AC_DEFINE([JEMALLOC_MUTEX_INIT_CB])
  1006. fi
  1007. dnl Disable lazy locking by default.
  1008. AC_ARG_ENABLE([lazy_lock],
  1009. [AS_HELP_STRING([--enable-lazy-lock],
  1010. [Enable lazy locking (only lock when multi-threaded)])],
  1011. [if test "x$enable_lazy_lock" = "xno" ; then
  1012. enable_lazy_lock="0"
  1013. else
  1014. enable_lazy_lock="1"
  1015. fi
  1016. ],
  1017. [enable_lazy_lock="0"]
  1018. )
  1019. if test "x$enable_lazy_lock" = "x0" -a "x${force_lazy_lock}" = "x1" ; then
  1020. AC_MSG_RESULT([Forcing lazy-lock to avoid allocator/threading bootstrap issues])
  1021. enable_lazy_lock="1"
  1022. fi
  1023. if test "x$enable_lazy_lock" = "x1" ; then
  1024. if test "x$abi" != "xpecoff" ; then
  1025. AC_CHECK_HEADERS([dlfcn.h], , [AC_MSG_ERROR([dlfcn.h is missing])])
  1026. AC_CHECK_FUNC([dlsym], [],
  1027. [AC_CHECK_LIB([dl], [dlsym], [LIBS="$LIBS -ldl"],
  1028. [AC_MSG_ERROR([libdl is missing])])
  1029. ])
  1030. fi
  1031. AC_DEFINE([JEMALLOC_LAZY_LOCK], [ ])
  1032. fi
  1033. AC_SUBST([enable_lazy_lock])
  1034. AC_ARG_ENABLE([tls],
  1035. [AS_HELP_STRING([--disable-tls], [Disable thread-local storage (__thread keyword)])],
  1036. if test "x$enable_tls" = "xno" ; then
  1037. enable_tls="0"
  1038. else
  1039. enable_tls="1"
  1040. fi
  1041. ,
  1042. enable_tls="1"
  1043. )
  1044. if test "x${enable_tls}" = "x0" -a "x${force_tls}" = "x1" ; then
  1045. AC_MSG_RESULT([Forcing TLS to avoid allocator/threading bootstrap issues])
  1046. enable_tls="1"
  1047. fi
  1048. if test "x${enable_tls}" = "x1" -a "x${force_tls}" = "x0" ; then
  1049. AC_MSG_RESULT([Forcing no TLS to avoid allocator/threading bootstrap issues])
  1050. enable_tls="0"
  1051. fi
  1052. if test "x${enable_tls}" = "x1" ; then
  1053. AC_MSG_CHECKING([for TLS])
  1054. AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
  1055. [[
  1056. __thread int x;
  1057. ]], [[
  1058. x = 42;
  1059. return 0;
  1060. ]])],
  1061. AC_MSG_RESULT([yes]),
  1062. AC_MSG_RESULT([no])
  1063. enable_tls="0")
  1064. fi
  1065. AC_SUBST([enable_tls])
  1066. if test "x${enable_tls}" = "x1" ; then
  1067. AC_DEFINE_UNQUOTED([JEMALLOC_TLS], [ ])
  1068. elif test "x${force_tls}" = "x1" ; then
  1069. AC_MSG_ERROR([Failed to configure TLS, which is mandatory for correct function])
  1070. fi
  1071. dnl ============================================================================
  1072. dnl Check for ffsl(3), and fail if not found. This function exists on all
  1073. dnl platforms that jemalloc currently has a chance of functioning on without
  1074. dnl modification.
  1075. JE_COMPILABLE([a program using ffsl], [
  1076. #include <stdio.h>
  1077. #include <strings.h>
  1078. #include <string.h>
  1079. ], [
  1080. {
  1081. int rv = ffsl(0x08);
  1082. printf("%d\n", rv);
  1083. }
  1084. ], [je_cv_function_ffsl])
  1085. if test "x${je_cv_function_ffsl}" != "xyes" ; then
  1086. AC_MSG_ERROR([Cannot build without ffsl(3)])
  1087. fi
  1088. dnl ============================================================================
  1089. dnl Check for atomic(9) operations as provided on FreeBSD.
  1090. JE_COMPILABLE([atomic(9)], [
  1091. #include <sys/types.h>
  1092. #include <machine/atomic.h>
  1093. #include <inttypes.h>
  1094. ], [
  1095. {
  1096. uint32_t x32 = 0;
  1097. volatile uint32_t *x32p = &x32;
  1098. atomic_fetchadd_32(x32p, 1);
  1099. }
  1100. {
  1101. unsigned long xlong = 0;
  1102. volatile unsigned long *xlongp = &xlong;
  1103. atomic_fetchadd_long(xlongp, 1);
  1104. }
  1105. ], [je_cv_atomic9])
  1106. if test "x${je_cv_atomic9}" = "xyes" ; then
  1107. AC_DEFINE([JEMALLOC_ATOMIC9])
  1108. fi
  1109. dnl ============================================================================
  1110. dnl Check for atomic(3) operations as provided on Darwin.
  1111. JE_COMPILABLE([Darwin OSAtomic*()], [
  1112. #include <libkern/OSAtomic.h>
  1113. #include <inttypes.h>
  1114. ], [
  1115. {
  1116. int32_t x32 = 0;
  1117. volatile int32_t *x32p = &x32;
  1118. OSAtomicAdd32(1, x32p);
  1119. }
  1120. {
  1121. int64_t x64 = 0;
  1122. volatile int64_t *x64p = &x64;
  1123. OSAtomicAdd64(1, x64p);
  1124. }
  1125. ], [je_cv_osatomic])
  1126. if test "x${je_cv_osatomic}" = "xyes" ; then
  1127. AC_DEFINE([JEMALLOC_OSATOMIC], [ ])
  1128. fi
  1129. dnl ============================================================================
  1130. dnl Check whether __sync_{add,sub}_and_fetch() are available despite
  1131. dnl __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n macros being undefined.
  1132. AC_DEFUN([JE_SYNC_COMPARE_AND_SWAP_CHECK],[
  1133. AC_CACHE_CHECK([whether to force $1-bit __sync_{add,sub}_and_fetch()],
  1134. [je_cv_sync_compare_and_swap_$2],
  1135. [AC_LINK_IFELSE([AC_LANG_PROGRAM([
  1136. #include <stdint.h>
  1137. ],
  1138. [
  1139. #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_$2
  1140. {
  1141. uint$1_t x$1 = 0;
  1142. __sync_add_and_fetch(&x$1, 42);
  1143. __sync_sub_and_fetch(&x$1, 1);
  1144. }
  1145. #else
  1146. #error __GCC_HAVE_SYNC_COMPARE_AND_SWAP_$2 is defined, no need to force
  1147. #endif
  1148. ])],
  1149. [je_cv_sync_compare_and_swap_$2=yes],
  1150. [je_cv_sync_compare_and_swap_$2=no])])
  1151. if test "x${je_cv_sync_compare_and_swap_$2}" = "xyes" ; then
  1152. AC_DEFINE([JE_FORCE_SYNC_COMPARE_AND_SWAP_$2], [ ])
  1153. fi
  1154. ])
  1155. if test "x${je_cv_atomic9}" != "xyes" -a "x${je_cv_osatomic}" != "xyes" ; then
  1156. JE_SYNC_COMPARE_AND_SWAP_CHECK(32, 4)
  1157. JE_SYNC_COMPARE_AND_SWAP_CHECK(64, 8)
  1158. fi
  1159. dnl ============================================================================
  1160. dnl Check for spinlock(3) operations as provided on Darwin.
  1161. JE_COMPILABLE([Darwin OSSpin*()], [
  1162. #include <libkern/OSAtomic.h>
  1163. #include <inttypes.h>
  1164. ], [
  1165. OSSpinLock lock = 0;
  1166. OSSpinLockLock(&lock);
  1167. OSSpinLockUnlock(&lock);
  1168. ], [je_cv_osspin])
  1169. if test "x${je_cv_osspin}" = "xyes" ; then
  1170. AC_DEFINE([JEMALLOC_OSSPIN], [ ])
  1171. fi
  1172. dnl ============================================================================
  1173. dnl Darwin-related configuration.
  1174. AC_ARG_ENABLE([zone-allocator],
  1175. [AS_HELP_STRING([--disable-zone-allocator],
  1176. [Disable zone allocator for Darwin])],
  1177. [if test "x$enable_zone_allocator" = "xno" ; then
  1178. enable_zone_allocator="0"
  1179. else
  1180. enable_zone_allocator="1"
  1181. fi
  1182. ],
  1183. [if test "x${abi}" = "xmacho"; then
  1184. enable_zone_allocator="1"
  1185. fi
  1186. ]
  1187. )
  1188. AC_SUBST([enable_zone_allocator])
  1189. if test "x${enable_zone_allocator}" = "x1" ; then
  1190. if test "x${abi}" != "xmacho"; then
  1191. AC_MSG_ERROR([--enable-zone-allocator is only supported on Darwin])
  1192. fi
  1193. AC_DEFINE([JEMALLOC_IVSALLOC], [ ])
  1194. AC_DEFINE([JEMALLOC_ZONE], [ ])
  1195. dnl The szone version jumped from 3 to 6 between the OS X 10.5.x and 10.6
  1196. dnl releases. malloc_zone_t and malloc_introspection_t have new fields in
  1197. dnl 10.6, which is the only source-level indication of the change.
  1198. AC_MSG_CHECKING([malloc zone version])
  1199. AC_DEFUN([JE_ZONE_PROGRAM],
  1200. [AC_LANG_PROGRAM(
  1201. [#include <malloc/malloc.h>],
  1202. [static foo[[sizeof($1) $2 sizeof(void *) * $3 ? 1 : -1]]]
  1203. )])
  1204. AC_COMPILE_IFELSE([JE_ZONE_PROGRAM(malloc_zone_t,==,14)],[JEMALLOC_ZONE_VERSION=3],[
  1205. AC_COMPILE_IFELSE([JE_ZONE_PROGRAM(malloc_zone_t,==,15)],[JEMALLOC_ZONE_VERSION=5],[
  1206. AC_COMPILE_IFELSE([JE_ZONE_PROGRAM(malloc_zone_t,==,16)],[
  1207. AC_COMPILE_IFELSE([JE_ZONE_PROGRAM(malloc_introspection_t,==,9)],[JEMALLOC_ZONE_VERSION=6],[
  1208. AC_COMPILE_IFELSE([JE_ZONE_PROGRAM(malloc_introspection_t,==,13)],[JEMALLOC_ZONE_VERSION=7],[JEMALLOC_ZONE_VERSION=]
  1209. )])],[
  1210. AC_COMPILE_IFELSE([JE_ZONE_PROGRAM(malloc_zone_t,==,17)],[JEMALLOC_ZONE_VERSION=8],[
  1211. AC_COMPILE_IFELSE([JE_ZONE_PROGRAM(malloc_zone_t,>,17)],[JEMALLOC_ZONE_VERSION=9],[JEMALLOC_ZONE_VERSION=]
  1212. )])])])])
  1213. if test "x${JEMALLOC_ZONE_VERSION}" = "x"; then
  1214. AC_MSG_RESULT([unsupported])
  1215. AC_MSG_ERROR([Unsupported malloc zone version])
  1216. fi
  1217. if test "${JEMALLOC_ZONE_VERSION}" = 9; then
  1218. JEMALLOC_ZONE_VERSION=8
  1219. AC_MSG_RESULT([> 8])
  1220. else
  1221. AC_MSG_RESULT([$JEMALLOC_ZONE_VERSION])
  1222. fi
  1223. AC_DEFINE_UNQUOTED(JEMALLOC_ZONE_VERSION, [$JEMALLOC_ZONE_VERSION])
  1224. fi
  1225. dnl ============================================================================
  1226. dnl Check for typedefs, structures, and compiler characteristics.
  1227. AC_HEADER_STDBOOL
  1228. dnl ============================================================================
  1229. dnl Define commands that generate output files.
  1230. AC_CONFIG_COMMANDS([include/jemalloc/internal/private_namespace.h], [
  1231. mkdir -p "${objroot}include/jemalloc/internal"
  1232. "${srcdir}/include/jemalloc/internal/private_namespace.sh" "${srcdir}/include/jemalloc/internal/private_symbols.txt" > "${objroot}include/jemalloc/internal/private_namespace.h"
  1233. ], [
  1234. srcdir="${srcdir}"
  1235. objroot="${objroot}"
  1236. ])
  1237. AC_CONFIG_COMMANDS([include/jemalloc/internal/private_unnamespace.h], [
  1238. mkdir -p "${objroot}include/jemalloc/internal"
  1239. "${srcdir}/include/jemalloc/internal/private_unnamespace.sh" "${srcdir}/include/jemalloc/internal/private_symbols.txt" > "${objroot}include/jemalloc/internal/private_unnamespace.h"
  1240. ], [
  1241. srcdir="${srcdir}"
  1242. objroot="${objroot}"
  1243. ])
  1244. AC_CONFIG_COMMANDS([include/jemalloc/internal/public_symbols.txt], [
  1245. f="${objroot}include/jemalloc/internal/public_symbols.txt"
  1246. mkdir -p "${objroot}include/jemalloc/internal"
  1247. cp /dev/null "${f}"
  1248. for nm in `echo ${mangling_map} |tr ',' ' '` ; do
  1249. n=`echo ${nm} |tr ':' ' ' |awk '{print $[]1}'`
  1250. m=`echo ${nm} |tr ':' ' ' |awk '{print $[]2}'`
  1251. echo "${n}:${m}" >> "${f}"
  1252. dnl Remove name from public_syms so that it isn't redefined later.
  1253. public_syms=`for sym in ${public_syms}; do echo "${sym}"; done |grep -v "^${n}\$" |tr '\n' ' '`
  1254. done
  1255. for sym in ${public_syms} ; do
  1256. n="${sym}"
  1257. m="${JEMALLOC_PREFIX}${sym}"
  1258. echo "${n}:${m}" >> "${f}"
  1259. done
  1260. ], [
  1261. srcdir="${srcdir}"
  1262. objroot="${objroot}"
  1263. mangling_map="${mangling_map}"
  1264. public_syms="${public_syms}"
  1265. JEMALLOC_PREFIX="${JEMALLOC_PREFIX}"
  1266. ])
  1267. AC_CONFIG_COMMANDS([include/jemalloc/internal/public_namespace.h], [
  1268. mkdir -p "${objroot}include/jemalloc/internal"
  1269. "${srcdir}/include/jemalloc/internal/public_namespace.sh" "${objroot}include/jemalloc/internal/public_symbols.txt" > "${objroot}include/jemalloc/internal/public_namespace.h"
  1270. ], [
  1271. srcdir="${srcdir}"
  1272. objroot="${objroot}"
  1273. ])
  1274. AC_CONFIG_COMMANDS([include/jemalloc/internal/public_unnamespace.h], [
  1275. mkdir -p "${objroot}include/jemalloc/internal"
  1276. "${srcdir}/include/jemalloc/internal/public_unnamespace.sh" "${objroot}include/jemalloc/internal/public_symbols.txt" > "${objroot}include/jemalloc/internal/public_unnamespace.h"
  1277. ], [
  1278. srcdir="${srcdir}"
  1279. objroot="${objroot}"
  1280. ])
  1281. AC_CONFIG_COMMANDS([include/jemalloc/internal/size_classes.h], [
  1282. mkdir -p "${objroot}include/jemalloc/internal"
  1283. "${srcdir}/include/jemalloc/internal/size_classes.sh" > "${objroot}include/jemalloc/internal/size_classes.h"
  1284. ], [
  1285. srcdir="${srcdir}"
  1286. objroot="${objroot}"
  1287. ])
  1288. AC_CONFIG_COMMANDS([include/jemalloc/jemalloc_protos_jet.h], [
  1289. mkdir -p "${objroot}include/jemalloc"
  1290. cat "${srcdir}/include/jemalloc/jemalloc_protos.h.in" | sed -e 's/@je_@/jet_/g' > "${objroot}include/jemalloc/jemalloc_protos_jet.h"
  1291. ], [
  1292. srcdir="${srcdir}"
  1293. objroot="${objroot}"
  1294. ])
  1295. AC_CONFIG_COMMANDS([include/jemalloc/jemalloc_rename.h], [
  1296. mkdir -p "${objroot}include/jemalloc"
  1297. "${srcdir}/include/jemalloc/jemalloc_rename.sh" "${objroot}include/jemalloc/internal/public_symbols.txt" > "${objroot}include/jemalloc/jemalloc_rename.h"
  1298. ], [
  1299. srcdir="${srcdir}"
  1300. objroot="${objroot}"
  1301. ])
  1302. AC_CONFIG_COMMANDS([include/jemalloc/jemalloc_mangle.h], [
  1303. mkdir -p "${objroot}include/jemalloc"
  1304. "${srcdir}/include/jemalloc/jemalloc_mangle.sh" "${objroot}include/jemalloc/internal/public_symbols.txt" je_ > "${objroot}include/jemalloc/jemalloc_mangle.h"
  1305. ], [
  1306. srcdir="${srcdir}"
  1307. objroot="${objroot}"
  1308. ])
  1309. AC_CONFIG_COMMANDS([include/jemalloc/jemalloc_mangle_jet.h], [
  1310. mkdir -p "${objroot}include/jemalloc"
  1311. "${srcdir}/include/jemalloc/jemalloc_mangle.sh" "${objroot}include/jemalloc/internal/public_symbols.txt" jet_ > "${objroot}include/jemalloc/jemalloc_mangle_jet.h"
  1312. ], [
  1313. srcdir="${srcdir}"
  1314. objroot="${objroot}"
  1315. ])
  1316. AC_CONFIG_COMMANDS([include/jemalloc/jemalloc.h], [
  1317. mkdir -p "${objroot}include/jemalloc"
  1318. "${srcdir}/include/jemalloc/jemalloc.sh" "${objroot}" > "${objroot}include/jemalloc/jemalloc${install_suffix}.h"
  1319. ], [
  1320. srcdir="${srcdir}"
  1321. objroot="${objroot}"
  1322. install_suffix="${install_suffix}"
  1323. ])
  1324. dnl Process .in files.
  1325. AC_SUBST([cfghdrs_in])
  1326. AC_SUBST([cfghdrs_out])
  1327. AC_CONFIG_HEADERS([$cfghdrs_tup])
  1328. dnl ============================================================================
  1329. dnl Generate outputs.
  1330. AC_CONFIG_FILES([$cfgoutputs_tup config.stamp bin/jemalloc.sh])
  1331. AC_SUBST([cfgoutputs_in])
  1332. AC_SUBST([cfgoutputs_out])
  1333. AC_OUTPUT
  1334. dnl ============================================================================
  1335. dnl Print out the results of configuration.
  1336. AC_MSG_RESULT([===============================================================================])
  1337. AC_MSG_RESULT([jemalloc version : ${jemalloc_version}])
  1338. AC_MSG_RESULT([library revision : ${rev}])
  1339. AC_MSG_RESULT([])
  1340. AC_MSG_RESULT([CC : ${CC}])
  1341. AC_MSG_RESULT([CPPFLAGS : ${CPPFLAGS}])
  1342. AC_MSG_RESULT([CFLAGS : ${CFLAGS}])
  1343. AC_MSG_RESULT([LDFLAGS : ${LDFLAGS}])
  1344. AC_MSG_RESULT([EXTRA_LDFLAGS : ${EXTRA_LDFLAGS}])
  1345. AC_MSG_RESULT([LIBS : ${LIBS}])
  1346. AC_MSG_RESULT([RPATH_EXTRA : ${RPATH_EXTRA}])
  1347. AC_MSG_RESULT([])
  1348. AC_MSG_RESULT([XSLTPROC : ${XSLTPROC}])
  1349. AC_MSG_RESULT([XSLROOT : ${XSLROOT}])
  1350. AC_MSG_RESULT([])
  1351. AC_MSG_RESULT([PREFIX : ${PREFIX}])
  1352. AC_MSG_RESULT([BINDIR : ${BINDIR}])
  1353. AC_MSG_RESULT([INCLUDEDIR : ${INCLUDEDIR}])
  1354. AC_MSG_RESULT([LIBDIR : ${LIBDIR}])
  1355. AC_MSG_RESULT([DATADIR : ${DATADIR}])
  1356. AC_MSG_RESULT([MANDIR : ${MANDIR}])
  1357. AC_MSG_RESULT([])
  1358. AC_MSG_RESULT([srcroot : ${srcroot}])
  1359. AC_MSG_RESULT([abs_srcroot : ${abs_srcroot}])
  1360. AC_MSG_RESULT([objroot : ${objroot}])
  1361. AC_MSG_RESULT([abs_objroot : ${abs_objroot}])
  1362. AC_MSG_RESULT([])
  1363. AC_MSG_RESULT([JEMALLOC_PREFIX : ${JEMALLOC_PREFIX}])
  1364. AC_MSG_RESULT([JEMALLOC_PRIVATE_NAMESPACE])
  1365. AC_MSG_RESULT([ : ${JEMALLOC_PRIVATE_NAMESPACE}])
  1366. AC_MSG_RESULT([install_suffix : ${install_suffix}])
  1367. AC_MSG_RESULT([autogen : ${enable_autogen}])
  1368. AC_MSG_RESULT([experimental : ${enable_experimental}])
  1369. AC_MSG_RESULT([cc-silence : ${enable_cc_silence}])
  1370. AC_MSG_RESULT([debug : ${enable_debug}])
  1371. AC_MSG_RESULT([code-coverage : ${enable_code_coverage}])
  1372. AC_MSG_RESULT([stats : ${enable_stats}])
  1373. AC_MSG_RESULT([prof : ${enable_prof}])
  1374. AC_MSG_RESULT([prof-libunwind : ${enable_prof_libunwind}])
  1375. AC_MSG_RESULT([prof-libgcc : ${enable_prof_libgcc}])
  1376. AC_MSG_RESULT([prof-gcc : ${enable_prof_gcc}])
  1377. AC_MSG_RESULT([tcache : ${enable_tcache}])
  1378. AC_MSG_RESULT([fill : ${enable_fill}])
  1379. AC_MSG_RESULT([utrace : ${enable_utrace}])
  1380. AC_MSG_RESULT([valgrind : ${enable_valgrind}])
  1381. AC_MSG_RESULT([xmalloc : ${enable_xmalloc}])
  1382. AC_MSG_RESULT([mremap : ${enable_mremap}])
  1383. AC_MSG_RESULT([munmap : ${enable_munmap}])
  1384. AC_MSG_RESULT([dss : ${enable_dss}])
  1385. AC_MSG_RESULT([lazy_lock : ${enable_lazy_lock}])
  1386. AC_MSG_RESULT([tls : ${enable_tls}])
  1387. AC_MSG_RESULT([===============================================================================])