]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
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:59:18 +0000 (22:29 +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 73efc3fec049d6500897f55fc6a4bd11185ee91d..6fb28511b415fe0c28b09366244228264d649bd7 100644 (file)
@@ -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.
index bbabdc681badd17a57956cf8f08fa6a7628da133..694857a70c5be72060748fc7582a3262351a18b9 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 6847cb9d9557b88c3d7fc5184e83f2f44ae126e3..216aaef58b5e71cb054b44065d0b0c9d306fc4f5 100644 (file)
@@ -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.
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 7a4ea432bc11c0edfaf940fd6975952fb25cd649..e37d065c3532a8a5c68dbdafd3879b9181ade87c 100644 (file)
@@ -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
index f2864b76d89a9a4c5720a5be9a4c066e444f0200..29c5fb4b8863c4630a0415f157be88234bb3e8aa 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 cc7474dd61f0c52c3182369ecf8c6908251b8ccb..68911b675d48be8d1ccd13fb097c0908481d5f5f 100644 (file)
@@ -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
index b900175534dc02f245c2910b15489a875960e8e2..0638f5127609021429704bdc80b47c46e27b39e9 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