m4/gcc_version.m4 : Fix XIPH_GCC_VERSION macro.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 9 Mar 2013 09:07:31 +0000 (20:07 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 9 Mar 2013 09:07:38 +0000 (20:07 +1100)
Macro was misbehaving with OpenBSD's sed.

m4/gcc_version.m4

index d1bae6a..a643ef2 100644 (file)
@@ -20,8 +20,8 @@ if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
        AC_MSG_RESULT($GCC_VERSION)
 
        changequote(,)dnl
-       GCC_MINOR_VERSION=`echo $GCC_VERSION | sed "s/^[0-9]\+\.//" | sed "s/\..*//"`
        GCC_MAJOR_VERSION=`echo $GCC_VERSION | sed "s/\..*//"`
+       GCC_MINOR_VERSION=`echo $GCC_VERSION | sed "s/$GCC_MAJOR_VERSION\.//" | sed "s/\..*//"`
        changequote([,])dnl
        fi