[Mesa-dev] [PATCH v3 07/25] configure.ac: Move gallium checks out of LLVM version check

Emil Velikov emil.l.velikov at gmail.com
Wed Oct 12 09:01:01 UTC 2016


On 12 October 2016 at 00:02, Tobias Droste <tdroste at gmx.de> wrote:
> The gallium checks don't need to be inside the LLVM version check.
> If "enable-gallium-llvm" ist set this is called after the LLVM version check.
>
> Signed-off-by: Tobias Droste <tdroste at gmx.de>
> ---
>  configure.ac | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 0e4af6d..933e7b5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2276,12 +2276,6 @@ if test "x$enable_gallium_llvm" = xyes || test "x$HAVE_RADEON_VULKAN" = xyes; th
>              LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
>          fi
>
> -        LLVM_REQUIRED_VERSION_MAJOR="3"
> -        LLVM_REQUIRED_VERSION_MINOR="3"
> -        if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
> -            AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required])
> -        fi
> -
>          llvm_add_default_components
>
>          DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
> @@ -2295,6 +2289,18 @@ else
>      LLVM_VERSION_INT=0
>  fi
>
> +gallium_llvm_check() {
> +    LLVM_REQUIRED_VERSION_MAJOR="3"
> +    LLVM_REQUIRED_VERSION_MINOR="3"
> +    if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
> +        AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required])
> +    fi
> +}
> +
> +if test "x$enable_gallium_llvm" = xyes; then
> +    gallium_llvm_check
Reuse llvm_check_version_for "3" "3" "0" "Gallium" and update the
commit message ?

-Emil


More information about the mesa-dev mailing list