Skip to contentSkip to conversation

Wierdness in alsa-driver configure script

PATCH Eliot Blennerhassett 2 participants 2 messages Feb 10, 2010 – Feb 11, 2010

lore
Share & tools
lore
#0 lore raw

checking for kernel version... 2.6.28-17-generic
checking for GCC version... ./configure: eval: line 5540: syntax error near unexpected token `)'
./configure: eval: line 5540: `my_compiler_version=4.3.3-5ubuntu4)' Kernel compiler: Used compiler: gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3

gcc --version gives (yes, it is ugly!):
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.

The following change works for this particular case, but perhaps there is a better answer?

configure.in +1 -1
@@ -363,7 +363,7 @@ AC_DEFUN([CHECK_COMPILER], [
       ;;
     [[0-9]].[[0-9]]*)
       if test -z "$ac_compiler_version"; then
-        ac_compiler_version="$i"
+        ac_compiler_version=`echo $i | sed -e

's|[[^0-9]]*\([[0-9.]]\+\).*$|\1|'`

       fi
       ;;
     esac
#1 lore raw
Quoted 23 lines · Eliot Blennerhassett

checking for kernel version... 2.6.28-17-generic
checking for GCC version... ./configure: eval: line 5540: syntax error near unexpected token `)'
./configure: eval: line 5540: `my_compiler_version=4.3.3-5ubuntu4)' Kernel compiler: Used compiler: gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3

gcc --version gives (yes, it is ugly!):
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.

The following change works for this particular case, but perhaps there is a better answer?

configure.in +1 -1
@@ -363,7 +363,7 @@ AC_DEFUN([CHECK_COMPILER], [
      ;;
    [[0-9]].[[0-9]]*)
      if test -z "$ac_compiler_version"; then
-        ac_compiler_version="$i"
+        ac_compiler_version=`echo $i | sed -e

's|[[^0-9]]*\([[0-9.]]\+\).*$|\1|'`

Quoted 3 lines
      fi
      ;;
    esac

I applied this change to the alsa-driver git tree. The compiler check is not so critical these days.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.