From fa7a0974641a1a49888cd6b7964c7f1a7102de19 Mon Sep 17 00:00:00 2001 From: Quentin Glidic Date: Fri, 25 Jan 2013 15:02:04 +0100 Subject: [PATCH] configure.ac: Fix --with-llvm-shared-libs The third argument of AC_ARG_WITH is evaluated for any provided value, not only on --with-, so it must not force-enable the feature Also, setting $with_llvm_shared_libs in the opencl check was overriding the user switch --- configure.ac | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index ccf95c5..4e76e97 100644 --- a/configure.ac +++ b/configure.ac @@ -611,7 +611,7 @@ AC_ARG_ENABLE([opencl], [enable OpenCL library NOTE: Enabling this option will also enable --with-llvm-shared-libs @<:@default=no@:>@])], - [enable_opencl="$enableval" with_llvm_shared_libs="$enableval"], + [], [enable_opencl=no]) AC_ARG_ENABLE([xlib_glx], [AS_HELP_STRING([--enable-xlib-glx], @@ -1619,8 +1619,14 @@ AC_ARG_ENABLE([gallium-llvm], AC_ARG_WITH([llvm-shared-libs], [AS_HELP_STRING([--with-llvm-shared-libs], [link with LLVM shared libraries @<:@default=disabled@:>@])], - [with_llvm_shared_libs=yes], - [with_llvm_shared_libs=no]) + [], + [ + if x$enable_opencl = xyes; then + with_llvm_shared_libs=yes + else + with_llvm_shared_libs=no + fi + ]) AC_ARG_WITH([llvm-prefix], [AS_HELP_STRING([--with-llvm-prefix], -- 1.8.1.1