configure: Fix libc version check
Testing for gnu_get_libc_version isn't quite right (available before 2.1), and the feature macros were already present. The new test at least will fail for glibc < 2.1, but will pass on non-glibc systems. The buildsystem should be actually checking for some sort of compliance barrier instead, but this is a start. Signed-off-by: Ismael Luceno <ismael@iodev.co.uk> Change-Id: I879278c2946c1fa5416da0407a949c8c4b2a8bf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123006 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
committed by
Michael Stahl
parent
dd855b9af9
commit
19d85ff18f
16
configure.ac
16
configure.ac
@@ -11327,15 +11327,13 @@ dnl ***************************************
|
|||||||
dnl testing libc version for Linux...
|
dnl testing libc version for Linux...
|
||||||
dnl ***************************************
|
dnl ***************************************
|
||||||
if test "$_os" = "Linux"; then
|
if test "$_os" = "Linux"; then
|
||||||
AC_MSG_CHECKING([whether libc is >= 2.1.1])
|
AC_MSG_CHECKING([whether the libc is recent enough])
|
||||||
exec 6>/dev/null # no output
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
|
#include <features.h>
|
||||||
exec 6>&1 # output on again
|
#if defined(__GNU_LIBRARY__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1))
|
||||||
if test "$HAVE_LIBC"; then
|
#error glibc >= 2.1 is required
|
||||||
AC_MSG_RESULT([yes])
|
#endif
|
||||||
else
|
]])],, [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, upgrade libc])])
|
||||||
AC_MSG_ERROR([no, upgrade libc])
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl =========================================
|
dnl =========================================
|
||||||
|
Reference in New Issue
Block a user