From: Akim Demaille Date: Thu, 11 May 2000 07:59:08 +0000 (+0000) Subject: Merge AC_DECL_YYTEXT into AC_PROG_LEX. X-Git-Tag: autoconf-2.50~933 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=465612289e2827a7ed43a0903c25fa3888aaa6c2;p=thirdparty%2Fautoconf.git Merge AC_DECL_YYTEXT into AC_PROG_LEX. * acgeneral.m4 (AC_DECL_YYTEXT): Rename as (_AC_DECL_YYTEXT): this. (AC_PROG_LEX): Use it. (AC_DECL_YYTEXT): New AU macro. * doc/autoconf.texi: Adjust. --- diff --git a/ChangeLog b/ChangeLog index d1be6c948..ffee01c60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-05-11 Akim Demaille + + Merge AC_DECL_YYTEXT into AC_PROG_LEX. + + * acgeneral.m4 (AC_DECL_YYTEXT): Rename as + (_AC_DECL_YYTEXT): this. + (AC_PROG_LEX): Use it. + (AC_DECL_YYTEXT): New AU macro. + * doc/autoconf.texi: Adjust. + 2000-05-10 Akim Demaille * aclang.m4 (AC_F77_NAME_MANGLING): Use AC_COMPILE_IFELSE. diff --git a/NEWS b/NEWS index 84452d7c5..3a83d0c84 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,15 @@ equivalent. lists only specific options. - --help=recursive, -hr displays the help of all the embedded packages. +- Remembers environment variables when reconfiguring. + The previous scheme to set envvar before running configure was + ENV=VAL ./configure + what prevented configure from remembering the environment in which + it was run, therefore --recheck was run in an inconsistent + environment. Now, one should run + ./configure ENV=VAR + and then --recheck will work properly. Variables declared with + AC_ARG_VAR are also preserved. ** config.status - faster @@ -93,7 +102,7 @@ equivalent. Document and ask for the registration of an envvar. - AC_CONFIG_LINKS - Replaces the now obsolete AC_LINK_FILES. + Replaces AC_LINK_FILES. - AC_CONFIG_COMMANDS To add new actions to config.status. Should be used instead of @@ -103,6 +112,20 @@ equivalent. Checks if the compiler supports ISO C, included when needs special options. +- AC_LANG + Takes a language as argument and replaces AC_LANG_C, + AC_LANG_CPLUSPLUS and AC_LANG_FORTRAN77. + + +** Specific Macros + +- AC_PROG_LEX + Now integrates `AC_DECL_YYTEXT' which is obsoleted. + +- C++ compatibility + Almost every single macros has been revisited in order to support at + best CC=c++. + ** Test suite The testsuite no longer uses DejaGNU. It should be easy to submit test cases in this new frame work. @@ -110,17 +133,7 @@ test cases in this new frame work. ** Autoheader The internal machinery of Autoheader has completely changed. As a result, using an `acconfig.h' should be considered as obsoleted, and -you are encouraged to get rid of it using the AH_DEFUN macro. - -** Environment variables are kept when reconfiguring. -The previous scheme to set envvar before running configure was - ENV=VAL ./configure -what prevented configure from remembering the environment in which -it was run, therefore --recheck was run in an inconsistent environment. -Now, one runs - ./configure ENV=VAR -and the --recheck works correctly. Variables declared with AC_ARG_VAR -are also preserved. +you are encouraged to get rid of it using the AH macros. ** Fortran 77 compilers Support for automatically determining a Fortran 77 compilers diff --git a/acspecific.m4 b/acspecific.m4 index e7649735e..9f310567d 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -142,7 +142,9 @@ AC_DEFUN(AC_PROG_YACC, # AC_PROG_LEX # ----------- -AC_DEFUN(AC_PROG_LEX, +# Look for flex or lex. Set its associated library to LEXLIB. +# Check if lex declares yytext as a char * by default, not a char[]. +AC_DEFUN([AC_PROG_LEX], [AH_CHECK_LIB(fl)dnl AH_CHECK_LIB(l)dnl AC_CHECK_PROG(LEX, flex, flex, lex) @@ -154,15 +156,15 @@ then esac AC_CHECK_LIB($ac_lib, yywrap, LEXLIB="-l$ac_lib") fi -AC_SUBST(LEXLIB)]) +AC_SUBST(LEXLIB) +_AC_DECL_YYTEXT]) -# AC_DECL_YYTEXT -# -------------- +# _AC_DECL_YYTEXT +# --------------- # Check if lex declares yytext as a char * by default, not a char[]. -AC_DEFUN([AC_DECL_YYTEXT], +AC_DEFUN([_AC_DECL_YYTEXT], [AC_REQUIRE_CPP()dnl -AC_REQUIRE([AC_PROG_LEX])dnl AC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root, [# The minimal lex program is just a single line: %%. But some broken lexes # (Solaris, I think it was) want two %% lines, so accommodate them. @@ -196,7 +198,12 @@ if test $ac_cv_prog_lex_yytext_pointer = yes; then [Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'.]) fi -])# AC_DECL_YYTEXT +])# _AC_DECL_YYTEXT + + +# Require AC_PROG_LEX in case some people were just calling this macro. +AU_DEFUN([AC_DECL_YYTEXT], +[AC_REQUIRE([AC_PROG_LEX])]) # AC_PROG_INSTALL diff --git a/doc/autoconf.texi b/doc/autoconf.texi index e249d3847..ece5fe80c 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -2302,17 +2302,6 @@ general program check macros. These macros check for particular programs---whether they exist, and in some cases whether they support certain features. -@defmac AC_DECL_YYTEXT -@maindex DECL_YYTEXT -@cvindex YYTEXT_POINTER -@ovindex LEX_OUTPUT_ROOT -Define @code{YYTEXT_POINTER} if @code{yytext} is a @samp{char *} instead -of a @samp{char []}. Also set output variable @code{LEX_OUTPUT_ROOT} to -the base of the file name that the lexer generates; usually -@file{lex.yy}, but sometimes something else. These results vary -according to whether @code{lex} or @code{flex} is being used. -@end defmac - @defmac AC_PROG_AWK @maindex PROG_AWK @ovindex AWK @@ -2547,10 +2536,18 @@ If @sc{gnu} @code{m4} version 1.4 or above is found, set output variable @maindex PROG_LEX @ovindex LEX @ovindex LEXLIB -If @code{flex} is found, set output variable @code{LEX} to -@samp{flex} and @code{LEXLIB} to @samp{-lfl}, if that library is in a -standard place. Otherwise set @code{LEX} to @samp{lex} and -@code{LEXLIB} to @samp{-ll}. +@cvindex YYTEXT_POINTER +@ovindex LEX_OUTPUT_ROOT +If @code{flex} is found, set output variable @code{LEX} to @samp{flex} +and @code{LEXLIB} to @samp{-lfl}, if that library is in a standard +place. Otherwise set @code{LEX} to @samp{lex} and @code{LEXLIB} to +@samp{-ll}. + +Define @code{YYTEXT_POINTER} if @code{yytext} is a @samp{char *} instead +of a @samp{char []}. Also set output variable @code{LEX_OUTPUT_ROOT} to +the base of the file name that the lexer generates; usually +@file{lex.yy}, but sometimes something else. These results vary +according to whether @code{lex} or @code{flex} is being used. @end defmac @defmac AC_PROG_LN_S @@ -7414,6 +7411,10 @@ to print messages (@pxref{Printing Messages}). @code{AC_C_CROSS} @end defmac +@defmac AC_DECL_YYTEXT +Does nothing, now integrated in @code{AC_PROG_LEX}. +@end defmac + @defmac AC_DYNIX_SEQ @maindex DYNIX_SEQ If on Dynix/PTX (Sequent @sc{unix}), add @samp{-lseq} to output variable diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index e7649735e..9f310567d 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -142,7 +142,9 @@ AC_DEFUN(AC_PROG_YACC, # AC_PROG_LEX # ----------- -AC_DEFUN(AC_PROG_LEX, +# Look for flex or lex. Set its associated library to LEXLIB. +# Check if lex declares yytext as a char * by default, not a char[]. +AC_DEFUN([AC_PROG_LEX], [AH_CHECK_LIB(fl)dnl AH_CHECK_LIB(l)dnl AC_CHECK_PROG(LEX, flex, flex, lex) @@ -154,15 +156,15 @@ then esac AC_CHECK_LIB($ac_lib, yywrap, LEXLIB="-l$ac_lib") fi -AC_SUBST(LEXLIB)]) +AC_SUBST(LEXLIB) +_AC_DECL_YYTEXT]) -# AC_DECL_YYTEXT -# -------------- +# _AC_DECL_YYTEXT +# --------------- # Check if lex declares yytext as a char * by default, not a char[]. -AC_DEFUN([AC_DECL_YYTEXT], +AC_DEFUN([_AC_DECL_YYTEXT], [AC_REQUIRE_CPP()dnl -AC_REQUIRE([AC_PROG_LEX])dnl AC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root, [# The minimal lex program is just a single line: %%. But some broken lexes # (Solaris, I think it was) want two %% lines, so accommodate them. @@ -196,7 +198,12 @@ if test $ac_cv_prog_lex_yytext_pointer = yes; then [Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'.]) fi -])# AC_DECL_YYTEXT +])# _AC_DECL_YYTEXT + + +# Require AC_PROG_LEX in case some people were just calling this macro. +AU_DEFUN([AC_DECL_YYTEXT], +[AC_REQUIRE([AC_PROG_LEX])]) # AC_PROG_INSTALL