All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] igt: Fix detection of missing flex
Date: Fri, 26 May 2017 12:11:04 +0100	[thread overview]
Message-ID: <20170526111104.11127-1-tvrtko.ursulin@linux.intel.com> (raw)

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

AM_PROG_FLEX macro will set the LEX variable using the missing
script when the flex is not present. This will confuse the
configure.ac check, which expects the AC_PROG_FLEX behaviour,
and will so fail to detect the missing flex:

	AS_IF([test x"$LEX" != "x:" -a x"$YACC" != xyacc],
		[enable_assembler=yes],
		[enable_assembler=no])

This is because AM_PROG_LEX sets the LEX variable to
"${SHELL} /home/sc/intel-gpu-tools/build-aux/missing flex",
while AC_PROG_LEX would set it to ":".

If for some reason we really need to keep AM_PROG_LEX,
alternative fix could be something like this placed before
the above AS_IF check:

	AC_MSG_CHECKING([checking for working flex])
	if ! eval "$LEX --version >/dev/null 2>&1"; then
		AC_MSG_RESULT([failed])
		LEX=:
	else
		AC_MSG_RESULT([pass])
	fi

Note the evil eval needed to recursively expand variables.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 5342e33c8293..82857a8325b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,7 @@ AM_INIT_AUTOMAKE([1.12 foreign subdir-objects dist-bzip2])
 AM_PATH_PYTHON([3],, [:])
 
 AC_PROG_CC
-AM_PROG_LEX
+AC_PROG_LEX
 AC_PROG_YACC
 
 # check for gtk-doc
-- 
2.9.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2017-05-26 11:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 11:11 Tvrtko Ursulin [this message]
2017-05-30 11:59 ` [PATCH i-g-t] igt: Fix detection of missing flex Petri Latvala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170526111104.11127-1-tvrtko.ursulin@linux.intel.com \
    --to=tursulin@ursulin.net \
    --cc=Intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.