@@ -141,6 +141,7 @@ if test "x$CFLAGS" = "x" ; then
141141 JE_CFLAGS_APPEND([ -Wall] )
142142 JE_CFLAGS_APPEND([ -Werror=declaration-after-statement] )
143143 JE_CFLAGS_APPEND([ -Wshorten-64-to-32] )
144+ JE_CFLAGS_APPEND([ -Wsign-compare] )
144145 JE_CFLAGS_APPEND([ -pipe] )
145146 JE_CFLAGS_APPEND([ -g3] )
146147 elif test "x$je_cv_msvc" = "xyes" ; then
@@ -304,6 +305,7 @@ case "${host}" in
304305 *-*-freebsd*)
305306 CFLAGS="$CFLAGS"
306307 abi="elf"
308+ AC_DEFINE ( [ JEMALLOC_SYSCTL_VM_OVERCOMMIT] , [ ] )
307309 AC_DEFINE ( [ JEMALLOC_PURGE_MADVISE_FREE] , [ ] )
308310 force_lazy_lock="1"
309311 ;;
@@ -328,6 +330,7 @@ case "${host}" in
328330 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
329331 abi="elf"
330332 AC_DEFINE ( [ JEMALLOC_HAS_ALLOCA_H] )
333+ AC_DEFINE ( [ JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY] , [ ] )
331334 AC_DEFINE ( [ JEMALLOC_PURGE_MADVISE_DONTNEED] , [ ] )
332335 AC_DEFINE ( [ JEMALLOC_THREADED_INIT] , [ ] )
333336 AC_DEFINE ( [ JEMALLOC_USE_CXX_THROW] , [ ] )
@@ -1172,27 +1175,36 @@ dnl ============================================================================
11721175dnl jemalloc configuration.
11731176dnl
11741177
1175- dnl Set VERSION if source directory is inside a git repository.
1176- if test "x`test ! \"${srcroot}\" && cd \"${srcroot}\"; git rev-parse --is-inside-work-tree 2>/dev/null`" = "xtrue" ; then
1177- dnl Pattern globs aren't powerful enough to match both single- and
1178- dnl double-digit version numbers, so iterate over patterns to support up to
1179- dnl version 99.99.99 without any accidental matches.
1180- rm -f "${objroot}VERSION"
1181- for pattern in [ '[ 0-9] .[ 0-9] .[ 0-9] ' '[ 0-9] .[ 0-9] .[ 0-9] [ 0-9] ' \
1182- '[ 0-9] .[ 0-9] [ 0-9] .[ 0-9] ' '[ 0-9] .[ 0-9] [ 0-9] .[ 0-9] [ 0-9] ' \
1183- '[ 0-9] [ 0-9] .[ 0-9] .[ 0-9] ' '[ 0-9] [ 0-9] .[ 0-9] .[ 0-9] [ 0-9] ' \
1184- '[ 0-9] [ 0-9] .[ 0-9] [ 0-9] .[ 0-9] ' \
1185- '[ 0-9] [ 0-9] .[ 0-9] [ 0-9] .[ 0-9] [ 0-9] '] ; do
1186- if test ! -e "${objroot}VERSION" ; then
1187- (test ! "${srcroot}" && cd "${srcroot}"; git describe --long --abbrev=40 --match="${pattern}") > "${objroot}VERSION.tmp" 2>/dev/null
1188- if test $? -eq 0 ; then
1189- mv "${objroot}VERSION.tmp" "${objroot}VERSION"
1190- break
1191- fi
1178+ AC_ARG_WITH ( [ version] ,
1179+ [ AS_HELP_STRING ( [ --with-version=<major>.<minor>.<bugfix>-<nrev>-g<gid>] ,
1180+ [ Version string] ) ] ,
1181+ [
1182+ echo "${with_version}" | grep [ '^[ 0-9] \+\.[ 0-9] \+\.[ 0-9] \+-[ 0-9] \+-g[ 0-9a-f] \+$'] 2>&1 1>/dev/null
1183+ if test $? -ne 0 ; then
1184+ AC_MSG_ERROR ( [ ${with_version} does not match <major>.<minor>.<bugfix>-<nrev>-g<gid>] )
11921185 fi
1193- done
1194- fi
1195- rm -f "${objroot}VERSION.tmp"
1186+ echo "$with_version" > "${objroot}VERSION"
1187+ ] , [
1188+ dnl Set VERSION if source directory is inside a git repository.
1189+ if test "x`test ! \"${srcroot}\" && cd \"${srcroot}\"; git rev-parse --is-inside-work-tree 2>/dev/null`" = "xtrue" ; then
1190+ dnl Pattern globs aren't powerful enough to match both single- and
1191+ dnl double-digit version numbers, so iterate over patterns to support up
1192+ dnl to version 99.99.99 without any accidental matches.
1193+ for pattern in [ '[ 0-9] .[ 0-9] .[ 0-9] ' '[ 0-9] .[ 0-9] .[ 0-9] [ 0-9] ' \
1194+ '[ 0-9] .[ 0-9] [ 0-9] .[ 0-9] ' '[ 0-9] .[ 0-9] [ 0-9] .[ 0-9] [ 0-9] ' \
1195+ '[ 0-9] [ 0-9] .[ 0-9] .[ 0-9] ' '[ 0-9] [ 0-9] .[ 0-9] .[ 0-9] [ 0-9] ' \
1196+ '[ 0-9] [ 0-9] .[ 0-9] [ 0-9] .[ 0-9] ' \
1197+ '[ 0-9] [ 0-9] .[ 0-9] [ 0-9] .[ 0-9] [ 0-9] '] ; do
1198+ (test ! "${srcroot}" && cd "${srcroot}"; git describe --long --abbrev=40 --match="${pattern}") > "${objroot}VERSION.tmp" 2>/dev/null
1199+ if test $? -eq 0 ; then
1200+ mv "${objroot}VERSION.tmp" "${objroot}VERSION"
1201+ break
1202+ fi
1203+ done
1204+ fi
1205+ rm -f "${objroot}VERSION.tmp"
1206+ ] )
1207+
11961208if test ! -e "${objroot}VERSION" ; then
11971209 if test ! -e "${srcroot}VERSION" ; then
11981210 AC_MSG_RESULT (
@@ -1229,13 +1241,8 @@ fi
12291241
12301242CPPFLAGS="$CPPFLAGS -D_REENTRANT"
12311243
1232- dnl Check whether clock_gettime(2) is in libc or librt. This function is only
1233- dnl used in test code, so save the result to TESTLIBS to avoid poluting LIBS.
1234- SAVED_LIBS="${LIBS}"
1235- LIBS=
1236- AC_SEARCH_LIBS ( [ clock_gettime] , [ rt] , [ TESTLIBS="${LIBS}"] )
1237- AC_SUBST ( [ TESTLIBS] )
1238- LIBS="${SAVED_LIBS}"
1244+ dnl Check whether clock_gettime(2) is in libc or librt.
1245+ AC_SEARCH_LIBS ( [ clock_gettime] , [ rt] )
12391246
12401247dnl Check if the GNU-specific secure_getenv function exists.
12411248AC_CHECK_FUNC ( [ secure_getenv] ,
@@ -1741,7 +1748,6 @@ AC_MSG_RESULT([CPPFLAGS : ${CPPFLAGS}])
17411748AC_MSG_RESULT ( [ LDFLAGS : ${LDFLAGS}] )
17421749AC_MSG_RESULT ( [ EXTRA_LDFLAGS : ${EXTRA_LDFLAGS}] )
17431750AC_MSG_RESULT ( [ LIBS : ${LIBS}] )
1744- AC_MSG_RESULT ( [ TESTLIBS : ${TESTLIBS}] )
17451751AC_MSG_RESULT ( [ RPATH_EXTRA : ${RPATH_EXTRA}] )
17461752AC_MSG_RESULT ( [ ] )
17471753AC_MSG_RESULT ( [ XSLTPROC : ${XSLTPROC}] )
0 commit comments