aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-01-18 16:06:49 +1030
committerAlan Modra <amodra@gmail.com>2016-01-18 22:17:57 +1030
commit3d961d0d3a797b4d463024a11131e96c213dee27 (patch)
tree0bf38009a6b32cba6004c18a6ce002821312b631 /config
parentFix gdbserver build failure on targets without fork (diff)
downloadbinutils-gdb-3d961d0d3a797b4d463024a11131e96c213dee27.tar.gz
binutils-gdb-3d961d0d3a797b4d463024a11131e96c213dee27.tar.bz2
binutils-gdb-3d961d0d3a797b4d463024a11131e96c213dee27.zip
Provide AC_PROG_LEX that copes with LEX=missing from top-level
config/ PR binutils/19481 * override.m4 (AC_PROG_LEX): Define. binutils/ * configure: Regenerate. gas/ * configure: Regenerate. ld/ * configure: Regenerate.
Diffstat (limited to 'config')
-rw-r--r--config/ChangeLog5
-rw-r--r--config/override.m412
2 files changed, 17 insertions, 0 deletions
diff --git a/config/ChangeLog b/config/ChangeLog
index d115579a39a..bb77be0e15c 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-18 Alan Modra <amodra@gmail.com>
+
+ PR binutils/19481
+ * override.m4 (AC_PROG_LEX): Define.
+
2015-10-21 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
* bootstrap-asan.mk: Replace ASAN_OPTIONS=detect_leaks with
diff --git a/config/override.m4 b/config/override.m4
index 52bd1c3d1b8..b5ce6545ab6 100644
--- a/config/override.m4
+++ b/config/override.m4
@@ -101,4 +101,16 @@ m4_define([_AC_CHECK_DECLS],
])
+dnl If flex/lex are not found, the top level configure sets LEX to
+dnl "/path_to/missing flex". When AC_PROG_LEX tries to find the flex
+dnl output file, it calls $LEX to do so, but the current lightweight
+dnl "missing" won't create a file. This results in an error.
+dnl Avoid calling the bulk of AC_PROG_LEX when $LEX is "missing".
+AC_DEFUN_ONCE([AC_PROG_LEX],
+[AC_CHECK_PROGS(LEX, flex lex, :)
+case "$LEX" in
+ :|*"missing "*) ;;
+ *) _AC_PROG_LEX_YYTEXT_DECL ;;
+esac])
+
])