summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2013-09-05 16:26:17 -0700
committerTom Stellard <[email protected]>2013-09-27 20:20:35 -0700
commita64d3dd1358fe0f69ebbf10da35c9ebd672e6f9d (patch)
treeca4bee69abd7be67a6dd9711d4a442762a64156c
parentb2d5757831e2b67d87d3f80caa7f4ec10fce142b (diff)
configure.ac: Add a more informative warning when libclc.pc is not found v2
v2: - Don't display an error message when the user doesn't ask for libclc. Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--configure.ac17
1 files changed, 11 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 6db02653bb7..1f0a646a61f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1344,10 +1344,7 @@ AC_ARG_WITH([clang-libdir],
[CLANG_LIBDIR="$withval"],
[CLANG_LIBDIR=""])
-LIBCLC_INCLUDEDIR=`pkg-config --variable=includedir libclc`
-LIBCLC_LIBEXECDIR=`pkg-config --variable=libexecdir libclc`
-AC_SUBST([LIBCLC_INCLUDEDIR])
-AC_SUBST([LIBCLC_LIBEXECDIR])
+PKG_CHECK_EXISTS([libclc], [have_libclc=yes], [have_libclc=no])
if test "x$enable_opencl" = xyes; then
if test "x$with_gallium_drivers" = x; then
@@ -1358,8 +1355,16 @@ if test "x$enable_opencl" = xyes; then
AC_MSG_ERROR([gcc >= 4.6 is required to build clover])
fi
- if test "x$LIBCLC_INCLUDEDIR" == x || test "x$LIBCLC_LIBEXECDIR" == x; then
- AC_MSG_ERROR([pkg-config cannot use libclc.pc which is required to build clover])
+ if test "x$have_libclc" = xno; then
+ AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover.
+ Make sure the directory containing libclc.pc is specified in your
+ PKG_CONFIG_PATH environment variable.
+ By default libclc.pc is installed to /usr/local/share/pkgconfig/])
+ else
+ LIBCLC_INCLUDEDIR=`pkg-config --variable=includedir libclc`
+ LIBCLC_LIBEXECDIR=`pkg-config --variable=libexecdir libclc`
+ AC_SUBST([LIBCLC_INCLUDEDIR])
+ AC_SUBST([LIBCLC_LIBEXECDIR])
fi
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS clover"