X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/0d49053a75ada3da6de8934fd9f4d08b8deb246a..071863b3d88c232c10348b7c38378c47d363857c:/m4/flex.m4?ds=inline diff --git a/m4/flex.m4 b/m4/flex.m4 index 2073a0dc..6f8530ae 100644 --- a/m4/flex.m4 +++ b/m4/flex.m4 @@ -1,5 +1,5 @@ -# flex.m4 serial 1 -# Copyright (C) 2012 Free Software Foundation, Inc. +# flex.m4 serial 2 +# Copyright (C) 2012-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -24,7 +24,7 @@ fi]) # and whether Lex declares yytext as a char * by default. m4_define([_AC_PROG_LEX_YYTEXT_DECL], [AC_CACHE_CHECK([whether lex is flex], - [ac_cv_prog_flex], + [ac_cv_prog_lex_is_flex], [cat >conftest.l <<_ACEOF[ %option debug nodefault noinput nounput noyywrap never-interactive %x SC_CONF_TEST @@ -32,15 +32,13 @@ m4_define([_AC_PROG_LEX_YYTEXT_DECL], a { BEGIN SC_CONF_TEST; } ]_ACEOF if _AC_DO_VAR([LEX conftest.l]); then - ac_cv_prog_flex=yes + ac_cv_prog_lex_is_flex=yes else - ac_cv_prog_flex=no + ac_cv_prog_lex_is_flex=no fi ]) -FLEX= -if test $ac_cv_prog_flex = yes; then - AC_SUBST([FLEX], [yes])dnl -fi +AC_SUBST([LEX_IS_FLEX], + [`test "$ac_cv_prog_lex_is_flex" = yes && echo true || echo false`])dnl cat >conftest.l <<_ACEOF[ %% @@ -80,7 +78,7 @@ if test -z "${LEXLIB+set}"; then for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" AC_LINK_IFELSE([AC_LANG_DEFINES_PROVIDED[`cat $LEX_OUTPUT_ROOT.c`]], - [ac_cv_lib_lex=$ac_lib]) + [ac_cv_lib_lex=$ac_lib]) test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS @@ -106,8 +104,8 @@ LIBS=$ac_save_LIBS dnl if test $ac_cv_prog_lex_yytext_pointer = yes; then AC_DEFINE([YYTEXT_POINTER], [1], - [Define to 1 if `lex' declares `yytext' as a `char *' by default, - not a `char[]'.]) + [Define to 1 if `lex' declares `yytext' as a `char *' by default, + not a `char[]'.]) fi rm -f conftest.l $LEX_OUTPUT_ROOT.c ])# _AC_PROG_LEX_YYTEXT_DECL