Commit ed2170dd authored by POGODALLA Sylvain's avatar POGODALLA Sylvain
Browse files

The configure script now take into account the caml version to link with the good camlp4 library

parent e8fe8895
......@@ -520,6 +520,7 @@ s,@OCAMLDOC@,|#_!!_#|ocamldoc.opt,g
s,@OCAMLDEP@,|#_!!_#|ocamldep.opt,g
s,@OCAMLLEX@,|#_!!_#|ocamllex.opt,g
s,@DYPGEN@,|#_!!_#|dypgen.opt,g
s,@CAMLP4_LIB@,|#_!!_#|camlp4.cma,g
s,@TYPES@,|#_!!_#|-dtypes,g
s,@OCAML09WARNINGS@,|#_!!_#|-w yz,g
s,@OCAMLP4_LOC@,|#_!!_#|-loc loc,g
......
......@@ -104,6 +104,14 @@ else
fi
AC_MSG_RESULT(Compilation will be done with the $OCAML09WARNINGS option)
if ($OCAML $ML_CHECK_FILE -ref 3.10 $OCAML_VERSION > /dev/null) ; then
CAMLP4_LIB="camlp4lib.cma"
else
CAMLP4_LIB="camlp4.cma"
fi
AC_MSG_RESULT($OCAMLP4 calls will be done with the $CAMLP4_LIB library)
############################
......@@ -111,6 +119,7 @@ AC_MSG_RESULT(Compilation will be done with the $OCAML09WARNINGS option)
AC_SUBST(OCAMLC)
AC_SUBST(OCAMLCOPT)
AC_SUBST(OCAMLP4)
AC_SUBST(CAMLP4_LIB)
AC_SUBST(OCAMLDOC)
AC_SUBST(OCAMLDEP)
......
......@@ -623,6 +623,7 @@ OCAMLDOC
OCAMLDEP
OCAMLLEX
DYPGEN
CAMLP4_LIB
TYPES
OCAML09WARNINGS
OCAMLP4_LOC
......@@ -2114,6 +2115,15 @@ fi
{ echo "$as_me:$LINENO: result: Compilation will be done with the $OCAML09WARNINGS option" >&5
echo "${ECHO_T}Compilation will be done with the $OCAML09WARNINGS option" >&6; }
if ($OCAML $ML_CHECK_FILE -ref 3.10 $OCAML_VERSION > /dev/null) ; then
CAMLP4_LIB="camlp4lib.cma"
else
CAMLP4_LIB="camlp4.cma"
fi
{ echo "$as_me:$LINENO: result: $OCAMLP4 calls will be done with the $CAMLP4_LIB library" >&5
echo "${ECHO_T}$OCAMLP4 calls will be done with the $CAMLP4_LIB library" >&6; }
############################
......@@ -2125,6 +2135,7 @@ echo "${ECHO_T}Compilation will be done with the $OCAML09WARNINGS option" >&6; }
#AC_SUBST(OCAMLYACC)
......@@ -2851,6 +2862,7 @@ OCAMLDOC!$OCAMLDOC$ac_delim
OCAMLDEP!$OCAMLDEP$ac_delim
OCAMLLEX!$OCAMLLEX$ac_delim
DYPGEN!$DYPGEN$ac_delim
CAMLP4_LIB!$CAMLP4_LIB$ac_delim
TYPES!$TYPES$ac_delim
OCAML09WARNINGS!$OCAML09WARNINGS$ac_delim
OCAMLP4_LOC!$OCAMLP4_LOC$ac_delim
......@@ -2859,7 +2871,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 51; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
......
......@@ -13,7 +13,7 @@ TITLE="The ACG Development Toolkit Documentation"
OCAMLDOC_FLAGS = -sort -keep-code -html -t $(TITLE)
#CAMLDOC_FLAGS = -html -t $(TITLE)
LIBS = camlp4.cma
LIBS = camlp4.cma
LIBDIR = -I +camlp4
OCAMLPP = -pp "camlp4o pa_extend.cmo pa_macro.cmo $(DEBUGFLAGS) -loc loc"
......
......@@ -13,7 +13,7 @@ TITLE="The ACG Development Toolkit Documentation"
OCAMLDOC_FLAGS = -sort -keep-code -html -t $(TITLE)
#CAMLDOC_FLAGS = -html -t $(TITLE)
LIBS = camlp4.cma
LIBS = @CAMLP4_LIB@
LIBDIR = -I +camlp4
OCAMLPP = -pp "@OCAMLP4@ pa_extend.cmo pa_macro.cmo $(DEBUGFLAGS) @OCAMLP4_LOC@"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment