Index: flex-2.5.31/main.c =================================================================== --- flex-2.5.31.orig/main.c +++ flex-2.5.31/main.c @@ -344,7 +344,7 @@ void check_options () /* Setup the filter chain. */ output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); - filter_create_ext(output_chain,"m4","-P",0); + filter_create_ext(output_chain,GM4_PROGRAM,"-P",0); filter_create_int(output_chain, filter_fix_linedirs, NULL); /* For debugging, only run the requested number of filters. */ Index: flex-2.5.31/Makefile.am =================================================================== --- flex-2.5.31.orig/Makefile.am +++ flex-2.5.31/Makefile.am @@ -141,7 +141,7 @@ SUBDIRS = \ tests localedir = $(datadir)/locale -AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl +AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl -DGM4_PROGRAM=\"@M4@\" LIBS = @LIBINTL@ @LIBS@ skel.c: flex.skl mkskel.sh flexint.h tables_shared.h Index: flex-2.5.31/Makefile.in =================================================================== --- flex-2.5.31.orig/Makefile.in +++ flex-2.5.31/Makefile.in @@ -290,7 +290,7 @@ SUBDIRS = \ localedir = $(datadir)/locale -AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl +AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl -DGM4_PROGRAM=\"@M4@\" # Run GNU indent on sources. Don't run this unless all the sources compile cleanly. #