This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb/binutils-2_26-branch] Provide AC_PROG_LEX that copes with LEX=missing from top-level
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org, gdb-cvs at sourceware dot org
- Date: 18 Jan 2016 12:06:17 -0000
- Subject: [binutils-gdb/binutils-2_26-branch] Provide AC_PROG_LEX that copes with LEX=missing from top-level
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=334b860d4e5656348710e45afb0cebca203468eb
commit 334b860d4e5656348710e45afb0cebca203468eb
Author: Alan Modra <amodra@gmail.com>
Date: Mon Jan 18 16:06:49 2016 +1030
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.
Diff:
---
binutils/ChangeLog | 4 ++++
binutils/configure | 9 +++++----
config/ChangeLog | 5 +++++
config/override.m4 | 12 ++++++++++++
gas/ChangeLog | 4 ++++
gas/configure | 9 +++++----
ld/ChangeLog | 4 ++++
ld/configure | 9 +++++----
8 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 73efc3f..6fb2851 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-18 Alan Modra <amodra@gmail.com>
+
+ * configure: Regenerate.
+
2015-12-10 Alan Modra <amodra@gmail.com>
Apply from master.
diff --git a/binutils/configure b/binutils/configure
index bbabdc6..694857a 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -12112,8 +12112,9 @@ fi
done
test -n "$LEX" || LEX=":"
-if test "x$LEX" != "x:"; then
- cat >conftest.l <<_ACEOF
+case "$LEX" in
+ :|*"missing "*) ;;
+ *) cat >conftest.l <<_ACEOF
%%
a { ECHO; }
b { REJECT; }
@@ -12224,8 +12225,8 @@ $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c
-
-fi
+ ;;
+esac
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
diff --git a/config/ChangeLog b/config/ChangeLog
index 6847cb9..216aaef 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-08-24 Yaakov Selkowitz <yselkowi@redhat.com>
* iconv.m4 (AM_ICONV_LINK): Use in-tree libiconv when present.
diff --git a/config/override.m4 b/config/override.m4
index 52bd1c3..b5ce654 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])
+
])
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 7a4ea43..e37d065 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-18 Alan Modra <amodra@gmail.com>
+
+ * configure: Regenerate.
+
2015-12-17 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* gas/config/tc-arm.c (aeabi_set_public_attributes): Adjust
diff --git a/gas/configure b/gas/configure
index f2864b7..29c5fb4 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12862,8 +12862,9 @@ fi
done
test -n "$LEX" || LEX=":"
-if test "x$LEX" != "x:"; then
- cat >conftest.l <<_ACEOF
+case "$LEX" in
+ :|*"missing "*) ;;
+ *) cat >conftest.l <<_ACEOF
%%
a { ECHO; }
b { REJECT; }
@@ -12974,8 +12975,8 @@ $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c
-
-fi
+ ;;
+esac
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
diff --git a/ld/ChangeLog b/ld/ChangeLog
index cc7474d..68911b6 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-18 Alan Modra <amodra@gmail.com>
+
+ * configure: Regenerate.
+
2016-01-11 Kwok Cheung Yeung <kcy@codesourcery.com>
PR ld/18199
diff --git a/ld/configure b/ld/configure
index b900175..0638f51 100755
--- a/ld/configure
+++ b/ld/configure
@@ -16130,8 +16130,9 @@ fi
done
test -n "$LEX" || LEX=":"
-if test "x$LEX" != "x:"; then
- cat >conftest.l <<_ACEOF
+case "$LEX" in
+ :|*"missing "*) ;;
+ *) cat >conftest.l <<_ACEOF
%%
a { ECHO; }
b { REJECT; }
@@ -16242,8 +16243,8 @@ $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c
-
-fi
+ ;;
+esac
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi