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