[Mesa-dev] [PATCH 1/1] configure.ac: Fix build with git-svn llvm version string

Tom Stellard tom at stellard.net
Thu Aug 14 06:35:40 PDT 2014


On Wed, Aug 13, 2014 at 04:46:56PM -0400, Jan Vesely wrote:
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
> 
> My llvm-config --version is
> 3.6.0git-svn-r215564-cd35a3b3
> 
> This patch assumes that the interesting part consists of only digits and dots.
> 
> 
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 4ff87eb..dc5117e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1697,7 +1697,7 @@ if test "x$enable_gallium_llvm" = xyes; then
>      fi
>  
>      if test "x$LLVM_CONFIG" != xno; then
> -        LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
> +        LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/[[^0-9.]].*//g'`

As long as we are changing this.  I think it would be simpler to use grep:

`$LLVM_CONFIG --version | grep -o '^[[0-9.]]\+'`

-Tom

>          LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
>          LLVM_BINDIR=`$LLVM_CONFIG --bindir`
>          LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
> -- 
> 1.9.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list