]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
* Make sure we're using GNU sed; install can otherwise fail
authorJulian Seward <jseward@acm.org>
Fri, 18 Jul 2008 18:20:42 +0000 (18:20 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 18 Jul 2008 18:20:42 +0000 (18:20 +0000)
* when getting the gcc version number, be robust to strings like
  "gcc.orig (GNU) 3.3.3" -- previous pattern was fooled by the dot
  in "gcc.orig"

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8442

configure.in

index dfbcc900abfaddd95faac66b41d209c06e9ed068..e5d696c3d8de41527348bba714dc2d03ed87d06d 100644 (file)
@@ -92,10 +92,30 @@ AC_SUBST(ASFLAGS)
 ])
 
 
+# Check we have GNU sed: some of the stuff done by "make install" relies
+# on some pretty fancy sed expressions, and AIX sed doesn't produce the
+# same results, causing install to fail
+
+AC_MSG_CHECKING([for GNU sed])
+
+[sed_firstline=`sed --version | head -n 1`]
+
+case "${sed_firstline}" in
+    GNU*)
+       AC_MSG_RESULT([ok, looks like GNU sed])
+       ;;
+    *)
+       AC_MSG_RESULT([please ensure first 'sed' in your path is GNU sed])
+       AC_MSG_RESULT([note: GNU sed is only required at build/install time])
+       AC_MSG_ERROR([build/install requires that 'sed' is GNU sed])
+       ;;
+esac
+
+
 # We don't want gcc < 3.0
 AC_MSG_CHECKING([for a supported version of gcc])
 
-[gcc_version=`${CC} --version | head -n 1 | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`]
+[gcc_version=`${CC} --version | head -n 1 | sed 's/^[^0-9]*\([0-9.]*\).*$/\1/'`]
 
 case "${gcc_version}" in
      2.*)