Provide AC_PROG_LEX that copes with LEX=missing from top-level
authorAlan Modra <amodra@gmail.com>
Mon, 18 Jan 2016 05:36:49 +0000 (16:06 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 18 Jan 2016 11:47:57 +0000 (22:17 +1030)
config/
PR binutils/19481
* override.m4 (AC_PROG_LEX): Define.
binutils/
* configure: Regenerate.
gas/
* configure: Regenerate.
ld/
* configure: Regenerate.

binutils/ChangeLog
binutils/configure
config/ChangeLog
config/override.m4
gas/ChangeLog
gas/configure
ld/ChangeLog
ld/configure

index 97dc3613a267fbfdd8010fb261ead8e95db0d594..c5b52f4b9b2cb723614adff00aee6293cac9a059 100644 (file)
@@ -1,3 +1,7 @@
+2016-01-18  Alan Modra  <amodra@gmail.com>
+
+       * configure: Regenerate.
+
 2016-01-17  Alan Modra  <amodra@gmail.com>
 
        * configure: Regenerate.
index e1452e332987ef59c53b1ede4454340301679bc7..dc735dcc9d84adca0264dfe06617f5a042579555 100755 (executable)
@@ -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
index d115579a39ad210509ba674727d8638f39bb241a..bb77be0e15c459a81052e40e49f0be083751c3f5 100644 (file)
@@ -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
index 52bd1c3d1b82469bf38c11dddf5fbec82878820f..b5ce6545ab69bb0b7bbfc0cc528b4eabad971111 100644 (file)
@@ -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])
+
 ])
index 38ccec5eb7cc8ea273e3a38c7ea42c51107200fe..1c0e2248c5897159c02d938dd592826327b315d2 100644 (file)
@@ -1,3 +1,7 @@
+2016-01-18  Alan Modra  <amodra@gmail.com>
+
+       * configure: Regenerate.
+
 2016-01-17  Alan Modra  <amodra@gmail.com>
 
        * configure: Regenerate.
index ceb99f5ab13a49850bc13039699dab2ed9886c8e..c69edf5803882654e621c9008fd2149f5f6e4a34 100755 (executable)
@@ -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
index ba6c46347aa5daff6d7f2229d9f65ff255f406cd..b99b17080e03293a60fa77671a959dc726d103c3 100644 (file)
@@ -1,3 +1,7 @@
+2016-01-18  Alan Modra  <amodra@gmail.com>
+
+       * configure: Regenerate.
+
 2016-01-18  Nick Clifton  <nickc@redhat.com>
 
        * testsuite/ld-plugin/plugin.exp: Skip plugin tests if the linker
index 65b280cc9d771527f888270460648cacf9f1f942..2141ee7cb097f0df8c51cbf3ab86750c9d0a5cb9 100755 (executable)
@@ -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
This page took 0.038783 seconds and 4 git commands to generate.