|
From: <sv...@va...> - 2010-05-15 08:37:33
|
Author: bart
Date: 2010-05-15 09:37:24 +0100 (Sat, 15 May 2010)
New Revision: 11132
Log:
Changes:
- Made glibc version detection test shorter and faster.
- Made unsupported glibc version error message more detailed.
Modified:
trunk/configure.in
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2010-05-14 11:18:52 UTC (rev 11131)
+++ trunk/configure.in 2010-05-15 08:37:24 UTC (rev 11132)
@@ -39,6 +39,7 @@
# AC_SUBST([OBJCFLAGS])
# ])
AC_PROG_RANLIB
+AC_PROG_SED
# If no AR variable was specified, look up the name of the archiver. Otherwise
# do not touch the AR variable.
@@ -582,118 +583,19 @@
# This variable will collect the suppression files to be used.
AC_SUBST(DEFAULT_SUPP)
-GLIBC_VERSION=""
+AC_CHECK_HEADER([features.h])
-AC_EGREP_CPP([GLIBC_22], [
+if test x$ac_cv_header_features_h = xyes; then
+ rm -f conftest.$ac_ext
+ cat <<_ACEOF >conftest.$ac_ext
#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2)
- GLIBC_22
- #endif
+#if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__)
+glibc version is: __GLIBC__ __GLIBC_MINOR__
#endif
-],
-GLIBC_VERSION="2.2")
+_ACEOF
+ GLIBC_VERSION="`$CPP conftest.$ac_ext | $SED -n 's/^glibc version is: //p' | $SED 's/ /./g'`"
+fi
-AC_EGREP_CPP([GLIBC_23], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 3)
- GLIBC_23
- #endif
-#endif
-],
-GLIBC_VERSION="2.3")
-
-AC_EGREP_CPP([GLIBC_24], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 4)
- GLIBC_24
- #endif
-#endif
-],
-GLIBC_VERSION="2.4")
-
-AC_EGREP_CPP([GLIBC_25], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 5)
- GLIBC_25
- #endif
-#endif
-],
-GLIBC_VERSION="2.5")
-
-AC_EGREP_CPP([GLIBC_26], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 6)
- GLIBC_26
- #endif
-#endif
-],
-GLIBC_VERSION="2.6")
-
-AC_EGREP_CPP([GLIBC_27], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 7)
- GLIBC_27
- #endif
-#endif
-],
-GLIBC_VERSION="2.7")
-
-AC_EGREP_CPP([GLIBC_28], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8)
- GLIBC_28
- #endif
-#endif
-],
-GLIBC_VERSION="2.8")
-
-AC_EGREP_CPP([GLIBC_29], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 9)
- GLIBC_29
- #endif
-#endif
-],
-GLIBC_VERSION="2.9")
-
-AC_EGREP_CPP([GLIBC_210], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 10)
- GLIBC_210
- #endif
-#endif
-],
-GLIBC_VERSION="2.10")
-
-AC_EGREP_CPP([GLIBC_211], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 11)
- GLIBC_211
- #endif
-#endif
-],
-GLIBC_VERSION="2.11")
-
-AC_EGREP_CPP([GLIBC_212], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 12)
- GLIBC_212
- #endif
-#endif
-],
-GLIBC_VERSION="2.12")
-
AC_EGREP_CPP([AIX5_LIBC], [
#include <standards.h>
#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
@@ -806,7 +708,7 @@
;;
*)
- AC_MSG_RESULT(unsupported version)
+ AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.12])
AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
AC_MSG_ERROR([or Darwin libc])
|
|
From: Julian S. <js...@ac...> - 2010-05-28 20:47:38
|
On Saturday 15 May 2010, sv...@va... wrote:
> Author: bart
> Date: 2010-05-15 09:37:24 +0100 (Sat, 15 May 2010)
> New Revision: 11132
>
> Log:
> Changes:
> - Made glibc version detection test shorter and faster.
> - Made unsupported glibc version error message more detailed.
>
>
> Modified:
> trunk/configure.in
>
>
> Modified: trunk/configure.in
> ===================================================================
> --- trunk/configure.in 2010-05-14 11:18:52 UTC (rev 11131)
> +++ trunk/configure.in 2010-05-15 08:37:24 UTC (rev 11132)
> @@ -39,6 +39,7 @@
> # AC_SUBST([OBJCFLAGS])
> # ])
> AC_PROG_RANLIB
> +AC_PROG_SED
It seems autoconf-2.59 does not have AC_PROG_SED, so this causes
from-scratch builds to fail:
running: aclocal
running: autoheader
running: automake -a
running: autoconf
configure.in:42: error: possibly undefined macro: AC_PROG_SED
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
and later
checking for ranlib... ranlib
./configure: line 3849: AC_PROG_SED: command not found
checking for ar... /usr/bin/ar
Bart, is there a fix/workaround for this?
J
>
> # If no AR variable was specified, look up the name of the archiver.
> Otherwise # do not touch the AR variable.
> @@ -582,118 +583,19 @@
> # This variable will collect the suppression files to be used.
> AC_SUBST(DEFAULT_SUPP)
>
> -GLIBC_VERSION=""
> +AC_CHECK_HEADER([features.h])
>
> -AC_EGREP_CPP([GLIBC_22], [
> +if test x$ac_cv_header_features_h = xyes; then
> + rm -f conftest.$ac_ext
> + cat <<_ACEOF >conftest.$ac_ext
> #include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2)
> - GLIBC_22
> - #endif
> +#if defined(__GNU_LIBRARY__) && defined(__GLIBC__) &&
> defined(__GLIBC_MINOR__) +glibc version is: __GLIBC__ __GLIBC_MINOR__
> #endif
> -],
> -GLIBC_VERSION="2.2")
> +_ACEOF
> + GLIBC_VERSION="`$CPP conftest.$ac_ext | $SED -n 's/^glibc version is:
> //p' | $SED 's/ /./g'`" +fi
>
> -AC_EGREP_CPP([GLIBC_23], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 3)
> - GLIBC_23
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.3")
> -
> -AC_EGREP_CPP([GLIBC_24], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 4)
> - GLIBC_24
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.4")
> -
> -AC_EGREP_CPP([GLIBC_25], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 5)
> - GLIBC_25
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.5")
> -
> -AC_EGREP_CPP([GLIBC_26], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 6)
> - GLIBC_26
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.6")
> -
> -AC_EGREP_CPP([GLIBC_27], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 7)
> - GLIBC_27
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.7")
> -
> -AC_EGREP_CPP([GLIBC_28], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8)
> - GLIBC_28
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.8")
> -
> -AC_EGREP_CPP([GLIBC_29], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 9)
> - GLIBC_29
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.9")
> -
> -AC_EGREP_CPP([GLIBC_210], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 10)
> - GLIBC_210
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.10")
> -
> -AC_EGREP_CPP([GLIBC_211], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 11)
> - GLIBC_211
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.11")
> -
> -AC_EGREP_CPP([GLIBC_212], [
> -#include <features.h>
> -#ifdef __GNU_LIBRARY__
> - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 12)
> - GLIBC_212
> - #endif
> -#endif
> -],
> -GLIBC_VERSION="2.12")
> -
> AC_EGREP_CPP([AIX5_LIBC], [
> #include <standards.h>
> #if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) ||
> defined(_AIXVERSION_530) @@ -806,7 +708,7 @@
> ;;
>
> *)
> - AC_MSG_RESULT(unsupported version)
> + AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
> AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.12])
> AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
> AC_MSG_ERROR([or Darwin libc])
>
>
> ---------------------------------------------------------------------------
>---
>
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|
|
From: Dave G. <go...@mc...> - 2010-05-28 21:27:19
|
On May 28, 2010 , at 4:09 PM CDT, Julian Seward wrote:
> checking for ranlib... ranlib
> ./configure: line 3849: AC_PROG_SED: command not found
> checking for ar... /usr/bin/ar
>
> Bart, is there a fix/workaround for this?
You could try something like this:
------8<------
# provide a very basic def for AC_PROG_SED if we don't have one (as in ac 2.59)
m4_ifndef([AC_PROG_SED],[AC_DEFUN([AC_PROG_SED],
[AC_ARG_VAR([SED])
AC_CHECK_PROGS([SED],[gsed sed])])])
AC_PROG_SED
------8<------
That's a pretty weak check because it doesn't do anything to make sure that the given sed isn't buggy. But it probably makes for a pretty good fallback, and most systems where Valgrind actually builds/runs should have a workable sed.
-Dave
|
|
From: Bart V. A. <bva...@ac...> - 2010-05-29 06:45:56
|
On Fri, May 28, 2010 at 11:27 PM, Dave Goodell <go...@mc...> wrote: > > On May 28, 2010 , at 4:09 PM CDT, Julian Seward wrote: > > > checking for ranlib... ranlib > > ./configure: line 3849: AC_PROG_SED: command not found > > checking for ar... /usr/bin/ar > > > > Bart, is there a fix/workaround for this? > > You could try something like this: > > ------8<------ > # provide a very basic def for AC_PROG_SED if we don't have one (as in ac 2.59) > m4_ifndef([AC_PROG_SED],[AC_DEFUN([AC_PROG_SED], > [AC_ARG_VAR([SED]) > AC_CHECK_PROGS([SED],[gsed sed])])]) > AC_PROG_SED > ------8<------ > > That's a pretty weak check because it doesn't do anything to make sure that the > given sed isn't buggy. But it probably makes for a pretty good fallback, and most > systems where Valgrind actually builds/runs should have a workable sed. Thanks. Applied a slightly modified version as r11137. Bart. |