diff --git a/Make.rules.in b/Make.rules.in index 1b051ea3433..02df1711656 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -27,8 +27,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ LIBS = @LIBS@ BISON = @BISON@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ +FLEX = @FLEX@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ LIBEXT = @LIBEXT@ @@ -141,7 +140,7 @@ LINTS = $(C_SRCS:.c=.ln) $(BISON) $(BISONFLAGS) -p $*_ -o $*.tab.c -d $< .l.yy.c: - $(LEX) $(LEXFLAGS) -t $< >$@ || ($(RM) $@ && exit 1) + $(FLEX) $(LEXFLAGS) -o$@ $< .mc.mc.rc: $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $< diff --git a/configure b/configure index 319be49eef0..4f911a81d00 100755 --- a/configure +++ b/configure @@ -681,10 +681,7 @@ X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS -LEX -LEX_OUTPUT_ROOT -LEXLIB -XLEX +FLEX BISON AS ac_ct_AS @@ -4997,17 +4994,18 @@ fi fi -for ac_prog in flex lex + +for ac_prog in flex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_LEX+set}" = set; then +if test "${ac_cv_prog_FLEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. + if test -n "$FLEX"; then + ac_cv_prog_FLEX="$FLEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5016,7 +5014,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LEX="$ac_prog" + ac_cv_prog_FLEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5026,229 +5024,24 @@ IFS=$as_save_IFS fi fi -LEX=$ac_cv_prog_LEX -if test -n "$LEX"; then - { echo "$as_me:$LINENO: result: $LEX" >&5 -echo "${ECHO_T}$LEX" >&6; } +FLEX=$ac_cv_prog_FLEX +if test -n "$FLEX"; then + { echo "$as_me:$LINENO: result: $FLEX" >&5 +echo "${ECHO_T}$FLEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi - test -n "$LEX" && break + test -n "$FLEX" && break done -test -n "$LEX" || LEX=":" +test -n "$FLEX" || FLEX="none" -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF -%% -a { ECHO; } -b { REJECT; } -c { yymore (); } -d { yyless (1); } -e { yyless (input () != 0); } -f { unput (yytext[0]); } -. { BEGIN INITIAL; } -%% -#ifdef YYTEXT_POINTER -extern char *yytext; -#endif -int -main (void) -{ - return ! yylex () + ! yywrap (); -} -_ACEOF -{ (ac_try="$LEX conftest.l" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$LEX conftest.l") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ echo "$as_me:$LINENO: checking lex output file root" >&5 -echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } -if test "${ac_cv_prog_lex_root+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 -echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} - { (exit 1); exit 1; }; } -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 -echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -if test -z "${LEXLIB+set}"; then - { echo "$as_me:$LINENO: checking lex library" >&5 -echo $ECHO_N "checking lex library... $ECHO_C" >&6; } -if test "${ac_cv_lib_lex+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ac_save_LIBS=$LIBS - ac_cv_lib_lex='none needed' - for ac_lib in '' -lfl -ll; do - LIBS="$ac_lib $ac_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_lex=$ac_lib -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - test "$ac_cv_lib_lex" != 'none needed' && break - done - LIBS=$ac_save_LIBS - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 -echo "${ECHO_T}$ac_cv_lib_lex" >&6; } - test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex -fi - - -{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 -echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } -if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -ac_save_LIBS=$LIBS -LIBS="$LEXLIB $ac_save_LIBS" -cat >conftest.$ac_ext <<_ACEOF -#define YYTEXT_POINTER 1 -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_prog_lex_yytext_pointer=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_save_LIBS - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 -echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } -if test $ac_cv_prog_lex_yytext_pointer = yes; then - -cat >>confdefs.h <<\_ACEOF -#define YYTEXT_POINTER 1 -_ACEOF - -fi -rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi - -for ac_prog in $LEX flex lex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_XLEX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$XLEX"; then - ac_cv_prog_XLEX="$XLEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_XLEX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -XLEX=$ac_cv_prog_XLEX -if test -n "$XLEX"; then - { echo "$as_me:$LINENO: result: $XLEX" >&5 -echo "${ECHO_T}$XLEX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$XLEX" && break -done -test -n "$XLEX" || XLEX="none" - -if test "$XLEX" = "none" +if test "$FLEX" = "none" then - { { echo "$as_me:$LINENO: error: no suitable lex found. Please install the 'flex' package." >&5 -echo "$as_me: error: no suitable lex found. Please install the 'flex' package." >&2;} + { { echo "$as_me:$LINENO: error: no suitable flex found. Please install the 'flex' package." >&5 +echo "$as_me: error: no suitable flex found. Please install the 'flex' package." >&2;} { (exit 1); exit 1; }; } fi @@ -22107,10 +21900,7 @@ X_CFLAGS!$X_CFLAGS$ac_delim X_PRE_LIBS!$X_PRE_LIBS$ac_delim X_LIBS!$X_LIBS$ac_delim X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim -LEX!$LEX$ac_delim -LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim -LEXLIB!$LEXLIB$ac_delim -XLEX!$XLEX$ac_delim +FLEX!$FLEX$ac_delim BISON!$BISON$ac_delim AS!$AS$ac_delim ac_ct_AS!$ac_ct_AS$ac_delim @@ -22123,6 +21913,9 @@ LN_S!$LN_S$ac_delim LN!$LN$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim +LDCONFIG!$LDCONFIG$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 82; then @@ -22184,9 +21977,6 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF -LDCONFIG!$LDCONFIG$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim LINT!$LINT$ac_delim LINTFLAGS!$LINTFLAGS$ac_delim @@ -22264,7 +22054,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 75; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.ac b/configure.ac index 7ad14c00384..01b0224dc44 100644 --- a/configure.ac +++ b/configure.ac @@ -84,14 +84,12 @@ AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir, AC_SUBST(TOOLSDIR,$wine_cv_toolsdir) AC_PATH_XTRA -AC_PROG_LEX -dnl **** Just additional warning checks, since AC_PROG just sets 'lex' even -dnl **** without one present. -AC_CHECK_PROGS(XLEX,$LEX flex lex,none) -if test "$XLEX" = "none" +dnl Check for flex +AC_CHECK_PROGS(FLEX,flex,none) +if test "$FLEX" = "none" then - AC_MSG_ERROR([no suitable lex found. Please install the 'flex' package.]) + AC_MSG_ERROR([no suitable flex found. Please install the 'flex' package.]) fi dnl Check for bison diff --git a/include/config.h.in b/include/config.h.in index 581a246fcb9..4b3eaa14f7c 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -1050,10 +1050,6 @@ /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#undef YYTEXT_POINTER - /* Define to a macro to generate an assembly function directive */ #undef __ASM_FUNC diff --git a/tools/widl/Makefile.in b/tools/widl/Makefile.in index 64aaedb1636..a3145b2eeb0 100644 --- a/tools/widl/Makefile.in +++ b/tools/widl/Makefile.in @@ -30,7 +30,7 @@ all: $(PROGRAMS) $(MANPAGES) @MAKE_RULES@ widl$(EXEEXT): $(OBJS) $(LIBWPP) - $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWPP) $(LIBPORT) $(LEXLIB) $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWPP) $(LIBPORT) $(LDFLAGS) install:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS) $(INSTALL_PROGRAM) widl$(EXEEXT) $(DESTDIR)$(bindir)/widl$(EXEEXT) diff --git a/tools/wmc/Makefile.in b/tools/wmc/Makefile.in index 5f347da6a9e..5e6e31a2d4b 100644 --- a/tools/wmc/Makefile.in +++ b/tools/wmc/Makefile.in @@ -24,7 +24,7 @@ all: $(PROGRAMS) $(MANPAGES) @MAKE_RULES@ wmc$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LEXLIB) $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LDFLAGS) install:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS) $(INSTALL_DATA) wmc.man $(DESTDIR)$(mandir)/man$(prog_manext)/wmc.$(prog_manext) diff --git a/tools/wrc/Makefile.in b/tools/wrc/Makefile.in index e0efa18ff6c..9bae142be9d 100644 --- a/tools/wrc/Makefile.in +++ b/tools/wrc/Makefile.in @@ -29,7 +29,7 @@ all: $(PROGRAMS) $(MANPAGES) @MAKE_RULES@ wrc$(EXEEXT): $(OBJS) $(LIBWPP) - $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWPP) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LEXLIB) $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWPP) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LDFLAGS) install:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS) $(INSTALL_DATA) wrc.man $(DESTDIR)$(mandir)/man$(prog_manext)/wrc.$(prog_manext)