APXS = @APXS@
APXS_LDFLAGS = $(EXTRA_LIBS) $(LIBS)
WARNING_LEVEL = @WARNING_LEVEL@
+LEX_CFLAGS = -w$(WARNING_LEVEL) @LEX_CFLAGS@
SOURCE = main.c internal_functions.c snprintf.c php3_sprintf.c \
configuration-parser.c configuration-scanner.c request_info.c \
bison -p cfg -v -d $(srcdir)/configuration-parser.y -o configuration-parser.c
configuration-scanner.o: configuration-scanner.c
- $(CC) $(CFLAGS) -w$(WARNING_LEVEL) -c configuration-scanner.c
+ $(CC) $(CFLAGS) $(LEX_CFLAGS) -c configuration-scanner.c
configuration-scanner.c: $(srcdir)/configuration-scanner.l
flex -Pcfg -oconfiguration-scanner.c -i $(srcdir)/configuration-scanner.l
AC_PROG_LN_S
AC_PATH_PROG(PERL_PATH, perl)
+
+dnl Make flex scanners use const if they can, even if __STDC__ is not
+dnl true, for compilers like Sun's that only set __STDC__ true in
+dnl "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
+AC_C_CONST
+if test "$ac_cv_c_const" = "yes" ; then
+ LEX_CFLAGS="-DYY_USE_CONST"
+fi
+AC_SUBST(LEX_CFLAGS)
+
dnl Ugly hack to get around a problem with gcc on AIX.
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
"`uname -sv`" = "AIX 4"; then