Probe for camlp4 in configure

See issue #364.
This commit is contained in:
Olly Betts 2015-03-25 12:44:05 +13:00
commit 226b4dec5b
2 changed files with 8 additions and 1 deletions

View file

@ -883,7 +883,7 @@ OCAMLFIND=@OCAMLFIND@
OCAMLMKTOP=@OCAMLMKTOP@ $(SWIGWHERE)
NOLINK ?= false
OCAMLPP= -pp "camlp4o ./swigp4.cmo"
OCAMLP4WHERE=`$(COMPILETOOL) camlp4 -where`
OCAMLP4WHERE=`$(COMPILETOOL) @CAMLP4@ -where`
OCAMLCORE=\
rm -rf swig.mli swig.ml swigp4.ml && \
$(SWIG) -ocaml -co swig.mli 2>/dev/null && \

View file

@ -1750,6 +1750,7 @@ AC_ARG_WITH(ocamlc,[ --with-ocamlc=path Set location of ocamlc executable]
AC_ARG_WITH(ocamldlgen,[ --with-ocamldlgen=path Set location of ocamldlgen],[ OCAMLDLGEN="$withval" ], [OCAMLDLGEN=])
AC_ARG_WITH(ocamlfind,[ --with-ocamlfind=path Set location of ocamlfind],[OCAMLFIND="$withval"],[OCAMLFIND=])
AC_ARG_WITH(ocamlmktop,[ --with-ocamlmktop=path Set location of ocamlmktop executable],[ OCAMLMKTOP="$withval"], [OCAMLMKTOP=])
AC_ARG_WITH(camlp4,[ --with-camlp4=path Set location of camlp4 executable],[ CAMLP4="$withval"], [CAMLP4=])
# First, check for "--without-ocaml" or "--with-ocaml=no".
if test x"${with_ocaml}" = xno -o x"${with_alllang}" = xno ; then
@ -1775,12 +1776,18 @@ else
if test -z "$OCAMLMKTOP"; then
AC_CHECK_PROGS(OCAMLMKTOP, ocamlmktop, :)
fi
AC_MSG_CHECKING(for Ocaml Pre-Processor-Pretty-Printer)
if test -z "$CAMLP4"; then
AC_CHECK_PROGS(CAMLP4, camlp4, :)
fi
fi # Disabling ocaml
AC_SUBST(OCAMLC)
AC_SUBST(OCAMLDLGEN)
AC_SUBST(OCAMLFIND)
AC_SUBST(OCAMLMKTOP)
AC_SUBST(CAMLP4)
#----------------------------------------------------------------
# Look for Pike