Branch: Tag:

2005-10-13

2005-10-13 14:54:26 by Martin Stjernholm <mast@lysator.liu.se>

Added configure test to make the right short define for different bison
versions.

Rev: src/acconfig.h:1.148
Rev: src/configure.in:1.918
Rev: src/language.yacc:1.359

1: - AC_REVISION("$Id: configure.in,v 1.917 2005/09/01 13:09:00 grubba Exp $") + AC_REVISION("$Id: configure.in,v 1.918 2005/10/13 14:47:33 mast Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
2457:    # MinGW system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.917 2005/09/01 13:09:00 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.918 2005/10/13 14:47:33 mast Exp $.   # MinGW-version. Do NOT edit.   posix_name="`cat`"   posix_prefix="/"
2495:    # Native POSIX system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.917 2005/09/01 13:09:00 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.918 2005/10/13 14:47:33 mast Exp $.   # POSIX-version. Do NOT edit.   cat   EOF
2504:    # rntcl-style    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.917 2005/09/01 13:09:00 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.918 2005/10/13 14:47:33 mast Exp $.   # RNTCL-version. Do NOT edit.   sed -e "$PIKE_PATH_TRANSLATE"   EOF
3048:      #############################################################################    + AC_MSG_CHECKING(how bison uses short) + AC_CACHE_VAL(pike_cv_short_use, + [ +  pike_cv_short_use=unknown +  for short_use in CT_SHORT CT_SHORT_INT; do +  cat >conftest.y <<EOF + %{ + #define $short_use + #ifdef CT_SHORT + #define short int + #else + #define short + #endif + void parse(); + void yyerror(char *); + %} + %% + foo: 'f' x y ; + x: 'o' ; + y: 'o' ; + %% + int context = 0; +  + int yylex(YYSTYPE *yylval) + { +  switch(context++) +  { +  case 0: return 'f'; +  case 1: return 'o'; +  case 2: return 'o'; +  default: return 0; +  } + } +  + int errors=0; + void yyerror(char *fel) { errors++; } + EOF +  if $YACC -d conftest.y 1>&AC_FD_CC 2>&AC_FD_CC; then +  AC_TRY_COMPILE([ + #include "y.tab.c" + ],[ + yyparse(); + exit(errors); + ],ok=yes,ok=no) +  if test "$ok" = "yes"; then +  pike_cv_short_use=$short_use +  break +  fi +  fi +  done + ]) +  + case "$pike_cv_short_use" in +  CT_SHORT) +  AC_MSG_RESULT(short) +  AC_DEFINE(BISON_SHORT_EXPANSION,int) +  ;; +  CT_SHORT_INT) +  AC_MSG_RESULT(short int) +  AC_DEFINE(BISON_SHORT_EXPANSION,[]) +  ;; +  *) +  AC_MSG_RESULT(unknown) +  ;; + esac +  + ############################################################################# +    AC_MSG_CHECKING(for the type of __yy_memcpy)   AC_CACHE_VAL(pike_cv___yy_memcpy_count_type, [    pike_cv___yy_memcpy_from_const=