From b253751a7d4de5b2e57dec5f25a82c62519cc995 Mon Sep 17 00:00:00 2001 From: Fabrice Le Fessant Date: Mon, 15 Jul 2019 19:19:22 +0200 Subject: [PATCH] Add seq dep for ocaml < 4.07 --- Makefile | 6 ++ autoconf/Makefile.config.in | 4 +- autoconf/config.ocp2gen.in | 2 +- autoconf/config.ocpgen.in | 2 +- autoconf/configure | 161 +++++++++--------------------------- autoconf/configure.ac | 51 ++++-------- autoconf/generated.files | 12 +-- autoconf/m4/ocaml.m4 | 12 +-- ocp-autoconf.config | 1 + ocp-autoconf.d/configure.ac | 3 + opam | 1 + 11 files changed, 81 insertions(+), 174 deletions(-) diff --git a/Makefile b/Makefile index 84dbb34..6cc7b4f 100644 --- a/Makefile +++ b/Makefile @@ -26,9 +26,15 @@ OCPLIB_NAMES=debug lang unix file system config compat CMDLINER_DIR := $(shell ocamlfind query cmdliner) RE_DIR := $(shell ocamlfind query re) +ifeq (${NEED_SEQ},true) +SEQ_DIR := $(shell ocamlfind query seq) +SEQ_DEP := ${SEQ_DIR}/seq.cmxa +endif +RE_DIR := $(shell ocamlfind query re) EXTERNAL_INCLUDES= -I ${CMDLINER_DIR} -I ${RE_DIR} EXTERNAL_LIBS=\ ${CMDLINER_DIR}/cmdliner.cmxa \ + ${SEQ_DEP} \ ${RE_DIR}/re.cmxa INCLUDES=$(foreach lib, $(OCPLIB_NAMES), -I $($(lib)_SRCDIR)) \ diff --git a/autoconf/Makefile.config.in b/autoconf/Makefile.config.in index f4203d7..66af252 100644 --- a/autoconf/Makefile.config.in +++ b/autoconf/Makefile.config.in @@ -1,7 +1,7 @@ OCAMLFIND=@OCAMLFIND@ OCAMLYACC=@OCAMLYACC@ OCAMLLEX=@OCAMLLEX@ -PROJECTURE_ARGS=@PROJECTURE_ARGS@ +CONFIGURE_ARGS=@CONFIGURE_ARGS@ ROOTDIR=@ROOTDIR@ prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -19,7 +19,6 @@ OPAM_REPO_OFFICIAL_REMOTE=@OPAM_REPO_OFFICIAL_REMOTE@ OPAM_REPO_FORK_REMOTE=@OPAM_REPO_FORK_REMOTE@ DOWNLOAD_URL_PREFIX=@DOWNLOAD_URL_PREFIX@ OCAMLVERSION=@OCAMLVERSION@ -OCAMLVERSION_C=@OCAMLVERSION_C@ OCAMLC=@OCAMLC@ OCAMLOPT=@OCAMLOPT@ OCAMLDEP=@OCAMLDEP@ @@ -29,4 +28,5 @@ OCAMLDOC=@OCAMLDOC@ OCAMLLIB=@OCAMLLIB@ OCAMLBIN=@OCAMLBIN@ HAS_BYTES=@HAS_BYTES@ +NEED_SEQ=@NEED_SEQ@ OCAML_USE_BINANNOT=@OCAML_USE_BINANNOT@ diff --git a/autoconf/config.ocp2gen.in b/autoconf/config.ocp2gen.in index 4c85f10..bef41f6 100644 --- a/autoconf/config.ocp2gen.in +++ b/autoconf/config.ocp2gen.in @@ -19,7 +19,6 @@ autoconf = { opam_repo_fork_remote="@OPAM_REPO_FORK_REMOTE@"; download_url_prefix="@DOWNLOAD_URL_PREFIX@"; conf_ocamlversion="@OCAMLVERSION@"; - conf_ocamlversion_c="@OCAMLVERSION_C@"; conf_ocamlc="@OCAMLC@"; conf_ocamlopt="@OCAMLOPT@"; conf_ocamldep="@OCAMLDEP@"; @@ -29,6 +28,7 @@ autoconf = { conf_ocamllib="@OCAMLLIB@"; conf_ocamlbin="@OCAMLBIN@"; conf_has_bytes="@HAS_BYTES@"; + conf_need_seq="@NEED_SEQ@"; ocaml_use_binannot = @OCAML_USE_BINANNOT@; autoconf_dir = "@PACKAGE_NAME@-autoconf-dir"; diff --git a/autoconf/config.ocpgen.in b/autoconf/config.ocpgen.in index 3eddac7..9f1faa6 100644 --- a/autoconf/config.ocpgen.in +++ b/autoconf/config.ocpgen.in @@ -18,7 +18,6 @@ opam_repo_official_remote="@OPAM_REPO_OFFICIAL_REMOTE@" opam_repo_fork_remote="@OPAM_REPO_FORK_REMOTE@" download_url_prefix="@DOWNLOAD_URL_PREFIX@" conf_ocamlversion="@OCAMLVERSION@" -conf_ocamlversion_c="@OCAMLVERSION_C@" conf_ocamlc="@OCAMLC@" conf_ocamlopt="@OCAMLOPT@" conf_ocamldep="@OCAMLDEP@" @@ -28,6 +27,7 @@ conf_ocamldoc="@OCAMLDOC@" conf_ocamllib="@OCAMLLIB@" conf_ocamlbin="@OCAMLBIN@" conf_has_bytes="@HAS_BYTES@" +conf_need_seq="@NEED_SEQ@" ocaml_use_binannot = @OCAML_USE_BINANNOT@ autoconf_dir = "@PACKAGE_NAME@-autoconf-dir" diff --git a/autoconf/configure b/autoconf/configure index 024b414..92ab779 100755 --- a/autoconf/configure +++ b/autoconf/configure @@ -587,31 +587,26 @@ PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS OCAML_USE_BINANNOT +NEED_SEQ HAS_BYTES DOWNLOAD_URL_PREFIX OPAM_REPO_FORK_REMOTE OPAM_REPO_OFFICIAL_REMOTE OPAM_REPO ROOTDIR -PROJECTURE_ARGS OCAML_PKG_re_glob OCAML_PKG_cmdliner OCAMLYACC OCAMLLEXDOTOPT OCAMLLEX OCAMLBIN -OCAMLVERSION_C CONFIGURE_ARGS metadir ocamldir OCAMLFIND OCAML_USE_POSIX_TYPES AWK -OCAML_POINT_VERSION -OCAML_MINOR_VERSION -OCAML_MAJOR_VERSION SED -OCAML_OS_TYPE OCAMLBUILD OCAMLDOC OCAMLMKLIB @@ -1797,7 +1792,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -PROJECTURE_ARGS=$* +CONFIGURE_ARGS=$* OCAML_MINIMAL_VERSION=4.02.3 @@ -2703,7 +2698,7 @@ fi if test "$OCAMLC" != "no"; then - OCAMLVERSION=`$OCAMLC -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p'` + OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml version is $OCAMLVERSION" >&5 $as_echo "OCaml version is $OCAMLVERSION" >&6; } # If OCAMLLIB is set, use it @@ -2817,7 +2812,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5 $as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;} else - TMPVERSION=`$OCAMLOPT -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlopt discarded." >&5 $as_echo "versions differs from ocamlc; ocamlopt discarded." >&6; } @@ -2923,7 +2918,7 @@ else fi if test "$OCAMLCDOTOPT" != "no"; then - TMPVERSION=`$OCAMLCDOTOPT -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlc.opt discarded." >&5 $as_echo "versions differs from ocamlc; ocamlc.opt discarded." >&6; } @@ -3027,7 +3022,7 @@ else fi if test "$OCAMLOPTDOTOPT" != "no"; then - TMPVERSION=`$OCAMLOPTDOTOPT -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: version differs from ocamlc; ocamlopt.opt discarded." >&5 $as_echo "version differs from ocamlc; ocamlopt.opt discarded." >&6; } @@ -3324,7 +3319,7 @@ else fi if test "$OCAMLDEPDOTOPT" != "no"; then - TMPVERSION=`$OCAMLDEPDOTOPT -version | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + TMPVERSION=`$OCAMLDEPDOTOPT -version | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: version differs from ocamlc; ocamldep.opt discarded." >&5 $as_echo "version differs from ocamlc; ocamldep.opt discarded." >&6; } @@ -3710,21 +3705,6 @@ else fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking OCaml Sys.os_type" >&5 -$as_echo_n "checking OCaml Sys.os_type... " >&6; } - - cat > conftest.ml <&5 -$as_echo "$OCAML_OS_TYPE" >&6; } - - -if test "${OCAML_OS_TYPE}" = "Win32" ; then - OCAMLLIB="$(echo "${OCAMLLIB}" | tr -d '\015' | sed -e 's|\\|/|g')" -fi ROOTDIR=$(dirname $(pwd)) @@ -3816,13 +3796,9 @@ $as_echo_n "checking Point version... " >&6; } $as_echo "$AX_POINT_VERSION" >&6; } OCAML_MAJOR_VERSION=$AX_MAJOR_VERSION - OCAML_MINOR_VERSION=$AX_MINOR_VERSION - OCAML_POINT_VERSION=$AX_POINT_VERSION -OCAMLVERSION_C=$OCAML_MAJOR_VERSION$OCAML_MINOR_VERSION$OCAML_POINT_VERSION - if test "$OCAMLC" = "no"; then as_fn_error $? "You must install the OCaml compiler" "$LINENO" 5 fi @@ -4063,11 +4039,7 @@ fi if test "${OCAMLFIND}" != "no"; then - if test "${OCAML_OS_TYPE}" = "Win32" ; then - metadir="$(${OCAMLFIND} -printconf destdir | tr -d '\015' | sed -e 's|\\|/|g')" - else - metadir="$(${OCAMLFIND} -printconf destdir)" - fi + metadir="$(${OCAMLFIND} -printconf destdir)" echo "initializing metadir from ocamlfind config" fi @@ -4109,7 +4081,6 @@ fi - # checking for ocamllex if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamllex", so it can be a program name with args. @@ -4427,9 +4398,8 @@ $as_echo "not found" >&6; } if test "$OCAML_PKG_cmdliner" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: BEFORE ERROR: Please install OCaml package 'cmdliner'." >&5 -$as_echo "$as_me: WARNING: BEFORE ERROR: Please install OCaml package 'cmdliner'." >&2;} -else + as_fn_error $? "Please install OCaml package 'cmdliner'." "$LINENO" 5 +fi @@ -4449,7 +4419,7 @@ else -e 's/[^0-9]//g'` - ax_compare_version_B=`echo "1.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + ax_compare_version_B=`echo ">=1.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ @@ -4462,11 +4432,9 @@ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version if test "$ax_compare_version" = "true" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: BEFORE ERROR: Version >= 1.0 of cmdliner is needed" >&5 -$as_echo "$as_me: WARNING: BEFORE ERROR: Version >= 1.0 of cmdliner is needed" >&2;} + as_fn_error $? "Version >=1.0 of cmdliner is needed" "$LINENO" 5 fi -fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package re.glob" >&5 $as_echo_n "checking for OCaml findlib package re.glob... " >&6; } @@ -4495,9 +4463,8 @@ $as_echo "not found" >&6; } if test "$OCAML_PKG_re.glob" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: BEFORE ERROR: Please install OCaml package 're.glob'." >&5 -$as_echo "$as_me: WARNING: BEFORE ERROR: Please install OCaml package 're.glob'." >&2;} -else + as_fn_error $? "Please install OCaml package 're.glob'." "$LINENO" 5 +fi @@ -4517,7 +4484,7 @@ else -e 's/[^0-9]//g'` - ax_compare_version_B=`echo "1.7.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + ax_compare_version_B=`echo ">=1.7.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ @@ -4530,61 +4497,22 @@ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version if test "$ax_compare_version" = "true" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: BEFORE ERROR: Version >= 1.7.3 of re.glob is needed" >&5 -$as_echo "$as_me: WARNING: BEFORE ERROR: Version >= 1.7.3 of re.glob is needed" >&2;} + as_fn_error $? "Version >=1.7.3 of re.glob is needed" "$LINENO" 5 fi -fi -if test "$OCAML_PKG_cmdliner" = "no"; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Missing dependencies (see warnings above). -See \`config.log' for more details" "$LINENO" 5; } -fi - - - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - - ax_compare_version_A=`echo "$OCAML_PKG_cmdliner_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version_B=`echo "1.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` - +OPAM_REPO=/home/lefessan/GIT/ocp-public/opam-repository +OPAM_REPO_OFFICIAL_REMOTE=ocaml +OPAM_REPO_FORK_REMOTE=origin +DOWNLOAD_URL_PREFIX=http://github.com/OCamlPro/ocp-build/archive/ +############################################################### +## # +## From autoconf.ac: # +## # +############################################################### - if test "$ax_compare_version" = "true" ; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Problems with dependencies (see warnings above) -See \`config.log' for more details" "$LINENO" 5; } - fi -if test "$OCAML_PKG_re.glob" = "no"; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Missing dependencies (see warnings above). -See \`config.log' for more details" "$LINENO" 5; } -fi +HAS_BYTES=3.12.1 @@ -4597,14 +4525,14 @@ fi # 0001001200050617. In other words, each number is zero padded to four # digits, and non digits are removed. - ax_compare_version_A=`echo "$OCAML_PKG_re.glob_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + ax_compare_version_A=`echo "${OCAMLVERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/[^0-9]//g'` - ax_compare_version_B=`echo "1.7.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + ax_compare_version_B=`echo "4.02.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ @@ -4617,25 +4545,10 @@ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version if test "$ax_compare_version" = "true" ; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Problems with dependencies (see warnings above) -See \`config.log' for more details" "$LINENO" 5; } - fi - -OPAM_REPO=/home/lefessan/GIT/ocp-public/opam-repository -OPAM_REPO_OFFICIAL_REMOTE=ocaml -OPAM_REPO_FORK_REMOTE=origin -DOWNLOAD_URL_PREFIX=http://github.com/OCamlPro/ocp-build/archive/ - -############################################################### -## # -## From autoconf.ac: # -## # -############################################################### - + : + else HAS_BYTES=4.02.0 + fi -HAS_BYTES=3.12.1 @@ -4655,7 +4568,7 @@ HAS_BYTES=3.12.1 -e 's/[^0-9]//g'` - ax_compare_version_B=`echo "4.02.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + ax_compare_version_B=`echo "4.03.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ @@ -4669,10 +4582,12 @@ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version if test "$ax_compare_version" = "true" ; then : - else HAS_BYTES=4.02.0 + else HAS_BYTES=4.03.0 fi +NEED_SEQ=false + # Used to indicate true or false condition @@ -4691,7 +4606,7 @@ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version -e 's/[^0-9]//g'` - ax_compare_version_B=`echo "4.03.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + ax_compare_version_B=`echo "4.07.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ @@ -4699,13 +4614,13 @@ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` +x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` if test "$ax_compare_version" = "true" ; then : - else HAS_BYTES=4.03.0 + else NEED_SEQ=true fi diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 8721e30..6deef17 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -8,7 +8,7 @@ # # ####################################################### AC_INIT(ocp-build,1.99.21-beta) -PROJECTURE_ARGS=$* +CONFIGURE_ARGS=$* AC_COPYRIGHT(Copyright 2011-2016 OCamlPro SAS) OCAML_MINIMAL_VERSION=4.02.3 AC_CONFIG_MACRO_DIR([m4]) @@ -26,18 +26,13 @@ AC_ARG_ENABLE(bin-annot, AC_PROG_CC AC_PROG_OCAML -AC_CHECK_OCAML_OS_TYPE -if test "${OCAML_OS_TYPE}" = "Win32" ; then - OCAMLLIB="$(echo "${OCAMLLIB}" | tr -d '\015' | sed -e 's|\\|/|g')" -fi ROOTDIR=$(dirname $(pwd)) AX_SPLIT_VERSION(OCAMLVERSION) -AC_SUBST(OCAML_MAJOR_VERSION,$AX_MAJOR_VERSION) -AC_SUBST(OCAML_MINOR_VERSION,$AX_MINOR_VERSION) -AC_SUBST(OCAML_POINT_VERSION,$AX_POINT_VERSION) -OCAMLVERSION_C=$OCAML_MAJOR_VERSION$OCAML_MINOR_VERSION$OCAML_POINT_VERSION +OCAML_MAJOR_VERSION=$AX_MAJOR_VERSION +OCAML_MINOR_VERSION=$AX_MINOR_VERSION +OCAML_POINT_VERSION=$AX_POINT_VERSION if test "$OCAMLC" = "no"; then AC_MSG_ERROR([You must install the OCaml compiler]) @@ -75,11 +70,7 @@ metadir='${ocamldir}' AC_PROG_FINDLIB if test "${OCAMLFIND}" != "no"; then - if test "${OCAML_OS_TYPE}" = "Win32" ; then - metadir="$(${OCAMLFIND} -printconf destdir | tr -d '\015' | sed -e 's|\\|/|g')" - else - metadir="$(${OCAMLFIND} -printconf destdir)" - fi + metadir="$(${OCAMLFIND} -printconf destdir)" echo "initializing metadir from ocamlfind config" fi @@ -115,7 +106,6 @@ AC_SUBST(metadir) AC_SUBST(CONFIGURE_ARGS) AC_SUBST(OCAMLVERSION) -AC_SUBST(OCAMLVERSION_C) AC_SUBST(OCAMLLIB) AC_SUBST(OCAMLOPT) AC_SUBST(OCAMLDEP) @@ -127,28 +117,16 @@ if test "$OCAMLFIND" = "no"; then fi AC_CHECK_OCAML_PKG(cmdliner) if test "$OCAML_PKG_cmdliner" = "no"; then - AC_MSG_WARN([BEFORE ERROR: Please install OCaml package 'cmdliner'.]) -else - AX_COMPARE_VERSION( [$OCAML_PKG_cmdliner_VERSION], [lt], [1.0], - AC_MSG_WARN([BEFORE ERROR: Version >= 1.0 of cmdliner is needed])) + AC_MSG_ERROR([Please install OCaml package 'cmdliner'.]) fi + AX_COMPARE_VERSION( [$OCAML_PKG_cmdliner_VERSION], [lt], [>=1.0], + AC_MSG_ERROR([Version >=1.0 of cmdliner is needed])) AC_CHECK_OCAML_PKG(re.glob) if test "$OCAML_PKG_re.glob" = "no"; then - AC_MSG_WARN([BEFORE ERROR: Please install OCaml package 're.glob'.]) -else - AX_COMPARE_VERSION( [$OCAML_PKG_re.glob_VERSION], [lt], [1.7.3], - AC_MSG_WARN([BEFORE ERROR: Version >= 1.7.3 of re.glob is needed])) -fi -if test "$OCAML_PKG_cmdliner" = "no"; then - AC_MSG_FAILURE([Missing dependencies (see warnings above).]) + AC_MSG_ERROR([Please install OCaml package 're.glob'.]) fi - AX_COMPARE_VERSION( [$OCAML_PKG_cmdliner_VERSION], [lt], [1.0], - AC_MSG_FAILURE([Problems with dependencies (see warnings above)])) -if test "$OCAML_PKG_re.glob" = "no"; then - AC_MSG_FAILURE([Missing dependencies (see warnings above).]) -fi - AX_COMPARE_VERSION( [$OCAML_PKG_re.glob_VERSION], [lt], [1.7.3], - AC_MSG_FAILURE([Problems with dependencies (see warnings above)])) + AX_COMPARE_VERSION( [$OCAML_PKG_re.glob_VERSION], [lt], [>=1.7.3], + AC_MSG_ERROR([Version >=1.7.3 of re.glob is needed])) OPAM_REPO=/home/lefessan/GIT/ocp-public/opam-repository OPAM_REPO_OFFICIAL_REMOTE=ocaml OPAM_REPO_FORK_REMOTE=origin @@ -165,6 +143,9 @@ HAS_BYTES=3.12.1 AX_COMPARE_VERSION( [${OCAMLVERSION}], [lt], [4.02.0],, HAS_BYTES=4.02.0) AX_COMPARE_VERSION( [${OCAMLVERSION}], [lt], [4.03.0],, HAS_BYTES=4.03.0) +NEED_SEQ=false +AX_COMPARE_VERSION( [${OCAMLVERSION}], [gt], [4.07.0],, NEED_SEQ=true) + ############################################################### ## # ## END of autoconf.ac # @@ -174,7 +155,7 @@ AX_COMPARE_VERSION( [${OCAMLVERSION}], [lt], [4.03.0],, HAS_BYTES=4.03.0) AC_SUBST(OCAMLFIND) AC_SUBST(OCAMLYACC) AC_SUBST(OCAMLLEX) -AC_SUBST(PROJECTURE_ARGS) +AC_SUBST(CONFIGURE_ARGS) AC_SUBST(ROOTDIR) AC_SUBST(prefix) AC_SUBST(exec_prefix) @@ -192,7 +173,6 @@ AC_SUBST(OPAM_REPO_OFFICIAL_REMOTE) AC_SUBST(OPAM_REPO_FORK_REMOTE) AC_SUBST(DOWNLOAD_URL_PREFIX) AC_SUBST(OCAMLVERSION) -AC_SUBST(OCAMLVERSION_C) AC_SUBST(OCAMLC) AC_SUBST(OCAMLOPT) AC_SUBST(OCAMLDEP) @@ -202,6 +182,7 @@ AC_SUBST(OCAMLDOC) AC_SUBST(OCAMLLIB) AC_SUBST(OCAMLBIN) AC_SUBST(HAS_BYTES) +AC_SUBST(NEED_SEQ) AC_SUBST(OCAML_USE_BINANNOT) AC_CONFIG_FILES(Makefile.config config.ocpgen config.ocp2gen ocaml-config.h) AC_OUTPUT diff --git a/autoconf/generated.files b/autoconf/generated.files index 4c05114..adb32b1 100644 --- a/autoconf/generated.files +++ b/autoconf/generated.files @@ -2,20 +2,20 @@ .travis-install.sh 9bfd3722ac873da3f33d69fd670659b2 .travis.yml b8d1c34e40f86f2ac048fad4481cbfd3 autoconf/.gitignore 00973f185af428536c3caff11a53626d -autoconf/Makefile.config.in 36fcfa1c57a4d8fa043f92c8436a27bb +autoconf/Makefile.config.in 75c54fea1f14a82fba8a11e51c9577b6 autoconf/Makefile.rules c9e85dee44380b1a855cb2d49da44d54 autoconf/build.ocp 9d81103f0dd977b6414645b9ab29c713 -autoconf/config.ocp2gen.in 3a8917bdb961d9e59c36ca60d9ff96fd -autoconf/config.ocpgen.in 2bf3c3d333ef7ce7f09cc7a9addb4496 +autoconf/config.ocp2gen.in 27960dd1354daae9bed9f5ec62388db7 +autoconf/config.ocpgen.in 0342fb350cd028d61bdfb3c7b9ce822e autoconf/config.ocpgen2.in 9a995bcba87527893659a1d970826a84 -autoconf/configure.ac 85b00172f3543afc206d296720f6fc3f +autoconf/configure.ac 0492a3d30672278e87a3c4f5fdd767a2 autoconf/m4/ax_compare_version.m4 ebb455a7fd6a8ba9a4e38a25c8f0b686 -autoconf/m4/ocaml.m4 b3841cddbff929a11a3665288e0ff305 +autoconf/m4/ocaml.m4 bffe7da970a9e23a89b611c00360f36f autoconf/ocaml-config.h.in 361f7d5a23b30c6c49756a9e34c2dcf9 autoconf/travis-ci.sh e22cfae9156c383ce5a4abf646798a17 autoconf/travis-install.sh 9bfd3722ac873da3f33d69fd670659b2 build.ocp e34f091d3841a5b334fbb7341b9e227e build.ocp2 1e8c5c999be6aa80323779226d7c7f1a configure 3ffc5da4b7c00140c3024342e64cc2a5 -opam 82f345e79108061ed32837ce42b40fc5 +opam 4fca83cd15e752fb3706c484e338d19e push-opam.sh c48fac7c8991f96357c9fc65a2ae6288 diff --git a/autoconf/m4/ocaml.m4 b/autoconf/m4/ocaml.m4 index ae61cd6..eb75ab5 100644 --- a/autoconf/m4/ocaml.m4 +++ b/autoconf/m4/ocaml.m4 @@ -14,7 +14,7 @@ AC_DEFUN([AC_PROG_OCAML], AC_CHECK_TOOL([OCAMLC],[ocamlc],[no]) if test "$OCAMLC" != "no"; then - OCAMLVERSION=`$OCAMLC -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p'` + OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'` AC_MSG_RESULT([OCaml version is $OCAMLVERSION]) # If OCAMLLIB is set, use it if test "$OCAMLLIB" = ""; then @@ -33,7 +33,7 @@ AC_DEFUN([AC_PROG_OCAML], if test "$OCAMLOPT" = "no"; then AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.]) else - TMPVERSION=`$OCAMLOPT -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then AC_MSG_RESULT([versions differs from ocamlc; ocamlopt discarded.]) OCAMLOPT=no @@ -47,7 +47,7 @@ AC_DEFUN([AC_PROG_OCAML], # checking for ocamlc.opt AC_CHECK_TOOL([OCAMLCDOTOPT],[ocamlc.opt],[no]) if test "$OCAMLCDOTOPT" != "no"; then - TMPVERSION=`$OCAMLCDOTOPT -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then AC_MSG_RESULT([versions differs from ocamlc; ocamlc.opt discarded.]) else @@ -59,7 +59,7 @@ AC_DEFUN([AC_PROG_OCAML], if test "$OCAMLOPT" != "no" ; then AC_CHECK_TOOL([OCAMLOPTDOTOPT],[ocamlopt.opt],[no]) if test "$OCAMLOPTDOTOPT" != "no"; then - TMPVERSION=`$OCAMLOPTDOTOPT -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then AC_MSG_RESULT([version differs from ocamlc; ocamlopt.opt discarded.]) else @@ -82,7 +82,7 @@ AC_DEFUN([AC_PROG_OCAML], if test "$OCAMLDEP" != "no" ; then AC_CHECK_TOOL([OCAMLDEPDOTOPT],[ocamldep.opt],[no]) if test "$OCAMLDEPDOTOPT" != "no"; then - TMPVERSION=`$OCAMLDEPDOTOPT -version | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + TMPVERSION=`$OCAMLDEPDOTOPT -version | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then AC_MSG_RESULT([version differs from ocamlc; ocamldep.opt discarded.]) else @@ -132,7 +132,7 @@ AC_DEFUN([AC_PROG_CAMLP4], # checking for camlp4 AC_CHECK_TOOL([CAMLP4],[camlp4],[no]) if test "$CAMLP4" != "no"; then - TMPVERSION=`$CAMLP4 -v 2>&1| tr -d '\015' | sed -n -e 's|.*version *\(.*\)$|\1|p'` + TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'` if test "$TMPVERSION" != "$OCAMLVERSION" ; then AC_MSG_RESULT([versions differs from ocamlc]) CAMLP4=no diff --git a/ocp-autoconf.config b/ocp-autoconf.config index ce1636e..94029a7 100644 --- a/ocp-autoconf.config +++ b/ocp-autoconf.config @@ -80,6 +80,7 @@ extra_m4_files = [ (* their lowercase translation. *) extra_config_vars = [ HAS_BYTES; + NEED_SEQ; ] (* [extra_bool_vars]: Extra variables to be substituted as boolean. Same as *) diff --git a/ocp-autoconf.d/configure.ac b/ocp-autoconf.d/configure.ac index 09d2cc4..990cf61 100644 --- a/ocp-autoconf.d/configure.ac +++ b/ocp-autoconf.d/configure.ac @@ -2,3 +2,6 @@ HAS_BYTES=3.12.1 AX_COMPARE_VERSION( [${OCAMLVERSION}], [lt], [4.02.0],, HAS_BYTES=4.02.0) AX_COMPARE_VERSION( [${OCAMLVERSION}], [lt], [4.03.0],, HAS_BYTES=4.03.0) + +NEED_SEQ=false +AX_COMPARE_VERSION( [${OCAMLVERSION}], [gt], [4.07.0],, NEED_SEQ=true) diff --git a/opam b/opam index b37abf2..186f553 100644 --- a/opam +++ b/opam @@ -43,6 +43,7 @@ depends: [ "cmdliner" {>= "1.0" } "ocamlfind" "re" {>= "1.7.3" } + "seq" {re > "1.7.3"} ] (**************************************************************)