Merge r1535027, 1535157, and 1541486 from trunk:
PR: 55690
r1535027:
configure.in: Fix Linux kernel version detection, which did not
anticipate "3.11.x"-style double digit versioning.
Submitted by: jorton
r1535157:
configure.in: Fix r1535027 for Linux kernel versions x.0.y.
Submitted by: jorton
r1541486:
Fix sed re escaping issue in recognition of Linux kernel version.
Submitted by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta gmail.com>
Reviewed by: trawick
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1541489 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CHANGES b/CHANGES
index 7e89cbf..15cefbc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes for APR 1.5.0
+ *) Fix Linux kernel version check to recognize more versions,
+ including versions 3.10 and later. PR 55690. [Joe Orton,
+ Arfrever Frehtes Taifersar Arahesis <arfrever.fta gmail.com>]
+
*) Add apr_sockaddr_is_wildcard() to check if a socket address
refers to the wildcard address for the protocol family (e.g.,
0.0.0.0/INADDR_ANY for IPv4). [Jeff Trawick]
diff --git a/configure.in b/configure.in
index b5f9985..56ccc19 100644
--- a/configure.in
+++ b/configure.in
@@ -664,7 +664,15 @@
fi
;;
*linux*)
- os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/'`
+ os_major=[`uname -r | sed -e 's/\([1-9][0-9]*\)\..*/\1/'`]
+ os_minor=[`uname -r | sed -e 's/[1-9][0-9]*\.\([0-9]\+\)\..*/\1/'`]
+ if test $os_major -lt 2 -o \( $os_major -eq 2 -a $os_minor -lt 4 \); then
+ AC_MSG_WARN([Configured for pre-2.4 Linux $os_major.$os_minor])
+ os_pre24linux=1
+ else
+ os_pre24linux=0
+ AC_MSG_NOTICE([Configured for Linux $os_major.$os_minor])
+ fi
;;
*os390)
os_version=`uname -r | sed -e 's/\.//g'`
@@ -1183,7 +1191,8 @@
# that it has it.
# FIXME - find exact 2.3 version that MMANON was fixed in. It is
# confirmed fixed in 2.4 series.
- if test $os_version -le "240"; then
+ if test $os_pre24linux -eq 1; then
+ AC_MSG_WARN([Disabling anon mmap() support for Linux pre-2.4])
APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_ZERO USE_SHMEM_SHMGET_ANON)
fi
;;
@@ -1249,11 +1258,9 @@
APR_DECIDE(USE_SHMEM_WIN32, [Windows shared memory])])
case $host in
*linux* )
- # Linux has problems with MM_SHMT_MMANON even though it reports
- # that it has it.
- # FIXME - find exact 2.3 version that MMANON was fixed in. It is
- # confirmed fixed in 2.4 series.
- if test $os_version -le "240"; then
+ # Linux pre-2.4 had problems with MM_SHMT_MMANON even though
+ # it reports that it has it.
+ if test $os_pre24linux -eq 1; then
APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_TMP USE_SHMEM_MMAP_SHM dnl
USE_SHMEM_SHMGET)
fi
@@ -1350,7 +1357,8 @@
;;
s390-*-linux-gnu)
# disable sendfile support for 2.2 on S/390
- if test $os_version -lt 240; then
+ if test $os_pre24linux -eq 1; then
+ AC_MSG_WARN([Disabled sendfile support for Linux 2.2 on S/390])
sendfile="0"
fi
;;