bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_PROG_LEX broken on IRIX with MIPSpro Compilers


From: Peter O'Gorman
Subject: AC_PROG_LEX broken on IRIX with MIPSpro Compilers
Date: Sun, 23 Dec 2007 16:43:07 -0600
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

For the simplest possible configure.ac:
AC_INIT
AC_PROG_LEX

if test -z "$LEXLIB"; then
  AC_MSG_ERROR(no lexlib)
fi


We get:
checking for gcc... no
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
configure: error: no lexlib


Because (from config.log):
cc-1042 cc: ERROR File = conftest.l, Line = 6
  The types of operands "char *" and "int" are incompatible.

  { yyless (input () != 0); }
    ^

1 error detected in the compilation of "conftest.c".
configure:2670: $? = 2
configure: failed program was:

I think we need to patch programs.m4 to change thusly:
--- programs.m4 2007-12-23 22:41:23.662814876 +0000
+++ programs.m4.orig    2007-12-23 22:40:57.274441233 +0000
@@ -734,7 +734,7 @@
 b { REJECT; }
 c { yymore (); }
 d { yyless (1); }
-e { yyless (input () != 0); }
+e { yyless ((input () != 0)); }
 f { unput (yytext[0]); }
 . { BEGIN INITIAL; }
 %%

Peter
-- 
Peter O'Gorman
http://pogma.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]