summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
-rw-r--r--doc/Makefile.am2
2 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3c977a4..14e42d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,6 +92,12 @@ AC_PATH_PROG([HELP2MAN], help2man, [\${top_srcdir}/build-aux/missing help2man])
AS_IF([test "$HELP2MAN" = "\${top_srcdir}/build-aux/missing help2man"],
AC_MSG_WARN(help2man: program not found: building man page will not work)
)
+if test "$cross_compiling" = yes; then
+ FLEXexe='flex$(EXEEXT)'
+else
+ FLEXexe='$(top_builddir)/flex$(EXEEXT)'
+fi
+AC_SUBST(FLEXexe)
AC_PATH_PROGS([TEXI2DVI], [gtexi2dvi texi2dvi], [\${top_srcdir}/build-aux/missing texi2dvi])
AS_IF([test "$TEXI2DVI" = "\${top_srcdir}/build-aux/missing texi2dvi"],
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 523aa97..e0ff498 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -10,5 +10,5 @@ CLEANFILES = *.aux *.cp *.cps *.fn *.fns *.hk *.hks *.ky *.log \
flex.1: $(top_srcdir)/configure.ac $(top_srcdir)/src/flex.skl $(top_srcdir)/src/options.c $(top_srcdir)/src/options.h | $(FLEX)
$(HELP2MAN) --name='$(PACKAGE_NAME)' --section=1 \
--source='The Flex Project' --manual='Programming' \
- --output=$@ $(FLEX) \
+ --output=$@ $(FLEXexe) \
|| rm -f $@