From: Erez Zadok Date: Sun, 11 Sep 2005 19:06:40 +0000 (+0000) Subject: * Makefile.am (EXTRA_DIST_M4): add prog_{lex,yacc}.m4 to distro. X-Git-Tag: before-clocktime-fixes~5 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=b78070ce91655d9043ac99c9c49ca8889da1b365;p=am-utils-6.1.git * Makefile.am (EXTRA_DIST_M4): add prog_{lex,yacc}.m4 to distro. * configure.in: use new macros AMU_PROG_YACC and AMU_PROG_LEX. * m4/macros/prog_yacc.m4: new macro to check if bison/yacc/byacc exist, but exist with an error if none found. * m4/macros/prog_lex.m4: new macro to check if f/lex exist, but exit with an error if not found (am-utils requires f/lex). --- diff --git a/ChangeLog b/ChangeLog index 7702cde..ea77a80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2005-09-11 Erez Zadok + + * Makefile.am (EXTRA_DIST_M4): add prog_{lex,yacc}.m4 to distro. + + * configure.in: use new macros AMU_PROG_YACC and AMU_PROG_LEX. + + * m4/macros/prog_yacc.m4: new macro to check if bison/yacc/byacc + exist, but exist with an error if none found. + + * m4/macros/prog_lex.m4: new macro to check if f/lex exist, but + exit with an error if not found (am-utils requires f/lex). + 2005-09-07 Erez Zadok * minor new port: powerpc-apple-darwin8.2.0. diff --git a/Makefile.am b/Makefile.am index 9fbee09..1e95139 100644 --- a/Makefile.am +++ b/Makefile.am @@ -108,6 +108,8 @@ EXTRA_DIST_M4 = \ m4/macros/package_bugreport.m4 \ m4/macros/package_name.m4 \ m4/macros/package_version.m4 \ + m4/macros/prog_lex.m4 \ + m4/macros/prog_yacc.m4 \ m4/macros/save_state.m4 \ m4/macros/struct_field_nfs_fh.m4 \ m4/macros/struct_mntent.m4 \ diff --git a/NEWS b/NEWS index b01ca15..6f7581f 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,9 @@ XXX: Dan, document sun_map_syntax flag in more detail in am-utils.texi and (more briefly) in amd.conf.5. And in this NEWS file, also briefly. +- Bugs fixed: + * abort with an error if yacc/lex programs not found + Amd now understands a new log_option called "defaults" which is synonymous with "fatal,error,user,warning,info" (and is also what logging happens by default). diff --git a/configure.in b/configure.in index effcf08..7068a7c 100644 --- a/configure.in +++ b/configure.in @@ -55,7 +55,7 @@ AH_BOTTOM([ dnl dnl AC_CONFIG_AUX_DIR(m4) AC_PREREQ(2.52) -AC_REVISION($Revision: 1.112 $) +AC_REVISION($Revision: 1.113 $) AC_COPYRIGHT([Copyright (c) 1997-2005 Erez Zadok]) dnl find out system type AC_MSG_NOTICE(*** SYSTEM TYPES ***) @@ -189,8 +189,10 @@ AC_PROG_INSTALL dnl the next two are run or supported natively by libtool dnl AC_PROG_LN_S dnl AC_PROG_RANLIB -AC_PROG_YACC -AM_PROG_LEX +dnl AC_PROG_YACC +AMU_PROG_YACC +dnl AM_PROG_LEX +AMU_PROG_LEX dnl ====================================================================== dnl Generic Program Checks diff --git a/m4/macros/prog_lex.m4 b/m4/macros/prog_lex.m4 new file mode 100644 index 0000000..43da78a --- /dev/null +++ b/m4/macros/prog_lex.m4 @@ -0,0 +1,14 @@ +dnl find f/lex, but error if none found +AC_DEFUN_ONCE([AMU_PROG_LEX], +[AC_CHECK_PROGS(LEX, flex lex, :) +if test -z "$LEXLIB" +then + AC_CHECK_LIB(fl, yywrap, LEXLIB="-lfl", + [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")]) +fi +AC_SUBST(LEXLIB) +if test "x$LEX" != "x:"; then + _AC_PROG_LEX_YYTEXT_DECL +else + AC_MSG_ERROR([cannot find flex/lex -- needed for am-utils]) +fi]) diff --git a/m4/macros/prog_yacc.m4 b/m4/macros/prog_yacc.m4 new file mode 100644 index 0000000..666cdef --- /dev/null +++ b/m4/macros/prog_yacc.m4 @@ -0,0 +1,6 @@ +dnl find bison/yacc, but error if none found +AC_DEFUN([AMU_PROG_YACC], +[AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :) +if test "x$YACC" = "x:"; then + AC_MSG_ERROR([cannot find bison/yacc/byacc -- needed for am-utils]) +fi])