summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-10-10 17:14:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-10-11 10:51:35 +0100
commite914dada5595a24b5d0fada7e476cc93570fa7c5 (patch)
treebb979b0cc5e3d1ecdc9d51c355de3eace01bb3d4
parent3e3af6936ea26be57e80e09752a8736c9cfe2566 (diff)
configure: Allow manual specification of intel-gen4asm path
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--configure.ac21
1 files changed, 17 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 45bd370a..aa444a5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,13 +97,26 @@ AC_ARG_ENABLE(gen4asm,
gen4asm=no
if test "x$ASM" != "xno"; then
- PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no])
- if test "x$ASM" = "xyes" -a "x$gen4asm" != "xyes"; then
- AC_MSG_ERROR([intel-gen4asm support requested but not found])
+ AC_ARG_WITH(gen4asm,
+ AS_HELP_STRING([--with-gen4asm=PATH],
+ [Path to intel-gen4asm binary]]]),
+ [path="$withval"],
+ [path=""])
+ if test -n "$path" ; then
+ gen4asm=yes
+ else
+ PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no])
+ if test "x$ASM" = "xyes" -a "x$gen4asm" != "xyes"; then
+ AC_MSG_ERROR([intel-gen4asm support requested but not found])
+ fi
fi
if test "x$gen4asm" = "xyes"; then
AC_MSG_CHECKING([path to use for intel-gen4asm])
- INTEL_GEN4ASM="`pkg-config intel-gen4asm --variable=exec_prefix`/bin/intel-gen4asm"
+ if test -n "$path" ; then
+ INTEL_GEN4ASM="$path"
+ else
+ INTEL_GEN4ASM="`pkg-config intel-gen4asm --variable=exec_prefix`/bin/intel-gen4asm"
+ fi
if ! test -e "$INTEL_GEN4ASM"; then
AC_MSG_ERROR([intel-gen4asm enabled, but not found. Tried '$INTEL_GEN4ASM'.])
fi