opam-2.1.2/0000755000650106067230000000000014153703467011321 5ustar glondusedopam-2.1.2/.gitattributes0000644000650106067230000000114214153703467014212 0ustar glondused# Default behaviour, for if core.autocrlf isn't set * text=auto # Shell scripts, autoconf, etc. must have LF endings, even on Windows *.sh text eol=lf configure text eol=lf -diff linguist-generated configure.ac text eol=lf msvs-detect text eol=lf check_linker text eol=lf *.m4 text eol=lf changelog_checker text eol=lf *.cmd text eol=crlf # For diffing simplicity, the patch re-write test uses LF endings on Windows tests/patcher-test.reference text eol=lf # Don't normalise patch files *.patch -text # Actual binary files *.pdf binary # Avoid conflicts in master_changes.md master_changes.md merge=union opam-2.1.2/.github/0000755000650106067230000000000014153703467012661 5ustar glondusedopam-2.1.2/.github/issue_template.md0000644000650106067230000000044414153703467016230 0ustar glondused> If your issue concerns a package not building, please report to > https://github.com/ocaml/opam-repository/issues or to the package maintainer > unless you are confident it is an issue in the opam tool itself. ``` ``` opam-2.1.2/.github/pull_request_template.md0000644000650106067230000000007214153703467017621 0ustar glondusedPlease update `master_changes.md` file with your changes. opam-2.1.2/.github/scripts/0000755000650106067230000000000014153703467014350 5ustar glondusedopam-2.1.2/.github/scripts/changelog_checker0000644000650106067230000000231314153703467017705 0ustar glondused# This script check that the current master changelog has been updated by PR, # ignoring some internal files. # It is used byt the changelog_check github action. # (c) Copyright Raja Boujbel OCamlPro 2020 set -ue IGNORE=" .gitattributes .github .gitignore .ocamlinit .ocp-indent .ocplint .travis-ci.sh .travis.yml AUTHORS CONTRIBUTING.md README.md appveyor.patch appveyor.yml appveyor_build.cmd appveyor_test.sh master_changes.md shell/install.sh " changelog=master_changes.md diffile=/tmp/diff git fetch origin $GITHUB_BASE_REF --depth=1 --quiet echo "> base commit" git show origin/$GITHUB_BASE_REF --format=oneline -s git diff origin/$GITHUB_BASE_REF --name-only --diff-filter=AMRCX > $diffile updated=0 grep -sq $changelog $diffile || updated=1 echo "> all changes" cat $diffile for ign in $IGNORE ; do sed -i "/^${ign//\//\\\/}/d" $diffile done echo "> kept changes" cat $diffile num_changes=`wc -l $diffile | cut -f 1 -d ' '` if [ $num_changes -ne 0 ] ; then if [ $updated -eq 0 ] ; then echo -e "\033[32mChangelog updated\033[m" else echo -e "\033[31mPlease update changelog in master_changes.md\033[m" exit 1 fi else echo -e "\033[33mCommitted files not concerned by changelog\033[m" fi opam-2.1.2/.github/scripts/hygiene.sh0000644000650106067230000001135014153703467016334 0ustar glondused#!/bin/bash -xue . .github/scripts/preamble.sh if [ "$GITHUB_EVENT_NAME" = "pull_request" ] && [ "x" = "x$BASE_REF_SHA$PR_REF_SHA" ] ; then echo "Variables BASE_REF_SHA and PR_REF_SHA must be defined in a pull request job" exit 2 fi # Don't use BASE_REF_SHA and PR_REF_SHA on non pull request jobs, they are not # defined. See .github/workflows/ci.yml hygiene job. if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then # needed for git diffs and rev-list # we need to get history from base ref to head ref for check configure depth=10 set +e git cat-file -e $BASE_REF_SHA r=$? while [ $r -ne 0 ] ; do git fetch origin $GITHUB_REF --depth=$depth depth=$(( $depth + 10 )) git cat-file -e $BASE_REF_SHA r=$? done set -e fi CheckConfigure () { GIT_INDEX_FILE=tmp-index git read-tree --reset -i "$1" git diff-tree --diff-filter=d --no-commit-id --name-only -r "$1" \ | (while IFS= read -r path do case "$path" in configure|configure.ac|m4/*) touch CHECK_CONFIGURE;; esac done) rm -f tmp-index if [[ -e CHECK_CONFIGURE ]] ; then echo "configure generation altered in $1" echo 'Verifying that configure.ac generates configure' git clean -dfx git checkout -f "$1" mv configure configure.ref make configure if ! diff -q configure configure.ref >/dev/null ; then echo -e "[\e[31mERROR\e[0m] configure.ac in $1 doesn't generate configure, \ please run make configure and fixup the commit" ERROR=1 else echo "configure ok for $1" fi fi } set +x ERROR=0 ### # Check configure ### (set +x ; echo -en "::group::check configure\r") 2>/dev/null case $GITHUB_EVENT_NAME in push) CheckConfigure "$GITHUB_SHA" ;; pull_request) for commit in $(git rev-list $BASE_REF_SHA...$PR_REF_SHA --reverse) do echo "check configure for $commit" CheckConfigure "$commit" done ;; *) echo "no configure to check for unknown event" ;; esac (set +x ; echo -en "::endgroup::check configure\r") 2>/dev/null ### # Check install.sh ### if [ "$GITHUB_EVENT_NAME" = "pull_request" ] ; then (set +x ; echo -en "::group::check install.sh\r") 2>/dev/null if ! git diff "$BASE_REF_SHA..$PR_REF_SHA" --name-only --exit-code -- shell/install.sh > /dev/null ; then echo "shell/install.sh updated - checking it" eval $(grep '^\(OPAM_BIN_URL_BASE\|DEV_VERSION\|VERSION\)=' shell/install.sh) echo "OPAM_BIN_URL_BASE=$OPAM_BIN_URL_BASE" echo "VERSION = $VERSION" echo "DEV_VERSION = $DEV_VERSION" for VERSION in $DEV_VERSION $VERSION; do eval $(grep '^TAG=' shell/install.sh) echo "TAG = $TAG" ARCHES=0 while read -r key sha do ARCHES=1 URL="$OPAM_BIN_URL_BASE$TAG/opam-$TAG-$key" echo "Checking $URL" check=$(curl -Ls "$URL" | sha512sum | cut -d' ' -f1) if [ "$check" = "$sha" ] ; then echo "Checksum as expected ($sha)" else echo -e "[\e[31mERROR\e[0m] Checksum downloaded: $check" echo -e "[\e[31mERROR\e[0m] Checksum install.sh: $sha" ERROR=1 fi done < <(sed -ne "s/.*opam-$TAG-\([^)]*\).*\"\([^\"]*\)\".*/\1 \2/p" shell/install.sh) done if [ $ARCHES -eq 0 ] ; then echo "[\e[31mERROR\e[0m] No sha512 checksums were detected in shell/install.sh" echo "That can't be right..." ERROR=1 fi else echo "No changes in install.sh" fi (set +x ; echo -en "::endgroup::check install.sh\r") 2>/dev/null fi ### # Check src_ext patches ### (set +x ; echo -en "::group::check src_ext patches\r") 2>/dev/null # Check that the lib-ext/lib-pkg patches are "simple" make -C src_ext PATCH="busybox patch" clone make -C src_ext PATCH="busybox patch" clone-pkg # Check that the lib-ext/lib-pkg patches have been re-packaged cd src_ext ../shell/re-patch.sh if [[ $(find patches -name \*.old | wc -l) -ne 0 ]] ; then echo -e "[\e[31mERROR\e[0m] ../shell/re-patch.sh should be run from src_ext before CI check" git diff ERROR=1 fi cd .. (set +x ; echo -en "::endgroup::check src_ext patches\r") 2>/dev/null ### # Default cli version check ### if [ "$GITHUB_EVENT_NAME" = "push" ] && [ "$BRANCH" = "master" ]; then (set +x ; echo -en "::group::check default cli\r") 2>/dev/null CURRENT_MAJOR="`sed -n "s/^AC_INIT(opam,\([0-9]\+\)[^0-9]*.*)$/\1/p" configure.ac`" DEFAULT_CLI_MAJOR="`sed -n "/let *default *=/s/.*(\([0-9]*\)[^0-9]*.*/\1/p" src/client/opamCLIVersion.ml`" if [ $CURRENT_MAJOR -eq $DEFAULT_CLI_MAJOR ]; then echo "Major viersion is default cli one: $CURRENT_MAJOR" else echo -e "[\e[31mERROR\e[0m] Major version $CURRENT_MAJOR and default cli version $DEFAULT_CLI_MAJOR mismatches" (set +x ; echo -en "::endgroup::check default cli\r") 2>/dev/null ERROR=1 fi fi exit $ERROR opam-2.1.2/.github/scripts/main.sh0000644000650106067230000001076114153703467015635 0ustar glondused#!/bin/bash -xue . .github/scripts/preamble.sh unset-dev-version () { # disable git versioning to allow OPAMYES use for upgrade touch src/client/no-git-version } export OPAMYES=1 export OCAMLRUNPARAM=b ( # Run subshell in bootstrap root env to build (set +x ; echo -en "::group::build opam\r") 2>/dev/null if [[ $OPAM_TEST -eq 1 ]] ; then export OPAMROOT=$OPAMBSROOT # If the cached root is newer, regenerate a binary compatible root opam env || { rm -rf $OPAMBSROOT; init-bootstrap; } eval $(opam env) fi ./configure --prefix ~/local --with-mccs if [ "$OPAM_TEST" != "1" ]; then echo 'DUNE_PROFILE=dev' >> Makefile.config fi if [[ $OPAM_TEST$OPAM_COLD -eq 0 ]] ; then make lib-ext fi if [ $OPAM_UPGRADE -eq 1 ]; then unset-dev-version fi make all admin rm -f ~/local/bin/opam make install (set +x ; echo -en "::endgroup::build opam\r") 2>/dev/null export PATH=~/local/bin:$PATH opam config report if [ "$OPAM_TEST" = "1" ]; then # test if an upgrade is needed set +e opam list 2> /dev/null rcode=$? if [ $rcode -eq 10 ]; then echo "Recompiling for an opam root upgrade" (set +x ; echo -en "::group::rebuild opam\r") 2>/dev/null unset-dev-version make all admin rm -f ~/local/bin/opam make install opam list 2> /dev/null rcode=$? set -e if [ $rcode -ne 10 ]; then echo -e "\e[31mBad return code $rcode, should be 10\e[0m"; exit $rcode fi (set +x ; echo -en "::endgroup::rebuild opam\r") 2>/dev/null fi set -e # Note: these tests require a "system" compiler and will use the one in $OPAMBSROOT make tests make distclean # Compile and run opam-rt (set +x ; echo -en "::group::opam-rt\r") 2>/dev/null opamrt_url="https://github.com/ocaml-opam/opam-rt" if [ ! -d $CACHE/opam-rt ]; then git clone $opamrt_url $CACHE/opam-rt fi cd $CACHE/opam-rt git fetch origin if git ls-remote --exit-code origin $BRANCH ; then if git branch | grep -q $BRANCH; then git checkout $BRANCH git reset --hard origin/$BRANCH else git checkout -b $BRANCH origin/$BRANCH fi else git checkout master git reset --hard origin/master fi test -d _opam || opam switch create . --no-install --formula '"ocaml-system"' eval $(opam env) opam pin $GITHUB_WORKSPACE -yn --with-version to-test # opam lib pins defined in opam-rt are ignored as there is a local pin opam pin . -yn --ignore-pin-depends opam install opam-rt --deps-only opam-devel.to-test make || { opam reinstall opam-client -y; make; } (set +x ; echo -en "::endgroup::opam-rt\r") 2>/dev/null fi ) export PATH=~/local/bin:$PATH if [ $OPAM_UPGRADE -eq 1 ]; then OPAM12=$OPAM12CACHE/bin/opam if [[ ! -f $OPAM12 ]]; then mkdir -p $OPAM12CACHE/bin os="Linux" if [ "$RUNNER_OS" = "macOS" ]; then os="Darwin" fi wget "https://github.com/ocaml/opam/releases/download/1.2.2/opam-1.2.2-x86_64-$os" -O $OPAM12 chmod +x $OPAM12 fi export OPAMROOT=/tmp/opamroot rm -rf $OPAMROOT if [[ ! -d $OPAM12CACHE/root ]]; then $OPAM12 init cp -r /tmp/opamroot/ $OPAM12CACHE/root else cp -r $OPAM12CACHE/root /tmp/opamroot fi set +e $OPAM12 --version opam --version opam update rcode=$? if [ $rcode -ne 10 ]; then echo "Bad return code $rcode, should be 10"; exit $rcode fi opam_version=$(sed -ne 's/opam-version: *//p' $OPAMROOT/config) if [ "$opam_version" = '"1.2"' ]; then echo -e "\e[31mUpgrade failed, opam-root is still 1.2\e[0m"; cat $OPAMROOT/config exit 2 fi exit 0 fi ( # Finally run the tests, in a clean environment export OPAMKEEPLOGS=1 if [[ $OPAM_TEST -eq 1 ]] ; then cd $CACHE/opam-rt make KINDS="local git" run else if [[ $OPAM_COLD -eq 1 ]] ; then export PATH=$PWD/bootstrap/ocaml/bin:$PATH fi # Test basic actions # The SHA is fixed so that upstream changes shouldn't affect CI. The SHA needs # to be moved forwards when a new version of OCaml is added to ensure that the # ocaml-system package is available at the correct version. opam init --bare default git+https://github.com/ocaml/opam-repository#$OPAM_TEST_REPO_SHA cat >> $(opam var root --global 2>/dev/null)/config < $CACHE" OCAML_LOCAL=$CACHE/ocaml-local OPAM_LOCAL=$CACHE/opam-local PATH=$OPAM_LOCAL/bin:$OCAML_LOCAL/bin:$PATH; export PATH OPAM_COLD=${OPAM_COLD:-0} OPAM_TEST=${OPAM_TEST:-0} OPAM_UPGRADE=${OPAM_UPGRADE:-0} OPAM12CACHE=`eval echo $OPAM12CACHE` OPAMBSROOT=`eval echo $OPAMBSROOT` OPAMBSSWITCH=opam-build case $GITHUB_EVENT_NAME in pull_request) BRANCH=$GITHUB_HEAD_REF ;; push) BRANCH=${GITHUB_REF##*/} ;; *) echo -e "Not handled event" BRANCH=master esac git config --global user.email "gha@example.com" git config --global user.name "Github Actions CI" git config --global gc.autoDetach false # used only for TEST jobs init-bootstrap () { if [ "$OPAM_TEST" = "1" ] || [ -n "$SOLVER" ]; then set -e export OPAMROOT=$OPAMBSROOT # The system compiler will be picked up opam init --yes --no-setup git+https://github.com/ocaml/opam-repository#$OPAM_REPO_SHA cat >> $OPAMROOT/config <.cached export OPAMROOT=$OPAMBSROOT echo $OPAMROOT case "$SOLVER" in z3) PKGS=$SOLVER ;; 0install) PKGS="$SOLVER opam-0install-cudf" ;; *) echo -e "\e[31mSolver $SOLVER not handled\e[0m"; exit 3 ;; esac opam switch create $SOLVER ocaml-system || true opam install $PKGS opam install . --deps opam clean --logs --switch-cleanup eval $(opam env) ./configure make opam-2.1.2/.github/workflows/0000755000650106067230000000000014153703467014716 5ustar glondusedopam-2.1.2/.github/workflows/changelog_check.yml0000644000650106067230000000030714153703467020525 0ustar glondusedname: Changelog check on: pull_request: branches: master jobs: diff: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: bash .github/scripts/changelog_checker opam-2.1.2/.github/workflows/ci.yml0000644000650106067230000002251114153703467016035 0ustar glondusedname: Builds, tests & co on: [ push, pull_request ] env: OPAMBSVERSION: 2.1.0-beta4 OPAMBSROOT: ~/.cache/.opam.cached OPAM12CACHE: ~/.cache/opam1.2/cache # This should be identical to the value in appveyor.yml OPAM_TEST_REPO_SHA: 38e8f54c584fa3cfe779890f7a56fe88ee38be78 OPAM_REPO_SHA: 38e8f54c584fa3cfe779890f7a56fe88ee38be78 # Default ocaml version for some jobs OCAML_VERSION: 4.12.0 ## variables for cache paths GH_OCAML_CACHE: ~/.cache/ocaml-local/** SOLVER: defaults: run: shell: bash jobs: #### # Caches #### # ocaml-cache: # runs-on: ${{ matrix.os }} # strategy: # matrix: # os: [ ubuntu-latest ] # ocamlv: [ 4.02.3, 4.03.0, 4.04.2, 4.05.0, 4.06.1, 4.07.1, 4.08.1, 4.09.1, 4.10.2, 4.11.2 ] # include: # - os: macos-latest # ocamlv: 4.11.2 # fail-fast: false # steps: # - uses: actions/checkout@v2 # - name: ocaml ${{ matrix.ocamlv }} cache # id: ocaml-cache # uses: actions/cache@v2 # with: # path: ${{ env.GH_OCAML_CACHE }} # key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ hashFiles ('.github/scripts/ocaml-cache.sh', '.github/scripts/preamble.sh') }} # - name: Building ocaml ${{ matrix.ocamlv }} cache # if: steps.ocaml-cache.outputs.cache-hit != 'true' # env: # OCAML_VERSION: ${{ matrix.ocamlv }} # run: bash -exu .github/scripts/ocaml-cache.sh ocaml archives-cache: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: src ext archives cache id: archives uses: actions/cache@v2 with: path: src_ext/archives key: archives-${{ hashFiles('src_ext/Makefile.sources', 'src_ext/Makefile') }} - name: Retrieve archives if: steps.archives.outputs.cache-hit != 'true' run: |#bash -exu .github/scripts/caches.sh archives rm -rf src_ext/archives export PATH=~/.cache/ocaml-local/bin:$PATH which ocaml && export OCAML=`which ocaml` || true make -C src_ext cache-archives ls src_ext/archives -al #### # Build #### build: runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest ] ocamlv: [ 4.02.3, 4.03.0, 4.04.2, 4.05.0, 4.06.1, 4.07.1, 4.08.1, 4.09.1, 4.10.2, 4.11.2, 4.12.0 ] include: - os: macos-latest ocamlv: 4.12.0 # Intentionnaly fail fast, no need to run all build if there is a # problem in a given version; usually it is functions not defined in lower # versions of caml # fail-fast: false steps: - name: install deps if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt install bubblewrap - uses: actions/checkout@v2 - name: ocaml ${{ matrix.ocamlv }} cache id: ocaml-cache uses: actions/cache@v2 with: path: ${{ env.GH_OCAML_CACHE }} key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ hashFiles ('.github/scripts/ocaml-cache.sh', '.github/scripts/preamble.sh') }} - name: Building ocaml ${{ matrix.ocamlv }} cache if: steps.ocaml-cache.outputs.cache-hit != 'true' env: OCAML_VERSION: ${{ matrix.ocamlv }} run: bash -exu .github/scripts/ocaml-cache.sh ocaml - name: Build env: OCAML_VERSION: ${{ matrix.ocamlv }} run: bash -exu .github/scripts/main.sh #### # Opam tests #### test: needs: [ build, archives-cache ] runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest, macos-latest ] ocamlv: [ 4.12.0 ] fail-fast: false env: OPAM_TEST: 1 steps: - uses: actions/checkout@v2 - name: install deps if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt install bubblewrap - name: ocaml ${{ matrix.ocamlv }} cache - test id: ocaml-cache-test uses: actions/cache@v2 with: path: ${{ env.GH_OCAML_CACHE }} key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ hashFiles ('.github/scripts/ocaml-cache.sh', '.github/scripts/preamble.sh') }}-test - name: Building ocaml ${{ env.OCAML_VERSION }} cache - test if: steps.ocaml-cache-test.outputs.cache-hit != 'true' env: OCAML_VERSION: ${{ matrix.ocamlv }} run: bash -exu .github/scripts/ocaml-cache.sh ocaml - name: opam bootstrap cache id: opam-bootstrap uses: actions/cache@v2 with: path: | ${{ env.OPAMBSROOT }}/** ~/.cache/opam-local/bin/** key: opam-${{ runner.os }}-${{ env.OPAMBSVERSION }}-${{ matrix.ocamlv }}-${{ env.OPAM_REPO_SHA }}-${{ hashFiles ('.github/scripts/opam-bs-cache.sh', '.github/scripts/preamble.sh') }} - name: opam root cache if: steps.opam-bootstrap.outputs.cache-hit != 'true' run: bash -exu .github/scripts/opam-bs-cache.sh - name: opam-rt cache id: opam-rt uses: actions/cache@v2 with: path: ~/.cache/opam-rt/** key: ${{ runner.os }}-opam-rt-${{ matrix.ocamlv }} - name: Test env: OCAML_VERSION: ${{ matrix.ocamlv }} run: bash -exu .github/scripts/main.sh #### # Opam cold #### cold: needs: [ build, archives-cache ] runs-on: ${{ matrix.os }} strategy: matrix: # os: [ ubuntu-latest, macos-latest ] os: [ ubuntu-latest ] ocamlv: [ 4.12.0 ] fail-fast: false steps: - name: install deps if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt install bubblewrap - uses: actions/checkout@v2 - name: src ext archives cache uses: actions/cache@v2 with: path: src_ext/archives key: archives-${{ hashFiles('src_ext/Makefile.sources', 'src_ext/Makefile') }} - name: Cold env: OCAML_VERSION: ${{ matrix.ocamlv }} OPAM_COLD: 1 run: | make compiler make lib-pkg bash -exu .github/scripts/main.sh #### # Compile solver backends #### solvers: needs: [ build ] runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest, macos-latest ] ocamlv: [ 4.12.0 ] solver: [ z3, 0install ] fail-fast: false env: SOLVER: ${{ matrix.solver }} OPAM_REPO_SHA: 9355b17f9c22a2b44740e3fc5f25f24771929f26 OPAMBSROOT: ~/.cache/opam.${{ matrix.solver }}.cached steps: - uses: actions/checkout@v2 - name: install deps if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt install bubblewrap - name: ocaml ${{ matrix.ocamlv }} cache - test id: ocaml-cache-test uses: actions/cache@v2 with: path: ${{ env.GH_OCAML_CACHE }} key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ matrix.solver }}-${{ hashFiles ('.github/scripts/ocaml-cache.sh', '.github/scripts/preamble.sh') }}-test - name: Building ocaml ${{ env.OCAML_VERSION }} cache - test if: steps.ocaml-cache-test.outputs.cache-hit != 'true' env: OCAML_VERSION: ${{ matrix.ocamlv }} run: bash -exu .github/scripts/ocaml-cache.sh ocaml - name: opam bootstrap cache id: opam-bootstrap uses: actions/cache@v2 with: path: | ~/.cache/opam.${{ matrix.solver }}.cached ~/.cache/opam-local/bin/** key: opam-${{ matrix.solver }}-${{ runner.os }}-${{ env.OPAMBSVERSION }}-${{ matrix.ocamlv }}-${{ hashFiles ('.github/scripts/opam-bs-cache.sh', '.github/scripts/preamble.sh') }} - name: opam root cache env: OPAMBSROOT: ~/.cache/opam.${{ matrix.solver }}.cached if: steps.opam-bootstrap.outputs.cache-hit != 'true' run: bash -exu .github/scripts/opam-bs-cache.sh - name: Compile env: OCAML_VERSION: ${{ matrix.ocamlv }} run: bash -exu .github/scripts/solvers.sh #### # Upgrade from 1.2 to current #### upgrade: needs: [ build ] runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest, macos-latest ] ocamlv: [ 4.12.0 ] fail-fast: false steps: - name: install deps if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt install bubblewrap - uses: actions/checkout@v2 - name: opam 1.2 root cache uses: actions/cache@v2 with: path: ${{ env.OPAM12CACHE }} key: ${{ runner.os }}-opam1.2-root - name: ocaml ${{ matrix.ocamlv }} cache id: ocaml-cache uses: actions/cache@v2 with: path: ${{ env.GH_OCAML_CACHE }} key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ hashFiles ('.github/scripts/ocaml-cache.sh', '.github/scripts/preamble.sh') }} - name: Building ocaml ${{ matrix.ocamlv }} cache if: steps.ocaml-cache.outputs.cache-hit != 'true' env: OCAML_VERSION: ${{ matrix.ocamlv }} run: bash -exu .github/scripts/ocaml-cache.sh ocaml - name: Upgrade env: OCAML_VERSION: ${{ matrix.ocamlv }} OPAM_UPGRADE: 1 run: bash -exu .github/scripts/main.sh #### # Around opam tests ### hygiene: needs: [ archives-cache ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: src ext archives cache uses: actions/cache@v2 with: path: src_ext/archives key: archives-${{ hashFiles('src_ext/Makefile.sources', 'src_ext/Makefile') }} - name: Hygiene env: # Defined only on pull request jobs BASE_REF_SHA: ${{ github.event.pull_request.base.sha }} PR_REF_SHA: ${{ github.event.pull_request.head.sha }} run: bash -exu .github/scripts/hygiene.sh opam-2.1.2/.gitignore0000644000650106067230000000251214153703467013311 0ustar glondused_build/ _obuild/ _opam/ _olint/ bootstrap/ tests/tmp/ tests/.merlin tests/reftests/.merlin .*.swp src_ext/lib src_ext/cudf/ src_ext/cppo/ src_ext/dose3/ src_ext/cmdliner/ src_ext/extlib/ src_ext/mccs/ src_ext/re/ src_ext/ocamlgraph/ src_ext/dune-local/ src_ext/result/ src_ext/stdlib-shims/ src_ext/opam-file-format/ src_ext/camlp4 src_ext/findlib src_ext/ocamlbuild src_ext/topkg src_ext/seq src_ext/secondary/ src_ext/*.*stamp src_ext/*.tbz src_ext/*.tar.gz src_ext/archives/* src_ext/*.*download src_ext/*.pkgbuild src_ext/dune Opam.Runtime.*/ *.tar.bz2 *.annot *.tar.gz *~ .#* \#*# opam opam-installer opam-admin.top opam.exe opam-installer.exe opam-admin.top.exe # debug files *.log *.cudf *.dot # Generated files: *.cmo *.cmx *.cmi *.cmt *.cmti *.cma *.cmxa *.cmxs *.a *.lib *.dll *.o *.obj *.install Makefile.config config.log config.status aclocal.m4 autom4te.cache src/ocaml-flags-configure.sexp src/**/.merlin src/client/linking.sexp src/client/no-git-version src/core/developer src/manifest/dune src/manifest/install.inc src/stubs/libacl/dune src/stubs/libacl/c-libraries.sexp src/stubs/win32/cc64 src/stubs/win32/dune src/stubs/c-flags.sexp # doc doc/dev-manual/*aux doc/dev-manual/*.html doc/dev-manual/*toc doc/html doc/man/.merlin doc/man-html doc/tutorials/opam.wiki doc/dev-manual/*.out doc/pages/*.html doc/*.build src/x_build_libs.ocp opam-2.1.2/.ocamlinit0000644000650106067230000000107014153703467013277 0ustar glondused#use "topfind";; #use "down.top";; #require "opam-client";; OpamClientConfig.opam_init ();; let gt = OpamGlobalState.load `Lock_none;; OpamConsole.msg "Opam global state for %s loaded in 'gt'\n" OpamStateConfig.(OpamFilename.Dir.to_string !r.root_dir);; let rt = OpamRepositoryState.load `Lock_none gt;; OpamConsole.msg "Opam repository state loaded in 'rt'\n";; let st = OpamSwitchState.load `Lock_none gt rt (OpamStateConfig.get_switch ());; OpamConsole.msg "Opam switch state of '%s' loaded in 'st'\n" (OpamSwitch.to_string (OpamStateConfig.get_switch ()));; opam-2.1.2/.ocp-indent0000644000650106067230000000003014153703467013353 0ustar glondusednormal strict_else=auto opam-2.1.2/.ocplint0000644000650106067230000001564014153703467013000 0ustar glondused(*************************************) (* Never edit options files while *) (* the program is running *) (*************************************) (* SECTION : Header *) (* These options must be read first *) (*************************************) (* [ignore]: Module to ignore during the lint. *) ignore = [ ] (* [db_persistence]: Time before erasing cached results (in days). *) db_persistence = 1 (* [jobs]: Number of parallel jobs *) jobs = 4 plugin_typedtree = { (* [enabled]: A plugin with linters on typed tree *) enabled = true fully_qualified_identifiers = { (* [enabled]: Enable/Disable linter "Fully-Qualified Identifiers". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Fully-Qualified Identifiers" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Fully-Qualified Identifiers" *) warnings = "+A-1" ignored_modules = [ Pervasives; StringCompat; ] ignore_operators = true ignore_depth = 2 } polymorphic_function = { (* [enabled]: Enable/Disable linter "Polymorphic function". *) enabled = false (* [ignore]: Module to ignore durint the lint of "Polymorphic function" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Polymorphic function" *) warnings = "+A" } } plugin_text = { (* [enabled]: A plugin with linters on the source *) enabled = true code_length = { (* [enabled]: Enable/Disable linter "Code Length". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Code Length" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Code Length" *) warnings = "+A-1" (* [max_line_length]: Maximum line length *) max_line_length = 80 } useless_space_line = { (* [enabled]: Enable/Disable linter "Useless space character and empty line at the end of file.". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Useless space character and empty line at the end of file." *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Useless space character and empty line at the end of file." *) warnings = "+A" } not_that_char = { (* [enabled]: Enable/Disable linter "Detect use of unwanted chars in files". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Detect use of unwanted chars in files" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Detect use of unwanted chars in files" *) warnings = "+A" } } plugin_patch = { (* [enabled]: Detect pattern with semantic patch. *) enabled = true sempatch_lint = { (* [enabled]: Enable/Disable linter "Lint from semantic patches.". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Lint from semantic patches." *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Lint from semantic patches." *) warnings = "+A-1" } } plugin_parsing = { (* [enabled]: Analyses requiring to re-parse the file *) enabled = true raw_syntax = { (* [enabled]: Enable/Disable linter "Raw Syntax". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Raw Syntax" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Raw Syntax" *) warnings = "+A-2-7-8" } } plugin_parsetree = { (* [enabled]: A plugin with linters on parsetree *) enabled = true code_identifier_length = { (* [enabled]: Enable/Disable linter "Code Identifier Length". *) enabled = false (* [ignore]: Module to ignore durint the lint of "Code Identifier Length" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Code Identifier Length" *) warnings = "+A" (* [min_identifier_length]: Identifiers with a shorter name will trigger a warning *) min_identifier_length = 2 (* [max_identifier_length]: Identifiers with a longer name will trigger a warning *) max_identifier_length = 30 } code_list_on_singleton = { (* [enabled]: Enable/Disable linter "List function on singleton". *) enabled = true (* [ignore]: Module to ignore durint the lint of "List function on singleton" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "List function on singleton" *) warnings = "+A" } phys_comp_allocated_lit = { (* [enabled]: Enable/Disable linter "Physical comparison between allocated litterals.". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Physical comparison between allocated litterals." *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Physical comparison between allocated litterals." *) warnings = "+A" } fabrice_good_practices = { (* [enabled]: Enable/Disable linter "Good Practices". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Good Practices" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Good Practices" *) warnings = "+A" } check_constr_args = { (* [enabled]: Enable/Disable linter "Check Constructor Arguments". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Check Constructor Arguments" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Check Constructor Arguments" *) warnings = "+A" } code_redefine_stdlib_module = { (* [enabled]: Enable/Disable linter "Refedine Stdlib Module". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Refedine Stdlib Module" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Refedine Stdlib Module" *) warnings = "+A-1-2" } } plugin_indent = { (* [enabled]: A plugin with linters on the source *) enabled = true ocp_indent = { (* [enabled]: Enable/Disable linter "Indention with ocp-indent". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Indention with ocp-indent" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Indention with ocp-indent" *) warnings = "+A-1" } } plugin_file_system = { (* [enabled]: A plugin with linters on file system like interface missing, etc *) enabled = true interface_missing = { (* [enabled]: Enable/Disable linter "Missing interface". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Missing interface" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Missing interface" *) warnings = "+A" } project_files = { (* [enabled]: Enable/Disable linter "File Names". *) enabled = true (* [ignore]: Module to ignore durint the lint of "File Names" *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "File Names" *) warnings = "+A" } } plugin_complex = { (* [enabled]: A plugin with linters on different inputs *) enabled = true interface_module_type_name = { (* [enabled]: Enable/Disable linter "Checks on module type name.". *) enabled = true (* [ignore]: Module to ignore durint the lint of "Checks on module type name." *) ignore = [ ] (* [warnings]: Enable/Disable warnings from "Checks on module type name." *) warnings = "+A" } } opam-2.1.2/AUTHORS0000644000650106067230000000070114153703467012367 0ustar glondusedVincent Bernardoff Raja Boujbel Roberto Di Cosmo Thomas Gazagnaire Louis Gesbert Fabrice Le Fessant Anil Madhavapeddy Guillem Rieu Ralf Treinen Frederic Tuong opam-2.1.2/CHANGES0000644000650106067230000023213714153703467012324 0ustar glondusedChanges prefixed with "(*)" are potentially breaking to scripts or existing repositories (changes that are automatically handled by the format upgrade tools are not marked). Those prefixed with "(+)" are new command/option (since 2.1.0~alpha2). 2.1.2: * Fallback on dnf if yum does not exist on RHEL-based systems [#4825 @kit-ty-kate] * Use --no-depexts in CLI 2.0 mode [#4908 @dra27] * bootstrap: update ocaml version (fixes the compilation of opam with mingw) [#4927 @kit-ty-kate] 2.1.1: * Fix typo in error message for opam var [#4786 @kit-ty-kate - fix #4785] * Run the sandbox check in the temporary directory [#4787 @dra27 - fix #4783] * OpamSystem: avoid calling Unix.environment at top level [#4789 @hannesm] * Homebrew: Add support for casks and full-names [#4801 @kit-ty-kate] * Fix the cold target in presence of an older OCaml compiler version on macOS [#4802 @kit-ty-kate - fix #4801] * Archlinux: handle virtual package detection [#4833 @rjbou - partial fix #4759] * Disable the detection of available packages on RHEL-based distributions. This fixes an issue on RHEL-based distributions where yum list used to detect available and installed packages would wait for user input without showing any output and/or fail in some cases [#4791 @kit-ty-kate - fixes #4790] * Handle empty environment variable updates - missed cherry-pick from 2.0 [#4840 @dra27] * Fix vendored build on mingw-w64 with g++ 11.2 [#4835 @dra27] * Put back support for switch creation with packages argument and `--packages` option with cli 2.0, and a specific error message for cli 2.1 [#4853 @rjbou - fix #4843] * Fix reverting environment additions to PATH-like variables when several dirs added at once [#4861 @dra27] * Fix dose3 download url since gforge is gone [#4870 @avsm] * Ensure setenv can use package variables defined during the build [#4841 @dra27] * Fix `set-invariant: default repos were loaded instead of switch repos [#4866 @rjbou] 2.1.0: * Set DEBIAN_FRONTEND=noninteractive for unsafe-yes confirmation level [#4735 @dra27 - partially fix #4731] * Fix 2.1~alpha2 to 2.1 format upgrade with reinit [#4750 #4756 @rjbou - fix #4748] * Fix bypass-check handling on reinit [#4750 @rjbou] * fish: fix deprecated redirection syntax `^` [#4736 @vzaliva] * Bump src_exts and fix build compat with Dune 2.9.0 [#4754 @dra27] * Fix depext alpine tagged repositories handling [#4758 @rjbou] 2.1.0~rc2: * Remove OPAMZ3DEBUG evironment variable [#4720 @rjbou - fix #4717] * Fix format upgrade when there is missing local switches in the config file [#4715 @rjbou - fix #4713] * Fix not recorded local switch handling, with format upgrade [#4715 @rjbou] * Set opam root version to 2.1 [#4715 @rjbou] * Improved and extended tests [#4715 @rjbou] 2.1.0~rc: * (*) Environment variables initialised only at opam client launch, no more via libraries [#4606 #4703 @rjbou] * (*) Deprecated `build-doc`, `build-test`, `make` flags [#4581 @rjbou] * (+) Add `--confirm-level` and `OPAMCONFIRMLEVEL` for automatic answering [#4582 @rjbou - fix #4168; #4683 @dra27 - fix #4682; #4691 @rjbou - fix #4682] * (+) Add `--no` [#4582 @rjbou] * (+) Add a `--with-0install-solver` option to the configure script to enable the 'builtin-0install' solver [#4646 @kit-ty-kate] * Add default cli mechanism: deprecated options are accepted (in the major version) if no cli is specified [#4575 @rjbou] * Add `opam config` deprecated subcommands in the default cli [#4575 @rjbou - fix #4503] * Add cli versioning for opam environment variables [#4606 @rjbou] * Add cli versioning for enums of flags with predefined enums [#4606 @rjbou] * Clearer messages about using --cli and OPAMCLI [#4655 @dra27] * The options `--root` and `--switch` are now reflected in environment variables when building packages so that calls to `opam` during build access the correct root and switch [#4668 @LasseBlaauwbroek] * Add cli versioning for enums of flags with predefined enums [#4626 @rjbou] * Preprocess `--confirm-level` for plugins calls/install [#4694 @rjbou] * Ensure the symlink for a plugin is maintained on each invocation [#4621 @dra27 - partially fixes #4619] * Initialise environment variables for plugins call/install [#4582 @rjbou] * Expect plugins to end in .exe on Windows [#4709 @dra27] * Introduce a `default-invariant` config field, restore the 2.0 semantics for `default-compiler` [#4607 @AltGr] * Fix default invariant with no system compiler [#4644 @AltGr - fix #4640] * Perform an hard upgrade on intermediate roots, ie root from `2.1~alpha/beta`, and keep a light upgrade from `2.0` [#4638 @rjbou] * Send the 'opam root layout update' message to stderr [#4692 @AltGr] * If opam root is different from the binary, allow reading it and try to read in best effort mode [#4638 @rjbou - fix #4636] * Don't check opam system dependencies on reinit after a format upgrade [#4638 @rjbou] * Fix `sys-ocaml-cc`, `sys-ocaml-arch` and `sys-ocaml-libc` when no system compiler installed [#4706 @dra27] * Fix `Not_found` (config file) in config report [#4570 @rjbou] * Config report: Print variables of installed compilers and their (installed) dependencies [#4570 @rjbou] * Don't patch twice file [#4529 @rjbou] * With `--deps-only`, set dependencies as root packages [#4964 @rjbou - fix #4502] * Keep global lock only if root format upgrade is performed [#4612 @rjbou - fix #4597] * Improve installation times by only tracking files listed in `.install` instead of the whole switch prefix when there are no `install:` instructions (and no preinstall commands) [#4494 @kit-ty-kate @rjbou; #4667 @dra27 - fix #4422] * Scrub OPAM* environment variables added since 2.0 from package builds to prevent warnings when a package calls opam [#4663 @dra27 - fix #4660] * Correct the message when more than one depext is missing [#4678 @dra27] * Only display one conflict message when they are all owing to identical missing depexts [#4678 @dra27] * Don't exclude base packages from rebuilds (made some sense in opam 2.0 with base packages but doesn't make sense with 2.1 switch invariants) [#4569 @dra27] * Don't refer to base packages in messages any more [#4623 @dra27 - fixes #4572] * Give the correct command when demonstrating switch creation [#4675 @dra27 - fixes #4673] * On switch loading, if invariant is inferred and a write lock required, write the file [#4638 @rjbou] * Don't look for lock files for pin depends [#4511 @rjbou - fix #4505] * Fetch sources when pinning an already pinned package with a different url when using working directory [#4542 @rjbou - fix #4484] * Don't ask for confirmation for pinning base packages (similarly makes no sense with 2.1 switch invariants) [#4571 @dra27] * Fix version pin source retrieving: mustn't error if archive opam file is malformed [#4580 @rjbou] * `opam list --silent` renamed to `--check` [#4595 @dra27 - fix #4323] * Include doc field in opam-show [#4567 @dra27 - partially fix #4565] * Fix `switch` global variable resolving [#4685 @rjbou - fix #4684] * Fix `hash` package variable resolving [#4687 @rjbou] * Lint: Fix W59 & E60 for conf packages (no url required) [#4550 @rjbou - fix #4549] * Lint: Fix W59 & E60 with VCS urls, don't check upstream if url has VCS backend [#4635 @rjbou] * Lint: Add E67 checksum specified with non archive url [#4635 @rjbou] * Lint: Disable subpath warning E63,W64 [#4638 @rjbou] * Lint: Fix manpage listing [#4708 @rjbou] * Don't write lock file with `--read-only', `--safe`, and `--dryrun` [#4562 @rjbou - fix #4320] * Make `opam lock` consistent with `opam install`, on local pin always take last opam file even if uncommitted [#4562 @rjbou - fix #4320] * Opam file: Fix `features` parser [#4507 @rjbou] * Opam file: Rename `hidden-version` to `avoid-version` [#4527 @dra27] * Opam file: Fix rewriting with preserved format empty field error [#4634 @rjbou - fix #4628] * Opam file: Switch config: Defined `invariant` field as an option to differentiate when it is not defined [#4638 @rjbou] * Opam file: Differentiate bad format from bad (opam) version with `Bad_version` exception, raised from `OpamFormat.check_opam_version` [#4638 @rjbou] * Opam file: Always print the `opam-version` field on files [#4638 @rjbou] * Opam file: Config: add `opam-root-version` field as a marker for the whole opam root [#4638 @rjbou - fix #4636] * Opam file: Add `BestEffort` modules with reading functions that don't show errors, given the `opam_file_format` internal field [#4638 @rjbou - fix #4636] * Depext: Handle macport variants [#4509 @rjbou - fix #4297] * Depext: Always upgrade all the installed packages when installing a new package on Archlinux [#4556 @kit-ty-kate] * Depext: Handle some additional environment variables (`OPAMASSUMEDEPEXTS`, `OPAMNODEPEXTS`) [#4587 @AltGr] * Depext: Improve messages to hint that answering `no` doesn't abort installation [#4591 @AltGr] * Depext: Add support for non-interactive mode in macports [#4676 @kit-ty-kate] * Depext: Handling of packages of tagged repositories for alpine [#4700 @rjbou - fix #4670] * Depext: Clarify some `assume-depexts` related messages [#4671 @AltGr - partial fix #4662] * Depext: Warn the user if epel-release is missing and unavailable depexts are detected [#4679 @dra27 fix #4669] * Depext: Ignore config yes automatic answering when asking confirmation to run install commands [#4698 @rjbou - fix #4680] * Sandbox: Fix the conflict with the environment variable name used by dune [#4535 @smorimoto - fix ocaml/dune#4166] * Sandbox: Kill builds on Ctrl-C with bubblewrap [#4530 @kit-ty-kate - fix #4400] * Sandbox: Linux: mount existing TMPDIR read-only, re-bind `$TMPDIR` to a separate tmpfs [#4589 @AltGr] * Sandbox: Fix the sandbox check [#4589 @AltGr] * Sandbox: Fix sandbox script shell mistake that made `PWD` read-write on remove actions [#4589 @AltGr] * Sandbox: Port bwrap improvements to sandbox_exec [#4589 @AltGr] * Sandbox: Fix realpath use for macos, partial revert of #4589 [#4609 @AltGr] * Add missing shell quoting to support space and special shell characters in switch directory path [#4707 @kit-ty-kate] * Rename `state.cache` to include the `OpamVersion.magic()` string. All .cache files are deleted if any cache file is written to, allowing multiple versions of the library to co-exist without constantly regenerating it [#4642 @dra27 - fix #4554] * Fix Cudf preprocessing [#4534 #4627 @AltGr - fix #4624] * Allow to upgrade to a hidden-version package if a hidden-version package is already installed [#4525 @kit-ty-kate] * Add support for a few select criteria useful to CI to the 0install solver: `+count[version-lag,solution]` to always choose the oldest version available, `+removed` to not try to keep installed packages [#4631 @kit-ty-kate] * Fix opam-devel's tests on platforms without openssl, GNU-diff and a system-wide ocaml [#4500 @kit-ty-kate] * Use dune to run reftests [#4376 @emillon] * Restrict `extlib` and `dose` version [#4517 @kit-ty-kate] * Restrict to `opam-file-format.2.1.2` [#4495 @rjbou] * Require `opam-file-format.2.1.3+` in order to enforce `opam-version: "2.1"` as first non-comment line [#4639 @dra27 - fix #4394] * Switch to newer version of MCCS (based on newer GLPK) for src_ext [#4559 @AltGr] * Bump dune version to 2.8.2 [#4592 @AltGr] * Bump the minimal dune requirement to dune 1.11 [#4437 @dra27 @kit-ty-kate] * 4.12 compatibility [#4437 @dra27 @kit-ty-kate] * Cold compiler updated to 4.12 [#4616 @dra27] * Fix build from source when a dune-project file is presented in the parent directory [#4545 @kit-ty-kate] * Fix build from source when a dune-project file is presented in the parent directory [#4545 @kit-ty-kate - fix #4537] * Fix opam-devel.install not to install two files called opam [#4664 @dra27] * Build release tags as non-dev versions, as for release tarballs [#4665 @dra27 - fix #4656] * Disable dev version for tests (needed for format upgrade test) [#4638 @rjbou] * Add a hint for missing `openssl` in `make cold` [#4702 @rjbou] * Remove test field from opam-devel, they need the network [#4702 @rjbou] * Update src_ext for Dune and MCCS [#4704 @dra27] * Release scripts: switch to OCaml 4.10.2 by default, add macos/arm64 builds by default [#4559 @AltGr] * Release scripts: add default cli version check on full archive build [#4575 @rjbou] * Arg: Generalise `mk_tristate_opt` to `mk_state_opt` [#4575 @rjbou] * Arg: Fix `mk_state_opt` and rename to `mk_enum_opt` [#4626 @rjbou] * Arg: Add `mk_enum_opt_all` for state flags that appears more than once [#4582 @rjbou] * Fix `opam exec` on native Windows when calling cygwin executables [#4588 @AltGr] * Fix temporary file with a too long name causing errors on Windows [#4590 @AltGr] * CLI: Add flag deprecation and replacement helper [#4595 @rjbou] * Win32 Console: fix VT100 support [#3897 #4710 @dra27] * Tidied the opam files [#4620 @dra27] * Externalise cli versioning tools from `OpamArg` into `OpamArgTools` [#4606 @rjbou] * Each library defines its own environment variables, that fills the config record [#4606 @rjbou] * Harden cygpath wrapper [#4625 @dra27] * Reset the plugin symlinks when the root is upgraded [#4641 @dra27 - partial fix for #4619] * Formalise opam dev version detection with `OpamVersion.is_dev_version` [#4665 @dra27] * Add `OpamStd.String.is_prefix_of` [#4694 @rjbou @dra27] * Fix `OpamStd.Format.pretty_list`: `last` argument dropped if list contains more than 2 elements [#4694 @rjbou] * Run the shell hooks with closed stdin (bash, zsh) [#4692 @AltGr] * Improved and extended tests [#4376 #4504 #4545 #4612 #4668 #4612 #4634 #4672 #4638 #4702 #4697 #4697 @AltGr @dra27 @emillon @rjbou] * Improve Github Actions [#4593 #4575 #4610 #4610 #4618 #4606 #4695 #4695 @AltGr @dra27 @rjbou] * Improve documentation [#4496 #4506 #4513 #4637 #4681 #4702 @dannywillems @eth-arm @kit-ty-kate @rjbou @UnixJunkie] 2.1.0~beta4: * (*) Implemented CLI version compatibility layer [#4385 @rjbou] * (*) Return code 31 (`Sync_error`) instead of code 40 (`Package_operation_error`) when all failures happend during fetching [#4416 @rjbou - fix #4214] * (+) Add `--download-only` flag [#4071 @Armael @rjbou - fix #4036] * (+) Provide `opam update --depexts` to request an update of the system package manager databases [#4379 @AltGr - fix #4355] * Set OPAMCLI=2.0 during package action commands [#4492 @kit-ty-kate] * Fix sandbox check on first `opam init` [#4370 @rjbou - fix #4368] * Print shell-appropriate eval command on `opam init` [#4427 @freevoid] * Fix init script check in csh [#4482 @gahr] * The stdout of `pre-` and `post-session` hooks is now propagated to the user [#4382 @AltGr - fix #4359] * `post-install` hooks are now allowed to modify or remove installed files [#4388 @lefessan] * Add support for switch-specific pre/post sessions hooks [#4476 @rjbou - fix #4472] * Ensure we don't advertise upgrades to hidden versions [#4477 @AltGr - fix #4432] * Fix `opam remove --autoremove ` to not autoremove unrelated packages [#4369 @AltGr - fix #4250 #4332] * Fix cases where `opam remove -a` could trigger conflicts in the presence of orphan packages [#4369 @AltGr - fix #4250 #4332] * Fix `--update-invariant` when removing or changing package name [#4360 @AltGr - fix #4353] * Fix updates of the invariant with `--update-invariant` [#4431 @AltGr] * Fix cleanup of build dirs for version pinned packages [#4436 @rjbou - fix #4255] * Fix opamfile format upgrade on pinning [#4366 @rjbou - fix #4365] * Fix `pin --show` actually pinning [#4367 @rjbou - fix #4348] * When several pins are needed, do their fetching in parallel [#4399 @rjbou - fix #4315] * Don't cleanup VCS pin source directories [#4399 @rjbou] * Fix `--working-dir` with local switches [#4433 @rjbou] * Add package variable `opamfile-loc`, containing the location of installed package opam file [#4402 @rjbou] * Fix `arch` detection when using 32bit mode on ARM64 [#4462 @kit-ty-kate] * Fix `arch` detection of i486 [#4462 @kit-ty-kate] * Skip loading the switch state for variable lookup when possible [#4428 @rjbou] * Fix package variables display when no config file is found [#4428 @rjbou] * Fix `opam option depext-bypass-=["XXX"]` [#4428 @rjbou] * Lint: add a check that strings in filtered package formula are booleans or variables [#443 @rjbou - fix #4439] * Fix handling of filename-encoded pkgname in opam files [#4401 @AltGr - fix ocaml-opam/opam-publish#107] * Don't recompile when modifying the package flags [#4477 @AltGr] * Add depext support for NetBSD and DragonFlyBSD [#4396 @kit-ty-kate] * Fix depexts on OpenBSD, FreeBSD and Gentoo: Allow short names and full name paths for ports-based systems [#4396 @kit-ty-kate] * Handle the case where `os-family=ubuntu` as `os-family=debian` [#4441 @alan-j-hu] * Update opam's opam files to 2.0 [#4371 @AltGr] * Makefile: Add rule `custom-libinstall` for `opam-custom-install` use [#4401 @AltGr] * Use the archive caches when running `opam admin cache` [#4384 @AltGr - fix #4352] * Fix explosion of `opam admin check --cycles` on repositories with huge cliques [#4392 @AltGr] * Much improved format-preserving printer [#4298 #4302 @rjbou - fix #3993] * Fix missing conflict message when trying to remove required packages [#4362 @AltGr] * Fix the Z3 backend for upgrades [#4393 @AltGr] * Fix cases where opam would wrongly complain about action cycles [#4358 @AltGr - fix #4357] * Fix permission denied fallback for openssl [#4449 @Blaisorblade - fix #4448] * Add debug & verbose log for patch & subst applications [#4464 @rjbou - fix #4453] * Be more robust w.r.t. new caches updates when `--read-only` is not used [#4467 @AltGr - fix #4354] * Improved and extended tests [#4375 #4395 #4428 #4385 #4467 #4475 #4483 @emillon @rjbou @AltGr @freevoid @dra27] * Switched to Github actions [#4463 @rjbou] 2.1.0~beta2: * Reduced startup times, in particular for `opam exec` [#4341 @altgr] * Fixed the sandboxing check on fresh inits [#4342 @altgr] * Fixed cases where `--with-version` was not respected by `opam pin` [#4346 @altgr] * Upgraded the bootstrap OCaml compiler from 4.09.1 to 4.11.1 [#4242 @avsm @dra27 @MisterDA @rjbou] 2.1.0~beta: * (*) `--cli` / `OPAMCLI` option added [#4316 @dra27] * `--help/--version` documented in wrong section for aliases [#4317 @dra27] * `opam lock --help` missing common information {#4317 @dra27] * (+) `--yes` passed to all commands, and plugins [#4316 @dra27] * On init, check availability of sandbox and propose to disable [#4284 @rjbou - fix #4089] * config upgrade: on the fly upgrade if no write lock required [#4313 @rjbou] * (*) Add `pin scan` subcommand to list available pins [#4285 @rjbou] * (*) Add `--normalise` option to print a normalised list when scanning, that can be taken by `opam pin add` [#4285 @rjbou] * (*) Add `with-version` option to set the pinned package version [#4301 @rjbou] * Add error message in case git repo is empty [#4303 @rjbou - fix #3905] * Lock: Support -d as alias of --direct-only (to match plugin) [#4319 @dra27] * Switch: Support -n as an alias of --no-action (to match opam-pin) [#4324 @dra27] * List: form no longer advertised as valid for --columns [#4322 @dra27] * Admin: form no longer advertised as valid for --columns in list [#4322 @dra27] * Solver: Don't penalise packages with more recent 'hidden-versions' [#4312 @AltGr] * `OpamCommand.pin` refactor, including adding `OpamClient.PIN.url_pins` to pin a list of package with url [#4285 #4301 @rjbou] * `OpamPinCommand.source_pin', for new package confirmation, don't check that no opam file is given as argument [#4301 @rjbou] * CLI: Provide all functions in the client library [#4329 @AltGr] * Process: don't display status line if not verbose, and status line disabled [#4285 @rjbou] * Optimise package name comparison [#4328 @AltGr - fix #4245] 2.1.0~alpha3: * Confirmation on non-compiler switch invariant: not on dryrun, Y by default [#4289 @AltGr] * (*) Fix pin kind automatic detection consistency [#4300 @rjbou]: With `opam pin target', when opam file is not versioned and at root, vcs-pin the package instead of path-pin, and with `opam pin add nv target', take opam file even if not versioned. * External dependencies: Fix non-interactive mode on OpenSuse [#4293 @kit-ty-kate] * src-ext: bump topkg to 1.0.2 and dune to 2.6.2, with a second compiler built in case main one is < 4.07.0 (dune restriction) [#4294 @dra27] * Allow Z3 backend to return sub-optimal solutions on timeout, add `OPAMSOLVERALLOWSUBOPTIMAL` environment variable [#4289 @AltGr] * Add an optional solver relying on opam-0install-cudf [#4240 @kit-ty-kate] 2.1.0~alpha2: * Remove m4 from the list of recommended tools [#4184 @kit-ty-kate] * Fix config solver field ignored at init [#4243 @rjbou - fix #4241] * Fix atoms formula restriction with `--all` at upgrade [#4221 @rjbou - fix #4218] * Copy instead of calling rsync when archives are in a local cache [#4270 @kit-ty-kate] * Opam file build using dune, removal of opam-%.install makefile target [#4178 @rjbou #4229 @kit-ty-kate - fix #4173] * Use version var in opam file instead of equal current version number in opamlib dependencies [#4178 @rjbou] * src ext: fix extlib url [#4248 @rjbou] * Add `_build` to rsync exclusion list [#4230 @rjbou - fix #4195] * Recursive opam file lookup: ignore `_build` [#4230 @rjbou] * Assume-built fix & rewriting [#4211 @rjbou] * Fix autoremove env var handling [#4219 @rjbou - fix #4217] * Fix Not_found with `opam switch create . --deps` [#4151 @AltGr] * Package Var: resolve self `name` variable for orphan packages [#4228 @rjbou - fix #4224] * (*) Reject (shell) character on switch names [#4237 @rjbou - fix #4231] * Fix `OPAMSWITCH` empty string setting, consider as unset [#4237 @rjbou] * opam-installer: For paths, remove use of empty switch in favor of a context-less module [#4237 @rjbou] * Add missing depext to unavailable reasons [#4194 @rjbou #4279 @rjbou - fix #4176] * (*) Bump config file version to 2.1 (new depext fields) [#4280 @rjbou - fix #4266] * Add depext handling on new pinned packages [#4194 @rjbou - fix #4189] * Don't keep unpinned package version if it exists in repo [#4073 @rjbou - fix #3630] * Fix path resolving when pinning with `file://` [#4209 @rjbou - fix #4208] * (*) Disable recursive & subpath pinning (only present experimentally in opam 2.1.0~alpha) [#4252 @rjbou] * Add switch depext-bypass as modifiable field [#4194 @rjbou - fix #4177] * Add `--no-depexts` option to disable depexts packages unavailability [#4194 @rjbou - fix #4205] * Warn if packages are not listed because of depexts unavailability [#4194 @rjbou - fix #4205] * (*) Display error message for all not found packages [#4179 @rjbou - fix #4164] * (*) Keep package order given via cli [#4179 @rjbou - fix #4163] * `--sort`` apply to with all options, not only `--just-file` [#4179 @rjbou] * Add scope display to Not found message [#4192 @rjbou] * No scope needed for variable display [#4192 @rjbou - fix #4183] * Fix package variable resolution [#4192 @rjbou - fix #4182] * opam option: Fix messages advertising a command in an obsolete format [#4194 @rjbou] * E65: check that url local paths are absolute [#4209 @rjbou] * Fix arch query depext [#4200 @rjbou] * Add message when adding a package to `depext-bypass` [#4194 @rjbou] * Fix performance issue of depext under Docker/debian [#4165 @AltGr] * Handle debian virtual packages [#4269 @AltGr @rjbou - fix #4251] * Refactor `OpamSysInteract` package status [#4152 #4200 @rjbou] * Add environment variables handling on depext query [#4200 @rjbou] * Add depext Macport support [#4152 @rjbou] * Homebrew/depext: add no auto update env var for install, accept `pkgname` and `pkgname@version` on query [#4200 @rjbou] * Tag packages with missing depexts in Cudf [#4235 @AltGr] * Force LC_ALL=C for depext query commands [#4200 @rjbou] * Put back opam-depext-2.0's behaviour with regards to asking users' consent before installing system packages [#4168 @kit-ty-kate @rjbou] * Add OPAMDEPEXTYES env variable to pass --yes options to system package manager [#4168 @kit-ty-kate @rjbou] * Fix system install command dryrun [#4200 @rjbou] * (+) Add --depext-only to install only external dependencies, regardless of config depext status [#4238 @rjbou] * Move system install confirmation message after opam packages install [#4238 @rjbou] * Error if '--depext-only' is given with '--assume-depexts' or '--no-depexts' [#4238 @rjbou] * Sanddbox: no error when linked directory doesn't exist (e.g. XDG defined) [#4278 @kit-ty-kate] * Sandbox: add quotes to avoid space unwanted behaviors [#4278 @kit-ty-kate] * Fix temp files repository cleaning [#4197 @rjbou] * Fix admin cache synchronisation message [#4193 @rjbou - fix #4167] * Fix mismatching extra files detection [#4198 @rjbou] * Fix Cudf generation for compat with external solvers [#4261 @AltGr] * Check for a solution before calling the solver [#4263 @AltGr] * Add the package flag 'hidden-version' to discourage selection by the solver [#4281 @AltGr] * Tweak the default criteria to handle 'missing-depexts' and 'hidden-version' flags [#4281 @AltGr] * Disable chrono when timestamps are disables [#4206 @rjbou] * Expose some functionality in the `OpamAction`, `OpamPath` and `OpamSwitchState` modules for use without a `switch` value (introduce a functor to permit replicating switch layout in different contexts) [#4147 @timberston] * Std: Add map_reduce to Set and Map [#4263 @AltGr] * Fix regression in command resolution from #4072 (ocaml code for looking up commands in PATH) [#4265 @dra27] * Use OCaml 4.09.1 for the make cold target [#4257 @dra27] * Add show cram test [#4206 @rjbou] * Add envrionnement variable handling on cram test [#4206 @rjbou] 2.1.0~alpha: * Recursive & subpath based pin [#3499 @rjbou @hngrgr - fix #3174 #3477] * Define switch invariants rather than "base packages" [#3894 @AltGr] * Don't warn on switch creation with 'ocaml' as invariant [#4108 @AltGr] * Better error handling on switch creation [#4121 @AltGr] * Integrate lock plugin [#3746 @rjbou - fix #3734 #3769 #3694] * Add configuration modifications as opam config subcommands [#3992 @rjbou] * opam var and opam option outside of opam config [#4116 @rjbou - fix #4119] * Enable option var optimisation switch load [#4138 @rjbou] * Integrate depext plugin [#3975 @rjbou @AltGr - fix #3790 #1519 #2426 #3692] * Enable command/output display only from verbose level 3 [#4141 @rjbou] * Add `opam install --check ` checks that `` dependencies are already installed in the switch. It reports missing ones and exits with 1, 0 otherwise. It is used on a check only purpose, additionally to `--deps-only`. [#3854 @rjbou - fix #3823] * Add `opam install --ignore-conflicts` to use with `--deps-only` in case it is needed to install dependencies without taking conflicts into account. [#3853 @rjbou - fix #3846] * Add `opam show --just-file ` shows information of a given file, without loading the switch state. It can be combined with other options, as field filter `--field`. It deprecates `--file` option. [#3729 @rjbou - fix #3721] * Add `opam show --all-versions ` displays information of all versions of the given package. It can be used in combination of field filter. [#3867 @rjbou - fix #2980] * Add `opam show --sort ` display on stdout a sorted opam file: all fields are alphabetically sorted. [#3866 @rjbou - fix ocaml/opam2web#173] * opam show better error handling. [#4118 @rjbou - fix #3875] * `opam show --field` are no longer required to end with a colon. [#3931 @rjbou] * (*) `opam show --normalise` disable terminal width wrapping. [#3868 @rjbou - fix #3751] * `opam env --check` permit to indicates if an opam environment is synchronized: returns 0 if up-to-date, 1 otherwise. [#4074 @rjbou - fix #3725] * Add `opam switch export --freeze` to record VCS commit hash when a VCS url is specified. [#4055 @hannesm] * Add `opam switch export --full` option, include extra-files in switch export, on import create an overlay directory with the file contents. [#4040 @hannesm] * Optimize repository loading: we store the repository contents as .tar.gz files in ~/.opam/repo instead. [#3752 @AltGr - fix #3721] * Handle failure or interruption of tar during `opam update`. [#3861 @AltGr] * Fallback in case repository archive doesn't exist. [#4008 @rjbou] * In case repository archive is corrupted, delete it and ask to launch an update. [#4075 @rjbou - fix #4053] * When adding a repository, an error is displayed in case of mismatching urls, now both urls are displayed. [#4086 @rjbou - fix #4085] * Handle url backend change to VCS of a package from repository. [#4007 @rjbou - fix #3991] * Allow local compiler switch creation. [#3720 @rjbou - fix #3713] * Switch creation, fix multiple compiler candidate. [#3884 @rjbou - fix #3874] * Make reinstall handling stricter. [#3907 @AltGr] * (*) `opam list --resolve`: restrain test dependencies to direct one instead of listing all test dependencies of queried package(s) [#3923 @rjbou - fix ocaml/opam-depext#121] * Update pin-depends confirmation message to add a skip option. [#3852 @rjbou - fix #3840] * Add OPAMDROPWORKINGDIR environment variable for C. [#3792 @rjbou - fix #3727] * Don't restrain copy to versioned file. [#3759 @rjbou] * Don't fetch sources when working-dir is set. [#4046 @rjbou] * Update in place source copy: [#3948 @rjbou] - review `sync_dirty` on VCS: - use VCS to synchronize, then rsync & remove others files - exclude `_build`, `_opam` & VCS directories - when `--inplace-build` is given, it does a dirty synchronization of the sources, in order to keep tracking package stats (clean, local or dirty). * Fix `working-dir` messages on update command. [#3824 @rjbou] * Working-dir fixes. [#3982 @rjbou] * Update download errors handling during actions processing. [#3811 @AltGr] * Update `ftp` command, to pass url last. [#3910 @hannesm] * Terminate (with double dashes) list of command-line download option. [#3913 @cfcs] * Repository: remove 'file://' prefix for darcs. [#3761 @rjbou] * Opam{Git,Hg}: Fix diffs in presence of binary file. [#3879 @kit-ty-kate] * Set core.autocrlf and core.eol for Git remotes. [#3882 @dra27] * Add a git clean on `reset_tree` to keep source dir clean. [#3948 @rjbou] * Lint W62: Add a lint check for SPDX license. [#3976 @AltGr] * Lint: add result in json output. [#3848 @rjbou - fix #3046] * Add lint codes in manpage. [#3903 @rjbou] * Default configuration file: add `getconf` to required tools. [#3813 @rjbou] * Clarify message in `opam init --yes`. [#3892 @dra27] * Shell setup: don't advice an infinite sourcing loop. [#3832 @rjbou] * Default configuration file: Add compilation target globals, `sys-ocaml-arch, `sys-ocaml-cc`, and `sys-ocaml-libc`. [#3900 @dra27] * Ensure that environment is initialized lazily, not before init functions are called [#4111 @gasche] * Fix OPAMLOGS handling, and logdir `opam_init` argument [#4117 @rjbou - fix #4076] * Include base packages configuration variables in opam config report. [#3798 @dra27] * Determine jobs number at launch (`OpamStateConfig`) [#4004 @rjbou - fix #3986] * Fully test native Windows in the testsuite. [#3260 @dra27] * Allow native Windows to use Cygwin tool. [#3348 @dra27] * Deal with Windows path conventions (backslashes, .exe, etc.) [#3350 @dra27] * Correct display of dir separator on Windows. [#3893 @dra27] * Tested wrong variable in OPAMW_HasGlyp. [#3898 @dra27] * Default use `fetch` on FreeBSD, `ftp` on OpenBSD. [#3904 @hannesm] * Don't overwrite user's sandbow script modification. [#4020 #4092 @rjbou] * Handle `CCACHE_DIR` environment variable in sandbox script. [#4087 @rjbou - fix #4079] * Follow links of `~/.cache` & `~/.cache/dune` for bwrap call. [#4087 @rjbou - fix #4086] * On MacOS sandbox script, always read write mount `/tmp` [#3742 @rjbou - fix ocaml/opam-repository#13339] * Environment file right handling for empty switch. [#3899 @dra27] * Add colon for fish MANPATH fix. [#4084 @rjbou - fix #4078] * Update zsh check interactive terminal [#4095 @OCamlPro-mattiasdrp #4128 @AltGr] * Add package selection to `opam admin add-hashes` [#3787 @rjbou - fix #3767] * Download files (patches, etc.) using a safe filename. [#3900 @dra27] * `opam admin --add-constraints`, add constraint on depopts. [#4002 @rjbou - fix #3994] * Add `format-version` field to all opam files. [#3478 @AltGr] [#3906 @AltGr] * Clarify pin depend parse error. [#3762 @rjbou] * Opam file extensions (`x-` fields) enhancement. [#4049 @hannesm] * Add support for Z3 as a solver backend. [#3845 @AltGr] * Interleave download actions with build/install actions. [#3777 @Armael] [#4083 @rjbou - fix #4080] * Generalization of the job scheduler: provide separate job pools for different subsets of the tasks. [#3778 @AltGr] * Refactor the return types of `OpamSolution.{apply,resolve_and_apply}` [#3781 @Armael] * Use the scheduler pools to respect the download-jobs parameter. [#3791 @AltGr] * Set the right opam file `format-version` field on upgrade. [#4014 @rjbou] * Streamline the output from download action. [#3794 @AltGr] * Use a character that displays better on terminals for download action. [ #3802 @AltGr] * Change symbol for download action. [#3862 @AltGr] * Include the version number in "compilation failed" message. [#4052 @Armael] * Propagate `--force` remove option to directory tracking revert function. [#4094 @rjbou - fix #4091] * Add `OpamDirTack.string_of_changes` [#4107 @rjbou @hannesm] * Introduce state `drop` function to replace `ignore (unlock ..)` for more lock-type-safety. [#3783 @gasche - #3812 @rjbou] * Change `OpamStateTypes.switch_state.conf_files `from package_map` to `name_map` [#3799 @dra27] * Fix handling of availability outside of switches. [#3864 @AltGr] * Sorting formulas function. [#3945 @rjbou] * Sort formula: fix `compare_formula` & add `compare` [#3960 @rjbou] * Patch rewrite test. [#3456 @dra27] * Command errors display: differentiate command not found & permission denied. [#3865 @rjbou] * Factorize option functions in `OpamProcess` [#4016 @nobrakal] * Use ocaml code for looking up commands in `PATH` [#4072 @Armael] * Copy files using OCaml code instead of calling to cp or install [#4064 @Armael] * Sort & clean pkg:depend. [#4060 @rjbou - fix #4057] * Add `of_json` functions & crowbar. [#3776 @gasche] * JSON (de)serialization for OpamParallel graph. [#3786 @gasche] * Url: catch failure & specific exception. [#3946 @rjbou] * Update: don't update installed dev package that is not pinned. [#3947 @rjbou] * Use `OpamArg` helpers for option. [#4059 @rjbou] * Steps towards sudo-enabled make install. [#3522 @dra27] * Port build system to Dune (1.2) [#3618 @dra27] * Update shell/msvs-detect to 0.4.0. [#3869 @dra27] * Sort out repository script mode. [#3963 @dra27] * Preliminary support for Dune 2.0. [#3965 @dra27] * Update mccs.1.1+11 [#4109 #4146 @MisterDA] * Fix developer mode option. [#3646 @rjbou] * Ensure configure generates consistently. [#3935 @dra27] * Documentation [#3542 @0xflotus] [#3571 @hannesm] [#3780 @gasche] [#3944 @tchajed] [#3955 @nbraud] [#4106 @vp2177] [#3863 @dra27] [#3554 @rjbou - fix #3540 #2255c #3612 #3606c] [#4058 @rjbou] [#4114 @rjbou @AltGr] 2.0.7: * opam exec: display command not found message. [#4133 @rjbou - fix #4131] * Escape Windows paths on manpages. [#4129 @AltGr @rjbou - fix #4100] * Fix opam installer opam file. [#4058 @rjbou] * Fix various warnings. [#4132 @rjbou @AltGr - fix #4100] 2.0.6: * Do not fail if `$HOME/.ccache` is missing. [#3957 @mseri - fix https://discuss.ocaml.org/t/dune-1-11-1-compilation-failed/4248] * Add dune cache as rw. [#4019 @rjbou - fix #4012] * Check both size and mtime for dirtrack cached entries. [#4038 @hannesm] * Build man pages with dune. [#3937 @AltGr @dra27] * make cold: fail if patch or bunzip2 missing. [#4006 @rjbou - fix #3842] * Documentation [#3999 @maroneze] 2.0.5: * `opam lint --check-upstream` enables lint checks on archive urls. This option lead to download archives to check their checksum. [#3758 @rjbou] * Lint W59: No url checksum given (if `check-upstream` enabled). [#3758 @rjbou] * Lint E60: Unavailable archive or checksum mismatching (if `check-upstream` enabled). [#3758 @rjbou] * Lint E61: Out-of-scope `with-test` variable in `run-test:` field. [#3763 @rjbou - fix AltGr/Camelus/issues/27] * Lint W58: Restrain warning to filters. [#3871 @rjbou - fix ocaml/opam-repository#14280 (comment)] * Lint E61: Restrain to `run-test:`. [#3860 @rjbou] * Read jobs variable from `OpamStateConfig` [#3881 @dra27] * Fix cppo detection. [#3915 @rjbou] * Documentation [#3809#3891 @dra27] 2.0.4: * Remove mismatching extra-files: sort list before comparing them. [#3744 @rjbou] * Update source of (version) pinned directory. [#3726 @rjbou - fix #3651] * Fix `--ignore-pin-depends` with autopin. [#3736 @AltGr] * Fix pin not installing/upgrading already pinned package. [#3800 @AltGr] * Fix hg opam1.2 url parsing. [#3754 @rjbou] * Use `git -c diff.noprefix=false diff`. [#3788/#3628 @Blaisorblade - fix #3627] * Lint W47: Update warning message. [#3753 @rjbou - fix #3738] * Harmonization of `opam config list` and `opam config var `: resolve variable first with switch state (loading it only for package defined variables), otherwise, global state. [#3723 @rjbou - fix #3717] * Considering the possibility that TMPDIR is unset. [#3597 @herbelin - fix #3576] * Unconditionally display MANPATH when fish version is 2.7 or late. [#3728 @gregory-nisbet] * Fix precise tracking mode: missing `to_hex` conversion. [#3796 @rjbou] * Catch signal to select ones that are really cancelling a blocking state (e.g. waiting for a lock to be released). [#3541 @rjbou] * `opam clean`: ignore errors trying to remove directories. [#3732 @kit-ty-kate] * Documentation [#3731 @MisterDA] 2.0.3: * On init, retrieve `root is ok` from global options instead of initialization. [#3704 @rjbou - fix #3695] * Regenerate missing environment file. [#3691 @rjbou - fix #3690 #3594] * Documentation [#3703 @rjbou - fix #3700] 2.0.2: * Check consistency with opam file when reading lock file to suggest regeneration message [#3680 @rjbou - fix #3654] * Remove pin depends messages. [#3679 @rjbou] * Upgrade pin depends on pinning. [#3684 @rjbou - fix #3508] * To avoid lint warning 57 (description error) on 1.2 opam file pinning, add auxiliary files (descr, url) before linting. [#3687 @rjbou] * Don't check hash with --no-checksum on pull_upstream. [#3658 @rjbou - fix #3652] * Lint E52: Fix `light_uninstall` flag. [#3631 @rjbou - fix #3625] * On init, don't fail if empty compiler given. [#3633 @rjbou - fix #3614] * Sandbox: make `/var` read-only instead of empty and rw. [#3605 @bobot - fix #3604] * Handle symlinks in bwrap sandbox. [#3661 @mroch - fix #3660] * Sandbox: Change one-line conditional to `if` statement which was incompatible with `set -e`. [#3645 @rjbou - fix #3607] * Release use of unix sockets on MacOS. [#3663 @silene - fix #3659] * Fix closure computation in the presence of cycle. [#3670 @AltGr - fix #3662 #3666] * Fix some cases of listing coinstallable package. [#3689 @AltGr] * Extract archived source files of version-pinned packages. [#3610 @rjbou - fix #3600] * Add function to upgrade opam file, including its auxiliary files: descr, url, files/. [#3624 @rjbou] * Set `.out` suffix for `read_command_output` stdout file. [#3644 @rjbou] {2.0.2} * Default opam root is resolved at creation, in order to have the correct linked path. [#3681 @rjbou - fix #3622] * Reinsert and deprecate `alias-of` & `no-autoinstall` option. [#3685 @rjbou - fix #3390] * Updates for OCaml 4.07. [#3474 @dra27] * Documentation [#3656 @rjbou - fix #3634 #3653 #3639] [#3685 @rjbou - fix #3390] 2.0.1: * Add `opam list --silent` to not write in the output, exit with return code 0 if the list is not empty, 1 otherwise. [#3533 @rjbou - fix #3525] * Fix `opam list --external` [#3558 @rjbou - fix #3557 ocaml/opam-repository#12677] * Show command with local opam file returns local file information. Fixes also the non 1.2 conversion to 2.0 format of local files with `opam show --raw`. [#3536 @rjbou - fix #3423] * Show command display string fields printed with quotes, as lists. [#3368 @rjbou - fix #3365] * Pin edit: fix editing an opam file without a name field. [#3535 @rjbou] * Don't execute validation hook if update is empty. [#3490 @hannesm] * Git: fallback, fetch all repository remotes to get SHA1 with git < 2.1. [#3561 @rjbou - fix #3523 #3548] * Lint E57: A description or a synopsis must be present and non empty. [#3581 @rjbou - fix ocaml/opam-repository#12729] * Lint W58: Advise to use `with-test` and `with-doc` variables if `test` and `doc` are present. [#3591 @rjbou - fix #3580 ocaml/opam-repository#12729] * Add `gtar` as OpenBSD required tool, as tar does not support the `J` flag. [#3538 @adamsteen] * Hash: fallback to internal library in case of openssl error. [#3543 @rjbou - fix ocaml/opam-repository#12613] * Respect user's TMPDIR when invoking bwrap sandbox. [#3487 @3noch] * Add a way to mount unusual path in bwrap sandbox: introduction of `OPAM_USER_PATH_RO` environment variable. [#3540 @ErwanGa] * opam admin: handle non http backend on repository upgrade: compute hash only for http or distant rsync backend [#3596 @rjbou - fix #3590] * Upgrade to opam 2.0 format overlay opam files of pinned package. [#3528 @rjbou - fix #3513] * Add compiler file translation to opam 2.0 format function. [#3530 @rjbou - fix ocaml/opam-repository#12523] * Tar extract fail error message: if a tar extract fails, it checks the presence of underlying commands (bzip2, xz, lzma, gzip) to display the error message in verbose mode. [#3502 @rjbou - fix #3497] * Remove link files only if it exists. [#3519 @rjbou - fix ocaml/opam-depext#104] * Remove GNUism from bootstrap-ocaml.sh [#3481 @dra27 - fix #3480] * Avoid sed -i, a GNU sed extension, use mv instead [#3603 @hannesm] * Add patch & bunzip2 check in configure. [#3531 @rjbou - fix #3520] * Not having wget or curl is now only a hard-error if src_ext/archives doesn't contain the archives (i.e. if make -C src_ext cache-archives has not been run) which means that this should no longer be a requirement for building with the "full" tarball. [#3572 @dra27 - fix #3551] * C++ test for MCCS is now moved to the correct place and the message as to whether the solver will be build should work correctly with --disable-checks. Note that not having a C++ compiler is not considered an error if --disable-checks is specified because configure is permitted to believe that the MCCS library exists even if it couldn't detect it. [#3572 @dra27] 2.0.0 * Fixes and documentation * Add `opam admin add-hashes` helper to add more secure hashes to the repository 2.0.0~rc3 * Fixes * Added subcommand `switch link` to link a local switch to a defined one * Added option `--assume-built` to install an already built pinned package * Better Windows support * Obsolete `opam config setup` option 2.0.0~rc2 * Fixes * Much faster CUDF universe loading * Much faster `opam env` and similar commands * Added `opam admin check` for integrity checks on package repositories * Added the ability to setup scripts on `opam init` from `.opamrc` * Setup wrappers to sandbox builds by default, based on `bubblewrap` on Linux and `sandbox-exec` on MacOS * Windows support for many aspects including parallel processes, environment variables setup, color console and utf8 (using specific C stubs) * Better detection of the running shell * Added shell helpers to automatically sync the environment on every prompt * Support for selecting different backends if compiled in the `ocaml-mccs` solver lib 2.0.0~rc * Fixes * Support compiling on OCaml 4.06.0 * `opam env` and `opam exec` no longer set the `OPAMROOT` or `OPAMSWITCH` variables * Allow in-source package metadata to be gathered in an `opam/` directory 2.0.0~beta6 * Small UI fixes * Fixed a rare case of looping while processing actions 2.0.0~beta5 * Added timeout support to the solvers (default 1min) * Added `--unlock-base` to allow changing the compiler of a switch * Added the `{post}` dependency flag for packages to be installed together, but in no specific order. Use it for `base-*` packages. * Fixed issue with OCaml 4.05.0 and installed programs not found (`Unix.execvpe` behaviour changes, https://caml.inria.fr/mantis/view.php?id=7640) * Added a `pin-depends` field for easier development project dependency management and sharing * Some optimisations to repository loading * Fixed --best-effort with the built-in solver * Shorten conflict messages even more * Added `opam admin add-constraint` to amend a set of reverse dependencies in a repository * New format for `depexts:`, easier to understand and more flexible. Depexts for the host can now be inferred by opam * Optimised search criteria for the built-in solver * Added a `build-id` variable to identify package builds * Extend hooks (new variable `installed-files`, new session hooks) * `opam switch create DIR` now installs packages defined in `DIR` * Added system-related variables `arch`, `os`, `os-distribution`, `os-family`, `os-version` * Added support for using `opam.locked` files instead of `opam` ones (`--locked`) * Opam plugins are now made available across switches 2.0.0~beta4 * Building with OCaml < 4.02.3 is no longer supported * Support compilation with a built-in mccs solver (removing run-time dependency to aspcud). Integrated half-working "heuristics" dropped. * Remove jsonm and transitive uutf dependency. * Switch build systems to `jbuilder`, including `lib-ext` support * Allow repeated and or'd arguments to the `list` command * Many code and build system portability fixes (Windows, BSD) * Add `switch export --full` to include package definitions * Add `announce:` and `stamp:` fields to repositories (`repo` files) * Add a global cache of git objects (greatly speeding up multiple cloning) * Allow `opam pin URL` without a package name * Many error handling, messages and corner case fixes * Updated the versions of dependencies * Removed the unused `features:` field, and proposal for a new syntax * More informative exit codes, and documentation thereof 2.0.0~beta3 * (*) Renamed `--soft-request` to `--best-effort` * Fixed and improved speed of the package file tracking mechanism * Added `--ignore-constraints-on` to temporarily bypass version constraints on some dependencies * Fields `build-test:`, `build-doc:` are now deprecated, in favor of specifying conditions on the `with-test` and `with-doc` variables within the `build:` field, and of the new `run-test:` field * (*) The command-line options have been renamed accordingly to `--with-test` and `--with-doc` * Removed the `opam build` command * Allow directories in place of package specifications for the `install`, `remove`, `upgrade`, `reinstall` and `show` commands. `opam` files can also be specified for `install` and `show` * On local switch creation, check for package definitions and choose a compatible compiler if possible * Add `opam install|remove --destdir` to copy the package's installed files somewhere else * Allow `opam init --config=URL` 2.0~beta2 * Fixes (mainly to `opam build`) * Faster coinstallability check 2.0~beta * New, by-hash package archive caching system * Simpler HTTP repository update * Allow specification of multiple checksums per file * Add `opam reinstall --pending`, to handle reinstallations of changed packages * Support for defining trust anchors and repository validation hooks (for use with Conex) * (*) Added `opam install --working-dir`, removed "mixed mode" for pinned packages * Added `opam install --soft-request`, a non-failing "do what can be done" install mode * Simplified, better conflict messages * Added `opam list --coinstallable-with PKG` * Added command `opam clean` * Added `opam upgrade --all PKGS`, to do a full upgrade while guaranteeing `PKGS` are kept installed * Allow `&` in conflict version constraints, e.g. `conflicts: "foo" {>= "3" & < "4"}` * Added an `opam admin` command, with various, better organised repository admin commands, and remove the `opam-admin` tool * Added an `opam build` command, to handle `opam` files found in the current directory * Internally upgrade repositories in 1.2 format automatically to 2.0 (on `init`, `update` or `repo add`) 2.0~alpha5 * Merge stdout and stderr of child processes by default * Fixed regression on solver call times * Added a few shorter command aliases: `opam var` `opam exec`, `opam env` for the corresponding `opam config` commands * (*) Simplified `opam repo` to only use `add` and `remove` in normal use, always meaning the current switch (only) if not specified otherwise * (*) Restrict package names and versions to a reasonable character set * Added support for SHA256 and SHA512 checksums * Separated the opam format lexer/parser/printers into a separate `opam-file-format` library * Reporting on package definition file errors only when the file will be used, and on by default (rather than all-off by default, and optionally all-on) * `opam lint` now accept multiple input files * `opam pin` interface yet improved, allow pinning all at once when a source directory contains multiple packages. `opam unpin ` now allowed to cancel `opam pin ` * Updated version of the dose lib dependency * (*) All patch files used in package definitions are now assumed to apply with `-p1`. 2.0~alpha4 * Added pre and post hooks for package command sections; allowed per-switch configuration * Re-packaged the libraries and opam into 7 individual packages * Convert opam 1.2 files on the fly when pinning * `opam list` can now match patterns on versions * Allow switches to be created below arbitrary directories using `opam switch create `. Automatically select a switch found in `$PWD` * Add `install --reuse-build-dir` to be used together with `--keep-build-dir` and allow incremental recompilations * Add `install --inplace-build` to build locally pinned packages directly in their source directory 2.0~alpha3 * (*) Refactored 'opam switch' command, creation of new switches no longer implicit * (*) Allow per-switch selection of repositories * Better update of the environment variables across switches or opam roots * Add `opam install --restore` to recover packages that got removed due to errors or interruptions * Added `synopsis:` and `description:` fields to integrate package descriptions in a single package definition file * Removed the clever hack to skip downloads when uninstalling packages with `ocamlfind remove`; this now needs to be explicit through the `light-uninstall` flag. * Provide `opam admin upgrade-format` to migrate package repositories to the new format, and create the proper OCaml compiler package wrappers * Allow initialisation parameters from a .opamrc file, possibly completely overriding OCaml and opam.ocaml.org repository defaults 2.0~alpha2 * Extended the `opam lint` command-line options (package descriptions from opam metadata, warnings selection) * Allow to create a new switch with `opam switch import` * (*) Rewritten, much more flexible `opam list` command, with composable filters and output selection * Delay the removals of packages as much as possible, avoiding most cases of mass uninstalled packages after a build failure * Use a specific `opam` user-agent for downloads * Remove globalisation of compiler package variables and support for `available:` constraints depending on those. Rewrite the repository accordingly to use explicit dependencies towards the compiler version. 2.0~alpha * Changed license to LGPL 2.1 with linking exception, like OCaml (#2573) * Track files installed by packages for cleaner removal and listing, add `opam search --owns-file` (#502, #1215) *this requires packages to properly separate build and install*, or unrelated files could get removed on package uninstall. * Allow command wrappers around package build/install/remove commands to be defined in `~/.opam/config`; include sample Linux wrappers to restrict process permissions (e.g. ensure `build:` doesn't install) * (*) Reworked `opam show`, with more fields and the ability to select raw fields from the opam file (#2122) * Dropped ability to compile opam with OCaml earlier than 4.01.0 * Version constraints in `depopts:` allowed again, but with consistent semantics * Allow mixing filters within dependency constraints * More flexible `opam pin` command interface * New internal file-lock handling, less obtrusive and safer * New `switch export` format, now including local (pinned) package definitions * No longer uses insecure arguments of curl/wget (#55, #2006, #2460) * Installed package source and metadata are now handled per-switch, which is more reliable * `opam pin edit` now allows changing version and even URL; better editor handling * Discarded built-in variables based on polling OCaml (they are now defined by the compiler package at installation) * Discarded compiler files, `opam switch` now based on packages with the `compiler` flag set * Extended package configuration files * Allow initialised opam without switch, initialised switch without compiler. Better handling of compiler install failure * (*) Large API rework, switch and repository state now handled separately, used in functional style and avoiding many loads * Git submodules are now automatically fetched by the git backend * (*) Package definition files now prioritize `&` higher than `|`, like is most common * (*) `opam list -a` now lists all available packages, even if they can't be installed (missing depends...), which is much faster (#2370) * Added ability to reprint files with reduced diffs (#2363) * Url and description can now be included within a single package definition `opam` file (#2328) * Internal switch state now all below `/.opam-switch/`, state in a single `switch-state` file (#2340) * Add a `setenv:` field to package definitions, allowing to export environment variables (#2337, #2361) * Built-in support for alternative solver `mccs` (#2333) * `opam upgrade pkg` now prompts to install `pkg` if absent (#2327) * (*) Assume plugin package and exec names start with "opam-" (#2316, #2317) * Reworked, cleaner and bidirectional file manipulation library (kind of lenses) (#2325) * Allow packages to specify extra remote overlay files within their definition files * Heuristic to detect bad solutions and print a hint when no solver is available * (*) Proper URL handling with version-control + transport handling (e.g. `git+https://`) * Allow unescaped strings enclosed between `"""` markers in package definition files * Don't rely on '.zip' extension for downloaded archive handling (#2289) * `opam config` extended with `set`, `unset`, `expand` subcommands, allows variables in `exec` argument (#2268) * `conflict:` field is now handled as a disjunction in all regards (#2267) * Better handling of concurrent removal/build/install actions (#2161, #2266, #2370) * Allow fields `x-fieldname` in package definition files, for use by external tools (#2265) * Extended, more useful JSON output (including full package failure logs) (#2236) * Use the switch paths that are defined in the switch configuration file (#2185) * Allow package definition files to reference the package's own variables through "%{_:varname}%" (#2184) * Initialise number of jobs from host's number of processors (#2180) 1.2.2 * Fixed wrong locks being taken during `switch reinstall` (#2051) * Fixed `config report` that wasn't displaying the external solver (#2059) * Follow glibc standard on detecting an UTF8 locale (#2065) * Fixed issues with fish shell init scripts (#2063) * Restored printing of commands with `--verbose` and `--dry-run` * More concise printing of conflicts, with accurate version numbers * Small improvements to the causes of actions * Fixed issue causing the state cache not to be used on some OSes (OSX) (#2077) * Added numbers to lint checks, and some new checks * Restored the handling of a simple path to an `aspcud`-compatible executable in variable OPAMEXTERNALSOLVER (#2085) * Added package universe output to new PEF format for diagnostics * Prioritise newer versions even when the latest can't be installed (#2109) * Automatically install plugins on `opam plugin-name` (#2092) * Fixed a fd leak on solver calls (#2134) * Accept opam files with errors when no debug or strict options are set, for easier format updates * Add `opam list --resolve` to get dependencies as a consistent set of packages * Provide the expected checksum to download commands * Changed return code of `opam list` when no patterns are supplied and the list is empty 1.2.1 * Non-system compiler definitions without source are now allowed * Better handling of compiler "base" packages allows one to move build instructions from compiler definitions to packages * Rewritten action resolution mechanism to be based on atomic actions. Actions are not aborted anymore on first failure when there is no inter-dependency * Rewritten parallel command execution engine * Better display of actions, lots of improved messages * `opam upgrade pkg` now fails if no new version of `pkg` can be installed * fixed shell configuration for various shells * Updated Dose dependency to 3.3 * Fixed behaviour of `opam switch` and related commands when a switch is locally set in a shell (through `OPAMSWITCH`) * Better behaviour on failed `opam switch` * New pinning mode: when pinning using version-control on a local path and without a branch specified, use current file tree, but limited to version-tracked files * Faster and cleaner handling of downloads * Now compiles with --safe-string on OCaml 4.02, better compatibility handling * `opam unpin` now accepts multiple arguments * `opam pin add . ` is now allowed to specify the advertised version * Fixed bug leading to a bad `CAML_LD_LIBRARY_PATH` when switching from system * Better `opam lint`, reporting warnings and errors, including format errors * `opam config setup` now takes `--shell=` instead of `--sh`, `--csh`, `--fish`, `--zsh` * Provisional feature: dependency flag `dev` is accepted (but does nothing) * Provisional feature: field `features` in opam files implemented (beta), not for use in production * Better definition of the `filter` language within opam files: propagates undefined values, bool-to-string converter syntax * Provisional feature: `verbose` may be specified in package flags * OPAM git-like plugins (commands of the form opam-xxx) are now searched in the correct OPAM path * ~/.opam/config doesn't refer to OPAM's patch-version anymore, to allow downgrading * Recognise .opam files and directories when pinning a package to source * Cleaned up debug and verbose messages, allow more control (`-v` can now be repeated) * Pinning URL can now be explicit in the form `VC+URL`, e.g. `git+ssh://`, `hg+https://`... * New flexible way to specify download and solver commands in `~/.opam/config` or in variables `OPAMFETCH` and `OPAMEXTERNALSOLVER` * Lots of bug-fixes 1.2.0 * Handle locally installed self-upgrade opam binary (#1257) * Added `opam list --depends-on` to show reverse dependencies (#693) * More consistent checks on user-specified packages (#1241) * Handle version constraints from the command line (`package>=version`) (#380) * Output clear and concise messages on non solvable requests (#595, #1238) * Much better internal parser. File locations in error messages (#1260, #1222) * Removed dependency on camlp4 (#917) * Fixed orphan packages handling (installed packages with no upstream) (#1198) * Solver: optimize default preferences, depending on the solver version. New --criteria option (#1208) * Better PATH modifications handling, add 'opam config env --inplace-path' (#1189, #1749) * Specify variable overrides with environment OPAMVAR_name (#1153) * Much better overall failsafe behaviour. Error reports on interruption (#1202, #1125, #1188...) * Better action processing, with downloads first (#984) * Much improved and faster interface with the Cudf solver (#1185, #1179) * Ask the user to confirm actions whenever non-trivial (#1165) * Added option --show-actions, made --dry-run simulate actions (#1142) * Now prints meaningful causes explaining the actions (#1174) * Fixed the stats displayed after update (#1161) * Added variables to query ocaml native tools and arch (#979) * Enable packagers to specify mirrors in url files (#807) * Cleaned up the command-line interface (#1250, #1170, #1472). Incompatible changes: - 'opam config exec': takes command args directly rather than as a string (use -- for command arguments) - 'opam switch import|export': now have a mandatory FILE argument. '-f' no longer accepted. - 'opam pin' now takes a subcommand 'add', 'remove', 'list' or 'edit'. - 'opam config -env': no longer accepted for 'opam config env' - '--no-aspcud' is now '--use-internal-solver'. - Removed unused `opam config -I`, `opam config {asm,byte}{comp,link}` - '-r' isn't accepted anymore for '--root' * Much extended pinning features, with the ability to use opam files from the source, pin packages that don't exist in a repository, fill a local opam file from a template, etc. * Improved the internal solver to handle much larger problems (#1358) * Use Unix.lockf for more reliable internal repository locks (#1299) * Large performance improvements (#1363) * Upgraded external dependencies to dose 3.2.2, ocamlgraph 1.8.5, cmdliner 0.9.4, cudf 0.7 * Switch export file now include pinning data. Pinned package restored through 'opam switch import' (#1393) * Meaningful messages explaining why packages aren't available (#1419, #1398) * More informative 'opam config list', more complete 'opam config var' * Added 'opam config cudf-universe' for use in external tools * opam files: added a 'dev-repo' field, and the experimental 'flags' field (#1217, #1472) * Generate an opam-admin.top to easily apply scripts on a package repository (#1454). Provide scripts to ease adding new metadata ('dev-repo', etc.) * Added 'opam upgrade --fixup' to save the day if your installed package set gets inconsistent. * Fixed some return codes * Added option to query (recursive) (reverse) dependencies and external dependencies to 'opam list * Fixed opam init for some shells * OPAM search now includes the 'syntax' and 'libs' fields in the search, as well as 'findlib' files * 'opam source' command to get the package archive or upstream source easily * Added an 'install' field in opam files, to separate from build * Added the 'build', 'test' and 'doc' dependency flags to limit the scope of some dependencies * Added Check for common dependencies at init time * Pinning to a local git directory pins as path, but advertises pinning as git will now automatically select the pin kind to 'git' (#1555) * Fixed init scripts for fish and csh (#952) * More reliable and faster usage of git branches in the git backend * Friendlier env variable handling (true/1/yes or false/0/no/"" for true and false) (#1608) * Specify what is not rather than 'already up-to-date' when some packages couldn't be upgradedd (#1645) * Override Make variables in sub-processes (#1617) * 'opam update' no longer needed after 'opam repo add' * Attempt to read files in 'permissive mode' when they claim a newer OPAM version (#1662) * Fixed ignore of SIGPIPE in sub-processes (#1681) * New shell completion scripts * Added 'opam lint' to perform checks on opam files * Use the published version of jsonm rather than include it (#1574) * Changed findlib package name from 'opam' to 'opam-lib' * Hundreds of smaller fixes and UI improvements 1.1.2 * Rewritten, more compatible build system based on Makefiles (#1362, #1424) 1.1.1 * Fix `opam-admin make -r` (#990) * Explicitly prettyprint list of lists, to fix `opam-admin depexts` (#997) * Tell the user which fields is invalid in a configuration file (#1016) * Add `OpamSolver.empty_universe` for flexible universe instantiation (#1033) * Add `OpamFormula.eval_relop` and `OpamFormula.check_relop` (#1042) * Change `OpamCompiler.compare` to match `Pervasives.compare` (#1042) * Add `OpamCompiler.eval_relop` (#1042) * Add `OpamPackage.Name.compare` (#1046) * Add types `version_constraint` and `version_formula` to `OpamFormula` (#1046) * Clearer command aliases. Made `info` an alias for `show` and added the alias `uninstall` (#944) * Fixed `opam init --root=` (#1047) * Display OS constraints in `opam info` (#1052) * Add a new 'opam-installer' script to make `.install` files usable outside of opam (#1026) * Add a `--resolve` option to `opam-admin make` that builds just the archives you need for a specific installation (#1031) * Fixed handling of spaces in filenames in internal files (#1014) * Replace calls to `which` by a more portable call (#1061) * Fixed generation of the init scripts in some cases (#1011) * Better reports on package patch errors (#987, #988) * More accurate warnings for unknown package dependencies (#1079) * Added `opam config report` to help with bug reports (#1034) * Do not reinstall dev packages with `opam upgrade ` (#1001) * Be more careful with `opam init` to a non-empty root directory (#974) * Cleanup build-dir after successful compiler installation to save on space (#1006) * Improved OSX compatibility in the external solver tools (#1074) * Fixed messages printed on update that were plain wrong (#1030) * Improved detection of meaningful changes from upstream packages to trigger recompilation 1.1.0 [Oct 2013] * Fix update of dev packages (#962) * Add support for zip source archives (#958) * Add `OPAMCURL` environment variable to control invocation of curl (#960) * Ensure repository redirects only happen for http remotes (#955) * Turn malformed package files into warnings instead of hard errors (#957) * Improve robustness of pinned package update (#949) * Finish conversion of default repository to (#948) * Fix regression in handling archives with no extension (treat them as tar again) (#972) * Fixed stale archives causing packages to be marked as NEW when they weren't (#945) 1.1.0RC1 [Oct 2013] * Add `make cold` target to build OPAM without a system OCaml installed (#910) * More informative error messages from `curl` (#905) * Document use of `OPAMCOLOR` for optional ANSI coloring * Add `opam-admin depexts` utility to rewrite OPAM files with external dependencies * Added `repo` files for repository meta-information * Added support for repo redirections * Added scripts for automated testing in Travis * Fixed bug in opam-admin that could keep not up-to-date archives * Added an `opam-admin depexts` script to ease handling of external dependencies * Added the `--deps-only` option to `opam install` * Fixed upgrade with corner-cases of orphan packages * Added a `note` display form * Better handling of external solver failures, and added a `--no-aspcud` option * Fixed unpinning of some installed packages * Fixed upgrade of metadata from 1.0 when there are orphan custom compilers 1.1.0-beta [Sept 2013] * Automatic backup before any operation which might alter the list of installed packages * Support for arbitrary sub-directories for metadata repositories * Lots of colors * New option `opam update -u` equivalent to `opam update && opam upgrade --yes` * New `opam-admin` tool, bundling the features of `opam-mk-repo` and `opam-repo-check` + new 'opam-admin stats' tool * New `available`: field in opam files, superseding `ocaml-version` and `os` fields * Package names specified on the command-line are now understood case-insensitively (#705) * Fixed parsing of malformed opam files (#696) * Fixed recompilation of a package when uninstalling its optional dependencies (#692) * Added conditional post-messages support, to help users when a package fails to install for a known reason (#662) * Rewrite the code which updates pin et dev packages to be quicker and more reliable * Add {opam,url,desc,files/} overlay for all packages * `opam config env` now detects the current shell and outputs a sensible default if no override is provided. * Improve `opam pin` stability and start display information about dev revisions * Add a new `man` field in `.install` files * Support hierarchical installation in `.install` files * Add a new `stublibs` field in `.install` files * OPAM works even when the current directory has been deleted * speed-up invocation of `opam config var VARIABLE` when variable is simple (eg. `prefix`, `lib`, ...) * `opam list` now display only the installed packages. Use `opam list -a` to get the previous behavior. * Inverse the depext tag selection (useful for `ocamlot`) * Add a `--sexp` option to `opam config env` to load the configuration under emacs * Purge `~/.opam/log` on each invocation of OPAM * System compiler with versions such as `version+patches` are now handled as if this was simply `version` * New `OpamVCS` functor to generate OPAM backends * More efficient `opam update` * Switch license to LGPL with linking exception * `opam search` now also searches through the tags * minor API chanages for `API.list` and `API.SWITCH.list` * Improve the syntax of filters * Add a `messages` field * Add a `--jobs` command line option and add `%{jobs}%` to be used in OPAM files * Various improvements in the solver heuristics * By default, turn-on checking of certificates for downloaded dependency archives: use `./configure --disable-certificate-check` to go back to the previous behavior * Check the md5sum of downloaded archives when compiling OPAM * Improved `opam info` command (more information, non-zero error code when no patterns match) * Display OS and OPAM version on internal errors to ease error reporting * Fix `opam reinstall` when reinstalling a package which is a dependency of installed packages (regression introduced in 0.9.5) * Export and read `OPAMSWITCH` to be able to call OPAM in different switches * `opam-client` can now be used in a toplevel * `-n` now means `--no-setup` and not `--no-checksums` anymore * Fix support for FreeBSD * Fix installation of local compilers with local paths endings with `.../ocaml/` * Fix the contents of `~/.opam/opam-init/variable.sh` after a switch 1.0.0 [Mar 2013] * Improve the lexer performance (thx to @oandrieu) * Fix various typos (thx to @chaudhuri) * Fix build issue (thx to @avsm) 0.9.6 [Mar 2013] * Fix installation of pinned packages on BSD (thx to @smondet) * Fix configuration for zsh users (thx to @AltGr) * Fix loading of `~/.profile` when using dash (eg. in Debian/Ubuntu) * Fix installation of packages with symbolic links (regression introduced in 0.9.5) 0.9.5 [Mar 2013] * If necessary, apply patches and substitute files before removing a package * Fix `opam remove --keep-build-dir` keeps the folder if a source archive is extracted * Add build and install rules using ocamlbuild to help distro packagers * Support arbitrary level of nested subdirectories in packages repositories * Add `opam config exec "CMD ARG1 ... ARGn" --switch=SWITCH` to execute a command in a subshell * Improve the behaviour of `opam update` wrt. pinned packages * Change the default external solver criteria (only useful if you have aspcud installed on your machine) * Add support for global and user configuration for OPAM (`opam config setup`) * Stop yelling when OPAM is not up-to-date * Update or generate `~/.ocamlinit` when running `opam init` * Fix tests on *BSD (thx Arnaud Degroote) * Fix compilation for the source archive 0.9.4 [Feb 2013] * Disable auto-removal of unused dependencies. This can now be enabled on-demand using `-a` * Fix compilation and basic usage on Cygwin * Fix BSD support (use `type` instead of `which` to detect existing commands) * Add a way to tag external dependencies in OPAM files * Better error messages when trying to upgrade pinned packages * Display `depends` and `depopts` fields in `opam info` * `opam info pkg.version` shows the metadata for this given package version * Add missing `doc` fields in `.install` files * `opam list` now only shows installable packages 0.9.3 [Feb 2013] * Add system compiler constraints in OPAM files * Better error messages in case of conflicts * Cleaner API to install/uninstall packages * On upgrade, OPAM now perform all the remove action first * Use a cache for main storing OPAM metadata: this greatly speed-up OPAM invocations * after an upgrade, propose to reinstall a pinned package only if there were some changes * improvements to the solver heuristics * better error messages on cyclic dependencies 0.9.2 [Jan 2013] * Install all the API files * Fix `opam repo remove repo-name` * speed-up `opam config env` * support for `opam-foo` scripts (which can be called using `opam foo`) * 'opam update pinned-package' works * Fix 'opam-mk-repo -a' * Fix 'opam-mk-repo -i' * clean-up pinned cache dir when a pinned package fails to install 0.9.1 [Jan 2013] * Use ocaml-re 1.2.0 0.9.0 [Jan 2013] * add a new `--fake` option to simulate build and installation of packages. Use this option this care, it can easily corrupt the state of OPAM. * Better messages in case of error * OPAM proposes better solutions to the user * support for installed roots and auto-clean of unused packages * rename `--cores` to `--jobs` * better error messages for wrong argument of 'opam init' * show the root causes of actions done by OPAM * opam import and export now uses -f to specify the filename, and uses stdin and stdout if no filename is specified * Fix environment initialisation for some corner-cases * Add a way to specify how to run tests and build documentation for the packages * Display homepage, authors, doc link, license with 'opam info' * Improve `opam remove` efficiency when using `ocamlfind` command(s) only * Git pinning now works with commits/tags/branches * `opam init` works without preinstalled compiler * Support for DARCS backends * Each global command-line flag `xxx` as can be set using the `OPAMxxx` environment variable instead * Better display of compiler switch (+ read compiler descriptions) * Clearer error message when trying to pin a non-existing package * Fix issue with pinning to version number * Add a `shared` location to be used in OPAM files * Improve (but break) the command-line interface by using cmdliner 0.8.2 [Dec 2012] * Fix an issue with `opam reinstall` where packages were reinstalled in reverse order 0.8.1 [Nov 2012] * Simplify string substitution in OPAM files * Recompile the installed packages when the system compiler is upgraded * Fix various regressions in pinned and dev packages introduced in 0.8.0 0.8.0 [Nov 2012] * Improvements in the solver interface and API * The solver now use an external SAT-solver (aspcud) if found in the path * More expressive constraints in optional dependencies * Clean-up the build directory when build succeeds 0.7.7 [Oct 2012] * Add an `--alias` global command-line argument to overwrite the default alias value * Allow more concurrency between no conflicting opam commands * Upgrade to the latest version of DOSE and CUDF (solver libraries) * Add repository priorities * Create the default directories (`bin/`, `lib/` ...) when installing a new compiler 0.7.6 [Oct 2012] * major internal API refactoring * repositories are now versionned, and we try to auto-update when possible * more expressive compiler constraints in opam files 0.7.5 [Oct 2012] * dependencies can now be expressed by any formula (instead of just CNF) * It's easier to compose the value of environment variable (ie. to write `%{lwt+ssl:enable}%`) * Fix regression on init for rsync repositories 0.7.4 [Oct 2012] * improve `opam pin`: the code is more robust and it is now possible to pin a package to a git repository * add support for patches per package * add `opam switch -import file` and `opam switch -export file` 0.7.3 [Sep 2012] * Better user-message when no solution is found * Improve the minimality of installed packages 0.7.2 [Sep 2012] * Fix regression in init introcuced in 0.7.0 * Fix regression in update introduced in 0.7.0 0.7.1 [Sep 2012] * Remove forgotten debug statement 0.7.0 [Sep 2012] * report upgrade statistic on update * do no ask y/n when installing compiler's base packages * improve opam-mk-repo * fix `opam search` to be caseless * ability to filter some commands (depending on some predicates) in opam file * improvements when packages disappear upstream * check for ocaml 3.12.1 on configure * tell the user to unset some potentially dangerous variables when running opam * fix few git backend issues 0.6.0 [Sep 2012] * semantics changes in `opam switch` * solver improvements in case of install and remove * better error reporting * fix caching of package archives * fix `~/.opam/repo/index` priorities 0.5.0 [Sep 2012] * add opam search * add opam reinstall * ability to upgrade only a subset of packages * lot of bug fixes in the rsync and curl backend * better `--help` messages * better information displayed to the user 0.4.0 [Aug 2012] * better layout of repository files * (partial) possibility to specify archive checksums * if the archive is not on ocamlpro.com, download it upstream * suffix +opam to the versions of archives available on ocamlpro.com * prompt the user to evaluate `opam config -env` more often * changes in meta-data aren't picked up by the CURL backen * more modulare repository system: the 'kind' of repository is no more linked to the kind of package archives 0.3.2 [Aug 2012] * fix regression for `opam switch` introduced in 0.3 * fix deletion of optional dependencies * support for pinned packages * fix compilation for ocaml 4.00 * fix compilation for *BSD 0.3.1 [Jul 2012] * fix regression for `opam install` introduced in 0.3 0.3.0 [Jul 2012] * improve parallel compilation of packages * better recovery on compilation/installation errors * first draft of version pinnig * fix`'opam config -env` for old shells * install the latest version of packages when possible * more robust `opam update` (ie. old files are gc-ed) * add a (more or less) generic way to install and use topfind 0.2.0 [Jul 2012] * more robust switch command * more robust parallel build (not yet activated by default) * support for compiler-constraints in packages * new solver heuristics * improved performance on init with the rsync backend 0.1.0 [Jun 2012] * Initial version opam-2.1.2/CONTRIBUTING.md0000644000650106067230000000100614153703467013547 0ustar glondusedBug reports and feature requests for **the opam tool** should be reported on: * http://github.com/ocaml/opam/issues (please include the output of `opam config report` whenever possible) **Packaging issues** or requests for a new package should be reported on: * http://github.com/ocaml/opam-repository/issues **General queries** can be addressed at: * http://lists.ocaml.org/listinfo/platform (for the both the tool & packages) * http://lists.ocaml.org/listinfo/opam-devel (for the tool and its evolution) opam-2.1.2/LICENSE0000644000650106067230000006451714153703467012343 0ustar glondusedOpam is distributed under the terms of the GNU Lesser General Public License (LGPL) version 2.1 (included below). As a special exception to the GNU Lesser General Public License, you may link, statically or dynamically, a "work that uses opam" with a publicly distributed version of opam to produce an executable file containing portions of opam, and distribute that executable file under terms of your choice, without any of the additional requirements listed in clause 6 of the GNU Lesser General Public License. By "a publicly distributed version of opam", we mean either the unmodified opam as distributed by OCamlPro, or a modified version of the opam that is distributed under the conditions defined in clause 2 of the GNU Lesser General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Lesser General Public License. ---------------------------------------------------------------------- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. one line to give the library's name and an idea of what it does. Copyright (C) year name of author This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. signature of Ty Coon, 1 April 1990 Ty Coon, President of Vice That's all there is to it! -------------------------------------------------- opam-2.1.2/Makefile0000644000650106067230000002202014153703467012755 0ustar glondusedifeq ($(findstring clean,$(MAKECMDGOALS)),) -include Makefile.config endif all: opam opam-installer @ admin: $(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) opam-admin.install DUNE_PROMOTE_ARG = DUNE_PROMOTE_ARG += --promote-install-files ifeq ($(DUNE),) DUNE_EXE = src_ext/dune-local/dune.exe ifeq ($(shell command -v cygpath 2>/dev/null),) DUNE := $(DUNE_EXE) else DUNE := $(shell echo "$(DUNE_EXE)" | cygpath -f - -a) endif else DUNE_EXE= # NB make does not export the PATH update in Makefile.config to $(shell ...) ifeq ($(shell PATH='$(PATH)' $(DUNE) build --root . --help=plain 2>/dev/null \ | grep -F -- '$(DUNE_PROMOTE_ARG) '),) DUNE_PROMOTE_ARG = endif endif OPAMINSTALLER = ./opam-installer$(EXE) ALWAYS: @ DUNE_DEP = $(DUNE_EXE) JBUILDER_ARGS ?= DUNE_ARGS ?= $(JBUILDER_ARGS) DUNE_PROFILE ?= release ifeq ($(DUNE_PROFILE_ARG),release) # TODO Replace with --release when we require dune >= 2.5 DUNE_PROFILE_ARG = --profile=release else DUNE_PROFILE_ARG = --profile=$(DUNE_PROFILE) endif src_ext/dune-local/dune.exe: src_ext/dune-local.stamp $(DUNE_SECONDARY) ifeq ($(DUNE_SECONDARY),) cd src_ext/dune-local && ocaml bootstrap.ml else cd src_ext/dune-local && ( unset OCAMLLIB ; unset CAML_LD_LIBRARY_PATH ; PATH="$(dir $(realpath $(DUNE_SECONDARY))):$$PATH" ../../$(DUNE_SECONDARY) bootstrap.ml ) endif src_ext/dune-local.stamp: $(MAKE) -C src_ext dune-local.stamp dune: $(DUNE_DEP) @$(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) @install opam: $(DUNE_DEP) build-opam processed-opam.install @$(LN_S) -f _build/default/src/client/opamMain.exe $@$(EXE) ifneq ($(MANIFEST_ARCH),) @mkdir -p Opam.Runtime.$(MANIFEST_ARCH) @cp -f src/manifest/Opam.Runtime.$(MANIFEST_ARCH).manifest Opam.Runtime.$(MANIFEST_ARCH)/ @cd Opam.Runtime.$(MANIFEST_ARCH) && $(LN_S) -f ../_build/install/default/bin/Opam.Runtime.$(MANIFEST_ARCH)/libstdc++-6.dll . @cd Opam.Runtime.$(MANIFEST_ARCH) && $(LN_S) -f ../_build/install/default/bin/Opam.Runtime.$(MANIFEST_ARCH)/libwinpthread-1.dll . @cd Opam.Runtime.$(MANIFEST_ARCH) && $(LN_S) -f ../_build/install/default/bin/Opam.Runtime.$(MANIFEST_ARCH)/$(RUNTIME_GCC_S).dll . endif opam-installer: $(DUNE_DEP) build-opam-installer processed-opam-installer.install @$(LN_S) -f _build/default/src/tools/opam_installer.exe $@$(EXE) opam-admin.top: $(DUNE_DEP) $(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) src/tools/opam_admin_topstart.bc $(LN_S) -f _build/default/src/tools/opam_admin_topstart.bc $@$(EXE) lib-ext: $(MAKE) -j -C src_ext lib-ext lib-pkg: $(MAKE) -j -C src_ext lib-pkg download-ext: $(MAKE) -C src_ext cache-archives download-pkg: $(MAKE) -C src_ext archives-pkg clean-ext: $(MAKE) -C src_ext distclean clean: $(MAKE) -C doc $@ rm -f *.install *.env *.err *.info *.out opam$(EXE) opam-admin.top$(EXE) opam-installer$(EXE) rm -rf _build Opam.Runtime.* distclean: clean clean-ext rm -rf autom4te.cache bootstrap rm -f Makefile.config config.log config.status aclocal.m4 rm -f src/*.META src/*/.merlin src/manifest/dune src/manifest/install.inc src/stubs/libacl/dune src/stubs/win32/dune src/stubs/win32/cc64 src/ocaml-flags-configure.sexp src/stubs/libacl/c-libraries.sexp rm -f src/client/linking.sexp src/stubs/c-flags.sexp src/core/developer src/core/version OPAMINSTALLER_FLAGS = --prefix "$(DESTDIR)$(prefix)" OPAMINSTALLER_FLAGS += --mandir "$(DESTDIR)$(mandir)" # With ocamlfind, prefer to install to the standard directory rather # than $(prefix) if there are no overrides ifdef OCAMLFIND ifndef DESTDIR ifneq ($(OCAMLFIND),no) LIBINSTALL_DIR ?= $(shell PATH="$(PATH)" $(OCAMLFIND) printconf destdir) endif endif endif ifneq ($(LIBINSTALL_DIR),) OPAMINSTALLER_FLAGS += --libdir "$(LIBINSTALL_DIR)" --docdir "$(LIBINSTALL_DIR)/../doc" endif opam-devel.install: $(DUNE_DEP) $(DUNE) build $(DUNE_ARGS) -p opam opam.install sed -e "/lib\/opam\/opam/d" -e "s/bin:/libexec:/" opam.install > $@ opam-%.install: $(DUNE_DEP) $(DUNE) build $(DUNE_ARGS) -p opam-$* $@ .PHONY: build-opam-installer build-opam-installer: $(DUNE_DEP) $(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) $(DUNE_PROMOTE_ARG) -- opam-installer.install opam-installer.install: $(DUNE_DEP) $(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) $(DUNE_PROMOTE_ARG) -- opam-installer.install .PHONY: build-opam build-opam: $(DUNE_DEP) $(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) $(DUNE_PROMOTE_ARG) -- opam-installer.install opam.install opam.install: $(DUNE_DEP) $(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) $(DUNE_PROMOTE_ARG) -- opam-installer.install opam.install OPAMLIBS = core format solver repository state client opam-%: $(DUNE_DEP) $(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) $(DUNE_PROMOTE_ARG) -- opam-$*.install opam-lib: $(DUNE_DEP) $(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) $(DUNE_PROMOTE_ARG) -- $(patsubst %,opam-%.install,$(OPAMLIBS)) installlib-%: opam-installer opam-%.install $(if $(wildcard src_ext/lib/*),\ $(error Installing the opam libraries is incompatible with embedding \ the dependencies. Run 'make clean-ext' and try again)) $(OPAMINSTALLER) $(OPAMINSTALLER_FLAGS) opam-$*.install uninstalllib-%: opam-installer opam-%.install $(OPAMINSTALLER) -u $(OPAMINSTALLER_FLAGS) opam-$*.install libinstall: $(DUNE_DEP) opam-admin.top $(OPAMLIBS:%=installlib-%) @ custom-libinstall: $(DUNE_DEP) opam-lib opam for p in $(OPAMLIBS); do \ ./opam$(EXE) custom-install --no-recompilations opam-$$p.$(version) -- \ $(DUNE) install --root . opam-$$p; \ done processed-%.install: %.install sed -f process.sed $^ > $@ install: processed-opam.install processed-opam-installer.install $(OPAMINSTALLER) $(OPAMINSTALLER_FLAGS) processed-opam.install $(OPAMINSTALLER) $(OPAMINSTALLER_FLAGS) processed-opam-installer.install libuninstall: $(OPAMLIBS:%=uninstalllib-%) @ uninstall: opam.install $(OPAMINSTALLER) -u $(OPAMINSTALLER_FLAGS) $< $(OPAMINSTALLER) -u $(OPAMINSTALLER_FLAGS) opam-installer.install .PHONY: tests tests: $(DUNE_DEP) src/client/no-git-version @$(DUNE) runtest $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) src/ tests/ --no-buffer; \ ret=$$?; \ echo "### TESTS RESULT SUMMARY ###"; \ for t in _build/default/tests/reftests/*.test; do \ printf "%-30s" $$(basename $$t .test); \ if diff -q --strip-trailing-cr $$t $${t%.test}.out >/dev/null; \ then printf '\033[32m[ OK ]\033[m\n'; \ else printf '\033[31m[FAIL]\033[m\n'; \ fi; \ done; \ test $$ret -eq 0 .PHONY: crowbar # only run the quickcheck-style tests, not very covering crowbar: $(DUNE_DEP) $(DUNE) exec --root . -- src/crowbar/test.exe .PHONY: crowbar-afl # runs the real AFL deal, but needs to be done in a +afl switch crowbar-afl: $(DUNE_DEP) $(DUNE) build --root . -- src/crowbar/test.exe mkdir -p /tmp/opam-crowbar-input -p /tmp/opam-crowbar-output echo foo > /tmp/opam-crowbar-input/foo afl-fuzz -i /tmp/opam-crowbar-input -o /tmp/opam-crowbar-output dune exec src/crowbar/test.exe @@ INTERMEDIATE: src/client/no-git-version src/client/no-git-version: touch src/client/no-git-version # tests-local, tests-git tests-%: $(DUNE_DEP) src/client/no-git-version $(DUNE) build $(DUNE_ARGS) $(DUNE_PROFILE_ARG) --root . @reftest-legacy-$* --force reftest-gen: src/client/no-git-version echo >tests/reftests/dune.inc $(DUNE) build $(DUNE_ARGS) $(DUNE_PROFILE_ARG) --root . @reftest-gen --auto-promote --force reftest-runner: $(DUNE_DEP) src/client/no-git-version $(DUNE) build $(DUNE_ARGS) $(DUNE_PROFILE_ARG) --root . tests/reftests/run.exe reftests: $(DUNE_DEP) src/client/no-git-version $(DUNE) build $(DUNE_ARGS) $(DUNE_PROFILE_ARG) --root . @reftest reftest-%: $(DUNE_DEP) src/client/no-git-version $(DUNE) build $(DUNE_ARGS) $(DUNE_PROFILE_ARG) --root . @reftest-$* --force reftests-meld: meld `for t in tests/reftests/*.test; do echo --diff $$t _build/default/$${t%.test}.out; done` .PHONY: doc doc: all $(MAKE) -C doc .PHONY: man-html man-html: opam opam-installer $(MAKE) -C doc $@ configure: configure.ac m4/*.m4 aclocal -I m4 autoconf release-%: $(MAKE) -C release TAG="$*" ifeq ($(OCAML_PORT),) ifneq ($(COMSPEC),) ifeq ($(shell which gcc 2>/dev/null),) OCAML_PORT=auto endif endif endif .PHONY: compiler cold compiler: env MAKE=$(MAKE) BOOTSTRAP_EXTRA_OPTS= BOOTSTRAP_OPT_TARGET=opt.opt BOOTSTRAP_ROOT=.. BOOTSTRAP_DIR=bootstrap ./shell/bootstrap-ocaml.sh $(OCAML_PORT) src_ext/secondary/ocaml/bin/ocaml: env MAKE=$(MAKE) BOOTSTRAP_EXTRA_OPTS="--disable-ocamldoc --disable-debug-runtime --disable-debugger" BOOTSTRAP_OPT_TARGET=opt BOOTSTRAP_ROOT=../.. BOOTSTRAP_DIR=src_ext/secondary ./shell/bootstrap-ocaml.sh $(OCAML_PORT) cold: compiler env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" CAML_LD_LIBRARY_PATH= ./configure --enable-cold-check $(CONFIGURE_ARGS) env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" CAML_LD_LIBRARY_PATH= $(MAKE) lib-ext env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" CAML_LD_LIBRARY_PATH= $(MAKE) cold-%: env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" CAML_LD_LIBRARY_PATH= $(MAKE) $* .PHONY: run-appveyor-test run-appveyor-test: env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" ./appveyor_test.sh opam-2.1.2/Makefile.config.in0000644000650106067230000000203214153703467014627 0ustar glonduseddatarootdir = @datarootdir@ prefix = @prefix@ mandir = @mandir@ version = @PACKAGE_VERSION@ FETCH = @fetch@ PACKS = $(filter-out no,@OCAML_PKG_unix@ @OCAML_PKG_bigarray@ @OCAML_PKG_extlib@ @OCAML_PKG_re@ @OCAML_PKG_re_glob@ @OCAML_PKG_cmdliner@ @OCAML_PKG_ocamlgraph@ @OCAML_PKG_cudf@ @OCAML_PKG_dose3_common@ @OCAML_PKG_dose3_algo@ @OCAML_PKG_opam_file_format@ @OCAML_PKG_mccs@) CONF_OCAMLFLAGS = @CONF_OCAMLFLAGS@ MCCS_ENABLED = @MCCS_ENABLED@ OPAM_0INSTALL_SOLVER_ENABLED = @OPAM_0INSTALL_SOLVER_ENABLED@ OCAMLLIB = @OCAMLLIB@ OCAMLFIND = @OCAMLFIND@ OCAML = @OCAML@ OCAMLC = @OCAMLC@ OCAMLOPT = @OCAMLOPT@ DUNE = @DUNE@ DUNE_SECONDARY = @DUNE_SECONDARY@ LN_S = @LN_S@ EXE = @EXE@ WIN32 = @WIN32@ PATH:=@PATH_PREPEND@$(PATH) INCLUDE:=@INC_PREPEND@$(INCLUDE) LIB:=@LIB_PREPEND@$(LIB) LIB_PREFIX = @LIB_PREFIX@ CPATH = @CPATH@ LIBRARY_PATH = @LIBRARY_PATH@ MANIFEST_ARCH = @MANIFEST_ARCH@ RUNTIME_GCC_S = @RUNTIME_GCC_S@ PATCH = @PATCH@ export OCAMLVERSION OCAMLFIND OCAML OCAMLC OCAMLOPT EXE PATH INCLUDE LIB CPATH LIBRARY_PATH OCAMLLIB opam-2.1.2/README.md0000644000650106067230000002372614153703467012612 0ustar glondused# opam - A package manager for OCaml |master|2.0| |--|--| |[![GH actions](https://github.com/ocaml/opam/workflows/Builds,%20tests%20&%20co/badge.svg)](https://github.com/ocaml/opam/actions?query=workflow%3A%22Builds%2C+tests+%26+co%22+branch%3Amaster) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/ocaml/opam?branch=master&svg=true)](https://ci.appveyor.com/project/AltGr/opam) | [![2.0 GH actions](https://github.com/ocaml/opam/workflows/Builds,%20tests%20&%20co/badge.svg?branch=2.0)](https://github.com/ocaml/opam/actions?query=workflow%3A%22Builds%2C+tests+%26+co%22+branch%3A2.0) [![AppVeyor 2.0 Build Status](https://ci.appveyor.com/api/projects/status/github/ocaml/opam?branch=2.0&svg=true)](https://ci.appveyor.com/project/AltGr/opam) | Opam is a source-based package manager for OCaml. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow. Opam was created and is maintained by [OCamlPro](http://www.ocamlpro.com). To get started, checkout the [Install](http://opam.ocaml.org/doc/Install.html) and [Usage](http://opam.ocaml.org/doc/Usage.html) guides. ## Compiling this repo Either from an existing opam installation, use `opam pin add opam-devel --dev`, or: * Make sure you have the required dependencies installed: - GNU make - OCaml >= 4.02.3 (or see [below](#compiling-without-ocaml)) - A C++ compiler (unless building without a solver, see `./configure --without-mccs`) * Run `./configure` * Run `make lib-ext` as advertised by `./configure` if you don't have the dependencies installed. This will locally take care of all OCaml dependencies for you (downloading them, unless you used the inclusive archive we provide for each release). * Run `make` * Run `make install` This is all you need for installing and using opam, but if you want to use the `opam-lib` (to work on opam-related tools), you need to link it to installed libraries, rather than use `make lib-ext` which would cause conflicts. It's easier to already have a working opam installation in this case, so you can do it as a second step. * Make sure to have ocamlfind, ocamlgraph, cmdliner >= 0.9.8, cudf >= 0.7, dose3 >= 5, re >= 1.5.0, opam-file-format installed. Or run `opam install . --deps-only` if you already have a working instance. Re-run `./configure` once done * Run `make libinstall` at the end _Note_: If you install on your system (without changing the prefix), you will need to install as root (`sudo`). As sudo do not propagate environment variables, there wil be some errors. You can use `sudo -E "PATH=$PATH" in order to be sure to have the good environment for install. ## Developer mode If you are developing OPAM, you may enable developer features by including the `--enable-developer-mode` parameter with `./configure`. ## Compiling on Native Windows ``` BUILDING ON WINDOWS IS A WORK-IN-PROGRESS AND THESE INSTRUCTIONS WILL EVOLVE! ``` Cygwin (https://www.cygwin.com/setup-x86_64.exe) is always required to build opam on Windows. Both the 64-bit and 32-bit versions of Cygwin may be used (you can build 32-bit opam using 64-bit Cygwin and vice versa though note that you must be running 64-bit Windows in order to build the 64-bit version). The following Cygwin packages are required: * From Devel - `make` * From Devel - `patch` (not required if OCaml and all required packages are pre-installed) * From Interpreters - `m4` (unless required packages are pre-installed or built using `make lib-ext` rather than `make lib-pkg` - `m4` is required by findlib's build system) * From Devel - `mingw64-i686-gcc-core` & `mingw64-x86_64-gcc-core` (not required if building with MSVC) Alternatively, having downloaded Cygwin's setup program, Cygwin can be installed using the following command line: `setup-x86_64 --root=C:\cygwin64 --quiet-mode --no-desktop --no-startmenu --packages=make,mingw64-i686-gcc-core,mingw64-x86_64-gcc-core,m4,patch` The `--no-desktop` and `--no-startmenu` switches may be omitted in order to create shortcuts on the Desktop and Start Menu respectively. Executed this way, setup will still be interactive, but the packages will have been pre-selected. To make setup fully unattended, choose a mirror URL from https://cygwin.com/mirrors.lst and add the --site switch to the command line (e.g. `--site=http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/`). It is recommended that you set the `CYGWIN` environment variable to `nodosfilewarning winsymlinks:native`. Cygwin is started either from a shortcut or by running: ``` C:\cygwin64\bin\mintty - ``` It is recommended that opam be built outside Cygwin's root (so in `/cygdrive/c/...`). From an elevated Cygwin shell, edit `/etc/fstab` and ensure that the file's content is exactly: ``` none /cygdrive cygdrive noacl,binary,posix=0,user 0 0 ``` The change is the addition of the `noacl` option to the mount instructions for `/cygdrive` and this stops from Cygwin from attempting to emulate POSIX permissions over NTFS (which can result in strange and unnecessary permissions showing up in Windows Explorer). It is necessary to close and restart all Cygwin terminal windows after changing `/etc/fstab`. opam is able to be built **without** a pre-installed OCaml compiler. For the MSVC ports of OCaml, the Microsoft Windows SDK 7 or later or Microsoft Visual Studio is required (https://www.microsoft.com/en-gb/download/details.aspx?id=8442 - either x86 or x64 may be installed, as appropriate to your system). It is not necessary to modify PATH, INCLUDE or LIB - opam's build system will automatically detect the required changes. If OCaml is not pre-installed, run: ``` make compiler [OCAML_PORT=mingw64|mingw|msvc64|msvc|auto] ``` The `OCAML_PORT` variable determines which flavour of Windows OCaml is compiled - `auto` will attempt to guess. As long as `gcc` is **not** installed in Cygwin (i.e. the native C compiler *for Cygwin*), `OCAML_PORT` does not need to be specified and `auto` will be assumed. Once the compiler is built, you may run: ``` make lib-pkg ``` to install the dependencies as findlib packages to the compiler. Building `lib-pkg` requires the ability to create native symbolic links (and the `CYGWIN` variable *must* include `winsymlinks:native`) - this means that either Cygwin must be run elevated from an account with administrative privileges or your user account must be granted the SeCreateSymbolicLinkPrivilege either by enabling Developer mode on Windows 10, or using Local Security Policy on earlier versions of Windows. Alternatively, you may run `configure` and use `make lib-ext`, as advised. You can then `configure` and build opam as above. ## Compiling without OCaml `make cold` is provided as a facility to compile OCaml, then bootstrap opam. You don't need need to run `./configure` in that case, but you may specify `CONFIGURE_ARGS` if needed, e.g.: ``` make cold CONFIGURE_ARGS="--prefix ~/local" make cold-install ``` NOTE: You'll still need GNU make. ## Bug tracker Have a bug or a feature request ? Please open an issue on [our bug-tracker](https://github.com/ocaml/opam/issues). Please search for existing issues before posting, and include the output of `opam config report` and any details that may help track down the issue. ## Documentation #### User Manual The main documentation entry point to opam is the user manual, available using `opam --help`. To get help for a specific command, use `opam --help`. #### Guides and Tutorials A collection of guides and tutorials is available [online](http://opam.ocaml.org/doc/Usage.html). They are generated from the files in [doc/pages](https://github.com/ocaml/opam/tree/master/doc/pages). #### API, Code Documentation and Developer Manual A more thorough technical document describing opam and specifying the package description format is available in the [developer manual](http://opam.ocaml.org/doc/manual/dev-manual.html). `make doc` will otherwise make the API documentation available under `doc/`. ## Community Keep track of development and community news. * Have a question that's not a feature request or bug report? [Ask on the mailing list](http://lists.ocaml.org/listinfo/infrastructure). * Chat with fellow opamers on IRC. On the `irc.freenode.net` server, in the `#ocaml` or the `#opam` channel. ## Contributing We welcome contributions ! Please use Github's pull-request mechanism against the master branch of the [opam repository](https://github.com/ocaml/opam). If that's not an option for you, you can use `git format-patch` and email us. ## Versioning The release cycle respects [Semantic Versioning](http://semver.org/). ## Related repositories - [ocaml/opam-repository](https://github.com/ocaml/opam-repository) is the official repository for opam packages and compilers. A number of non-official repositories are also available on the interwebs, for instance on [Github](https://github.com/search?q=opam-repo&type=Repositories). - [opam2web](https://github.com/ocaml/opam2web) generates a collection of browsable HTML files for a given repository. It is used to generate http://opam.ocaml.org. - [opam-rt](https://github.com/ocaml/opam-rt) is the regression framework for opam. - [opam-publish](https://github.com/AltGr/opam-publish) is a tool to facilitate the creation, update and publication of opam packages. ## Copyright and license The version comparison function in `src/core/opamVersionCompare.ml` is part of the Dose library and Copyright 2011 Ralf Treinen. All other code is: Copyright 2012-2020 OCamlPro Copyright 2012 INRIA All rights reserved. Opam is distributed under the terms of the GNU Lesser General Public License version 2.1, with the special exception on linking described in the file LICENSE. Opam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. opam-2.1.2/admin-scripts/0000755000650106067230000000000014153703467014076 5ustar glondusedopam-2.1.2/admin-scripts/Makefile0000644000650106067230000000106614153703467015541 0ustar glondusedDEPS = core format repository INCLUDE = $(patsubst %,-I ../src/%,$(DEPS)) -I ../src/tools LIBS = $(patsubst %,../src/opam-%.cma,$(DEPS)) %: %.ml sed 's/^#.*//' $< >$*-tmp.ml ocamlfind ocamlc -package unix,re.glob,ocamlgraph -linkpkg $(INCLUDE) $(LIBS) ../src/tools/opam_admin_top.ml $*-tmp.ml -o $@ rm $*-tmp.ml 1_2_to_2_0: compilers-to-packages cp $< $@ couverture: couverture.ml sed 's/^#.*//' $< >couverture-tmp.ml ocamlfind ocamlopt -package re.glob,opam-lib.state -linkpkg ../src/tools/opam_admin_top.ml couverture-tmp.ml -o $@ rm couverture-tmp.ml opam-2.1.2/admin-scripts/add-build-deps.ml0000755000650106067230000000147114153703467017214 0ustar glondused#!/usr/bin/env opam-admin.top #directory "+../opam-lib";; open Opam_admin_top;; (* Add the "build" dependency flag to all ocamlfind depends *) let to_build = List.map OpamPackage.Name.of_string ["ocamlfind"] let addbuild (pkg, (flags, cstr) as atom) = if List.mem pkg to_build && not (List.mem OpamTypes.Depflag_Build flags) then OpamFormula.Atom (pkg, (OpamTypes.Depflag_Build::flags, cstr)) else OpamFormula.Atom atom ;; iter_packages ~opam:(fun _ opam0 -> let open OpamFile.OPAM in let opam = opam0 in let opam = with_depends opam @@ OpamFormula.map addbuild @@ depends opam in let opam = with_depopts opam @@ OpamFormula.map addbuild @@ depopts opam in let opam = if opam <> opam0 then with_opam_version opam @@ OpamVersion.of_string "1.2" else opam in opam) () opam-2.1.2/admin-scripts/add-github-dev.ml0000755000650106067230000000164314153703467017223 0ustar glondused#!/usr/bin/env opam-admin.top #directory "+../opam-lib";; open Opam_admin_top;; #use "topfind";; #require "re";; let github_re = Re.compile (Re_perl.re "([^/]*github.com/.*)/archive/.*");; iter_packages_gen @@ fun nv ~prefix:_ ~opam ~descr:_ ~url ~dot_install:_ -> let opam = if OpamFile.OPAM.dev_repo opam <> None then opam else match url with | None -> opam | Some u -> let url = OpamFile.URL.url u in if url.OpamUrl.backend = `http && Re.execp github_re url.OpamUrl.path then let substrings = Re.exec github_re url.OpamUrl.path in let dev_url = { OpamUrl.transport = "git"; path = Re.get substrings 1; hash = None; backend = `git } in let opam = OpamFile.OPAM.with_dev_repo opam dev_url in OpamFile.OPAM.with_opam_version opam (OpamVersion.of_string "1.2") else opam in opam, `Keep, `Keep, `Keep opam-2.1.2/admin-scripts/compilers-to-packages.ml0000755000650106067230000001354614153703467020635 0ustar glondused#!/usr/bin/env opam-admin.top #directory "+../opam-lib";; #directory "+../re";; (**************************************************************************) (* *) (* Copyright 2013-2016 OCamlPro *) (* *) (* All rights reserved. This file is distributed under the terms of the *) (* GNU Lesser General Public License version 2.1, with the special *) (* exception on linking described in the file LICENSE. *) (* *) (**************************************************************************) open OpamTypes open OpamProcess.Job.Op open Opam_admin_top open OpamStd.Option.Op ;; let () = let error_printer = function | OpamParallel.Errors (_, (_,exc)::_, _) -> Some (Printexc.to_string exc) | _ -> None in Printexc.register_printer error_printer ;; let compilers = let compilers_dir = OpamFilename.Op.(repo.repo_root / "compilers") in if OpamFilename.exists_dir compilers_dir then ( List.fold_left (fun map f -> if OpamFilename.check_suffix f ".comp" then let c = OpamFilename.(Base.to_string (basename (chop_extension f))) in OpamStd.String.Map.add c f map else map) OpamStd.String.Map.empty (OpamFilename.rec_files compilers_dir) ) else OpamStd.String.Map.empty ;; OpamStd.String.Map.iter (fun c comp_file -> let comp = OpamFile.Comp.read (OpamFile.make comp_file) in let descr_file = OpamFilename.(opt_file (add_extension (chop_extension comp_file) "descr")) in let descr = descr_file >>| fun f -> OpamFile.Descr.read (OpamFile.make f) in let comp = let drop_names = [ OpamPackage.Name.of_string "base-ocamlbuild" ] in (* ocamlbuild has requirements on variable ocaml-version: it can't be in the dependencies *) OpamFile.Comp.with_packages (OpamFormula.map (fun ((name, _) as atom) -> if List.mem name drop_names then OpamFormula.Empty else Atom atom) (OpamFile.Comp.packages comp)) comp in let opam = OpamFile.Comp.to_package (OpamPackage.Name.of_string "ocaml") comp descr in let nv = OpamFile.OPAM.package opam in let patches = OpamFile.Comp.patches comp in if patches <> [] then OpamConsole.msg "Fetching patches of %s to check their checksums...\n" (OpamPackage.to_string nv); let cache_file : string list list OpamFile.t = OpamFile.make @@ OpamFilename.of_string "~/.cache/opam-compilers-to-packages/url-hashes" in let url_md5 = (OpamFile.Lines.read_opt cache_file +! [] |> List.map @@ function | [url; md5] -> OpamUrl.of_string url, md5 | _ -> failwith "Bad cache") |> OpamUrl.Map.of_list in let extra_sources = (* Download them just to get their mandatory MD5 *) OpamParallel.map ~jobs:3 ~command:(fun url -> try Done (Some (url, OpamUrl.Map.find url url_md5, None)) with Not_found -> let err e = OpamConsole.error "Could not get patch file for %s from %s (%s), skipping" (OpamPackage.to_string nv) (OpamUrl.to_string url) (Printexc.to_string e); Done None in OpamFilename.with_tmp_dir_job @@ fun dir -> try (* Download to package.patch, rather than allowing the name to be guessed since, on Windows, some of the characters which are valid in URLs are not valid in filenames *) let f = let base = OpamFilename.Base.of_string "package.patch" in OpamFilename.create dir base in OpamProcess.Job.catch err (OpamDownload.download_as ~overwrite:false url f @@| fun () -> Some (url, OpamFilename.digest f, None)) with e -> err e) (OpamFile.Comp.patches comp) in List.fold_left (fun url_md5 -> function | Some (url,md5,_) -> OpamUrl.Map.add url md5 url_md5 | None -> url_md5) url_md5 extra_sources |> OpamUrl.Map.bindings |> List.map (fun (url,m) -> [OpamUrl.to_string url; m]) |> OpamFile.Lines.write cache_file; if List.mem None extra_sources then () else let opam = opam |> OpamFile.OPAM.with_extra_sources (OpamStd.List.filter_some extra_sources) |> OpamFile.OPAM.with_substs [OpamFilename.Base.of_string "ocaml.config"] in OpamFile.OPAM.write (OpamRepositoryPath.opam repo (Some "ocaml") nv) opam; let config = OpamFile.Dot_config.create @@ List.map (fun (v,c) -> OpamVariable.of_string v, c) @@ [ "ocaml-version", S (OpamFile.Comp.version comp); "compiler", S (OpamFile.Comp.name comp); "preinstalled", B false; (* fixme: generate those from build/config artifacts using a script ? Guess from os and arch vars and use static 'features' + variable expansion ? ... or just let them be fixed by hand ? *) "ocaml-native", B true; "ocaml-native-tools", B true; "ocaml-native-dynlink", B true; "ocaml-stubsdir", S "%{lib}%/stublibs"; ] in OpamFile.Dot_config.write (OpamFile.make OpamFilename.Op.(OpamRepositoryPath.files repo (Some "ocaml") nv // "ocaml.config.in")) config; OpamFilename.remove comp_file; OpamStd.Option.iter OpamFilename.remove descr_file; OpamFilename.rmdir_cleanup (OpamFilename.dirname comp_file); OpamConsole.msg "Compiler %s successfully converted to package %s\n" c (OpamPackage.to_string nv)) compilers ;; opam-2.1.2/admin-scripts/couverture.ml0000755000650106067230000001216314153703467016641 0ustar glondused#!/usr/bin/env opam-admin.top #directory "+../opam-lib";; (**************************************************************************) (* *) (* Copyright 2015-2018 OCamlPro *) (* *) (* All rights reserved. This file is distributed under the terms of the *) (* GNU Lesser General Public License version 2.1, with the special *) (* exception on linking described in the file LICENSE. *) (* *) (**************************************************************************) (** This script gives scenarios to install all named packages in a given set. This may require several steps, in case of conflicts. Consistent installation steps are printed one per line to stdout. Stderr gives more detail. Relies on the current opam root for the list of available packages, i.e. depends on configured remotes, OS and OCaml version, but not on the set of currently installed packages. *) open OpamTypes let max_install t inst_packages = let universe = OpamState.universe t Query in let wish_field = "wished" in let base = OpamState.base_packages t in let universe = { universe with u_installed = base; u_installed_roots = base; u_attrs = [wish_field, inst_packages]; } in if not (OpamCudf.external_solver_available ()) then failwith "No external solver found"; let preferences = let preferences = OpamSolverConfig.criteria `Default in Some (lazy (Printf.sprintf "+sum(solution,%s),%s" wish_field preferences)) in OpamSolverConfig.update ~solver_preferences_default:preferences (); let version_map = OpamSolver.cudf_versions_map universe universe.u_available in let request = { wish_install = []; wish_remove = []; wish_upgrade = []; extra_attributes = [wish_field]; criteria = `Default; } in let cudf_universe = OpamSolver.load_cudf_universe ~build:true universe ~version_map universe.u_available in match OpamCudf.resolve ~extern:true ~version_map cudf_universe request with | Conflicts _ -> failwith "Solver error (unexpected conflicts)" | Success u -> OpamPackage.Set.diff (OpamPackage.Set.of_list (List.map OpamCudf.cudf2opam (OpamCudf.packages u))) base module P = OpamPackage open P.Set.Op let rec couverture acc t pkgs = Printf.eprintf "# %d packages remaining...\n%!" (P.Name.Set.cardinal (P.names_of_packages pkgs)); let step = max_install t pkgs in let added = P.Name.Set.inter (P.names_of_packages step) (P.names_of_packages pkgs) in if P.Name.Set.is_empty added then let () = Printf.eprintf "# -> %d uninstallable packages remaining.\n%!" (P.Name.Set.cardinal (P.names_of_packages pkgs)) in List.rev acc, pkgs else let n = P.Name.Set.cardinal added in Printf.eprintf "# -> Step %d: covering %d/%d packages%s.\n%!" (List.length acc + 1) n (P.Name.Set.cardinal (P.names_of_packages pkgs)) (if n > 5 then "" else OpamStd.List.concat_map ~left:" (" ~right:")" " " P.Name.to_string (OpamPackage.Name.Set.elements added)); let pkgs = P.Set.filter (fun nv -> not (P.has_name step (P.name nv))) pkgs in couverture (step::acc) t pkgs let () = let root = OpamStateConfig.opamroot () in OpamFormatConfig.init (); if not (OpamStateConfig.load_defaults root) then failwith "Opam root not found"; OpamCoreConfig.init (); OpamSolverConfig.init (); OpamStateConfig.init (); let t = OpamState.load_state ~save_cache:false "couverture" (OpamStateConfig.get_switch_opt ()) in let avail = Lazy.force t.OpamState.Types.available_packages in let wanted = match Array.to_list Sys.argv with | [] | _::[] -> avail -- P.packages_of_names avail (OpamState.base_package_names t) | _::l -> List.fold_left (fun wanted name -> let nvs = if String.contains name '.' then P.Set.singleton (P.of_string name) else P.packages_of_name avail (P.Name.of_string name) in if P.Set.is_empty (nvs %% avail) then failwith (Printf.sprintf "Package %s not found" name) else wanted ++ nvs ) P.Set.empty l in let couv,remaining = couverture [] t wanted in let avail_names = P.names_of_packages avail in let remaining_names = P.names_of_packages remaining in Printf.eprintf "# Found a couverture for %d over %d packages in %d steps:\n%!" (P.Name.Set.cardinal (P.Name.Set.diff avail_names remaining_names)) (P.Name.Set.cardinal avail_names) (List.length couv); List.iter (fun s -> print_endline (OpamStd.List.concat_map " " OpamPackage.to_string (P.Set.elements s))) couv; Printf.eprintf "# %d uninstallable packages remain: %s\n%!" (P.Name.Set.cardinal remaining_names) (OpamStd.List.concat_map " " OpamPackage.Name.to_string (P.Name.Set.elements remaining_names)) opam-2.1.2/admin-scripts/cudf-debug.ml0000755000650106067230000000343114153703467016441 0ustar glondused#!/usr/bin/env opam-admin.top #directory "+../cudf";; #directory "+../dose3";; #directory "+../opam-lib";; open Opam_admin_top;; let cudf2opam_name cpkg = OpamPackage.Name.of_string (try Cudf.lookup_package_property cpkg OpamCudf.s_source with Not_found -> Common.CudfAdd.decode cpkg.Cudf.package) let cudf2opam_version cpkg = OpamPackage.Version.of_string (try Cudf.lookup_package_property cpkg OpamCudf.s_source_number with Not_found -> Printf.sprintf "#cudf%d" cpkg.Cudf.version) let cudf_pp cpkg = OpamPackage.Name.to_string (cudf2opam_name cpkg), OpamPackage.Version.to_string (cudf2opam_version cpkg), [] let rebuild_version_map univ = Cudf.fold_packages (fun acc cpkg -> let nv = OpamPackage.create (cudf2opam_name cpkg) (cudf2opam_version cpkg) in OpamPackage.Map.add nv cpkg.Cudf.version acc ) OpamPackage.Map.empty univ let _ = match Cudf_parser.load_from_file Sys.argv.(1) with | Some preamble, univ, Some req -> begin match Algo.Depsolver.check_request ~explain:true (preamble, univ, req) with | Algo.Depsolver.Unsat (Some f) -> OpamConsole.msg "== DOSE MESSAGE ==\n"; flush stdout; Algo.Diagnostic.fprintf_human ~pp:cudf_pp Format.err_formatter f; flush stderr; let version_map = rebuild_version_map univ in begin match OpamCudf.make_conflicts ~version_map univ f with | OpamTypes.Conflicts cs -> OpamConsole.msg "== OPAM MESSAGE ==\n%s\n" (OpamCudf.string_of_conflict (fun a -> Printf.sprintf "%s unavailable" (OpamFormula.string_of_atom a)) cs) | _ -> prerr_endline "unhandled case" end | _ -> () end | _ -> OpamConsole.error_and_exit `Solver_error "unsupported cudf file" opam-2.1.2/admin-scripts/depopts_to_conflicts.ml0000755000650106067230000000545214153703467020665 0ustar glondused#!/usr/bin/env opam-admin.top #directory "+../opam-lib";; open Opam_admin_top;; let contains_neq f = try OpamFormula.iter (function (_,cs) -> OpamFormula.iter (function (`Neq,_) -> raise Exit | _ -> ()) cs) f; false with Exit -> true ;; iter_packages ~opam:(fun _ opam -> let depopts = let formula = OpamFile.OPAM.depopts opam in let atoms = OpamFormula.fold_left (fun acc (n,(flags,_)) -> OpamFormula.Atom (n, (flags, OpamFormula.Empty)) :: acc) [] formula in OpamFormula.ors @@ OpamStd.List.remove_duplicates @@ List.rev atoms in let conflicts = (* add complement of the depopts as conflicts *) let module NM = OpamPackage.Name.Map in let depopts = (* get back a map (name => version_constraint) *) (* XXX this takes _all_ the atoms not considering con/disjunctions *) OpamFormula.fold_left (fun acc (name,(_,f)) -> try NM.add name ((OpamFormula.ors [f; NM.find name acc])) acc with Not_found -> NM.add name f acc) NM.empty (OpamFile.OPAM.depopts opam) in let neg_depopts = NM.fold (fun name f acc -> if f = OpamFormula.Empty then acc else let f = OpamFormula.(neg (fun (op,v) -> neg_relop op, v) f) in match OpamFormula.to_cnf (OpamFormula.Atom (name,f)) with | [] -> acc | [conj] -> conj @ acc | [x;y] when x = y -> x @ acc | cnf -> (* Formula is not a conjunction, we are left with no choice but to enumerate *) let f = OpamFormula.to_atom_formula @@ OpamFormula.ands @@ List.map OpamFormula.of_disjunction cnf in let conflict_packages = OpamPackage.Set.filter (fun pkg -> OpamFormula.eval (fun atom -> OpamFormula.check atom pkg) f) (OpamPackage.packages_of_name packages name) in OpamPackage.Set.fold (fun nv acc -> (OpamPackage.name nv, Some (`Eq, OpamPackage.version nv)) :: acc) conflict_packages acc) depopts [] in let conflicts = OpamFile.OPAM.conflicts opam in let add_conflicts = let c = OpamFormula.to_disjunction conflicts in List.filter (fun f -> not (List.mem f c)) neg_depopts in OpamFormula.ors (conflicts :: [OpamFormula.of_disjunction add_conflicts]) in let opam = OpamFile.OPAM.with_depopts opam depopts in let opam = OpamFile.OPAM.with_conflicts opam conflicts in let opam = if contains_neq conflicts then OpamFile.OPAM.with_opam_version opam (OpamVersion.of_string "1.2") else opam in opam) () ;; opam-2.1.2/admin-scripts/extract_mini_repository.sh0000755000650106067230000000561714153703467021433 0ustar glondused#! /bin/sh set -e if [ $# = 0 ]; then cat < /dev/null || true done ## Convert the required compilers as packages "${SOURCE_DIR}"/compilers-to-packages.ml ## Fetch the packages and compilers archives for version in ${COMPILERS}; do opam admin make --resolve --compiler ${version} ocaml.${version} ${PACKAGES} done ## Remove the unrequired package "versions unrequired_version() { case "$1" in base-*) return 1;; *) for version in archives/* do if [ "${version}" = "archives/$1+opam.tar.gz" ]; then return 1; fi done esac return 0 } for dir in packages/*/* do if unrequired_version "${dir##packages/*/}"; then rm -r "${dir}" fi done # Remove empty directories in "packages/" for dir in packages/* do rmdir "${dir}" 2> /dev/null || true done ## Remove unrequired files rm -f .gitignore .travis-ci-install.sh .travis-ci.sh .travis.yml README.md ## Build the archive cd "${WORK_DIR}" tar czf "${TARGET_DIR}/opam-mini-repository.tar.gz" ${REPO_DIR_NAME} opam-2.1.2/admin-scripts/lint.ml0000755000650106067230000000354214153703467015405 0ustar glondused#!/usr/bin/env opam-admin.top #directory "+../opam-lib";; open Opam_admin_top;; let includes = ref [] let excludes = ref [] let short = ref false let list = ref false let usage = "Arguments:\n\ \ -s\tshort format, don't print explanations\n\ \ -l\tlist format, only print package names\n\ \ [N]\tshow only the listed warnings\n\ \ -[N]\tskip any packages that trigger any of these warnings\n\ " let () = let args = match Array.to_list Sys.argv with | _::args -> args | [] -> [] in List.iter (function | "-s" -> short := true | "-l" -> list := true | a -> try if String.length a > 0 && a.[0] = '-' then excludes := 0 - int_of_string a :: !excludes else includes := int_of_string a :: !includes with Failure _ -> OpamConsole.msg "%s" usage; OpamStd.Sys.exit_because `Bad_argument) args let () = OpamPackage.Map.iter (fun nv prefix -> let opam_file = OpamRepositoryPath.opam repo prefix nv in let w, _ = OpamFileTools.lint_file opam_file in if List.exists (fun (n,_,_) -> List.mem n !excludes) w then () else let w = if !includes = [] then w else List.filter (fun (n,_,_) -> List.mem n !includes) w in if w <> [] then if !list then print_endline (OpamPackage.to_string nv) else if !short then OpamConsole.msg "%s %s\n" (OpamPackage.to_string nv) (OpamStd.List.concat_map " " (fun (n,k,_) -> OpamConsole.colorise (match k with `Warning -> `yellow | `Error -> `red) (string_of_int n)) w) else OpamConsole.msg "\r\027[KIn %s:\n%s\n" (OpamPackage.to_string nv) (OpamFileTools.warns_to_string w)) (OpamRepository.packages_with_prefixes repo) opam-2.1.2/admin-scripts/split_install.ml0000755000650106067230000000311214153703467017311 0ustar glondused#!/usr/bin/env opam-admin.top #directory "+../opam-lib";; #directory "+../re";; open Opam_admin_top;; open OpamTypes;; iter_packages ~opam:(fun _ opam -> let module O = OpamFile.OPAM in if O.install opam <> [] then opam else let rec rev_split_while acc cond = function | [] -> acc, [] | x::r when cond x -> rev_split_while (x::acc) cond r | l -> acc, List.rev l in let condition = function | (CString "install",_)::_, _ -> true | (CString "cp",_)::r, _ -> (try let dest = match List.filter (function | CString s, _ -> not (OpamStd.String.starts_with ~prefix:"-" s) | CIdent _, _ -> true) (List.rev r) with | (d, _)::_ -> d | _ -> raise Not_found in let dests = ["prefix";"bin";"sbin";"lib";"man";"doc";"share";"etc"; "toplevel";"stublibs";"doc"] in match dest with | CIdent i -> List.mem i dests | CString s -> Re.(execp (compile (seq [alt (List.map str dests); str "}%"])) s) with Not_found -> false) | l, _ -> List.exists (function | (CString arg, _) -> OpamStd.String.contains ~sub:"install" arg | _ -> false) l in let install, build = rev_split_while [] condition (List.rev (O.build opam)) in opam |> OpamFile.OPAM.with_build build |> OpamFile.OPAM.with_install install) () ;; opam-2.1.2/admin-scripts/to_1_1.ml0000755000650106067230000001033214153703467015514 0ustar glondused#!/usr/bin/env opam-admin.top #directory "+../opam-lib";; #directory "+../re";; (* Converts OPAM 1.2 packages for compat with OPAM 1.1 * merge 'install' with 'build' * remove the new fields: install, flags and dev-repo * remove dependency flags ('build', 'test', 'doc') * set file version * replace inequality constraints with '> & <' * remove new global variables from filters in commands, messages, 'patches', 'available' *) open OpamTypes open OpamStd.Option.Op ;; OpamFormatConfig.update ~all_parens:true;; let rewrite_constraint ~conj = (* Rewrites '!=' *) OpamFormula.map OpamFormula.(function | (`Neq,v) -> if conj then And (Atom (`Lt,v), Atom (`Gt,v)) else Or (Atom (`Lt,v), Atom (`Gt,v)) | atom -> Atom atom) ;; let vars_new_1_2 = [ "compiler"; "ocaml-native"; "ocaml-native-tools"; "ocaml-native-dynlink"; "arch" ] let filter_string = let rex = Re.(compile ( seq [ str "%{"; rep (seq [opt (char '%'); opt (char '}'); diff notnl (set "}%")]); str "}%"; ])) in Re_pcre.substitute ~rex ~subst:(fun s -> match String.sub s 2 (String.length s - 4) with | "compiler" -> "ocaml-version" | "ocaml-native" | "ocaml-native-tools" | "ocaml-native-dynlink" -> "true" | s when List.mem s vars_new_1_2 -> "" | s when String.contains s '?' -> (* new if/else printers: use default *) (try let i = String.rindex s ':' + 1 in String.sub s i (String.length s - i) with Not_found -> s) | _ -> s ) let rec filter_vars = function | FIdent ([],i,None) when List.mem (OpamVariable.to_string i) vars_new_1_2 -> None | FString s -> Some (FString (filter_string s)) | FBool _ | FIdent _ as f -> Some f | FOp (f1,op,f2) -> (match filter_vars f1, filter_vars f2 with | Some f1, Some f2 -> Some (FOp (f1, op, f2)) | _ -> Some (FBool false)) | FAnd (f1,f2) -> (match filter_vars f1, filter_vars f2 with | Some f1, Some f2 -> Some (FAnd (f1, f2)) | opt, None | None, opt -> Some (FBool false)) | FOr (f1,f2) -> (match filter_vars f1, filter_vars f2 with | Some f1, Some f2 -> Some (FOr (f1, f2)) | opt, None | None, opt -> opt) | FNot f -> (match filter_vars f with | Some f -> Some (FNot f) | None -> None) | FUndef -> None let filter_vars_optlist ol = List.map (fun (x, filter) -> x, filter >>= filter_vars) ol let filter_args sl = OpamStd.List.filter_map (fun (s, filter) -> match s with | CString s -> Some (CString (filter_string s),filter) | CIdent i when List.mem i vars_new_1_2 -> None | id -> Some (id,filter)) sl let filter_vars_commands ol = List.map (fun (args, filter) -> filter_args (filter_vars_optlist args), filter >>= filter_vars) ol let to_1_1 _ opam = let module OF = OpamFile.OPAM in if OpamVersion.compare (OF.opam_version opam) (OpamVersion.of_string "1.2") < 0 then opam else let opam = OF.with_build opam (filter_vars_commands (OF.build opam @ OF.install opam)) in let opam = OF.with_install opam [] in let opam = OF.with_flags opam [] in let opam = OF.with_dev_repo opam None in let opam = OF.with_features opam [] in let opam = OF.with_opam_version opam (OpamVersion.of_string "1.1") in let remove_ext = OpamFormula.map (fun (n, (_,cstr)) -> OpamFormula.Atom (n, ([], rewrite_constraint ~conj:false cstr))) in let opam = OF.with_depends opam (remove_ext (OF.depends opam)) in let opam = OF.with_depopts opam (remove_ext (OF.depopts opam)) in let opam = OF.with_conflicts opam (OpamFormula.map (fun (n, cstr) -> OpamFormula.Atom (n, rewrite_constraint ~conj:false cstr)) (OF.conflicts opam)) in let opam = OF.with_available opam (filter_vars (OF.available opam) +! FBool true) in let opam = OF.with_patches opam (filter_vars_optlist (OF.patches opam)) in let opam = OF.with_libraries opam [] in let opam = OF.with_syntax opam [] in let opam = OF.with_messages opam (filter_vars_optlist (OF.messages opam)) in let opam = OF.with_post_messages opam (filter_vars_optlist (OF.post_messages opam)) in opam ;; Opam_admin_top.iter_packages ~opam:to_1_1 () opam-2.1.2/appveyor.yml0000644000650106067230000000272114153703467013713 0ustar glondusedplatform: - x64 image: Visual Studio 2019 environment: global: CYG_ROOT: cygwin64 CYG_ARCH: x86_64 OCAML_PORT: CYG_CACHE: C:/cygwin/var/cache/setup CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ DEP_MODE: lib-ext # This should be identical to the value in .travis.yml OPAM_REPO_SHA: 38e8f54c584fa3cfe779890f7a56fe88ee38be78 OPAM_TEST_REPO_SHA: 38e8f54c584fa3cfe779890f7a56fe88ee38be78 matrix: - CYG_ROOT: cygwin CYG_ARCH: x86 - CYG_ROOT: cygwin64 CYG_ARCH: x86_64 DEP_MODE: lib-pkg - appveyor_build_worker_image: Visual Studio 2017 OCAML_PORT: msvc DEP_MODE: lib-pkg GIT_FOR_WINDOWS: 1 - appveyor_build_worker_image: Visual Studio 2017 OCAML_PORT: msvc64 - OCAML_PORT: mingw - OCAML_PORT: mingw64 DEP_MODE: lib-pkg GIT_FOR_WINDOWS: 1 cache: - C:\projects\opam\bootstrap - C:\projects\opam\src_ext\archives install: - call "%APPVEYOR_BUILD_FOLDER%\appveyor_build.cmd" install build_script: - call "%APPVEYOR_BUILD_FOLDER%\appveyor_build.cmd" build test_script: - call "%APPVEYOR_BUILD_FOLDER%\appveyor_build.cmd" test # Uncomment this to enable Remote Desktop on the build worker at the end of the # build. The worker is available for the remainder of the allocated hour. #on_finish: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) opam-2.1.2/appveyor_build.cmd0000644000650106067230000002305514153703467015037 0ustar glondused@rem *********************************************************************** @rem * * @rem * opam * @rem * * @rem * David Allsopp, OCaml Labs, Cambridge. * @rem * * @rem * Copyright 2018 MetaStack Solutions Ltd. * @rem * * @rem * All rights reserved. This file is distributed under the terms of * @rem * the GNU Lesser General Public License version 2.1, with the * @rem * special exception on linking described in the file LICENSE. * @rem * * @rem *********************************************************************** @rem BE CAREFUL ALTERING THIS FILE TO ENSURE THAT ERRORS PROPAGATE @rem IF A COMMAND SHOULD FAIL IT PROBABLY NEEDS TO END WITH @rem || exit /b 1 @rem BASICALLY, DO THE TESTING IN BASH... @rem Do not call setlocal! @echo off goto %1 goto :EOF :CheckPackage "%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %1" | findstr %1 > nul if %ERRORLEVEL% equ 1 ( echo Cygwin package %1 will be installed set CYGWIN_INSTALL_PACKAGES=%CYGWIN_INSTALL_PACKAGES%,%1 ) goto :EOF :UpgradeCygwin if %CYGWIN_UPGRADE_REQUIRED% equ 1 ( echo Cygwin package upgrade required - please go and drink coffee set CYGWIN_UPGRADE_FLAG=--upgrade-also SET CYGWIN_UPGRADE_REQUIRED=0 ) else ( set CYGWIN_UPGRADE_FLAG= ) if "%CYGWIN_INSTALL_PACKAGES%" neq "" set CYGWIN_INSTALL_PACKAGES=--packages %CYGWIN_INSTALL_PACKAGES:~1% if "%CYGWIN_INSTALL_PACKAGES%%FLAG%" equ "" goto UpgradeCygwin_next "%CYG_ROOT%\setup-%CYG_ARCH%.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" %CYGWIN_INSTALL_PACKAGES% %CYGWIN_UPGRADE_FLAG% > nul set CYGWIN_INSTALL_PACKAGES= :UpgradeCygwin_next if "%CYGWIN_UPGRADE_FLAG%" equ "" for %%P in (%CYGWIN_COMMANDS%) do "%CYG_ROOT%\bin\bash.exe" -lc "%%P --help" > nul || set CYGWIN_UPGRADE_REQUIRED=1 "%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%" if "%CYGWIN_UPGRADE_REQUIRED%%CYGWIN_UPGRADE_FLAG%" equ "1" call :UpgradeCygwin goto :EOF :install echo Build Worker Image: %APPVEYOR_BUILD_WORKER_IMAGE% systeminfo 2>nul | findstr /B /C:"OS Name" /C:"OS Version" echo System architecture: %PLATFORM% set CYG_ROOT=C:\%CYG_ROOT% cd "%APPVEYOR_BUILD_FOLDER%" :: if "%OCAML_PORT%" equ "" ( :: rem Need unreleased Cygwin 3.1.7 for bugfix in acl_get_tag_type and acl_get_permset :: appveyor DownloadFile "https://cygwin.com/snapshots/x86/cygwin1-20200710.dll.xz" -FileName "cygwin1.dll.xz" || exit /b 1 :: "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER ; unxz cygwin1.dll.xz ; chmod +x cygwin1.dll" :: move cygwin1.dll %CYG_ROOT%\bin\cygwin1.dll :: ) rem CYGWIN_PACKAGES is the list of required Cygwin packages (cygwin is included rem in the list just so that the Cygwin version is always displayed on the log). rem CYGWIN_COMMANDS is a corresponding command to run with --version to test rem whether the package works. This is used to verify whether the installation rem needs upgrading. set CYGWIN_PACKAGES=cygwin make patch curl diffutils tar unzip git set CYGWIN_COMMANDS=cygcheck make patch curl diff tar unzip git if "%OCAML_PORT%" equ "mingw" ( set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% mingw64-i686-gcc-g++ set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% i686-w64-mingw32-g++ ) if "%OCAML_PORT%" equ "mingw64" ( set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% mingw64-x86_64-gcc-g++ set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% x86_64-w64-mingw32-g++ ) if "%OCAML_PORT%" equ "" ( set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% gcc-g++ flexdll set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% g++ flexlink ) set CYGWIN_INSTALL_PACKAGES= set CYGWIN_UPGRADE_REQUIRED=0 rem Check that all packages are installed for %%P in (%CYGWIN_PACKAGES%) do call :CheckPackage %%P rem Check that Cygwin is at least 3.1.7 for /f "tokens=2,3,4 delims=-. " %%a in ('%CYG_ROOT%\bin\bash.exe -lc "cygcheck -dc cygwin" ^| findstr cygwin') do ( set CYG_MAJOR=%%a set CYG_MINOR=%%b set CYG_REV=%%c ) set /a CYG_VER=%CYG_MAJOR%*10000+%CYG_MINOR%*100+%CYG_REV% if %CYG_VER% lss 30107 ( if "%OCAML_PORT%" equ "" ( echo Cygwin version %CYG_MAJOR%.%CYG_MINOR%.%CYG_REV% installed; opam requires 3.1.7 or later set CYGWIN_UPGRADE_REQUIRED=1 ) ) rem Upgrade/install packages as necessary call :UpgradeCygwin set INSTALLED_URL= for /f "tokens=3" %%U in ('findstr /C:"URL_ocaml = " src_ext\Makefile') do set OCAML_URL=%%U for /f "tokens=3" %%U in ('findstr /C:"URL_flexdll = " src_ext\Makefile') do set FLEXDLL_URL=%%U if exist bootstrap\ocaml\lib\stdlib.cmxa ( echo Deleting out-of-date bootstrap compiler rd /s/q bootstrap ) if exist bootstrap\installed-tarball for /f "delims=" %%U in ('type bootstrap\installed-tarball') do set INSTALLED_URL=%%U if "%INSTALLED_URL%" neq "%OCAML_URL% %FLEXDLL_URL% %DEP_MODE%" if exist bootstrap\nul ( echo Required: %OCAML_URL% %FLEXDLL_URL% %DEP_MODE% echo Compiled: %INSTALLED_URL% echo Re-building bootstrap compiler rd /s/q bootstrap if exist src_ext\archives\nul rd /s/q src_ext\archives ) if "%DEP_MODE%" equ "lib-pkg" "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make --no-print-directory -C src_ext lib-pkg-urls | head -n -1 | sort | uniq" > current-lib-pkg-list if not exist bootstrap\installed-packages goto SkipCheck fc bootstrap\installed-packages current-lib-pkg-list > nul if %ERRORLEVEL% equ 1 ( echo lib-pkg packages changed: "%CYG_ROOT%\bin\diff.exe" bootstrap/installed-packages current-lib-pkg-list | "%CYG_ROOT%\bin\sed.exe" -ne "s//Add/p" | "%CYG_ROOT%\bin\gawk.exe" "BEGIN{FS="" ""}$2!=k{if(k!="""")print o==f?w:o;w=$0;k=$2;f=o=$2"" ""$3;next}{o=""Switch ""o"" --> ""$3}END{print o==f?w:o}" echo lib-pkg will be re-built "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make --no-print-directory -C src_ext reset-lib-pkg" del bootstrap\installed-packages ) else ( del current-lib-pkg-list ) :SkipCheck "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make --no-print-directory -C src_ext cache-archives" || exit /b 1 if not exist bootstrap\nul ( "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make compiler" || exit /b 1 for /f "delims=" %%U in ('type bootstrap\installed-tarball') do echo %%U %DEP_MODE%> bootstrap\installed-tarball if exist bootstrap\ocaml-*.tar.gz del bootstrap\ocaml-*.tar.gz if "%OCAML_PORT%" neq "" if exist bootstrap\flexdll-*.tar.gz del bootstrap\flexdll-*.tar.gz del bootstrap\ocaml\bin\*.byte.exe del bootstrap\ocaml\lib\ocaml\expunge.exe for /f %%D in ('dir /b/ad bootstrap\ocaml-*') do ( rd /s/q bootstrap\%%D rem Directory needs to exist, as the Cygwin bootstraps OCAMLLIB refers to it rem and bootstrap-ocaml.sh assumes it will exist even when regenerating the rem config. md bootstrap\%%D ) ) else ( if not exist bootstrap\installed-packages "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make --no-print-directory -C src_ext reset-lib-pkg" if exist current-lib-pkg-list "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && GEN_CONFIG_ONLY=1 shell/bootstrap-ocaml.sh %OCAML_PORT%" || exit /b 1 ) if exist current-lib-pkg-list ( "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make lib-pkg" || exit /b 1 move current-lib-pkg-list bootstrap\installed-packages ) goto :EOF :build if "%OCAML_PORT%" equ "" ( rem make install doesn't yet work for the native Windows builds set POST_COMMAND=^&^& make opam-installer install ) set LIB_EXT= if "%DEP_MODE%" equ "lib-ext" set LIB_EXT=^&^& make lib-ext set PRIVATE_RUNTIME= if "%OCAML_PORT:~0,5%" equ "mingw" set PRIVATE_RUNTIME=--with-private-runtime set WITH_MCCS=--with-mccs if "%DEP_MODE%" equ "lib-pkg" set WITH_MCCS= "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER %LIB_PKG% && ./configure %PRIVATE_RUNTIME% %WITH_MCCS% %LIB_EXT%" || exit /b 1 "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && echo DUNE_PROFILE=dev >> Makefile.config" || exit /b 1 "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make opam %POST_COMMAND%" || exit /b 1 goto :EOF :test rem Configure Git for Windows (for the testsuite, this isn't strictly necessary rem as Git-for-Windows will pick up $HOME/.gitconfig for Cygwin's git) git config --global user.email travis@example.com git config --global user.name Travis rem Configure Cygwin's Git "%CYG_ROOT%\bin\bash.exe" -lc "git config --global user.email travis@example.com" "%CYG_ROOT%\bin\bash.exe" -lc "git config --global user.name Travis" set OPAMCOLOR=always set PATH_SHIM= if "%OCAML_PORT%" neq "" if "%GIT_FOR_WINDOWS%" equ "1" ( set PATH_SHIM=PATH=/cygdrive/c/Program\ Files/Git/cmd:$PATH "C:\Program Files\Git\cmd\git.exe" config --global core.autocrlf "C:\Program Files\Git\cmd\git.exe" config --global core.autocrlf true "C:\Program Files\Git\cmd\git.exe" config --global core.autocrlf ) "%CYG_ROOT%\bin\bash.exe" -lc "%PATH_SHIM% make -C $APPVEYOR_BUILD_FOLDER tests" || exit /b 1 rem Can't yet do an opam init with the native Windows builds if "%OCAML_PORT%" equ "" "%CYG_ROOT%\bin\bash.exe" -lc "make -C $APPVEYOR_BUILD_FOLDER run-appveyor-test" || exit /b 1 goto :EOF opam-2.1.2/appveyor_test.sh0000755000650106067230000000025314153703467014564 0ustar glondused#!/bin/bash opam init -y -a --compiler=ocaml.4.12.0 git+https://github.com/ocaml/opam-repository#$OPAM_TEST_REPO_SHA eval $(opam config env) opam install -y -v ocamlfind opam-2.1.2/configure0000755000650106067230000065776614153703467013263 0ustar glondused#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for opam 2.1.2. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # # Copyright 2012-2019 OcamlPro SAS ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opam' PACKAGE_TARNAME='opam' PACKAGE_VERSION='2.1.2' PACKAGE_STRING='opam 2.1.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_default_prefix=`echo "os_type: ${OCAML_OS_TYPE}" | sed -e "s;^os_type: Win32;C:/OPAM;" -e "s;^os_type:.*;/usr/local;"` # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS hasalldeps ac_ct_CXX CXXFLAGS CXX OCAML_PKG_opam_0install_cudf OCAML_PKG_mccs OCAML_PKG_opam_file_format OCAML_PKG_dose3_algo OCAML_PKG_dose3_common OCAML_PKG_cudf OCAML_PKG_ocamlgraph OCAML_PKG_cmdliner OCAML_PKG_re_glob OCAML_PKG_re OCAML_PKG_extlib OCAML_PKG_bigarray OCAML_PKG_unix CONF_MANIFEST_O RUNTIME_GCC_S MANIFEST_ARCH fetch LN_S DUNE_SECONDARY BUNZIP2 PATCH CPPO DUNE FETCH OCAMLFIND OCAMLOBJINFO INC_PREPEND LIB_PREPEND PATH_PREPEND CC64 CONF_CFLAGS CONF_OCAMLFLAGS CONF_LIBACL_LINK EGREP GREP CPP OPAM_0INSTALL_SOLVER_ENABLED MCCS_ENABLED DEVELOPER OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC SYSTEM AWK LIBRARY_PATH CPATH LIB_PREFIX EXE WIN32 OCAML_OS_TYPE OCAMLBUILD OCAMLDOCDOTOPT OCAMLDOC OCAMLMKLIB OCAMLMKTOP OCAMLDEPDOTOPT OCAMLDEP OCAML OCAMLOPTDOTOPT OCAMLCDOTOPT OCAMLBEST OCAMLOPT OCAMLLIB OCAMLVERSION OCAMLC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_version_check enable_checks enable_developer_mode with_mccs with_0install_solver with_libacl with_private_runtime enable_cold_check enable_certificate_check ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures opam 2.1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/opam] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of opam 2.1.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-version-check Do not check OCaml version --disable-checks Assume OCaml dependencies are OK without checking --enable-developer-mode Enable developer features --enable-cold-check Fail on some check necessary for make cold --disable-certificate-check Do not check the certificate of opam's dependency archives Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-mccs Compile without a built-in Cudf solver (only works if 'mccs' is not otherwise installed) --with-0install-solver Compile with the built-in 0install solver (--without-0install-solver only works if 'opam-0install-cudf' is not otherwise installed) --with-libacl Compile opam with libacl support --with-private-runtime For a mingw-w64 build, manifest the runtime DLLs locally in Opam.Runtime.arch Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF opam configure 2.1.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright 2012-2019 OcamlPro SAS _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by opam $as_me 2.1.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # If a bootstrap compiler has been built, always use it PATH_PREPEND= PRE_BOOTSTRAP_PATH="$PATH" if test -x bootstrap/ocaml/bin/ocamlc -o -x bootstrap/ocaml/bin/ocamlopt ; then : echo Bootstrap compiler found -- activating unset OCAMLLIB export PATH_PREPEND=`pwd`/bootstrap/ocaml/bin: export PATH="$PATH_PREPEND$PATH" fi # XXX This isn't strictly correct for Windows MIN_OCAML_VERSION=4.02.3 # checking for ocamlc if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlc", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLC"; then ac_cv_prog_OCAMLC="$OCAMLC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLC="${ac_tool_prefix}ocamlc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLC=$ac_cv_prog_OCAMLC if test -n "$OCAMLC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5 $as_echo "$OCAMLC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLC"; then ac_ct_OCAMLC=$OCAMLC # Extract the first word of "ocamlc", so it can be a program name with args. set dummy ocamlc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLC"; then ac_cv_prog_ac_ct_OCAMLC="$ac_ct_OCAMLC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLC="ocamlc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLC=$ac_cv_prog_ac_ct_OCAMLC if test -n "$ac_ct_OCAMLC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLC" >&5 $as_echo "$ac_ct_OCAMLC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLC" = x; then OCAMLC="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLC=$ac_ct_OCAMLC fi else OCAMLC="$ac_cv_prog_OCAMLC" fi if test "$OCAMLC" != "no"; then OCAMLVERSION=`$OCAMLC -v | tr -d '\015' | 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 if test "$OCAMLLIB" = ""; then OCAMLLIB=`$OCAMLC -where 2>/dev/null | tr -d '\015' || $OCAMLC -v|tail -1|cut -d ' ' -f 4` else { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCAMLLIB previously set; preserving it." >&5 $as_echo "OCAMLLIB previously set; preserving it." >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml library path is $OCAMLLIB" >&5 $as_echo "OCaml library path is $OCAMLLIB" >&6; } # checking for ocamlopt if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlopt", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlopt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLOPT"; then ac_cv_prog_OCAMLOPT="$OCAMLOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLOPT="${ac_tool_prefix}ocamlopt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLOPT=$ac_cv_prog_OCAMLOPT if test -n "$OCAMLOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPT" >&5 $as_echo "$OCAMLOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLOPT"; then ac_ct_OCAMLOPT=$OCAMLOPT # Extract the first word of "ocamlopt", so it can be a program name with args. set dummy ocamlopt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLOPT"; then ac_cv_prog_ac_ct_OCAMLOPT="$ac_ct_OCAMLOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLOPT="ocamlopt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLOPT=$ac_cv_prog_ac_ct_OCAMLOPT if test -n "$ac_ct_OCAMLOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLOPT" >&5 $as_echo "$ac_ct_OCAMLOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLOPT" = x; then OCAMLOPT="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLOPT=$ac_ct_OCAMLOPT fi else OCAMLOPT="$ac_cv_prog_OCAMLOPT" fi OCAMLBEST=byte if test "$OCAMLOPT" = "no"; then { $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' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamlopt discarded." >&5 $as_echo "versions differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamlopt discarded." >&6; } OCAMLOPT=no else OCAMLBEST=opt fi fi # checking for ocamlc.opt if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlc.opt", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlc.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLCDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLCDOTOPT"; then ac_cv_prog_OCAMLCDOTOPT="$OCAMLCDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLCDOTOPT="${ac_tool_prefix}ocamlc.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLCDOTOPT=$ac_cv_prog_OCAMLCDOTOPT if test -n "$OCAMLCDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLCDOTOPT" >&5 $as_echo "$OCAMLCDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLCDOTOPT"; then ac_ct_OCAMLCDOTOPT=$OCAMLCDOTOPT # Extract the first word of "ocamlc.opt", so it can be a program name with args. set dummy ocamlc.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLCDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLCDOTOPT"; then ac_cv_prog_ac_ct_OCAMLCDOTOPT="$ac_ct_OCAMLCDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLCDOTOPT="ocamlc.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLCDOTOPT=$ac_cv_prog_ac_ct_OCAMLCDOTOPT if test -n "$ac_ct_OCAMLCDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLCDOTOPT" >&5 $as_echo "$ac_ct_OCAMLCDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLCDOTOPT" = x; then OCAMLCDOTOPT="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLCDOTOPT=$ac_ct_OCAMLCDOTOPT fi else OCAMLCDOTOPT="$ac_cv_prog_OCAMLCDOTOPT" fi if test "$OCAMLCDOTOPT" != "no"; then TMPVERSION=`$OCAMLCDOTOPT -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamlc.opt discarded." >&5 $as_echo "versions differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamlc.opt discarded." >&6; } else OCAMLC=$OCAMLCDOTOPT fi fi # checking for ocamlopt.opt if test "$OCAMLOPT" != "no" ; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlopt.opt", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlopt.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLOPTDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLOPTDOTOPT"; then ac_cv_prog_OCAMLOPTDOTOPT="$OCAMLOPTDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLOPTDOTOPT="${ac_tool_prefix}ocamlopt.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLOPTDOTOPT=$ac_cv_prog_OCAMLOPTDOTOPT if test -n "$OCAMLOPTDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPTDOTOPT" >&5 $as_echo "$OCAMLOPTDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLOPTDOTOPT"; then ac_ct_OCAMLOPTDOTOPT=$OCAMLOPTDOTOPT # Extract the first word of "ocamlopt.opt", so it can be a program name with args. set dummy ocamlopt.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLOPTDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLOPTDOTOPT"; then ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="$ac_ct_OCAMLOPTDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="ocamlopt.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLOPTDOTOPT=$ac_cv_prog_ac_ct_OCAMLOPTDOTOPT if test -n "$ac_ct_OCAMLOPTDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLOPTDOTOPT" >&5 $as_echo "$ac_ct_OCAMLOPTDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLOPTDOTOPT" = x; then OCAMLOPTDOTOPT="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLOPTDOTOPT=$ac_ct_OCAMLOPTDOTOPT fi else OCAMLOPTDOTOPT="$ac_cv_prog_OCAMLOPTDOTOPT" fi if test "$OCAMLOPTDOTOPT" != "no"; then TMPVERSION=`$OCAMLOPTDOTOPT -v | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamlopt.opt discarded." >&5 $as_echo "versions differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamlopt.opt discarded." >&6; } else OCAMLOPT=$OCAMLOPTDOTOPT fi fi fi fi # checking for ocaml toplevel if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocaml", so it can be a program name with args. set dummy ${ac_tool_prefix}ocaml; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAML+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAML"; then ac_cv_prog_OCAML="$OCAML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAML="${ac_tool_prefix}ocaml" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAML=$ac_cv_prog_OCAML if test -n "$OCAML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAML" >&5 $as_echo "$OCAML" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAML"; then ac_ct_OCAML=$OCAML # Extract the first word of "ocaml", so it can be a program name with args. set dummy ocaml; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAML+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAML"; then ac_cv_prog_ac_ct_OCAML="$ac_ct_OCAML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAML="ocaml" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAML=$ac_cv_prog_ac_ct_OCAML if test -n "$ac_ct_OCAML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAML" >&5 $as_echo "$ac_ct_OCAML" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAML" = x; then OCAML="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAML=$ac_ct_OCAML fi else OCAML="$ac_cv_prog_OCAML" fi # checking for ocamldep if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamldep", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamldep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLDEP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLDEP"; then ac_cv_prog_OCAMLDEP="$OCAMLDEP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLDEP="${ac_tool_prefix}ocamldep" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLDEP=$ac_cv_prog_OCAMLDEP if test -n "$OCAMLDEP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEP" >&5 $as_echo "$OCAMLDEP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLDEP"; then ac_ct_OCAMLDEP=$OCAMLDEP # Extract the first word of "ocamldep", so it can be a program name with args. set dummy ocamldep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLDEP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLDEP"; then ac_cv_prog_ac_ct_OCAMLDEP="$ac_ct_OCAMLDEP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLDEP="ocamldep" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLDEP=$ac_cv_prog_ac_ct_OCAMLDEP if test -n "$ac_ct_OCAMLDEP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDEP" >&5 $as_echo "$ac_ct_OCAMLDEP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLDEP" = x; then OCAMLDEP="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLDEP=$ac_ct_OCAMLDEP fi else OCAMLDEP="$ac_cv_prog_OCAMLDEP" fi # checking for ocamldep.opt if test "$OCAMLDEP" != "no" ; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamldep.opt", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamldep.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLDEPDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLDEPDOTOPT"; then ac_cv_prog_OCAMLDEPDOTOPT="$OCAMLDEPDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLDEPDOTOPT="${ac_tool_prefix}ocamldep.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLDEPDOTOPT=$ac_cv_prog_OCAMLDEPDOTOPT if test -n "$OCAMLDEPDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEPDOTOPT" >&5 $as_echo "$OCAMLDEPDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLDEPDOTOPT"; then ac_ct_OCAMLDEPDOTOPT=$OCAMLDEPDOTOPT # Extract the first word of "ocamldep.opt", so it can be a program name with args. set dummy ocamldep.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLDEPDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLDEPDOTOPT"; then ac_cv_prog_ac_ct_OCAMLDEPDOTOPT="$ac_ct_OCAMLDEPDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLDEPDOTOPT="ocamldep.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLDEPDOTOPT=$ac_cv_prog_ac_ct_OCAMLDEPDOTOPT if test -n "$ac_ct_OCAMLDEPDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDEPDOTOPT" >&5 $as_echo "$ac_ct_OCAMLDEPDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLDEPDOTOPT" = x; then OCAMLDEPDOTOPT="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLDEPDOTOPT=$ac_ct_OCAMLDEPDOTOPT fi else OCAMLDEPDOTOPT="$ac_cv_prog_OCAMLDEPDOTOPT" fi if test "$OCAMLDEPDOTOPT" != "no"; then TMPVERSION=`$OCAMLDEPDOTOPT -version | tr -d '\015' | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: version differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamldep.opt discarded." >&5 $as_echo "version differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamldep.opt discarded." >&6; } else OCAMLDEP=$OCAMLDEPDOTOPT fi fi fi # checking for ocamlmktop if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlmktop", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlmktop; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLMKTOP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLMKTOP"; then ac_cv_prog_OCAMLMKTOP="$OCAMLMKTOP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLMKTOP="${ac_tool_prefix}ocamlmktop" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLMKTOP=$ac_cv_prog_OCAMLMKTOP if test -n "$OCAMLMKTOP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKTOP" >&5 $as_echo "$OCAMLMKTOP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLMKTOP"; then ac_ct_OCAMLMKTOP=$OCAMLMKTOP # Extract the first word of "ocamlmktop", so it can be a program name with args. set dummy ocamlmktop; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLMKTOP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLMKTOP"; then ac_cv_prog_ac_ct_OCAMLMKTOP="$ac_ct_OCAMLMKTOP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLMKTOP="ocamlmktop" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLMKTOP=$ac_cv_prog_ac_ct_OCAMLMKTOP if test -n "$ac_ct_OCAMLMKTOP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLMKTOP" >&5 $as_echo "$ac_ct_OCAMLMKTOP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLMKTOP" = x; then OCAMLMKTOP="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLMKTOP=$ac_ct_OCAMLMKTOP fi else OCAMLMKTOP="$ac_cv_prog_OCAMLMKTOP" fi # checking for ocamlmklib if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlmklib", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlmklib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLMKLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLMKLIB"; then ac_cv_prog_OCAMLMKLIB="$OCAMLMKLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLMKLIB="${ac_tool_prefix}ocamlmklib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLMKLIB=$ac_cv_prog_OCAMLMKLIB if test -n "$OCAMLMKLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKLIB" >&5 $as_echo "$OCAMLMKLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLMKLIB"; then ac_ct_OCAMLMKLIB=$OCAMLMKLIB # Extract the first word of "ocamlmklib", so it can be a program name with args. set dummy ocamlmklib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLMKLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLMKLIB"; then ac_cv_prog_ac_ct_OCAMLMKLIB="$ac_ct_OCAMLMKLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLMKLIB="ocamlmklib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLMKLIB=$ac_cv_prog_ac_ct_OCAMLMKLIB if test -n "$ac_ct_OCAMLMKLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLMKLIB" >&5 $as_echo "$ac_ct_OCAMLMKLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLMKLIB" = x; then OCAMLMKLIB="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLMKLIB=$ac_ct_OCAMLMKLIB fi else OCAMLMKLIB="$ac_cv_prog_OCAMLMKLIB" fi # checking for ocamldoc if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamldoc", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamldoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLDOC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLDOC"; then ac_cv_prog_OCAMLDOC="$OCAMLDOC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLDOC="${ac_tool_prefix}ocamldoc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLDOC=$ac_cv_prog_OCAMLDOC if test -n "$OCAMLDOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOC" >&5 $as_echo "$OCAMLDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLDOC"; then ac_ct_OCAMLDOC=$OCAMLDOC # Extract the first word of "ocamldoc", so it can be a program name with args. set dummy ocamldoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLDOC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLDOC"; then ac_cv_prog_ac_ct_OCAMLDOC="$ac_ct_OCAMLDOC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLDOC=$ac_cv_prog_ac_ct_OCAMLDOC if test -n "$ac_ct_OCAMLDOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDOC" >&5 $as_echo "$ac_ct_OCAMLDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLDOC" = x; then OCAMLDOC="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLDOC=$ac_ct_OCAMLDOC fi else OCAMLDOC="$ac_cv_prog_OCAMLDOC" fi # checking for ocamldoc.opt if test "$OCAMLDOC" != "no" ; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamldoc.opt", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamldoc.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLDOCDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLDOCDOTOPT"; then ac_cv_prog_OCAMLDOCDOTOPT="$OCAMLDOCDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLDOCDOTOPT="${ac_tool_prefix}ocamldoc.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLDOCDOTOPT=$ac_cv_prog_OCAMLDOCDOTOPT if test -n "$OCAMLDOCDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOCDOTOPT" >&5 $as_echo "$OCAMLDOCDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLDOCDOTOPT"; then ac_ct_OCAMLDOCDOTOPT=$OCAMLDOCDOTOPT # Extract the first word of "ocamldoc.opt", so it can be a program name with args. set dummy ocamldoc.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLDOCDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLDOCDOTOPT"; then ac_cv_prog_ac_ct_OCAMLDOCDOTOPT="$ac_ct_OCAMLDOCDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLDOCDOTOPT="ocamldoc.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLDOCDOTOPT=$ac_cv_prog_ac_ct_OCAMLDOCDOTOPT if test -n "$ac_ct_OCAMLDOCDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDOCDOTOPT" >&5 $as_echo "$ac_ct_OCAMLDOCDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLDOCDOTOPT" = x; then OCAMLDOCDOTOPT="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLDOCDOTOPT=$ac_ct_OCAMLDOCDOTOPT fi else OCAMLDOCDOTOPT="$ac_cv_prog_OCAMLDOCDOTOPT" fi if test "$OCAMLDOCDOTOPT" != "no"; then TMPVERSION=`$OCAMLDOCDOTOPT -version | tr -d '\015'` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: version differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamldoc.opt discarded." >&5 $as_echo "version differs from ocamlc $TMPVERSION != $OCAMLVERSION; ocamldoc.opt discarded." >&6; } else OCAMLDOC=$OCAMLDOCDOTOPT fi fi fi # checking for ocamlbuild if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlbuild", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlbuild; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLBUILD+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLBUILD"; then ac_cv_prog_OCAMLBUILD="$OCAMLBUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLBUILD=$ac_cv_prog_OCAMLBUILD if test -n "$OCAMLBUILD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLBUILD" >&5 $as_echo "$OCAMLBUILD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLBUILD"; then ac_ct_OCAMLBUILD=$OCAMLBUILD # Extract the first word of "ocamlbuild", so it can be a program name with args. set dummy ocamlbuild; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLBUILD+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLBUILD"; then ac_cv_prog_ac_ct_OCAMLBUILD="$ac_ct_OCAMLBUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLBUILD=$ac_cv_prog_ac_ct_OCAMLBUILD if test -n "$ac_ct_OCAMLBUILD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLBUILD" >&5 $as_echo "$ac_ct_OCAMLBUILD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLBUILD" = x; then OCAMLBUILD="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLBUILD=$ac_ct_OCAMLBUILD fi else OCAMLBUILD="$ac_cv_prog_OCAMLBUILD" fi if test "x$OCAMLC" = "xno"; then as_fn_error $? "You must install the OCaml compiler, at least version $MIN_OCAML_VERSION (or run: make compiler)" "$LINENO" 5 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')" WIN32=1 EXE=.exe else EXE= WIN32=0 fi # AC_PREFIX_DEFAULT must be at the top level, which is the reason for the # somewhat convoluted pair of sed expressions... # Check whether --enable-version_check was given. if test "${enable_version_check+set}" = set; then : enableval=$enable_version_check; fi # Check whether --enable-checks was given. if test "${enable_checks+set}" = set; then : enableval=$enable_checks; fi # Check whether --enable-developer_mode was given. if test "${enable_developer_mode+set}" = set; then : enableval=$enable_developer_mode; fi # Check whether --with-mccs was given. if test "${with_mccs+set}" = set; then : withval=$with_mccs; else MCCS_DEFAULT=yes fi # Check whether --with-0install-solver was given. if test "${with_0install_solver+set}" = set; then : withval=$with_0install_solver; fi # Check whether --with-libacl was given. if test "${with_libacl+set}" = set; then : withval=$with_libacl; else with_libacl=auto fi # Check whether --with-private_runtime was given. if test "${with_private_runtime+set}" = set; then : withval=$with_private_runtime; else with_private_runtime=no fi # Check whether --enable-cold_check was given. if test "${enable_cold_check+set}" = set; then : enableval=$enable_cold_check; COLD_CHECK=yes fi if test "x" != "x$LIB_PREFIX"; then : CPATH=$CPATH:$LIB_PREFIX/include LIBRARY_PATH=$LIBRARY_PATH:$LIB_PREFIX/lib export CPATH LIBRARY_PATH fi LIB_PREFIX=$LIB_PREFIX CPATH=$CPATH LIBRARY_PATH=$LIBRARY_PATH # Check that OCaml version is greater or equal to 4.02.3 # Native Windows builds require at least 4.06.0 for the Unicode runtime. for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done if test "x${enable_version_check}" != "xno"; then : if test ${WIN32} -eq 1 ; then : MIN_OCAML_VERSION=4.06.0 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 "$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 "$MIN_OCAML_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=`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"` if test "$ax_compare_version" = "true" ; then as_fn_error $? "Your version of OCaml: $OCAMLVERSION is not supported" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler type" >&5 $as_echo_n "checking for compiler type... " >&6; } CCOMP_TYPE=`$OCAML shell/print_config.ml ccomp_type 2>/dev/null | fgrep -v "Cannot find" || $OCAMLC -config | tr -d '\r' | sed -n -e "s/ccomp_type: //p"` if test "$?" -eq 0 ; then : else as_fn_error $? "failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCOMP_TYPE" >&5 $as_echo "$CCOMP_TYPE" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler architecture" >&5 $as_echo_n "checking for compiler architecture... " >&6; } ARCH=`$OCAML shell/print_config.ml arch 2>/dev/null | fgrep -v "Cannot find" || $OCAMLC -config | tr -d '\r' | sed -n -e "s/architecture: //p"` if test "$?" -eq 0 ; then : else as_fn_error $? "failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH" >&5 $as_echo "$ARCH" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler system" >&5 $as_echo_n "checking for compiler system... " >&6; } SYSTEM=`$OCAML shell/print_config.ml system 2>/dev/null | fgrep -v "Cannot find" || $OCAMLC -config | tr -d '\r' | sed -n -e "s/system: //p"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM" >&5 $as_echo "$SYSTEM" >&6; } LIB_PREPEND= INC_PREPEND= # Need the C compiler used for OCaml (important on Windows, as both x86 and x64 are used) if test "$OCAMLBEST" = "opt"; then : OCAMLBESTCC=$OCAMLOPT else OCAMLBESTCC=$OCAMLC fi OCAML_CC="$($OCAMLBESTCC -config | sed -n -e "s/native_c_compiler: \(.*\) .*/\1/p")" set dummy ${OCAML_CC}; OCAML_TEST_CC=$2 if test ! -x ${OCAML_TEST_CC}; then : if test "x${CCOMP_TYPE}" = "xmsvc"; then : if test "${ARCH}" = "i386"; then : SDK_ARCH=x86 else SDK_ARCH=x64 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an installed Microsoft C Compiler for ${SDK_ARCH}" >&5 $as_echo_n "checking for an installed Microsoft C Compiler for ${SDK_ARCH}... " >&6; } eval `PATH="$PRE_BOOTSTRAP_PATH" bash ./shell/msvs-detect --arch=$SDK_ARCH; echo RESULT=$?` if test "x$MSVS_NAME" = "x" ; then : if test ${RESULT} -eq 0 ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: from PATH" >&5 $as_echo "from PATH" >&6; } else as_fn_error $? "no" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: from $MSVS_NAME" >&5 $as_echo "from $MSVS_NAME" >&6; } export PATH_PREPEND="${MSVS_PATH}${PATH_PREPEND}" # Note that we put ${MSVS_PATH} here NOT ${PATH_PREPEND} so that the bootstrap path isn't repeated export PATH="${MSVS_PATH}$PATH" LIB_PREPEND="${MSVS_LIB}" INC_PREPEND="${MSVS_INC}" export Lib="${MSVS_LIB}$LIB" export Include="${MSVS_INC}$INCLUDE" fi fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in "${OCAML_CC}" gcc cc do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in "${OCAML_CC}" gcc cc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x${enable_developer_mode}" = "xyes"; then : DEVELOPER=true echo "-D" > src/core/developer echo "DEVELOPER" >> src/core/developer else DEVELOPER=false rm -f src/core/developer fi if test "x${with_mccs}" = "xno"; then : MCCS_ENABLED=false else MCCS_ENABLED=true fi if test "x${with_0install_solver}" = "xyes"; then : OPAM_0INSTALL_SOLVER_ENABLED=true else OPAM_0INSTALL_SOLVER_ENABLED=false fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "x${with_libacl}" != "xno"; then : have_libacl=yes ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default" if test "x$ac_cv_header_acl_libacl_h" = xyes; then : else have_libacl=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_perm" >&5 $as_echo_n "checking for library containing acl_get_perm... " >&6; } if ${ac_cv_search_acl_get_perm+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char acl_get_perm (); int main () { return acl_get_perm (); ; return 0; } _ACEOF for ac_lib in '' acl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_acl_get_perm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_acl_get_perm+:} false; then : break fi done if ${ac_cv_search_acl_get_perm+:} false; then : else ac_cv_search_acl_get_perm=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_perm" >&5 $as_echo "$ac_cv_search_acl_get_perm" >&6; } ac_res=$ac_cv_search_acl_get_perm if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else have_libacl=no fi if test "x${SYSTEM}" = "xcygwin"; then : if test "x${have_libacl}" = "xno"; then : as_fn_error $? "opam on Cygwin requires libacl" "$LINENO" 5 else with_libacl=yes fi fi if test "x${with_libacl}${have_libacl}" = "xyesno"; then : as_fn_error $? "libacl not found" "$LINENO" 5 fi fi if test "x${with_libacl}" = "xyes"; then : if test "x${ac_cv_search_acl_get_perm}" = "xnone required"; then : else CONF_LIBACL_LINK=${ac_cv_search_acl_get_perm} fi fi CONF_OCAMLFLAGS="-w -67" if test "x${CI}" != "x"; then : CONF_OCAMLFLAGS="${CONF_OCAMLFLAGS} -w -67" fi if test "x${CI}" != "x" -o "x${enable_developer_mode}" = "xyes"; then : if test "x${CCOMP_TYPE}" = "xmsvc"; then : CONF_CFLAGS="\"/WX\"" else CONF_CFLAGS="-Werror" fi else CONF_CFLAGS= fi if test ${WIN32} -eq 1 -a "$GCC" = "yes"; then : # Pre-Visual Studio 2013 Microsoft C compiler adhere to the C89 standard, well # at least the bit of it which requires variable declarations to appear before # statements. Adding this warning to GCC prevents accidentally using C99 and # then getting unexpected C2143 errors from older Microsoft C compilers. I'm # not aware of an equivalent option for the Microsoft C compiler. CC="$CC -Wdeclaration-after-statement" fi if test ${WIN32} -eq 1 ; then : if test "$GCC" = "yes"; then : if test "x${CC64}" = "x" ; then : if test "$ARCH" = "i386" ; then : T_CC64=x86_64-w64-mingw32-gcc else T_CC64=i686-w64-mingw32-gcc fi fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}${T_CC64}", so it can be a program name with args. set dummy ${ac_tool_prefix}${T_CC64}; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC64"; then ac_cv_prog_CC64="$CC64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC64="${ac_tool_prefix}${T_CC64}" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC64=$ac_cv_prog_CC64 if test -n "$CC64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC64" >&5 $as_echo "$CC64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC64"; then ac_ct_CC64=$CC64 # Extract the first word of "${T_CC64}", so it can be a program name with args. set dummy ${T_CC64}; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC64"; then ac_cv_prog_ac_ct_CC64="$ac_ct_CC64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC64="${T_CC64}" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC64=$ac_cv_prog_ac_ct_CC64 if test -n "$ac_ct_CC64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC64" >&5 $as_echo "$ac_ct_CC64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC64" = x; then CC64="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC64=$ac_ct_CC64 fi else CC64="$ac_cv_prog_CC64" fi if test "x${CC64}" != "xno" ; then : echo "${CC64} -o " > src/stubs/win32/cc64 echo " -Wdeclaration-after-statement " >> src/stubs/win32/cc64 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Microsoft Linker needs a PATH shim" >&5 $as_echo_n "checking whether Microsoft Linker needs a PATH shim... " >&6; } PREV_PREPEND="$PATH_PREPEND" PATH_PREPEND=$(bash ./shell/check_linker) if test "x${PATH_PREPEND}" = "x${PREV_PREPEND}" ; then : PATH_PREPEND_RESULT=no else PATH_PREPEND_RESULT=yes fi PATH_PREPEND=`echo "${PATH_PREPEND}" | sed -e 's/#/\\\\#/g' -e 's/\\$/$$/g'` LIB_PREPEND=`echo ${LIB_PREPEND} | sed -e 's/#/\\\\#/g' -e 's/\\$/$$/g'` INC_PREPEND=`echo ${INC_PREPEND} | sed -e 's/#/\\\\#/g' -e 's/\\$/$$/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PREPEND_RESULT" >&5 $as_echo "$PATH_PREPEND_RESULT" >&6; } if test "$ARCH" = "i386" ; then : COMP_ARCH=x64 else COMP_ARCH=x86 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a way to invoke an $COMP_ARCH C compiler" >&5 $as_echo_n "checking for a way to invoke an $COMP_ARCH C compiler... " >&6; } eval `PATH="$PRE_BOOTSTRAP_PATH" bash ./shell/msvs-detect --arch=$COMP_ARCH` if test "x$MSVS_NAME" = "x" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CC64=no else { $as_echo "$as_me:${as_lineno-$LINENO}: result: from $MSVS_NAME" >&5 $as_echo "from $MSVS_NAME" >&6; } CL_FULL="`PATH="${MSVS_PATH}:${PATH}" which cl | cygpath -f - -w`" MSVS_PATH="`echo "${MSVS_PATH}" | cygpath -f - -wp`" echo "cl /nologo /Fe" > src/stubs/win32/cc64 echo " " >> src/stubs/win32/cc64 echo "PATH" >> src/stubs/win32/cc64 echo "${MSVS_PATH}" >> src/stubs/win32/cc64 echo "LIB" >> src/stubs/win32/cc64 echo "${MSVS_LIB}" >> src/stubs/win32/cc64 echo "INCLUDE" >> src/stubs/win32/cc64 echo "${MSVS_INC}" >> src/stubs/win32/cc64 fi fi if test "x${CC64}" = "xno" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Complementary C compiler not found - opam-putenv will not be built" >&5 $as_echo "$as_me: WARNING: Complementary C compiler not found - opam-putenv will not be built" >&2;} fi fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlobjinfo", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlobjinfo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLOBJINFO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLOBJINFO"; then ac_cv_prog_OCAMLOBJINFO="$OCAMLOBJINFO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLOBJINFO="${ac_tool_prefix}ocamlobjinfo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLOBJINFO=$ac_cv_prog_OCAMLOBJINFO if test -n "$OCAMLOBJINFO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOBJINFO" >&5 $as_echo "$OCAMLOBJINFO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLOBJINFO"; then ac_ct_OCAMLOBJINFO=$OCAMLOBJINFO # Extract the first word of "ocamlobjinfo", so it can be a program name with args. set dummy ocamlobjinfo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLOBJINFO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLOBJINFO"; then ac_cv_prog_ac_ct_OCAMLOBJINFO="$ac_ct_OCAMLOBJINFO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLOBJINFO="ocamlobjinfo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLOBJINFO=$ac_cv_prog_ac_ct_OCAMLOBJINFO if test -n "$ac_ct_OCAMLOBJINFO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLOBJINFO" >&5 $as_echo "$ac_ct_OCAMLOBJINFO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLOBJINFO" = x; then OCAMLOBJINFO="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLOBJINFO=$ac_ct_OCAMLOBJINFO fi else OCAMLOBJINFO="$ac_cv_prog_OCAMLOBJINFO" fi # checking for ocamlfind if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlfind", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLFIND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLFIND"; then ac_cv_prog_OCAMLFIND="$OCAMLFIND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLFIND=$ac_cv_prog_OCAMLFIND if test -n "$OCAMLFIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5 $as_echo "$OCAMLFIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLFIND"; then ac_ct_OCAMLFIND=$OCAMLFIND # Extract the first word of "ocamlfind", so it can be a program name with args. set dummy ocamlfind; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLFIND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLFIND"; then ac_cv_prog_ac_ct_OCAMLFIND="$ac_ct_OCAMLFIND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLFIND=$ac_cv_prog_ac_ct_OCAMLFIND if test -n "$ac_ct_OCAMLFIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLFIND" >&5 $as_echo "$ac_ct_OCAMLFIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLFIND" = x; then OCAMLFIND="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLFIND=$ac_ct_OCAMLFIND fi else OCAMLFIND="$ac_cv_prog_OCAMLFIND" fi if test "$OCAMLFIND" != "no"; then : if test "$OCAMLOBJINFO" = "no"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ocamlobjinfo not found; cannot verify ocamlfind" >&5 $as_echo "$as_me: WARNING: ocamlobjinfo not found; cannot verify ocamlfind" >&2;} else if ! $OCAMLOBJINFO `$OCAMLFIND query -predicates byte -a-format findlib | tr -d '\015'` > /dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: site-lib is for a different version of OCaml; ocamlfind discarded." >&5 $as_echo "site-lib is for a different version of OCaml; ocamlfind discarded." >&6; } OCAMLFIND=no fi fi fi # Check whether --enable-certificate_check was given. if test "${enable_certificate_check+set}" = set; then : enableval=$enable_certificate_check; fi if test "x${enable_certificate_check}" = "xno"; then : curl_certificate_check=--insecure wget_certificate_check=--no-check-certificate fi for ac_prog in curl wget do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_FETCH+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$FETCH"; then ac_cv_prog_FETCH="$FETCH" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_FETCH="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi FETCH=$ac_cv_prog_FETCH if test -n "$FETCH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FETCH" >&5 $as_echo "$FETCH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$FETCH" && break done test -n "$FETCH" || FETCH="no" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dune", so it can be a program name with args. set dummy ${ac_tool_prefix}dune; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUNE+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUNE"; then ac_cv_prog_DUNE="$DUNE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUNE="${ac_tool_prefix}dune" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUNE=$ac_cv_prog_DUNE if test -n "$DUNE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUNE" >&5 $as_echo "$DUNE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DUNE"; then ac_ct_DUNE=$DUNE # Extract the first word of "dune", so it can be a program name with args. set dummy dune; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUNE+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUNE"; then ac_cv_prog_ac_ct_DUNE="$ac_ct_DUNE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUNE="dune" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUNE=$ac_cv_prog_ac_ct_DUNE if test -n "$ac_ct_DUNE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUNE" >&5 $as_echo "$ac_ct_DUNE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DUNE" = x; then DUNE="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUNE=$ac_ct_DUNE fi else DUNE="$ac_cv_prog_DUNE" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cppo", so it can be a program name with args. set dummy ${ac_tool_prefix}cppo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CPPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CPPO"; then ac_cv_prog_CPPO="$CPPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CPPO="${ac_tool_prefix}cppo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CPPO=$ac_cv_prog_CPPO if test -n "$CPPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPPO" >&5 $as_echo "$CPPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CPPO"; then ac_ct_CPPO=$CPPO # Extract the first word of "cppo", so it can be a program name with args. set dummy cppo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CPPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CPPO"; then ac_cv_prog_ac_ct_CPPO="$ac_ct_CPPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CPPO="cppo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CPPO=$ac_cv_prog_ac_ct_CPPO if test -n "$ac_ct_CPPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CPPO" >&5 $as_echo "$ac_ct_CPPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CPPO" = x; then CPPO="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CPPO=$ac_ct_CPPO fi else CPPO="$ac_cv_prog_CPPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}patch", so it can be a program name with args. set dummy ${ac_tool_prefix}patch; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PATCH+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PATCH"; then ac_cv_prog_PATCH="$PATCH" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PATCH="${ac_tool_prefix}patch" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PATCH=$ac_cv_prog_PATCH if test -n "$PATCH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5 $as_echo "$PATCH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_PATCH"; then ac_ct_PATCH=$PATCH # Extract the first word of "patch", so it can be a program name with args. set dummy patch; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_PATCH+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_PATCH"; then ac_cv_prog_ac_ct_PATCH="$ac_ct_PATCH" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_PATCH="patch" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_PATCH=$ac_cv_prog_ac_ct_PATCH if test -n "$ac_ct_PATCH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PATCH" >&5 $as_echo "$ac_ct_PATCH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_PATCH" = x; then PATCH="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PATCH=$ac_ct_PATCH fi else PATCH="$ac_cv_prog_PATCH" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}bunzip2", so it can be a program name with args. set dummy ${ac_tool_prefix}bunzip2; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_BUNZIP2+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$BUNZIP2"; then ac_cv_prog_BUNZIP2="$BUNZIP2" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_BUNZIP2="${ac_tool_prefix}bunzip2" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi BUNZIP2=$ac_cv_prog_BUNZIP2 if test -n "$BUNZIP2"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNZIP2" >&5 $as_echo "$BUNZIP2" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_BUNZIP2"; then ac_ct_BUNZIP2=$BUNZIP2 # Extract the first word of "bunzip2", so it can be a program name with args. set dummy bunzip2; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_BUNZIP2+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_BUNZIP2"; then ac_cv_prog_ac_ct_BUNZIP2="$ac_ct_BUNZIP2" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_BUNZIP2="bunzip2" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_BUNZIP2=$ac_cv_prog_ac_ct_BUNZIP2 if test -n "$ac_ct_BUNZIP2"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_BUNZIP2" >&5 $as_echo "$ac_ct_BUNZIP2" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_BUNZIP2" = x; then BUNZIP2="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac BUNZIP2=$ac_ct_BUNZIP2 fi else BUNZIP2="$ac_cv_prog_BUNZIP2" 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 "$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 "4.08.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"` if test "$ax_compare_version" = "true" ; then DUNE_SECONDARY=src_ext/secondary/ocaml/bin/ocaml else DUNE_SECONDARY= fi if test "x${COLD_CHECK}" = "xyes" ; then if test "x$PATCH" = "x" ; then as_fn_error $? "You must have patch installed." "$LINENO" 5 fi if test "x$BUNZIP2" = "x" ; then as_fn_error $? "You must have bunzip2 installed." "$LINENO" 5 fi fi if test "${OCAML_OS_TYPE}" = "Win32"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a workable solution for ln -s" >&5 $as_echo_n "checking for a workable solution for ln -s... " >&6; } ln -s configure conftestLink if test "`cmd /c dir conftestLink 2>/dev/null | fgrep SYMLINK`" = ""; then : LN_S="cp -a" else LN_S="ln -s" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN_S" >&5 $as_echo "$LN_S" >&6; } else LN_S="ln -s" fi if test x"$FETCH" = x"curl" ; then fetch="curl $curl_certificate_check -LSs -o \$(2) \$(1)" elif test x"$FETCH" = x"wget" ; then fetch="wget $wget_certificate_check -O \$(2) \$(1)" elif test x"${enable_checks}" != x"no" ; then if ! ${MAKE:-make} -q -C src_ext has-archives 2>/dev/null ; then as_fn_error $? "You must have either curl or wget installed." "$LINENO" 5 fi fi if test "x${with_private_runtime}" != "xno"; then : if test ${WIN32} -eq 1 -a "x${CCOMP_TYPE}" = "xcc"; then : CONF_MANIFEST_O=opam-manifest.o if test "$ARCH" = "i386" ; then : MANIFEST_ARCH=x86 RUNTIME_GCC_S=libgcc_s_sjlj-1 else MANIFEST_ARCH=amd64 RUNTIME_GCC_S=libgcc_s_seh-1 fi else CONF_MANIFEST_O= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-private-runtime ignored (not building on mingw)" >&5 $as_echo "$as_me: WARNING: --with-private-runtime ignored (not building on mingw)" >&2;} fi else CONF_MANIFEST_O= fi echo { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package unix" >&5 $as_echo_n "checking for OCaml findlib package unix... " >&6; } unset found unset pkg found=no for pkg in unix ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_unix=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_unix=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package bigarray" >&5 $as_echo_n "checking for OCaml findlib package bigarray... " >&6; } unset found unset pkg found=no for pkg in bigarray ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_bigarray=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_bigarray=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package extlib" >&5 $as_echo_n "checking for OCaml findlib package extlib... " >&6; } unset found unset pkg found=no for pkg in extlib ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_extlib=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_extlib=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package re" >&5 $as_echo_n "checking for OCaml findlib package re... " >&6; } unset found unset pkg found=no for pkg in re ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_re=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_re=no 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; } unset found unset pkg found=no for pkg in re.glob ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_re_glob=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_re_glob=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package cmdliner" >&5 $as_echo_n "checking for OCaml findlib package cmdliner... " >&6; } unset found unset pkg found=no for pkg in cmdliner ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_cmdliner=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_cmdliner=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package ocamlgraph" >&5 $as_echo_n "checking for OCaml findlib package ocamlgraph... " >&6; } unset found unset pkg found=no for pkg in ocamlgraph ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_ocamlgraph=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_ocamlgraph=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package cudf" >&5 $as_echo_n "checking for OCaml findlib package cudf... " >&6; } unset found unset pkg found=no for pkg in cudf ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_cudf=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_cudf=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package dose3.common" >&5 $as_echo_n "checking for OCaml findlib package dose3.common... " >&6; } unset found unset pkg found=no for pkg in dose3.common dose.common ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_dose3_common=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_dose3_common=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package dose3.algo" >&5 $as_echo_n "checking for OCaml findlib package dose3.algo... " >&6; } unset found unset pkg found=no for pkg in dose3.algo dose.algo ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_dose3_algo=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_dose3_algo=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package opam-file-format" >&5 $as_echo_n "checking for OCaml findlib package opam-file-format... " >&6; } unset found unset pkg found=no for pkg in opam-file-format ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_opam_file_format=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_opam_file_format=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package mccs" >&5 $as_echo_n "checking for OCaml findlib package mccs... " >&6; } unset found unset pkg found=no for pkg in mccs ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_mccs=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_mccs=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package opam-0install-cudf" >&5 $as_echo_n "checking for OCaml findlib package opam-0install-cudf... " >&6; } unset found unset pkg found=no for pkg in opam-0install-cudf ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_opam_0install_cudf=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_opam_0install_cudf=no fi if test "x${with_mccs}" = "xno" && test "x$OCAML_PKG_mccs" != "xno"; then : as_fn_error $? "Option --without-mccs is not available without uninstalling the 'mccs' package" "$LINENO" 5 fi if test "x${with_0install_solver}" = "xno" && test "x$OCAML_PKG_opam_0install_cudf" != "xno"; then : as_fn_error $? "Option --without-0install-solver is not available without uninstalling the 'opam-0install-cudf' package" "$LINENO" 5 fi if test "x$OCAML_PKG_opam_0install_cudf" != "xno"; then : OPAM_0INSTALL_SOLVER_ENABLED=true fi if test "x$MCCS_ENABLED" = "xtrue"; then : if test "x${CCOMP_TYPE}" != "xmsvc"; then : ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Curiously, CXX=g++ && GXX= seems to be how autoconf "signals" that no C++ # compiler was found. if test "x$CXX" = "xg++" -a "x$GXX" != "xyes"; then : if test "x$MCCS_DEFAULT" = "xyes"; then : MCCS_ENABLED=false else if test "x${enable_checks}" != "xno"; then : as_fn_error $? "A C++ compiler is required to build mccs" "$LINENO" 5 fi fi fi fi fi if test "x$OPAM_0INSTALL_SOLVER_ENABLED" = "xtrue" -a "x$OCAML_PKG_opam_0install_cudf" = "xno"; then : # 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 "$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 "4.08" | 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"` if test "$ax_compare_version" = "true" ; then as_fn_error $? "Your version of OCaml: $OCAMLVERSION does not support the requested 0install-solver. \ You can either re-run the configure script with --without-0install-solver or use make cold" "$LINENO" 5 fi fi echo if test "x${enable_checks}" != "xno" && { test "x$OCAML_PKG_extlib" = "xno" || test "x$OCAML_PKG_re" = "xno" || test "x$OCAML_PKG_cmdliner" = "xno" || test "x$OCAML_PKG_ocamlgraph" = "xno" || test "x$OCAML_PKG_cudf" = "xno" || test "x$OCAML_PKG_dose3_common" = "xno" || test "x$OCAML_PKG_opam_file_format" = "xno" || test "x$CPPO" = "x" || test "x$OCAML_PKG_mccs$MCCS_ENABLED" = "xnotrue" || test "x$OCAML_PKG_opam_0install_cudf$OPAM_0INSTALL_SOLVER_ENABLED" = "xnotrue";}; then : echo "============================================================================" echo "Some dependencies are missing. If you are just interested in the stand-alone" echo "'opam' binary, run 'make lib-ext' to download and include them." echo "============================================================================" echo hasalldeps="" else hasalldeps="true" fi if test "x$prefix" = "xNONE"; then prefix=$ac_default_prefix fi ac_config_files="$ac_config_files Makefile.config src/ocaml-flags-configure.sexp src/stubs/c-flags.sexp src/stubs/libacl/c-libraries.sexp" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by opam $as_me 2.1.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ opam config.status 2.1.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; "src/ocaml-flags-configure.sexp") CONFIG_FILES="$CONFIG_FILES src/ocaml-flags-configure.sexp" ;; "src/stubs/c-flags.sexp") CONFIG_FILES="$CONFIG_FILES src/stubs/c-flags.sexp" ;; "src/stubs/libacl/c-libraries.sexp") CONFIG_FILES="$CONFIG_FILES src/stubs/libacl/c-libraries.sexp" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi rm -f src/manifest/dune src/manifest/install.inc if test "x${with_private_runtime}" != "xno"; then : if test ${WIN32} -eq 1 -a "x${CCOMP_TYPE}" = "xcc"; then : cd src/manifest ${LN_S} -f dune-manifest dune ${LN_S} -f install.${ARCH} install.inc cd ../.. else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-private-runtime ignored (not building on mingw)" >&5 $as_echo "$as_me: WARNING: --with-private-runtime ignored (not building on mingw)" >&2;} fi fi rm -f src/stubs/win32/dune if test ${WIN32} -eq 1; then : cd src/stubs/win32 ${LN_S} -f dune-win32 dune cd ../../.. fi rm -f src/stubs/libacl/dune if test "x${with_libacl}" = "xyes" ; then : cd src/stubs/libacl ${LN_S} -f dune-libacl dune cd ../../.. fi echo bindir="`eval echo ${bindir}`" bindir="`eval echo ${bindir}`" mandir="`eval echo ${mandir}`" mandir="`eval echo ${mandir}`" if test "x$MCCS_ENABLED" = "xfalse" -a "x$OPAM_0INSTALL_SOLVER_ENABLED" = "xfalse"; then : echo "Opam will be built WITHOUT a built-in solver" else echo "Opam will be built WITH a built-in solver" fi echo echo Executables will be installed in ${bindir} echo Manual pages will be installed in ${mandir} opam-2.1.2/configure.ac0000644000650106067230000003724214153703467013617 0ustar glonduseddnl The line below must be formatted AC_INIT(opam,VERSION) with no extra spaces AC_INIT(opam,2.1.2) AC_COPYRIGHT(Copyright 2012-2019 OcamlPro SAS) AC_CONFIG_MACRO_DIR([m4]) # If a bootstrap compiler has been built, always use it PATH_PREPEND= PRE_BOOTSTRAP_PATH="$PATH" AS_IF([ test -x bootstrap/ocaml/bin/ocamlc -o -x bootstrap/ocaml/bin/ocamlopt ],[ echo Bootstrap compiler found -- activating unset OCAMLLIB export PATH_PREPEND=`pwd`/bootstrap/ocaml/bin: export PATH="$PATH_PREPEND$PATH" ]) # XXX This isn't strictly correct for Windows MIN_OCAML_VERSION=4.02.3 AC_PROG_OCAML if test "x$OCAMLC" = "xno"; then AC_MSG_ERROR([You must install the OCaml compiler, at least version $MIN_OCAML_VERSION (or run: make compiler)]) fi AC_CHECK_OCAML_OS_TYPE AS_IF([ test "${OCAML_OS_TYPE}" = "Win32"],[ OCAMLLIB="$(echo "${OCAMLLIB}" | tr -d '\015' | sed -e 's|\\|/|g')" WIN32=1 EXE=.exe ],[ EXE= WIN32=0 ]) AC_SUBST(WIN32) AC_SUBST(EXE) # AC_PREFIX_DEFAULT must be at the top level, which is the reason for the # somewhat convoluted pair of sed expressions... AC_PREFIX_DEFAULT([`echo "os_type: ${OCAML_OS_TYPE}" | sed -e "s;^os_type: Win32;C:/OPAM;" -e "s;^os_type:.*;/usr/local;"`]) AC_ARG_ENABLE([version_check], AS_HELP_STRING([--disable-version-check], [Do not check OCaml version]) ) AC_ARG_ENABLE([checks], AS_HELP_STRING([--disable-checks], [Assume OCaml dependencies are OK without checking]) ) AC_ARG_ENABLE([developer_mode], AC_HELP_STRING([--enable-developer-mode], [Enable developer features]) ) AC_ARG_WITH([mccs], AC_HELP_STRING([--without-mccs], [Compile without a built-in Cudf solver (only works if 'mccs' is not otherwise installed)]),[],[MCCS_DEFAULT=yes] ) AC_ARG_WITH([0install-solver], AC_HELP_STRING([--with-0install-solver], [Compile with the built-in 0install solver (--without-0install-solver only works if 'opam-0install-cudf' is not otherwise installed)]) ) AC_ARG_WITH([libacl], AC_HELP_STRING([--with-libacl], [Compile opam with libacl support]),,[with_libacl=auto]) AC_ARG_WITH([private_runtime], AC_HELP_STRING([--with-private-runtime], [For a mingw-w64 build, manifest the runtime DLLs locally in Opam.Runtime.arch]),,[with_private_runtime=no] ) AC_ARG_ENABLE([cold_check], AC_HELP_STRING([--enable-cold-check], [Fail on some check necessary for make cold]),[COLD_CHECK=yes],[] ) AS_IF([test "x" != "x$LIB_PREFIX"], [ CPATH=$CPATH:$LIB_PREFIX/include LIBRARY_PATH=$LIBRARY_PATH:$LIB_PREFIX/lib export CPATH LIBRARY_PATH ]) AC_SUBST(LIB_PREFIX,$LIB_PREFIX) AC_SUBST(CPATH,$CPATH) AC_SUBST(LIBRARY_PATH,$LIBRARY_PATH) # Check that OCaml version is greater or equal to 4.02.3 # Native Windows builds require at least 4.06.0 for the Unicode runtime. AS_IF([test "x${enable_version_check}" != "xno"], [ AS_IF([ test ${WIN32} -eq 1 ],[MIN_OCAML_VERSION=4.06.0]) AX_COMPARE_VERSION( [$OCAMLVERSION], [lt], [$MIN_OCAML_VERSION], AC_MSG_ERROR([Your version of OCaml: $OCAMLVERSION is not supported])) ]) AC_MSG_CHECKING([for compiler type]) CCOMP_TYPE=`$OCAML shell/print_config.ml ccomp_type 2>/dev/null | fgrep -v "Cannot find" || $OCAMLC -config | tr -d '\r' | sed -n -e "s/ccomp_type: //p"` AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([failed])] ) AC_MSG_RESULT([$CCOMP_TYPE]) AC_MSG_CHECKING([for compiler architecture]) ARCH=`$OCAML shell/print_config.ml arch 2>/dev/null | fgrep -v "Cannot find" || $OCAMLC -config | tr -d '\r' | sed -n -e "s/architecture: //p"` AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([failed])] ) AC_MSG_RESULT([$ARCH]) AC_MSG_CHECKING([for compiler system]) SYSTEM=`$OCAML shell/print_config.ml system 2>/dev/null | fgrep -v "Cannot find" || $OCAMLC -config | tr -d '\r' | sed -n -e "s/system: //p"` AC_MSG_RESULT([$SYSTEM]) AC_SUBST(SYSTEM) LIB_PREPEND= INC_PREPEND= # Need the C compiler used for OCaml (important on Windows, as both x86 and x64 are used) AS_IF([test "$OCAMLBEST" = "opt"],[OCAMLBESTCC=$OCAMLOPT],[OCAMLBESTCC=$OCAMLC]) OCAML_CC="$($OCAMLBESTCC -config | sed -n -e "s/native_c_compiler: \(.*\) .*/\1/p")" set dummy ${OCAML_CC}; OCAML_TEST_CC=$2 AS_IF([test ! -x ${OCAML_TEST_CC}],[ AS_IF([test "x${CCOMP_TYPE}" = "xmsvc"],[ AS_IF([test "${ARCH}" = "i386"],[SDK_ARCH=x86],[SDK_ARCH=x64]) AC_MSG_CHECKING([for an installed Microsoft C Compiler for ${SDK_ARCH}]) eval `PATH="$PRE_BOOTSTRAP_PATH" bash ./shell/msvs-detect --arch=$SDK_ARCH; echo RESULT=$?` AS_IF([ test "x$MSVS_NAME" = "x" ], [ AS_IF([ test ${RESULT} -eq 0 ], [ AC_MSG_RESULT([from PATH]) ],[ AC_MSG_ERROR([no]) ]) ],[ AC_MSG_RESULT([from $MSVS_NAME]) export PATH_PREPEND="${MSVS_PATH}${PATH_PREPEND}" # Note that we put ${MSVS_PATH} here NOT ${PATH_PREPEND} so that the bootstrap path isn't repeated export PATH="${MSVS_PATH}$PATH" LIB_PREPEND="${MSVS_LIB}" INC_PREPEND="${MSVS_INC}" export Lib="${MSVS_LIB}$LIB" export Include="${MSVS_INC}$INCLUDE" ]) ]) ]) AC_PROG_CC(["${OCAML_CC}" gcc cc]) AS_IF([test "x${enable_developer_mode}" = "xyes"],[ AC_SUBST(DEVELOPER,true) echo "-D" > src/core/developer echo "DEVELOPER" >> src/core/developer ],[ AC_SUBST(DEVELOPER,false) rm -f src/core/developer ]) AS_IF([test "x${with_mccs}" = "xno"], [AC_SUBST(MCCS_ENABLED,false)], [AC_SUBST(MCCS_ENABLED,true)]) AS_IF([test "x${with_0install_solver}" = "xyes"], [AC_SUBST(OPAM_0INSTALL_SOLVER_ENABLED,true)], [AC_SUBST(OPAM_0INSTALL_SOLVER_ENABLED,false)]) AS_IF([test "x${with_libacl}" != "xno"],[ have_libacl=yes AC_CHECK_HEADER([acl/libacl.h],,[have_libacl=no]) AC_SEARCH_LIBS([acl_get_perm],[acl],,[have_libacl=no]) AS_IF([test "x${SYSTEM}" = "xcygwin"],[ AS_IF([test "x${have_libacl}" = "xno"],[AC_MSG_ERROR([opam on Cygwin requires libacl])],[with_libacl=yes]) ]) AS_IF([test "x${with_libacl}${have_libacl}" = "xyesno"],[AC_MSG_ERROR([libacl not found])]) ]) AS_IF([test "x${with_libacl}" = "xyes"],[ AS_IF([test "x${ac_cv_search_acl_get_perm}" = "xnone required"],[ AC_SUBST(CONF_LIBACL_LINK,[]) ],[ AC_SUBST(CONF_LIBACL_LINK,[${ac_cv_search_acl_get_perm}]) ]) ]) CONF_OCAMLFLAGS="-w -67" AS_IF([test "x${CI}" != "x"], [ CONF_OCAMLFLAGS="${CONF_OCAMLFLAGS} -w -67" ],[]) AS_IF([test "x${CI}" != "x" -o "x${enable_developer_mode}" = "xyes"],[ AS_IF([test "x${CCOMP_TYPE}" = "xmsvc"],[ CONF_CFLAGS="\"/WX\"" ],[ CONF_CFLAGS="-Werror" ]) ],[ CONF_CFLAGS= ]) AC_SUBST(CONF_OCAMLFLAGS) AC_SUBST(CONF_CFLAGS) AS_IF([ test ${WIN32} -eq 1 -a "$GCC" = "yes"],[ # Pre-Visual Studio 2013 Microsoft C compiler adhere to the C89 standard, well # at least the bit of it which requires variable declarations to appear before # statements. Adding this warning to GCC prevents accidentally using C99 and # then getting unexpected C2143 errors from older Microsoft C compilers. I'm # not aware of an equivalent option for the Microsoft C compiler. CC="$CC -Wdeclaration-after-statement" AC_SUBST(CC) ]) AS_IF([ test ${WIN32} -eq 1 ],[ AS_IF([ test "$GCC" = "yes"], [ AS_IF([ test "x${CC64}" = "x" ], [ AS_IF([ test "$ARCH" = "i386" ],[T_CC64=x86_64-w64-mingw32-gcc],[T_CC64=i686-w64-mingw32-gcc])]) AC_CHECK_TOOL(CC64,[${T_CC64}],[no]) AS_IF([ test "x${CC64}" != "xno" ],[ echo "${CC64} -o " > src/stubs/win32/cc64 echo " -Wdeclaration-after-statement " >> src/stubs/win32/cc64 ]) ],[ AC_MSG_CHECKING([whether Microsoft Linker needs a PATH shim]) PREV_PREPEND="$PATH_PREPEND" PATH_PREPEND=$(bash ./shell/check_linker) AS_IF([test "x${PATH_PREPEND}" = "x${PREV_PREPEND}" ],[PATH_PREPEND_RESULT=no],[PATH_PREPEND_RESULT=yes]) PATH_PREPEND=`echo "${PATH_PREPEND}" | sed -e 's/#/\\\\#/g' -e 's/\\$/$$/g'` LIB_PREPEND=`echo ${LIB_PREPEND} | sed -e 's/#/\\\\#/g' -e 's/\\$/$$/g'` INC_PREPEND=`echo ${INC_PREPEND} | sed -e 's/#/\\\\#/g' -e 's/\\$/$$/g'` AC_SUBST(PATH_PREPEND) AC_SUBST(LIB_PREPEND) AC_SUBST(INC_PREPEND) AC_MSG_RESULT([$PATH_PREPEND_RESULT]) AS_IF([ test "$ARCH" = "i386" ],[COMP_ARCH=x64],[COMP_ARCH=x86]) AC_MSG_CHECKING([for a way to invoke an $COMP_ARCH C compiler]) eval `PATH="$PRE_BOOTSTRAP_PATH" bash ./shell/msvs-detect --arch=$COMP_ARCH` AS_IF([ test "x$MSVS_NAME" = "x" ], [ AC_MSG_RESULT([no]) CC64=no ],[ AC_MSG_RESULT([from $MSVS_NAME]) CL_FULL="`PATH="${MSVS_PATH}:${PATH}" which cl | cygpath -f - -w`" MSVS_PATH="`echo "${MSVS_PATH}" | cygpath -f - -wp`" echo "cl /nologo /Fe" > src/stubs/win32/cc64 echo " " >> src/stubs/win32/cc64 echo "PATH" >> src/stubs/win32/cc64 echo "${MSVS_PATH}" >> src/stubs/win32/cc64 echo "LIB" >> src/stubs/win32/cc64 echo "${MSVS_LIB}" >> src/stubs/win32/cc64 echo "INCLUDE" >> src/stubs/win32/cc64 echo "${MSVS_INC}" >> src/stubs/win32/cc64 ]) ]) AS_IF([ test "x${CC64}" = "xno" ],[ AC_MSG_WARN([Complementary C compiler not found - opam-putenv will not be built]) ]) ]) AC_PROG_FINDLIB AC_ARG_ENABLE([certificate_check], AS_HELP_STRING([--disable-certificate-check], [Do not check the certificate of opam's dependency archives])dnl ' ) AS_IF([test "x${enable_certificate_check}" = "xno"], [ curl_certificate_check=--insecure wget_certificate_check=--no-check-certificate ]) AC_CHECK_PROGS(FETCH,[curl wget],no) AC_CHECK_TOOL(DUNE,dune) AC_CHECK_TOOL(CPPO,cppo) AC_CHECK_TOOL(PATCH,patch) AC_CHECK_TOOL(BUNZIP2,bunzip2) AX_COMPARE_VERSION([$OCAMLVERSION], [lt], [4.08.0], [DUNE_SECONDARY=src_ext/secondary/ocaml/bin/ocaml], [DUNE_SECONDARY=]) AC_SUBST([DUNE_SECONDARY]) if test "x${COLD_CHECK}" = "xyes" ; then if test "x$PATCH" = "x" ; then AC_MSG_ERROR([You must have patch installed.]) fi if test "x$BUNZIP2" = "x" ; then AC_MSG_ERROR([You must have bunzip2 installed.]) fi fi AS_IF([test "${OCAML_OS_TYPE}" = "Win32"],[ AC_MSG_CHECKING([for a workable solution for ln -s]) ln -s configure conftestLink AS_IF([test "`cmd /c dir conftestLink 2>/dev/null | fgrep SYMLINK`" = ""],[LN_S="cp -a"],[LN_S="ln -s"]) AC_MSG_RESULT([$LN_S]) ],[ LN_S="ln -s" ]) AC_SUBST(LN_S) if test x"$FETCH" = x"curl" ; then AC_SUBST(fetch, "curl $curl_certificate_check -LSs -o \$(2) \$(1)") elif test x"$FETCH" = x"wget" ; then AC_SUBST(fetch, "wget $wget_certificate_check -O \$(2) \$(1)") elif test x"${enable_checks}" != x"no" ; then if ! ${MAKE:-make} -q -C src_ext has-archives 2>/dev/null ; then AC_MSG_ERROR([You must have either curl or wget installed.]) fi fi AS_IF([test "x${with_private_runtime}" != "xno"],[ AS_IF([test ${WIN32} -eq 1 -a "x${CCOMP_TYPE}" = "xcc"],[ CONF_MANIFEST_O=opam-manifest.o AS_IF([ test "$ARCH" = "i386" ],[ MANIFEST_ARCH=x86 RUNTIME_GCC_S=libgcc_s_sjlj-1 ],[ MANIFEST_ARCH=amd64 RUNTIME_GCC_S=libgcc_s_seh-1 ]) AC_SUBST(MANIFEST_ARCH) AC_SUBST(RUNTIME_GCC_S) ],[ CONF_MANIFEST_O= AC_MSG_WARN([--with-private-runtime ignored (not building on mingw)]) ]) ],[CONF_MANIFEST_O=]) AC_SUBST(CONF_MANIFEST_O) echo AC_CHECK_OCAML_PKG([unix]) AC_CHECK_OCAML_PKG([bigarray]) AC_CHECK_OCAML_PKG([extlib]) AC_CHECK_OCAML_PKG([re]) AC_CHECK_OCAML_PKG([re.glob]) AC_CHECK_OCAML_PKG([cmdliner]) AC_CHECK_OCAML_PKG([ocamlgraph]) AC_CHECK_OCAML_PKG([cudf]) AC_CHECK_OCAML_PKG(dose3.common,dose.common) AC_CHECK_OCAML_PKG(dose3.algo,dose.algo) AC_CHECK_OCAML_PKG([opam-file-format]) AC_CHECK_OCAML_PKG([mccs]) AC_CHECK_OCAML_PKG([opam-0install-cudf]) AS_IF([test "x${with_mccs}" = "xno" && test "x$OCAML_PKG_mccs" != "xno"], [AC_MSG_ERROR([Option --without-mccs is not available without uninstalling the 'mccs' package])]) AS_IF([test "x${with_0install_solver}" = "xno" && test "x$OCAML_PKG_opam_0install_cudf" != "xno"], [AC_MSG_ERROR([Option --without-0install-solver is not available without uninstalling the 'opam-0install-cudf' package])]) dnl -- Enable 0install-solver if the package is available AS_IF([test "x$OCAML_PKG_opam_0install_cudf" != "xno"], [AC_SUBST(OPAM_0INSTALL_SOLVER_ENABLED,true)]) dnl -- that's what we would like to do, but no way to disable mccs in jbuilder dnl -- if it's installed, at the moment dnl AS_IF([test "x${with_mccs}" != "xno"], dnl AC_CHECK_OCAML_PKG([mccs]), dnl [echo "checking for OCaml findlib package mccs... disabled" dnl AC_SUBST(OCAML_PKG_mccs,"no")]) AS_IF([test "x$MCCS_ENABLED" = "xtrue"],[ AS_IF([test "x${CCOMP_TYPE}" != "xmsvc"],[ AC_PROG_CXX # Curiously, CXX=g++ && GXX= seems to be how autoconf "signals" that no C++ # compiler was found. AS_IF([test "x$CXX" = "xg++" -a "x$GXX" != "xyes"],[ AS_IF([test "x$MCCS_DEFAULT" = "xyes"],[ AC_SUBST(MCCS_ENABLED,false) ],[ AS_IF([test "x${enable_checks}" != "xno"],[ AC_MSG_ERROR([A C++ compiler is required to build mccs]) ]) ]) ]) ]) ]) AS_IF([test "x$OPAM_0INSTALL_SOLVER_ENABLED" = "xtrue" -a "x$OCAML_PKG_opam_0install_cudf" = "xno"],[ AX_COMPARE_VERSION([$OCAMLVERSION], [lt], [4.08],[ AC_MSG_ERROR([Your version of OCaml: $OCAMLVERSION does not support the requested 0install-solver. \ You can either re-run the configure script with --without-0install-solver or use make cold]) ]) ]) dnl echo dnl echo "extlib........................ ${OCAML_PKG_extlib}" dnl echo "re............................ ${OCAML_PKG_re}" dnl echo "cmdliner...................... ${OCAML_PKG_cmdliner}" dnl echo "graph......................... ${OCAML_PKG_ocamlgraph}" dnl echo "cudf.......................... ${OCAML_PKG_cudf}" dnl echo "dose3......................... ${OCAML_PKG_dose3}" echo AS_IF([test "x${enable_checks}" != "xno" && { test "x$OCAML_PKG_extlib" = "xno" || test "x$OCAML_PKG_re" = "xno" || test "x$OCAML_PKG_cmdliner" = "xno" || test "x$OCAML_PKG_ocamlgraph" = "xno" || test "x$OCAML_PKG_cudf" = "xno" || test "x$OCAML_PKG_dose3_common" = "xno" || test "x$OCAML_PKG_opam_file_format" = "xno" || test "x$CPPO" = "x" || test "x$OCAML_PKG_mccs$MCCS_ENABLED" = "xnotrue" || test "x$OCAML_PKG_opam_0install_cudf$OPAM_0INSTALL_SOLVER_ENABLED" = "xnotrue";}],[ echo "============================================================================" echo "Some dependencies are missing. If you are just interested in the stand-alone" echo "'opam' binary, run 'make lib-ext' to download and include them." echo "============================================================================" echo AC_SUBST(hasalldeps,"") ],[ AC_SUBST(hasalldeps,"true") ]) if test "x$prefix" = "xNONE"; then prefix=$ac_default_prefix fi AC_CONFIG_FILES( Makefile.config src/ocaml-flags-configure.sexp src/stubs/c-flags.sexp src/stubs/libacl/c-libraries.sexp ) AC_OUTPUT rm -f src/manifest/dune src/manifest/install.inc AS_IF([test "x${with_private_runtime}" != "xno"],[ AS_IF([test ${WIN32} -eq 1 -a "x${CCOMP_TYPE}" = "xcc"],[ cd src/manifest ${LN_S} -f dune-manifest dune ${LN_S} -f install.${ARCH} install.inc cd ../.. ],[ AC_MSG_WARN([--with-private-runtime ignored (not building on mingw)]) ]) ]) rm -f src/stubs/win32/dune AS_IF([ test ${WIN32} -eq 1],[ cd src/stubs/win32 ${LN_S} -f dune-win32 dune cd ../../.. ]) rm -f src/stubs/libacl/dune AS_IF([ test "x${with_libacl}" = "xyes" ],[ cd src/stubs/libacl ${LN_S} -f dune-libacl dune cd ../../.. ]) echo bindir="`eval echo ${bindir}`" bindir="`eval echo ${bindir}`" mandir="`eval echo ${mandir}`" mandir="`eval echo ${mandir}`" AS_IF([test "x$MCCS_ENABLED" = "xfalse" -a "x$OPAM_0INSTALL_SOLVER_ENABLED" = "xfalse"],[ echo "Opam will be built WITHOUT a built-in solver" ],[ echo "Opam will be built WITH a built-in solver" ]) echo echo Executables will be installed in ${bindir} echo Manual pages will be installed in ${mandir} opam-2.1.2/doc/0000755000650106067230000000000014153703467012066 5ustar glondusedopam-2.1.2/doc/Makefile0000644000650106067230000000334614153703467013534 0ustar glondused-include ../Makefile.config ifeq ($(DUNE),) DUNE_EXE = ../src_ext/dune-local/_boot/install/default/bin/dune$(EXE) ifeq ($(shell command -v cygpath 2>/dev/null),) DUNE := $(DUNE_EXE) else DUNE := $(shell echo "$(DUNE_EXE)" | cygpath -f - -a) endif else DUNE_EXE= endif DUNE_PROFILE ?= release DUNE_ARGS ?= ifeq ($(DUNE_PROFILE_ARG),release) # TODO Replace with --release when we require dune >= 2.5 DUNE_PROFILE_ARG = --profile=release else DUNE_PROFILE_ARG = --profile=$(DUNE_PROFILE) endif .PHONY: man html pages all: html pages MANDIR = ../_build/default/doc/man .PHONY: man-html man-html: rm -rf man-html mkdir -p $@ echo '' >$@/index.html echo '' >>$@/index.html echo ' Opam man-pages index' >>$@/index.html echo '' >>$@/index.html echo '

Opam $(version) man-pages index

' >>$@/index.html echo '
    ' >>$@/index.html for f in ${MANDIR}/*; do\ man2html -r $$f | sed 1,2d > $@/$$(basename $$f .1).html;\ echo "
  • $$(basename $$f .1)
  • " >>$@/index.html;\ done echo '
' >>$@/index.html echo '' >>$@/index.html html: rm -rf html cd .. && $(DUNE) build $(DUNE_PROFILE_ARG) --root . $(DUNE_ARGS) @doc cp -r ../_build/default/_doc/_html html sed 's/%{OPAMVERSION}%/'$(version)'/g' index.html > html/index.html # Not to break older links, add manpages to the `ocamldoc` dir mkdir -p html/ocamldoc cd html/ocamldoc && for f in ../*/*/index.html; do\ ln -sf $$f $$(basename $$(dirname $$f)).html;\ done pages/%.html: pages/%.md omd $^ -o $@ PAGES=$(wildcard pages/*.md) pages: $(PAGES:.md=.html) clean: rm -rf dependencies.dot html/ocamldoc man-html pages/*.html html/index.html opam-2.1.2/doc/design/0000755000650106067230000000000014153703467013337 5ustar glondusedopam-2.1.2/doc/design/depexts-plugins0000644000650106067230000001262114153703467016417 0ustar glondusedProposal for a plugin architecture for supporting checking and resolving of external dependencies (depexts) in OPAM > 1.2 ======================================================================== Rationale --------- The opam package metadata now contains a specific field for declaring dependencies on external packages handled through external package managers (typically, distribution and OS dependent, but may in general be any other package manager). There are two main functionalities that are needed: - checking whether external dependencies are satisified at a given moment; this is an operation that can be implemented in linear time (we are just checking whether a boolean formula is true or false); since external packages are managed outside opam, this check needs to be performed at the beginning of each opam run, to discover packages that are no longer functional, and report the issue to the user. With proper, OS specific integration, this operation can be made blazingly fast; a simple hack, calling an external command each time, may be functionally equivalent, but quite slow. - finding a way of satisfying external dependencies required by a set of opam packages; this is potentially much more expensive, it involves not only a dependency solving phase, but also the fetch and installation phase, and requires proper interfacing with the existing OS specific package manager. This should be done only when modifying or fixing an opam configuration and after asking user confirmation. Making things work smoothly and efficiently requires OS specific knowledge that is best found among experienced users of each OS, which may be different people, with different knowledge of Opam internals: a well designed plugin infrastructure can separate concerns and facilitate contributions. Proposal -------- It is proposed to create a plugin architecture for OS specific external dependencies, extending the following module signature for the modules implementing a plugin module type OSDependencyLayer = sig type depexts (* external dependencies, a CNF involvin OS-specific stuff *) type actions (* an abstract token corresponding to actions, and a textual representation of them to present to the user *) type explanations (* in case the depexts cannot be satisfied, explain why *) type result = Can of actions | Cannot of explanations type outcome (* result of the execution of the OS-specific actions *) val satisfied : depexts -> bool (* are the depexts already satisfied ? *) val cansatisfydepexts : depexts -> result val perform : actions -> outcome end Notice that there are two distinct sets of functions for the very different cases outlined above: - satisfied performs just a check to see whether depexts are already satisfied - cansatisfydepexts tries to solve the external dependencies, and returns a proposed action, or an explanation for the failure, while perform executes the actions (typically after user confirmation) The proposed module interface is intentionally incomplete, as it makes no assumption on the way in which plugins are identified, and registered, which is an orthogonal issue. Note on OCaml detection ----------------------- The OCaml compiler itself is an external dependency when using "system" switches. It's currently handled by a specific, dynamically generated compiler definition, with some ad-hoc code to treat it specifically, or check that it didn't change at startup time. With the current trend to move compiler handling to packages, the above won't work anymore, because "system" would now need to be a specific, dynamic package. While re-implementing the system switch hacks in this context would certainly be possible, having the depexts mechanism flexible enough to handle all this consistently would certainly be more consistent and easier to maintain. Here is a possibility: having an 'ocaml-system' package (that would "provide" ocaml) with depext on the system ocaml. * the package needs to be able to export some environment variables that are currently exported by the switch (`CAML_LD_LIBRARY_PATH`). * a change of this package should be detected at OPAM startup -- like for any depexts * "system" compilers currently don't have to be managed by the OS, they are just looked for in the PATH. Keeping this would probably require a specific (lower level) "depext" plugin, that wouldn't have the functionalities to install the depext. * this raises a new, but valid, concern: the above handles a binary state for depexts, while for this, we'd need to detect changes also. Creating one 'ocaml-system' package version for each possible compiler version may be an answer: on system compiler change, the installed 'ocaml-system' becomes invalid, and you'll need to replace it by the fitting version (recompiling all dependent packages as you go). * However, it sounds quite difficult to hold a middle ground between - "resolve with all OPAM packages installable, then check and handle their depexts", and - "check depexts, and then resolve with OPAM packages that can be installed with what's currently on the system;" (don't install them, except on conflict (how exactly?)) and the above won't play well with first option here, second option raising many more questions. Maybe this doesn't fit well with depexts, but it's worth considering opam-2.1.2/doc/design/depopts-and-features0000644000650106067230000001765514153703467017332 0ustar glondusedOpam metadata evolution proposal for 1.2.x ========================================== This document contains the current summary proposal for evolving Opam's metadata, together with the rationale underpinning the proposed choices. In a nutshell ------------- The new metadata will restrict the allowed values of the depopts: field and add a new field features: as follows - the depopts: field will be restricted to a simple list of packages, with no version constraints, no boolean connectors - a new field features: will be introduced to express the different possible configurations of the source packages according to the availability of arbitrarily complex combinations of other packages (also known as "variability points" in the software product lines research community) It is important to roll-out these changes to get them accepted by package maintainers as soon as possible. Current status -------------- Complex formulas for "depopts" are not allowed anymore for 1.2 packages (for packages declared with an older `opam-version`, they are still accepted with the older, awkward semantics). The `features` field is not present yet as of 1.2.1. Rationale --------- The old implementation of depopts: tried to address three different needs 1) list the packages which are not mandatory for installation, but that trigger a recompilation in case their status is modified (added, removed, downgraded, upgraded). This is needed to determine if a recompilation (and reconfiguration) is necessary 2) capture multiple package/versions patterns that lead, in the configuration phase, to enable or disable various different features 3) express incompatibilities with certain versions of these packages This has led to several difficulties in practice; optional configuration features could not be easily and faithfully translated into package dependencies, which led to an incomplete ad-hoc implementation; potential ambiguities emerged in the metadata, like in the line depopts: async >= 109.15.00 | lwt >= 2.4.3 | (lwt >= 2.4.3 & ssl) where lwt >= 2.4.3 | (lwt >= 2.4.3 & ssl) looks like a typo, as A \/ (A /\ B) is logically equivalent to A, while the intention of the maintainer was to identify two possible configurations, one with lwt only, and one with both lwt and ssl. As a consequence, it has been decided to fully separate the three issues, capturing them in different fields, with a clear semantics. Core Proposal ------------- Notice that items below are numbered according to the needs they addressed, but presented in order of increased implementation complexity 1) the depopts: field now contains only a list of package names (no version constraints, no boolean combinations, just a list); Semantics: In case the status of any package appearing in this field is modified (added, removed, downgraded, upgraded), a recompilation of the package is scheduled. The depopts: field is not used at all by the package dependencies resolution phase, and must not be translated into CUDF. After the solver returns a solution, packages in this list that are present in the system are added with all their dependencies to the dependency cone, which is then visited to determine a compatible compilation order. 3) incompatibilities implicitly expressed in the depopts: lines by using version constraints must now be made explicit in the form of conflicts added to the list contained in the conflicts: field There is no change in the semantics of conflicts: and rewriting the few old versioned depopts can be performed manually or automatically. For example, depopts: async >= 109.15.00 | lwt >= 2.4.3 | (lwt >= 2.4.3 & ssl) conflicts: tyxml will become depopts: async, lwt, ssl conflicts: tyxml, async < 109.15.00, lwt < 2.4.3 2) a new field features: is added, that contains a list of "feature specifications", each feature specification being composed by: - a state-variable (or configuration variable) - a string describing the feature - an arbitrary boolean formula built out of atoms that are package names, possibly with version constraints features: [ ssl-support "Support for SSL" { lwt >= 2.4.3 & ssl } ; multi-backend "Enable both Async and Lwt" {lwt >= 2.4.3 & async > 109.15.00 } ; minimal "Only minimalistich HTTP support" {lwt & -async & -ssl} ] Semantics: a feature, and the corresponding state variable, is enabled iff the associated boolean formula is satisfied by the current package state; this is easy to compute, as it is a simple boolean evaluation of the formula in the assignment given by the package state. Features are invisible to the solver, and intended to be used in the configuration and build phase. Benefits: it is now easy to read the intended meaning of the maintainer in the metadata, and it is possible to output meaningful information to the user during the package installation/recompilation phase Impact: ------- These above changes require several modifications to the current code base: 1) requires implementing a simple new parser and checking the logic for computing recompilation; 2) requires implementing another parser, a simple propositional logic evaluator, some user output, and an interconnection with the state-variables 3) is a noop in the code, but requires some manual rewriting of the metadata in the archive (this might be automated, but might not be worth the effort) Hence we propose to limit the changes in the next release to what is described up to here. =======END OF PROPOSED CHANGES FOR 1.2.x ==================================================== In the longer term, one may consider the following Proposal extensions: -------------------- Having isolated features clearly, we can imagine to use them for extra functionality, for example: user hints besides telling the user that a feature is enabled or not, one could add logic to compute a suggestion for enabling a feature, if requested. This will necessarily be based on some heuristics, as there might be exponentially many ways to satisfy an arbitrary boolean condition. reduced recompilation needs now that state-variables are clearly identified in the features, it is easy to check that when there is no change in the values of these state-variables, and in the versions of the packages involved in the *enabled* feature set, then no recompilation is needed: the configuration logic will only use the state-variables, which did not change, and only change to packages actually used for an enabled state-variables may be involved in a recompilation An extra suggested extension is the possibility of mixing in the formulae in the features: field state-variables and packages, like in the following example features: [ ssl-support "Support for SSL" { os != "windows" & ssl >= 1.1 & (lwt < 4 | async) } ] This requires a significant amount of extra effort to: - distinguish syntactically a package named os from a state variable named os - implement comparison with possibly non-boolean values of a state variable (the os != "windows" above) - detect and reject cyclic dependencies among state variables, like in ssl-support "Support for SSL" { ssl-support & ssl >= 1.1 & (lwt < 4 | async) } or in ssl-support "Support for SSL" { - foo & ssl >= 1.1 & (lwt < 4 | async) } foo "Just for the example" { - ssl-support } Complexity versus usefulness need to be carefully assessed beforehand. opam-2.1.2/doc/design/provides.md0000644000650106067230000001144714153703467015523 0ustar glondused# Provides field proposal This is a proposal to add a `provides:` field to the OPAM package description format. The feature is already supported by the Cudf format, which should ease the most difficult parts of the implementation. The purpose of this field is to make depending on a choice of packages providing the same feature easier. The `opam` file format is changed as such: ``` := ... ?provides: [ + ] ``` If package `a` is providing `b {constraint}`, this is to be understood as > installation of `a` implies that any version of `b` satisfying `constraint` > should be considered installed for all purposes regarding dependency > resolution. In particular: - any package depending on `b` with a constraint that has a non-empty intersection with `constraint` can be installed ; - any package with such an optional dependency would need to be compiled after `a`, and rebuilt on changes to `a` ; - conversely, any package conflicting with `b` with a constraint compatible with `constraint` can't be installed together with `a`. It may be simpler to start by implementing `provides` only for definite versions. ## Added functionality The feature provided can already be encoded without an extra field: given a list of packages that `provide` a given name, a package by this name can be added with a dependency towards either of those. However, on a repository maintenance point of view, having to list all the alternatives adds much more burden. Besides, it's not possible, using pinning or an additional repository, to provide a replacement for a base-repo package without redefining it explicitly: that's sometimes very useful to extend the OCaml versions where some package is available, for example. ## Virtual and replacement packages `provides` entries share the namespace of usual packages, and may therefore create _virtual_ packages, i.e. packages that only exist as provided by other packages. In the other case around, packages may both have a concrete definition and appear as `provides`, in which case we would speak of _replacement_ packages. In both cases, great care should be taken in the user interface. For example: - what to do when the user requires the installation of a virtual package ? (In `apt-get`, this is an error.) - should we print an advertisement when installing a package that has possible replacements ? - when querying info on a package, possible alternatives should be shown. - should virtual packages be listed in the normal package listing ? - other commands referring to a given package (e.g. `pin`) may become ambiguous, so they should probably just ignore `provides`, and display a warning for virtual packages. The case of replacement packages is a bit more tricky, because it may easily get confusing if the dependencies aren't explicitly traced. The format of the package index will have to be extended to allow for virtual packages, which may not have a definite version. ## Use-cases * camlp4 should be made a virtual package, provided by different implementations for different compiler versions. The current handling using package versions causes expectations on the upgrade of those, spurious warnings of not up-to-date packages, and obfuscates real upgrades. * Allow aliases or renaming of packages (see #1879). * Allow to fork existing package and provide a replacement in the repository (for example cryptokit-sha512, see #314). * Built-in stuff in the compiler would be made simpler with `provides` lines instead of the concrete (but empty) `base-` packages. With compilers in packages, that would fit well in the compiler package's description. * Adds flexibility in changing the granularity of packages: packagers could more easily go back and forth between splitting in small units or packaging a bundle. ## Constraint intersection While OPAM usually solves version constraints based on the set of actual versions, this needs to be symbolic, i.e. non-empty intersection of the sets of _possible_ versions. For example, the intersection of `a {>= 3}` and `a {<= 3}` is non-empty even if there was no known `a.3` version before. This will need some care in the opam to Cudf version conversion, which is currently based on existing versions. ## Interactions with the `features` field While `provides` occupies the namespace of packages, and is used in dependency resolution, `features` occupies that of variables, and is intended for use only at build time (we should forbid its use in the `available` field, which is resolved before dependencies). However, both indicate things that are made available by the package, so there is a high risk of user confusion. I think both are important features that we want, and there is no way to merge them, but this is to be taken into account in the interface design and documentation ; `features` might be renamed (`traits` ?). opam-2.1.2/doc/index.html0000644000650106067230000004057514153703467014076 0ustar glondused opam %{OPAMVERSION}% API and libraries documentation

opam %{OPAMVERSION}% API and libraries documentation

src/core opam-core library
Generic standard and system library
opamVersion.ml (generated) Current opam version
opamCoreConfig.ml Configuration options for this lib (record, global reference and setter)
opamVersionCompare.ml Version comparison function used throughout. From the Dose suite.
opamJson.ml Wrapper on Jsonm; only needed for some debug options
opamStd.ml Generic stdlib functions (String, List, Option, Sys submodules...)
opamConsole.ml Console output, ANSI color, logging and user querying
opamCompat.ml Compatibility layer (Bytes, etc.) for different OCaml versions
opamSHA.ml Pure OCaml implementation of SHA256/512 hashing functions
System handling
opamProcess.ml Process and job handling, with logs, termination status, etc.
opamSystem.ml Bindings of lots of filesystem and system operations
opamHash.ml Type and computation of file checksums
opamFilename.ml Higher level file and directory name manipulation AND file operations, wrappers on OpamSystem using the filename type
opamDirTrack.ml Tracking of changes in a given filesystem subtree
opamParallel.ml Parallel execution of jobs following a directed graph
opamUrl.ml URL parsing and printing, with support for our different backends
Windows support
opamStubs.ml C stubs for Windows. A “dummy” alternate is provided for Unix, which doesn’t require any C code
opamStubsTypes.ml Types in the stubs definitions (shared between both implementations)
src/stubs opam-stubs library
C stubs. This library is built on Windows-only and automatically pulled into opam-core if needed
opamInject.c Code for process injection shared between opamWindows.c and opam-putenv.c
opamWindows.c C stubs themselves
src/format opam-format library
Definition of opam datastructures and its file interface
opamFormatConfig.ml Configuration options for this lib (record, global reference and setter)
opamTypes.mli Definitions of many types used throughout
opamTypesBase.ml Helper functions on the base types. Often opened
opamPath.ml Defines the file hierarchy in ~/.opam
Basic types, used as keys
opamPackage.ml The package type, and package name type (name+version, values often called "nv" in the code)
opamRepositoryName.ml The repository type
opamSwitch.ml The switch type
opamVariable.ml Opam variables with scope (global or module)
opamSysPkg.ml The system package type
More advanced types
opamFilter.ml Formulas on variables, as used in opam files build scripts
opamFormula.ml Formulas on packages, opt. with sub-formulas on versions, and conversion functions
File format
opamLineLexer.mll A simple lexer to list of lines, which are lists of words
opamInterpLexer.mll Opam format variable interpolation processor
opamPp.ml Bidirectional transformations on top of the parser and printer
opamFormat.ml opam config files syntax and conversion tools
opamFile.ml Handles all opam file formats as record types and submodules, conversion to and from syntax
src/repository opam-repository library
Handling of remote sources
opamRepositoryConfig.ml Configuration options for this lib (record, global reference, setter, initialisation)
opamRepositoryBackend.ml Signature for repository handlers and some helpers for the repository type
opamRepositoryPath.ml Defines the file hierarchy in repositories
opamDownload.ml Configuration init and handling of downloading commands
opamHTTP.ml Main HTTP backend
opamLocal.ml Rsync backend, for local or ssh sources
opamVCS.ml Layer for handling version control sources
opamDarcs.ml Darcs support (through OpamVCS)
opamGit.ml Git support (through OpamVCS)
opamHg.ml Mercurial support (through OpamVCS)
opamRepository.ml Operations on repositories (update, fetch...) based on the above backends
src/solver opam-solver library
Solver and Cudf interaction
opamSolverConfig.ml Configuration options for this lib (record, global reference, setter, initialisation)
opamActionGraph.ml Handles graphs of actions (package changes), based on ocamlgraph
opamCudfSolver.ml Bindings to implementation of CUDF solvers, either built-in or external
opamCudf.ml Solver interaction, conversion of answer to solution
opamSolver.ml Entry point, conversion of universe to cudf, dependencies computation
Built-in solver backends
opamBuiltinMccs.ml.real Direct interface to the mccs solver, if present
opamBuiltinZ3.ml.real Direct interface to the Z3 solver, if present
src/state opam-state library
Handling of the ~/.opam hierarchy, repository and switch states
opamStateConfig.ml Configuration options for this lib (record, global reference, setter, initialisation)
opamScript.ml (generated) Shell config scripts as OCaml strings
opamStateTypes.mli Defines the types holding global, repository and switch states
opamFormatUpgrade.ml Handles upgrade of an opam root from earlier opam versions
opamSysPoll.ml Detection of host system (arch, os, distribution)
opamGlobalState.ml Loading and handling of the global state of an opam root
opamRepositoryState.ml loading and handling of the repository state of an opam root (i.e. what is in ~/.opam/repo)
opamSwitchState.ml Loading and querying a switch state
opamPackageVar.ml Resolution and handling of opam variables + filters
opamFileTools.ml Generic tools for handling package metadata
opamSwitchAction.ml Switch-related actions and changes
opamEnv.ml Process environment setup and handling, shell configuration
opamPinned.ml Specific query and handling of pinned packages
opamUpdate.ml Synchronisation and downloading of repositories and package sources
opamSysInteract.ml Interaction with system package manager, for external dependencies management
opamSpdxList.ml (generated) SPDX short IDs licenses list, used for linting packages
src/client opam-client library and exec
Actions on the opam root, switches, installations, and front-end
opam-client library
opamClientConfig.ml Configuration options for this lib (record, global reference, setter, initialisation), plus helper for global setup
opamAction.ml Handles concrete actions on packages, like installations and removals
opamSolution.ml Interface with the solver, processing of full solutions through actions
opamConfigCommand.ml Functions for the "opam config" subcommand
opamPinCommand.ml Functions for the "opam pin" subcommand
opamRepositoryCommand.ml Functions for the "opam repository" subcommand
opamSwitchCommand.ml Functions for the "opam switch" subcommand
opamListCommand.ml Functions for the "opam list" subcommand
opamLockCommand.ml Functions for the "opam lock" subcommand
opamInitDefaults.ml Defines the built-in "opamrc" to use by default on "opam init"
opamClient.ml High-level execution of the main user commands ("install", "upgrade", "remove"), and wrapper for Pin commands
opamAuxCommands.ml Some command helpers and extra opam management functions
opamAdminRepoUpgrade.ml Handles converting package repositories from the format of older opam versions to the current format
opamAdminCheck.ml Implements the repository checks of the 'opam admin check' command.
opamGitVersion.mli (generated) Current git version of opam
opamArg.ml Command-line argument parsers and helpers
opamArgTools.ml Command-line argument cli versioning helpers
opamAdminCommand.ml All sub-commands of the "opam admin" command
opamCommands.ml Opam CLI commands and their handlers as Cmdliner terms
opamCLIVersion.ml Functions for the CLI versioning
opamCliMain.ml Front-end wrappers and callers for the main opam entry point
Main opam CLI
opamMain.ml Main opam entry point
src/crowbar crowbar tests
Crowbar generators and tests for internal data structures
test.ml Main crowbar tests entry point
opamCrowbar.ml Definition of utils structures and functions
opamXxx_crowbar.ml Definition of tests for module Xxx
src/tools Extra tools and utilities
Auxiliary standalone tools
opam_admin_top.ml Tiny library for admin-scripts, included in opam-admin.top
opam-putenv.c Tiny C tool used on Windows for cross-architecture process injection
opam_installer.ml Handles opam's ".install" files
opam-2.1.2/doc/man/0000755000650106067230000000000014153703467012641 5ustar glondusedopam-2.1.2/doc/man/dune0000644000650106067230000000266514153703467013530 0ustar glondused; opam must always be invoked as %{bin:opam} to ensure that the manifested runtime on mingw is ; assembled, if it was selected at configure-time (%{exe:opamMain.exe} is not executable in this ; case. (rule (targets opam.1) (deps opam-topics.inc opam-admin-topics.inc) (action (with-stdout-to %{targets} (run %{bin:opam} --help=groff)))) (install (section man) (package opam) (files opam.1)) (rule (with-stdout-to opam-installer.1 (run %{bin:opam-installer} --help=groff))) (install (section man) (package opam-installer) (files opam-installer.1)) (executable (name dune_man) (libraries unix)) (rule (targets opam-topics.inc) (deps %{bin:opam} using-built-opam) (mode promote) (action (with-stdout-to %{targets} (run %{exe:dune_man.exe} opam)))) (rule (targets opam-admin-topics.inc) (deps %{bin:opam} using-built-opam) (mode promote) (action (with-stdout-to %{targets} (run %{exe:dune_man.exe} opam admin)))) (include opam-topics.inc) (include opam-admin-topics.inc) ; This ensures that no opam command run will block asking for input (env (_ (env-vars ("OPAMYES" "no")))) ; This ensure that %{bin:opam} really refers to the opam built in the tree (rule (with-stdout-to check_local_build.ml (echo "let s = Sys.argv.(1) in exit (if not (Filename.is_implicit s) && Filename.is_relative s then 0 else 1)"))) (rule (with-stdout-to using-built-opam (run ocaml %{dep:check_local_build.ml} %{bin:opam}))) opam-2.1.2/doc/man/dune_man.ml0000644000650106067230000000307614153703467014767 0ustar glondusedlet gen_topic target_basename dline t = Printf.printf "\n\ (rule\n\ \ (with-stdout-to %s-%s.0 (echo \"\")))\n\ (rule\n\ \ (targets %s-%s.1 %s-%s.err)\n\ \ (deps using-built-opam)\n\ \ (action (progn (with-stderr-to %s-%s.err\n\ \ (with-stdout-to %s-%s.1 (run %s %s --help=groff)))\n\ \ (diff %s-%s.err %%{dep:%s-%s.0}))))\n\ " target_basename t target_basename t target_basename t target_basename t target_basename t dline t target_basename t target_basename t let () = let cmd,args = match Array.to_list Sys.argv with | _::cmd::args -> cmd, args | [] | [_] -> invalid_arg "Missing command argument" in let cline = String.concat " " (cmd :: args) ^ " help topics" in let topics = let ic = Unix.open_process_in cline in set_binary_mode_in ic false; let rec aux () = match input_line ic with | "" -> aux () | s -> s :: aux () | exception _ -> close_in ic; [] in aux () in let target_basename = String.concat "-" ("opam" :: args) in let dline = String.concat " " ("%{bin:opam}" :: args) in print_string ";; Generated by dune_man\n"; List.iter (gen_topic target_basename dline) topics; Printf.printf "\n\ (install\n\ \ (section man)\n\ \ (package opam)\n\ \ (files%s))\n" (String.concat " " (List.map (Printf.sprintf "\n %s-%s.1" target_basename) topics)) opam-2.1.2/doc/man/opam-admin-topics.inc0000644000650106067230000001062014153703467016654 0ustar glondused;; Generated by dune_man (rule (with-stdout-to opam-admin-help.0 (echo ""))) (rule (targets opam-admin-help.1 opam-admin-help.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-help.err (with-stdout-to opam-admin-help.1 (run %{bin:opam} admin help --help=groff))) (diff opam-admin-help.err %{dep:opam-admin-help.0})))) (rule (with-stdout-to opam-admin-add-hashes.0 (echo ""))) (rule (targets opam-admin-add-hashes.1 opam-admin-add-hashes.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-add-hashes.err (with-stdout-to opam-admin-add-hashes.1 (run %{bin:opam} admin add-hashes --help=groff))) (diff opam-admin-add-hashes.err %{dep:opam-admin-add-hashes.0})))) (rule (with-stdout-to opam-admin-add-constraint.0 (echo ""))) (rule (targets opam-admin-add-constraint.1 opam-admin-add-constraint.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-add-constraint.err (with-stdout-to opam-admin-add-constraint.1 (run %{bin:opam} admin add-constraint --help=groff))) (diff opam-admin-add-constraint.err %{dep:opam-admin-add-constraint.0})))) (rule (with-stdout-to opam-admin-filter.0 (echo ""))) (rule (targets opam-admin-filter.1 opam-admin-filter.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-filter.err (with-stdout-to opam-admin-filter.1 (run %{bin:opam} admin filter --help=groff))) (diff opam-admin-filter.err %{dep:opam-admin-filter.0})))) (rule (with-stdout-to opam-admin-list.0 (echo ""))) (rule (targets opam-admin-list.1 opam-admin-list.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-list.err (with-stdout-to opam-admin-list.1 (run %{bin:opam} admin list --help=groff))) (diff opam-admin-list.err %{dep:opam-admin-list.0})))) (rule (with-stdout-to opam-admin-check.0 (echo ""))) (rule (targets opam-admin-check.1 opam-admin-check.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-check.err (with-stdout-to opam-admin-check.1 (run %{bin:opam} admin check --help=groff))) (diff opam-admin-check.err %{dep:opam-admin-check.0})))) (rule (with-stdout-to opam-admin-lint.0 (echo ""))) (rule (targets opam-admin-lint.1 opam-admin-lint.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-lint.err (with-stdout-to opam-admin-lint.1 (run %{bin:opam} admin lint --help=groff))) (diff opam-admin-lint.err %{dep:opam-admin-lint.0})))) (rule (with-stdout-to opam-admin-upgrade.0 (echo ""))) (rule (targets opam-admin-upgrade.1 opam-admin-upgrade.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-upgrade.err (with-stdout-to opam-admin-upgrade.1 (run %{bin:opam} admin upgrade --help=groff))) (diff opam-admin-upgrade.err %{dep:opam-admin-upgrade.0})))) (rule (with-stdout-to opam-admin-cache.0 (echo ""))) (rule (targets opam-admin-cache.1 opam-admin-cache.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-cache.err (with-stdout-to opam-admin-cache.1 (run %{bin:opam} admin cache --help=groff))) (diff opam-admin-cache.err %{dep:opam-admin-cache.0})))) (rule (with-stdout-to opam-admin-make.0 (echo ""))) (rule (targets opam-admin-make.1 opam-admin-make.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-make.err (with-stdout-to opam-admin-make.1 (run %{bin:opam} admin make --help=groff))) (diff opam-admin-make.err %{dep:opam-admin-make.0})))) (rule (with-stdout-to opam-admin-index.0 (echo ""))) (rule (targets opam-admin-index.1 opam-admin-index.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin-index.err (with-stdout-to opam-admin-index.1 (run %{bin:opam} admin index --help=groff))) (diff opam-admin-index.err %{dep:opam-admin-index.0})))) (install (section man) (package opam) (files opam-admin-help.1 opam-admin-add-hashes.1 opam-admin-add-constraint.1 opam-admin-filter.1 opam-admin-list.1 opam-admin-check.1 opam-admin-lint.1 opam-admin-upgrade.1 opam-admin-cache.1 opam-admin-make.1 opam-admin-index.1)) opam-2.1.2/doc/man/opam-topics.inc0000644000650106067230000002207414153703467015574 0ustar glondused;; Generated by dune_man (rule (with-stdout-to opam-help.0 (echo ""))) (rule (targets opam-help.1 opam-help.err) (deps using-built-opam) (action (progn (with-stderr-to opam-help.err (with-stdout-to opam-help.1 (run %{bin:opam} help --help=groff))) (diff opam-help.err %{dep:opam-help.0})))) (rule (with-stdout-to opam-admin.0 (echo ""))) (rule (targets opam-admin.1 opam-admin.err) (deps using-built-opam) (action (progn (with-stderr-to opam-admin.err (with-stdout-to opam-admin.1 (run %{bin:opam} admin --help=groff))) (diff opam-admin.err %{dep:opam-admin.0})))) (rule (with-stdout-to opam-lock.0 (echo ""))) (rule (targets opam-lock.1 opam-lock.err) (deps using-built-opam) (action (progn (with-stderr-to opam-lock.err (with-stdout-to opam-lock.1 (run %{bin:opam} lock --help=groff))) (diff opam-lock.err %{dep:opam-lock.0})))) (rule (with-stdout-to opam-clean.0 (echo ""))) (rule (targets opam-clean.1 opam-clean.err) (deps using-built-opam) (action (progn (with-stderr-to opam-clean.err (with-stdout-to opam-clean.1 (run %{bin:opam} clean --help=groff))) (diff opam-clean.err %{dep:opam-clean.0})))) (rule (with-stdout-to opam-lint.0 (echo ""))) (rule (targets opam-lint.1 opam-lint.err) (deps using-built-opam) (action (progn (with-stderr-to opam-lint.err (with-stdout-to opam-lint.1 (run %{bin:opam} lint --help=groff))) (diff opam-lint.err %{dep:opam-lint.0})))) (rule (with-stdout-to opam-source.0 (echo ""))) (rule (targets opam-source.1 opam-source.err) (deps using-built-opam) (action (progn (with-stderr-to opam-source.err (with-stdout-to opam-source.1 (run %{bin:opam} source --help=groff))) (diff opam-source.err %{dep:opam-source.0})))) (rule (with-stdout-to opam-unpin.0 (echo ""))) (rule (targets opam-unpin.1 opam-unpin.err) (deps using-built-opam) (action (progn (with-stderr-to opam-unpin.err (with-stdout-to opam-unpin.1 (run %{bin:opam} unpin --help=groff))) (diff opam-unpin.err %{dep:opam-unpin.0})))) (rule (with-stdout-to opam-pin.0 (echo ""))) (rule (targets opam-pin.1 opam-pin.err) (deps using-built-opam) (action (progn (with-stderr-to opam-pin.err (with-stdout-to opam-pin.1 (run %{bin:opam} pin --help=groff))) (diff opam-pin.err %{dep:opam-pin.0})))) (rule (with-stdout-to opam-switch.0 (echo ""))) (rule (targets opam-switch.1 opam-switch.err) (deps using-built-opam) (action (progn (with-stderr-to opam-switch.err (with-stdout-to opam-switch.1 (run %{bin:opam} switch --help=groff))) (diff opam-switch.err %{dep:opam-switch.0})))) (rule (with-stdout-to opam-remote.0 (echo ""))) (rule (targets opam-remote.1 opam-remote.err) (deps using-built-opam) (action (progn (with-stderr-to opam-remote.err (with-stdout-to opam-remote.1 (run %{bin:opam} remote --help=groff))) (diff opam-remote.err %{dep:opam-remote.0})))) (rule (with-stdout-to opam-repository.0 (echo ""))) (rule (targets opam-repository.1 opam-repository.err) (deps using-built-opam) (action (progn (with-stderr-to opam-repository.err (with-stdout-to opam-repository.1 (run %{bin:opam} repository --help=groff))) (diff opam-repository.err %{dep:opam-repository.0})))) (rule (with-stdout-to opam-env.0 (echo ""))) (rule (targets opam-env.1 opam-env.err) (deps using-built-opam) (action (progn (with-stderr-to opam-env.err (with-stdout-to opam-env.1 (run %{bin:opam} env --help=groff))) (diff opam-env.err %{dep:opam-env.0})))) (rule (with-stdout-to opam-exec.0 (echo ""))) (rule (targets opam-exec.1 opam-exec.err) (deps using-built-opam) (action (progn (with-stderr-to opam-exec.err (with-stdout-to opam-exec.1 (run %{bin:opam} exec --help=groff))) (diff opam-exec.err %{dep:opam-exec.0})))) (rule (with-stdout-to opam-config.0 (echo ""))) (rule (targets opam-config.1 opam-config.err) (deps using-built-opam) (action (progn (with-stderr-to opam-config.err (with-stdout-to opam-config.1 (run %{bin:opam} config --help=groff))) (diff opam-config.err %{dep:opam-config.0})))) (rule (with-stdout-to opam-option.0 (echo ""))) (rule (targets opam-option.1 opam-option.err) (deps using-built-opam) (action (progn (with-stderr-to opam-option.err (with-stdout-to opam-option.1 (run %{bin:opam} option --help=groff))) (diff opam-option.err %{dep:opam-option.0})))) (rule (with-stdout-to opam-var.0 (echo ""))) (rule (targets opam-var.1 opam-var.err) (deps using-built-opam) (action (progn (with-stderr-to opam-var.err (with-stdout-to opam-var.1 (run %{bin:opam} var --help=groff))) (diff opam-var.err %{dep:opam-var.0})))) (rule (with-stdout-to opam-upgrade.0 (echo ""))) (rule (targets opam-upgrade.1 opam-upgrade.err) (deps using-built-opam) (action (progn (with-stderr-to opam-upgrade.err (with-stdout-to opam-upgrade.1 (run %{bin:opam} upgrade --help=groff))) (diff opam-upgrade.err %{dep:opam-upgrade.0})))) (rule (with-stdout-to opam-update.0 (echo ""))) (rule (targets opam-update.1 opam-update.err) (deps using-built-opam) (action (progn (with-stderr-to opam-update.err (with-stdout-to opam-update.1 (run %{bin:opam} update --help=groff))) (diff opam-update.err %{dep:opam-update.0})))) (rule (with-stdout-to opam-reinstall.0 (echo ""))) (rule (targets opam-reinstall.1 opam-reinstall.err) (deps using-built-opam) (action (progn (with-stderr-to opam-reinstall.err (with-stdout-to opam-reinstall.1 (run %{bin:opam} reinstall --help=groff))) (diff opam-reinstall.err %{dep:opam-reinstall.0})))) (rule (with-stdout-to opam-uninstall.0 (echo ""))) (rule (targets opam-uninstall.1 opam-uninstall.err) (deps using-built-opam) (action (progn (with-stderr-to opam-uninstall.err (with-stdout-to opam-uninstall.1 (run %{bin:opam} uninstall --help=groff))) (diff opam-uninstall.err %{dep:opam-uninstall.0})))) (rule (with-stdout-to opam-remove.0 (echo ""))) (rule (targets opam-remove.1 opam-remove.err) (deps using-built-opam) (action (progn (with-stderr-to opam-remove.err (with-stdout-to opam-remove.1 (run %{bin:opam} remove --help=groff))) (diff opam-remove.err %{dep:opam-remove.0})))) (rule (with-stdout-to opam-install.0 (echo ""))) (rule (targets opam-install.1 opam-install.err) (deps using-built-opam) (action (progn (with-stderr-to opam-install.err (with-stdout-to opam-install.1 (run %{bin:opam} install --help=groff))) (diff opam-install.err %{dep:opam-install.0})))) (rule (with-stdout-to opam-info.0 (echo ""))) (rule (targets opam-info.1 opam-info.err) (deps using-built-opam) (action (progn (with-stderr-to opam-info.err (with-stdout-to opam-info.1 (run %{bin:opam} info --help=groff))) (diff opam-info.err %{dep:opam-info.0})))) (rule (with-stdout-to opam-show.0 (echo ""))) (rule (targets opam-show.1 opam-show.err) (deps using-built-opam) (action (progn (with-stderr-to opam-show.err (with-stdout-to opam-show.1 (run %{bin:opam} show --help=groff))) (diff opam-show.err %{dep:opam-show.0})))) (rule (with-stdout-to opam-search.0 (echo ""))) (rule (targets opam-search.1 opam-search.err) (deps using-built-opam) (action (progn (with-stderr-to opam-search.err (with-stdout-to opam-search.1 (run %{bin:opam} search --help=groff))) (diff opam-search.err %{dep:opam-search.0})))) (rule (with-stdout-to opam-list.0 (echo ""))) (rule (targets opam-list.1 opam-list.err) (deps using-built-opam) (action (progn (with-stderr-to opam-list.err (with-stdout-to opam-list.1 (run %{bin:opam} list --help=groff))) (diff opam-list.err %{dep:opam-list.0})))) (rule (with-stdout-to opam-init.0 (echo ""))) (rule (targets opam-init.1 opam-init.err) (deps using-built-opam) (action (progn (with-stderr-to opam-init.err (with-stdout-to opam-init.1 (run %{bin:opam} init --help=groff))) (diff opam-init.err %{dep:opam-init.0})))) (install (section man) (package opam) (files opam-help.1 opam-admin.1 opam-lock.1 opam-clean.1 opam-lint.1 opam-source.1 opam-unpin.1 opam-pin.1 opam-switch.1 opam-remote.1 opam-repository.1 opam-env.1 opam-exec.1 opam-config.1 opam-option.1 opam-var.1 opam-upgrade.1 opam-update.1 opam-reinstall.1 opam-uninstall.1 opam-remove.1 opam-install.1 opam-info.1 opam-show.1 opam-search.1 opam-list.1 opam-init.1)) opam-2.1.2/doc/modules0000644000650106067230000002362614153703467013472 0ustar glondusedWarning: this file may not contain the most up-to-date information. You should refer to index.html instead. src │ ├── core Generic standard and system library │   │   [ opam-core lib ] │   ├── opamVersion.ml (generated) Current OPAM version │   ├── opamCoreConfig.ml Configuration options for this lib (record, global reference and setter) │   ├── opamVersionCompare.ml Version comparison function used throughout. From the Dose suite. │   ├── opamJson.ml Wrapper on Jsonm; only needed for some debug options │   ├── opamStd.ml Generic stdlib functions (String, List, Option, Sys submodules...) │   ├── opamConsole.ml Console output, ANSI color, logging and user querying │   ├── opamCompat.ml.4.01/4.02 Compatibility layer (Bytes, etc.) for different OCaml versions │   │   # system handling │   ├── opamProcess.ml Process and job handling, with logs, termination status, etc. │   ├── opamSystem.ml Bindings of lots of filesystem and system operations │   ├── opamFilename.ml Higher level file and directory name manipulation AND file operations, wrappers on OpamSystem using the filename type │   ├── opamParallel.ml Parallel execution of jobs following a directed graph │   ├── opamUrl.ml URL parsing and printing, with support for our different backends | | # Windows support │   ├── opamStubsTypes.ml Types in the stubs definitions (shared between both implementations) │   └── opamStubs.ml C stubs for Windows. A "dummy" alternate is provided for Unix, which doesn't require any C code │ ├── format Definition of OPAM datastructures and its file interface │   │   [ opam-format lib ] │   ├── opamFormatConfig.ml Configuration options for this lib (record, global reference and setter) │   ├── opamTypes.mli Definitions of many types used throughout │   ├── opamTypesBase.ml Helper functions on the base types. Often opened │   │   # basic types, used as keys │   ├── opamCompiler.ml The compiler type (string, version pairs) │   ├── opamPackage.ml The package type, and package name type (name+version, values often called "nv" in the code) │   ├── opamRepositoryName.ml The repository type │   ├── opamSwitch.ml The switch type │   ├── opamVariable.ml OPAM variables with scope (global or module) │   │   # more advanced types │   ├── opamFilter.ml Formulas on variables, as used in opam files build scripts │   ├── opamFormula.ml Formulas on packages, opt. with sub-formulas on versions, and conversion functions │   │   # file format │   ├── opamLineLexer.mll A simple lexer to list of lines, which are lists of words │   ├── opamLexer.mll OPAM config file lexer │   ├── opamParser.mly OPAM config file generic type parser │   ├── opamFormat.ml OPAM config files syntax and conversion tools, printing │   └── opamFile.ml Handles all OPAM file formats as record types and submodules, conversion to and from syntax │ ├── repository Handling of remote sources │   │   [ opam-repository lib ] │   ├── opamRepositoryConfig.ml Configuration options for this lib (record, global reference, setter, initialisation) │   ├── opamRepositoryBackend.ml Signature for repository handlers and some helpers for the repository type │   ├── opamRepositoryPath.ml Defines the file hierarchy in repositories │   ├── opamDownload.ml Configuration init and handling of downloading commands │   ├── opamHTTP.ml Main HTTP backend │   ├── opamLocal.ml Rsync backend, for local or ssh sources │   ├── opamVCS.ml Layer for handling version control sources │   ├── opamDarcs.ml Darcs support (through OpamVCS) │   ├── opamGit.ml Git support (through OpamVCS) │   ├── opamHg.ml Mercurial support (through OpamVCS) │   └── opamRepository.ml Operations on repositories (update, fetch...) based on the above backends │ ├── solver Solver and Cudf interaction │   │   [ opam-solver lib ] │   ├── opamSolverConfig.ml Configuration options for this lib (record, global reference, setter, initialisation) │   ├── opamActionGraph.ml Handles graphs of actions (package changes), based on ocamlgraph │   ├── opamCudfSolver.ml Bindings to CUDF solvers │   ├── opamCudf.ml Solver interaction, conversion of answer to solution │   └── opamSolver.ml Entry point, conversion of universe to cudf, dependencies computation │ ├── state Handling of the ~/.opam hierarchy and actions on it │   │   [ opam-state lib ] │   ├── opamStateConfig.ml Configuration options for this lib (record, global reference, setter, initialisation) │   ├── opamPath.ml Defines the file hierarchy in ~/.opam │   ├── opamScript.ml (generated) Shell config scripts as OCaml strings │   ├── opamStateTypes.mli Defines the types holding global, repository and switch states │   ├── opamGlobalState.ml Loading and handling of the global state of an opam root │   ├── opamRepositoryState.ml loading and handling of the repository state of an opam root (i.e. what is in ~/.opam/repo) │   ├── opamSwitchState.ml Loading and querying a switch state │   ├── opamPackageVar.ml Resolution and handling of opam variables + filters │   ├── opamFileTools.ml Generic tools for handling package metadata │   ├── opamSwitchAction.ml Switch-related actions and changes │   ├── opamEnv.ml Process environment setup and handling, shell configuration │   ├── opamPinned.ml Specific query and handling of pinned packages │   ├── opamUpdate.ml Synchronisation and downloading of repositories and package sources │   ├── opamSolution.ml Interface with the solver, processing of full solutions through actions │   └── opamAction.ml Handles concrete actions on packages, like installations and removals │ ├── stubs C stubs. This library is built on Windows-only and automatically pulled into opam-core if needed │   ├── opamInject.c Code for process injection shared between opamWindows.c and opam-putenv.c │   ├── opamWindows.c C stubs themselves │   └── opamWin32Stubs.ml OCaml external declarations for the stubs │ ├── client Everything related to the OPAM state, installation and front-end │   │   [ opam-client lib ] │   ├── opamClientConfig.ml Configuration options for this lib (record, global reference, setter, initialisation), plus helper for global setup │   ├── opamConfigCommand.ml Functions for the "opam config" subcommand │   ├── opamPinCommand.ml Functions for the "opam pin" subcommand │   ├── opamRepositoryCommand.ml Functions for the "opam repository" subcommand │   ├── opamSwitchCommand.ml Functions for the "opam switch" subcommand │   ├── opamListCommand.ml Functions for the "opam list" subcommand │   ├── opamClient.ml High-level execution of user-facing functions like "upgrade", and wrappers around the *Command modules │   ├── opamGitVersion.mli (generated) Current git version of OPAM │   ├── opamArg.ml Command-line argument parsers and helpers │   │   [ opam exe ] │   └── opamMain.ml Main, including cmdliner command handling │ └── tools │   [ opam-admin tool ] ├── opam_mk_repo.ml Repo index and archives generation ├── opam_depexts_change.ml Operation on external dependencies in a repo ├── opam_findlib.ml Automatically add some findlib information to a repo ├── opam_rename.ml Package renaming ├── opam_stats.ml Repo stats & graphs generation ├── opam_repo_check.ml Check the repo for errors ├── opam_admin.ml Source of the opam-admin tool, main │   [ other stand-alone tools ] ├── opam_admin_top.ml Tiny library for admin-scripts, included in opam-admin.top ├── opam-putenv.c Tiny C tool used on Windows for cross-architecture process injection ├── opam_check.ml Tiny tool used in internal checks ("make tests") ├── opam_installer.ml Handles OPAM's ".install" files └── opamlfind.ml Experimental ocamlfind wrapper tool opam-2.1.2/doc/pages/0000755000650106067230000000000014153703467013165 5ustar glondusedopam-2.1.2/doc/pages/About.md0000644000650106067230000001145414153703467014566 0ustar glondused# opam ## A little bit of History ### opam The [first specification draft of OPAM](https://github.com/ocaml/opam/blob/30598a59c98554057ce2beda80f0d31474b94150/specs/roadmap.pdf?raw=true) was written at the end of Jan 2012 by Thomas Gazagnaire from OCamlPro. The specification was reviewed by Fabrice Le Fessant (OCamlPro/INRIA), Yaron Minsky (Jane Street) -- who funded the project, and Anil Madhavapeddy (University of Cambridge) -- who needed a source-based package manager to manage libraries emerging from the Mirage OS project. At about the same time, Frederic Tuong, an intern from Inria, funded by the DORM research grant in collaboration with OCamlPro and IRILL, started to implement [the first version of OPAM](https://github.com/ocaml/opam/commits/master?page=112) (called `ocp-get` at the time) at the end of Feb 2012. He also started to create the [first OPAM packages](https://github.com/ocaml/opam-repository/commits/master?page=200) one month later. Frederic and Thomas worked closely together in the following months to [demonstrate OPAM](https://www.youtube.com/watch?v=ivLqeRZJTGs) at the [OCaml Workshop 2012](http://oud.ocaml.org/2012/) where (almost) everyone was already using it! Frederic started a PhD in Oct 2012 and left the OPAM team to focus on his studies. Roberto Di Cosmo and Pietro Abate, from IRILL, began helping Thomas at the end of 2012 to properly integrate their [Mancoosi](http://www.mancoosi.org/) tools (such as [CUDF](http://www.mancoosi.org/cudf/) and `dose`) so that OPAM could benefit from modern constraint solving tools and be able to automatically use the `aspcud` external solver if is available. At the end of 2012, Vincent Bernardoff and Guillem Rieu (from OCamlPro) worked for a few months on improving the documentation and ease of use of OPAM for newcomers. They created [opam2web](https://github.com/ocaml/opam2web), the tool used to generate https://opam.ocaml.org. The [first public beta of OPAM](http://www.ocamlpro.com/blog/2013/01/17/opam-beta.html) was released in Jan 2013 and few months later (in March 2013) [the first official release landed](http://www.ocamlpro.com/blog/2013/03/14/opam-1.0.0.html). A few days later, Louis Gesbert -- who joined OCamlPro in Dec 2012, pushed [his first commit](https://github.com/ocaml/opam/commit/c56cf5e1e244cee9f707da8b682996bbc5dd31ff) to the codebase. In Nov 2013, [OPAM 1.1.0](https://opam.ocaml.org/blog/opam-1-1-0-released/) was released and Louis became the technical lead. A months later, [opam 1.1.1](https://opam.ocaml.org/blog/opam-1-1-1-released/) with numerous bug fixes. ### opam-repository Meanwhile, in June 2012 Mirage started to use opam (as it was using a custom 3.12.1 compiler). Very quickly, starting off Frederic's work, Anil and Thomas shared the task of adding new packages and monitor the pull-requests on opam-repository. The initial policy was to accept as many packages as possible, which means that things were often broken. So they started to use background [bulks builds](https://github.com/avsm/opam-bulk-logs) to improve the overall repository quality. In July 2012, Jane-Street's Core libraries made [its apparition](https://github.com/ocaml/opam-repository/commit/bad688d0f49f6c750525b0047b336eb8606e419d) in the repository. To improve the quality of new packages, Travis CI was [integrated](https://github.com/ocaml/opam-repository/commit/2671cb1e968e084c13989762ea43fc1a5b4703d7) in Sept 2013 to the pull-request process. From Aug to Nov 2013, all the contributors of opam-repository were contacted to re-license their contribution to CC0, which enable the [move of the repository](https://github.com/ocaml/opam-repository/issues/955) to the `ocaml` organisation. The [opam weather service](http://ows.irill.org/), created by Iril and OCamlPro, was announced in Apr 2014 and expose quality metrics to the repository quality. *Notes*: Some significant bumps in opam-repository were adoption by projects: start of the bi-weekly pulls from Jane Street on Core (the biggest one), the Ocsigen and XAPI remotes, and Mirage releases. ## Getting Support Opam has been created and is maintained by [OCamlPro](http://www.ocamlpro.com/). Bug reports and feature requests for the opam tool should be reported on [opam's issue-tracker](https://github.com/ocaml/opam/issues). Packaging issues or requests for a new package can be reported on the [official repository's issue-tracker](https://github.com/ocaml/opam-repository/issues). General queries for both the tool and the packages could be addressed on the [OCaml-platform mailing-list](http://lists.ocaml.org/listinfo/platform) and insights and evolution of opam internals can discussed on the [opam-devel mailing-list](http://lists.ocaml.org/listinfo/opam-devel). Standard commercial terms and support on opam, as well as training and consulting services, are provided by [OCamlPro](http://www.ocamlpro.com/). opam-2.1.2/doc/pages/Distribution.md0000644000650106067230000001660314153703467016174 0ustar glondused# opam and other package managers: distributions list This page tracks the state of binary packaging of opam on upstream distributions. If you do package up opam for your various OS, please feel free to add it below, update [this file](https://github.com/ocaml/opam/tree/master/doc/pages/Distribution.md) and open a [pull request](https://github.com/ocaml/opam/compare). Opam is in [![Packaging status](https://repology.org/badge/tiny-repos/opam.svg?header=)](https://repology.org/project/opam/versions) repository families. The pages/files linked are the ones that give the best overview of the available versions. Those [_pkgs_](http://pkgs.org/search/opam) and [_repology_]() pages may be used to get an up-to-date overview of official packages on most Linux distributions. ## _Official_ packages OS/distrubtion, their latest opam version and their maintainers: * Arch Linux [![Arch package](https://repology.org/badge/version-for-repo/arch/opam.svg?header=)](https://www.archlinux.org/packages/?q=opam) * [Package search](https://www.archlinux.org/packages/community/x86_64/opam/) * Alexander F. Rødseth [@xyproto](https://github.com/xyproto) * Debian Linux (9, oldstable, Stretch) [![Debian Oldstable package](https://repology.org/badge/version-for-repo/debian_oldstable/opam.svg?header=)](https://packages.debian.org/oldstable/source/opam) * [Package search](https://packages.debian.org/search?keywords=opam&searchon=names&suite=all§ion=all) * Mehdi Dogguy [@mehdid](https://github.com/mehdid), nicoo [@nbraud](https://www.github.com/nbraud) * Debian Linux (10, stable, Buster) [![Debian Stable package](https://repology.org/badge/version-for-repo/debian_stable/opam.svg?header=)](https://packages.debian.org/stable/source/opam) * [Package search](https://packages.debian.org/search?keywords=opam&searchon=names&suite=all§ion=all) * Mehdi Dogguy [@mehdid](https://github.com/mehdid), nicoo [@nbraud](https://www.github.com/nbraud) * Debian Linux (11, testing, Bullseye) [![Debian Testing package](https://repology.org/badge/version-for-repo/debian_testing/opam.svg?header=)](https://packages.debian.org/testing/source/opam) * [Package search](https://packages.debian.org/search?keywords=opam&searchon=names&suite=all§ion=all) * Mehdi Dogguy [@mehdid](https://github.com/mehdid), nicoo [@nbraud](https://www.github.com/nbraud) * Debian Linux (unstable, sid) [![Debian Unstable package](https://repology.org/badge/version-for-repo/debian_unstable/opam.svg?header=)](https://packages.debian.org/unstable/source/opam) * [Package search](https://packages.debian.org/search?keywords=opam&searchon=names&suite=all§ion=all) * Mehdi Dogguy [@mehdid](https://github.com/mehdid), nicoo [@nbraud](https://www.github.com/nbraud) * Fedora 32 [![Fedora 32 package](https://repology.org/badge/version-for-repo/fedora_32/opam.svg?header=)](https://src.fedoraproject.org/rpms/opam) * [Package page](https://apps.fedoraproject.org/packages/opam) * Ben Rosser [@TC01](https://www.github.com/TC01) * FreeBSD [![FreeBSD port](https://repology.org/badge/version-for-repo/freebsd/opam.svg?header=)](https://www.freshports.org/devel/ocaml-opam) * [Package search](http://www.freebsd.org/cgi/ports.cgi?query=opam&stype=all) * Hannes Mehnert [@hannesm](https://www.github.com/hannesm) * Gnu Guix [![GNU Guix package](https://repology.org/badge/version-for-repo/gnuguix/opam.svg?header=)](https://guix.gnu.org/packages/opam-2.0.6/) * [Package definition](https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ocaml.scm#n428) * Julien Lepiller [@roptat](https://github.com/roptat) * Homebrew (MacOS X) [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/opam.svg?header=)](https://formulae.brew.sh/formula/opam) * Macports (MacOS X) [![MacPorts package](https://repology.org/badge/version-for-repo/macports/opam.svg?header=)](https://ports.macports.org/port/opam/summary) * [Package definition](https://github.com/macports/macports-ports/blob/master/sysutils/opam/Portfile) * Perry E. Metzger [@pmetzger](https://www.github.com/pmetzger) * Mageia Linux (Cauldron) [![Mageia Cauldron package](https://repology.org/badge/version-for-repo/mageia_cauldron/opam.svg?header=)](https://madb.mageia.org/package/show/source/1/application/0/release/cauldron/name/opam) * [Package definition](http://svnweb.mageia.org/packages/cauldron/opam/current/SPECS/opam.spec?view=markup) * David Geiger [@david-geiger](https://www.github.com/david-geiger) * NixOS [![nixpkgs stable package](https://repology.org/badge/version-for-repo/nix_stable/opam.svg?header=)](https://github.com/NixOS/nixpkgs/blob/release-20.03/pkgs/development/tools/ocaml/opam/default.nix#L114) * [Package definitions](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/tools/ocaml/opam) * Henry Till * OpenBSD [![OpenBSD port](https://repology.org/badge/version-for-repo/openbsd/opam.svg?header=)](http://openports.se/sysutils/opam) * [Package page](http://ports.su/sysutils/opam,-main) * Christopher Zimmerman [@madroach](https://github.com/madroach) * OpenSuse (Tumbleweed) [![openSUSE Tumbleweed package](https://repology.org/badge/version-for-repo/opensuse_tumbleweed/opam.svg?header=)](https://build.opensuse.org/package/show/openSUSE:Factory/opam) * Anil Madhavapeddy [@avsm](https://www.github.com/avsm) * Ubuntu Linux (16.04, LTS, xenial) [![Ubuntu 16.04 package](https://repology.org/badge/version-for-repo/ubuntu_16_04/opam.svg?header=)](https://packages.ubuntu.com/source/xenial/opam) * [Package search](http://packages.ubuntu.com/search?keywords=opam&searchon=names&suite=all§ion=all) - bwrap unavailable * Ubuntu Linux (18.04, LTS, bionic) [![Ubuntu 18.04 package](https://repology.org/badge/version-for-repo/ubuntu_18_04/opam.svg?header=)](https://packages.ubuntu.com/source/bionic/opam) * [Package search](http://packages.ubuntu.com/search?keywords=opam&searchon=names&suite=all§ion=all) * Ubuntu Linux (19.10, LTS, eoan) [![Ubuntu 20.10 package](https://repology.org/badge/version-for-repo/ubuntu_20_10/opam.svg?header=)](https://packages.ubuntu.com/source/eoan/opam) * [Package search](http://packages.ubuntu.com/search?keywords=opam&searchon=names&suite=all§ion=all) * Ubuntu Linux (20.10, groovy) [![Ubuntu 20.10 package](https://repology.org/badge/version-for-repo/ubuntu_20_10/opam.svg?header=)](https://packages.ubuntu.com/source/groovy/opam) * [Package search](http://packages.ubuntu.com/search?keywords=opam&searchon=names&suite=all§ion=all) ## Third party packages * CentOS (6,7) * Anil Madhavapeddy [@avsm](https://www.github.com/avsm) * Exherbo Linux * 1.1.1 [Package page](http://git.exherbo.org/summer/packages/dev-ocaml/opam/index.html) (_ocaml-unofficial_) * nicoo [@nbraud](https://www.github.com/nbraud) * Ubuntu Linux PPA * 2.0.4 [Anil's official opam PPA](https://launchpad.net/~avsm) and [ppa post](https://discuss.ocaml.org/t/opam-2-0-experimental-ppas/2446) * Anil Madhavapeddy [@avsm](https://www.github.com/avsm) * Windows * [MinGW repo](https://github.com/fdopen/opam-repository-mingw) - Andreas Hauptmann [@fdopen](https://www.github.com/fdopen) * David Allsopp [@dra27](https://www.github.com/dra27) If you can't find latest version packages for your distribution here, see [the opam installation page](Install.html) for binaries or building from source. [Docker containers](http://hub.docker.com/r/ocaml/opam) for severals distributions and OCaml compiler versions are also available. opam-2.1.2/doc/pages/External_solvers.md0000644000650106067230000001753214153703467017056 0ustar glondused# External Solvers Resolving package installations in the presence of dependencies and conflicts is known to be an [NP-complete problem](https://hal.archives-ouvertes.fr/file/index/docid/149566/filename/ase.pdf). Thankfully, a [big effort](http://www.mancoosi.org/) has already been put into solving it efficiently: The `opam` package manager is an instance of the approach described in the article "[A modular package manager architecture](http://dl.acm.org/citation.cfm?id=2401012)", which was one of the outcomes of the [Mancoosi](http://www.mancoosi.org) research project. This architecture relies on dependency solvers for package managers, that communicate with the package manager front-end via the [CUDF format](http://www.mancoosi.org/cudf/). ## Installation and compatibility As of 2.0.0, opam comes with a CUDF solver built-in by default, so unless you have specifically compiled without it, you shouldn't have to be worried about installing an external solver. However, these are still supported, and can be useful in some specific cases. An external solver can be chosen over the built-in one using the `--solver` command-line argument, the `$OPAMEXTERNALSOLVER` environment variable, or the `solver:` field in the `~/.opam/config` file. If no solver was built in or selected, opam will detect the availability of `aspcud`, `packup` or `mccs` commands on your system and use one automatically. The following CUDF solvers have been tested: - [aspcud](http://www.cs.uni-potsdam.de/wv/aspcud/) (recommended solution until opam 1.2.2) - [packup](http://sat.inesc-id.pt/~mikolas/sw/packup/) - [mccs](http://www.i3s.unice.fr/~cpjm/misc/mccs.html) (a modified version of which is now being used as the built-in solver) - [p2Cudf](https://wiki.eclipse.org/Equinox/p2/CUDFResolver), which can be downloaded [here](http://eclipse.org/equinox/p2/p2CUDF/org.eclipse.equinox.p2.cudf-1.14.jar) and used with the configuration string `java -jar -obj %{criteria}% %{input}% %{output}%`. These have been developed by a variety of research teams during the [MISC competitions](http://www.mancoosi.org/misc/) run yearly from 2010 to 2012. # Specifying user Preferences for the External Solvers A fundamental distinguishing feature of the `opam` package manager is the fact that it is designed to reuse state-of-the-art dependency solving technology that gives the users the possibility to express their preferences regarding the operations to be performed during an installation, instead of being bound to an hard-coded strategy. This section provides basic documentation on this feature, and its usage. ## What are user preferences for installations, and why are them important? When you request the installation of some packages, say p1...pn, `opam` has a lot to do: it needs to look at all the packages already installed on your machine, find all packages available from the repositories, consider your request, and then come up with a set of actions to be performed to satisfy your request. Unfortunately, there are a lot of assumptions hidden in your mind when you tell `opam` that you want p1...pn installed: should it choose the latest version of the p1...pn? That seems a sensible thing to do, but sometimes installing a recent version of a package p may lead to downgrading or removing another package q, which is something you might not want. What should `opam` do in this case? Remove q to get the latest p, or keep q and get the most recent p that is compatible with it? Well, the answer is: it depends! It depends on what _you_ really want, and different users may have different points of view. User preferences, supported by `CUDF`-compatible solvers, are the means you can use to make the assumptions in your mind explicit and known to the solver used by `opam`, so that the actions performed on your machine correspond to your personalised needs. ## How do I express my preferences? Preferences are expressed using a simple language built by prefixing a little set of combinators with the `-` (minus) or `+` (plus) operators. The most useful combinators are the following ones: * `new` : the number of new packages * `changed` : the number of packages modified * `removed` : the number of packages removed * `notuptodate` : the number of packages that are not at their latest version For example, the preference `-removed` tells the solver that among all possible ways of satisfying your request, it should choose one that minimises the number of packages removed. These combinators can be combined in a comma separated sequence, that is treated in lexicographic order by the solver. ### Default preferences for an upgrade For example, the preference `-removed,-notuptodate,-changed` tells the solver that after ensuring that removals are minimised, it should look for a solution that minimises also the number of packages which are not at their latest version, and then reduce the changes to a minimum. This is close to the default preference setting used by `opam` when you perform an update or an upgrade, and in practice it tries to bring _all_ your packages to the latest version available, as far as this does not implies removing too many packages. It can be set using the environment variable `OPAMUPGRADECRITERIA`, or the [`solver-upgrade-criteria:`](Manual.html#configfield-solver-upgrade-criteria) configuration field. ### Default preferences for an install When you request to install a (set of) package(s), in general you do not expect to see all your existing packages updated, and this is why in this case it is preferable to use a different value `-removed,-changed,-notuptodate` that tries to minimise changes to the system. It can be set using the environment variable `OPAMCRITERIA`, or the [`solver-criteria:`](Manual.html#configfield-solver-criteria) configuration field. ### Specifying preferences for opam `opam` allows one to specify criteria on the command line, using the `--criteria` option, that will apply only to the current command. For example, if you are a very conservative user, you might try issuing the following command: ``` opam install --criteria="-removed,-changed" ... ``` This can also be used for some tricks: if for example you want to repair your set of installed packages, you can use the `opam upgrade` command without specifying a preference for newer versions in the criteria (although you may prefer to run `opam upgrade --fixup` in this case): ``` opam upgrade --criteria="-changed" ``` ## Yes, there are different versions of the user preference language The different editions of the MISC competition led to improving the preferences language, by allowing the user progressively more flexibility. Recent solvers give access to a more sophisticated set of preferences, described in [the 2012 MISC competition rules](http://www.mancoosi.org/misc-2012/criteria/). For example, using `aspcud >=1.8.0`, you could use `-count(removed),-count(down),-sum(solution,installedsize),-notuptodate(solution),-count(changed)` to instruct a solver to minimise downgrades, and mininise the installed size, among other criteria. The default criteria used by opam use a custom CUDF property `version-lag` that gives a monotonic measure of the "age" of packages, by counting the number of newer revisions of the package. They can be seen using the `opam config report` command: ``` # install-criteria -removed,-count[version-lag,request],-count[version-lag,changed],-changed # upgrade-criteria -removed,-count[version-lag,solution],-new ``` Notice that these criteria are written for the built-in solver which, being derived from [`mccs`](https://github.com/AltGr/ocaml-mccs), uses a slightly different syntax for the criteria: the `-sum(subset,property)` criterion should be written `-count[property,subset]` instead. We also make use of the `request` subset here, which applies only to the packages that were part of the user request, and was introduced in aspcud 1.9.0 and is not part of the official mccs release. opam-2.1.2/doc/pages/FAQ.md0000644000650106067230000004272014153703467014123 0ustar glondused# opam FAQ > This FAQ is for general questions about opam and its usage. You may also be > interested in the more advanced [Tricks](Tricks.html) for specific use-cases > or advanced users. #### 🐫 What is opam for? Easily installing, upgrading and managing your OCaml compiler(s), tools and libraries. It's made of a tool, the [opam package manager](https://github.com/ocaml/opam), and a community-maintained [package repository](https://github.com/ocaml/opam-repository). Note that the tool itself is not specific to OCaml at its core, and could be used for different systems using specific repositories (e.g. for the [Coq theorem prover](http://coq.io/opam/)) --- #### 🐫 How to get, install and upgrade opam? See the [install guide](Install.html). If upgrading, you can bootstrap using `opam install opam-devel`, and follow the instructions. --- #### 🐫 Where is the manual? opam has git-like, hierarchical [manpages](https://opam.ocaml.org/doc/2.0/man/opam.html). Try `opam --help` for a starting point. Or get started from the [Usage](Usage.html) guide. If you want to know more about opam packages, see the [Packaging Howto](Packaging.html). The full reference on the internals and file formats is in the [Manual](Manual.html). You may also want to browse the [library APIs](api/). --- #### 🐫 What changes does opam do to my filesystem? opam is designed to be run strictly as user (non-root), and except for the explicit options provided during `opam init`, opam only writes within `~/.opam` (and `/tmp`). This directory — the default "opam root" — contains configuration, various internal data, a cache of downloaded archives, and your OCaml installations. If you choose to create "local switches", the installation prefix will be put in the specified directory with `/_opam/` appended. Nothing else will be changed. Please note, however, that programs you install using opam won't themselves be bound by any restrictions. On Linux, and since opam 2.0.0~rc2, package instructions (build, install, remove) are also run in a sandbox and guaranteed not to affect your system. --- #### 🐫 Why does opam require ``bwrap``? Since opam 2.0.0~rc2, opam uses `bwrap` on Linux to run package instructions in a sandbox. This restricts their access to parts of the system (e.g., forbid access to operating system, user data, or network). See the [bubblewrap page](https://github.com/projectatomic/bubblewrap) for details. A similar mechanism is used on macOS, using the `sandbox-exec` command. We use `bwrap` to prevent packages from writing outside their allotted filesystem space or use the network. For example, build commands have restricted write access, restrained to their dedicated build directory and `/tmp`. These sandboxing instructions are specified in the built-in configuration, that you can display with `opam init --show-default-opamrc`: ``` init-scripts: ["sandbox.sh" """ [...] """] {os = "linux"} wrap-build-commands: ["%{hooks}%/sandbox.sh" "build"] {os = "linux"} wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux"} wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux"} ``` Sandboxing provides an important level of security, and should always be kept enabled. Note, however, that: - Only the _package_ build/install/remove commands are protected: if you install a program using opam and execute it, it will run with your standard user rights. - If your installation uses unusual paths (opam root outside `HOME`, system folder, etc.), since `2.0.1` you can use the environment variable `OPAM_USER_PATH_RO` to have them handled by then sandbox script, e.g. This variable format is the same as `PATH`, you can add it in your shell configuration file, e.g `export OPAM_USER_PATH_RO=/rw/usrlocal:/media`. Contained paths are added as read-only. - If needed, for special cases like unprivileged containers, sandboxing can be disabled on `opam init` with the `--disable-sandboxing` flag (only for non-initialised opam). Or by using a [custom `opamrc`](Manual.html#configfield-wrap-build-commands). Use wisely, broken Makefiles that run `rm -rf /` [__do__ happen](https://github.com/ocaml/opam/issues/3231). --- #### 🐫 Why does ``opam init`` need to add stuff to my init scripts / why is ``eval $(opam env)`` needed? This is not strictly needed, but by updating your `PATH` and a few specific environment variables, one can: 1. Automatically find executables installed in opam (current switch) 2. Ensure the OCaml tools are going to look at the right places for installed libraries (e.g. when running `make`) If you don't want to update your startup scripts or change your environment, you can also: - Remember to use `opam exec -- COMMAND` whenever you want to run `COMMAND` while being aware of the opam installation, or - Run `eval $(opam env)` in the shell specifically when you are going to work on a project that uses your opam installation. Just be careful, in this case, that running e.g. `make` while forgetting to do this may lead to use a system-wide installation of OCaml, that may be in conflict (and typically trigger "Inconsistent assumptions" errors in OCaml). --- #### 🐫 What is a "switch"? An OCaml installation and a set of installed packages within an opam installation. This can be used to keep different OCaml versions side-by-side, or different sets of packages. See the [related section](Usage.html#opamswitch) in the usage manual and `opam switch --help`. The "prefix" for a given installation is simply `~/.opam/`. A switch is either based on a system-wide OCaml installation, or on a local installation. In the former case, opam will need to recompile all packages when your system compiler changes. In the latter case, OCaml will be downloaded and compiled on creation of the switch. Standard switches are held within `~/.opam`, but by using a directory as switch handle (instead of a plain name), you may create switches that have their contents in any local repository. They are put in a `_opam/` subdirectory in this case, and it is safe to just remove that subdirectory to clear the switch. --- #### 🐫 Can I work on different switches at the same time in different shells? Yes. Use one of: ``` eval $(opam env --switch --set-switch) # for the current shell opam exec --switch -- # for one command ``` This only affects the environment. --- #### 🐫 Can I get a new switch with the same packages installed? Yes. Use: ``` opam switch export --switch opam switch import --switch ``` The file format is human-readable, so you are free to edit the file before doing the `import` if you need to customise the installation. ### 🐫 How to share my working switch setup for a specific package ? When working on a project, it is sometimes needed to share a set of dependencies that you know (locally) the project is working with. You can share this set by generating a _locked_ opam file. Ths is easily done using the [`lock` command](man/opam-lock.html): it creates an opam file with a `depends:` field populated with all dependencies, at their exact version in the current (working) switch. You can then share this `opam.locked` file, or check it in your version-control system. ```shell $ opam lock # generate a .opam.lock file $ opam install --locked # use locked file, if present ``` --- #### 🐫 I installed a package by hand / used ``ocamlfind remove`` / fiddled with the installed packages and opam is out of sync. Help! Don't panic. opam assumes it's controlling what's below `~/.opam/`, but there are several ways you can recover: * `opam remove --force` will run the uninstall instructions even if the package is not registered as installed. Then retry `opam install`. * `opam reinstall` will try to remove an installed package, but go on to re-installing even if that fails. * If all else fails, you can re-install your current set of packages from scratch using `opam switch reinstall`. * You can force opam to register an installation or removal _without actually performing anything_ using `opam install|remove --fake`. This is not recommended though, as your manual install may not be exactly equivalent to the one expected by other opam packages, and opam may later on trigger reinstallations or upgrades of the package. Don't complain if you mess up your installation using this! If you want to control how a package is installed or modify it, the right way is `opam pin`. * You shouldn't have to, but if you want to restart from scratch, just delete `~/.opam` and get back to `opam init` --- #### 🐫 What are the minimum requirements? 1GB of memory should be all you need. It was reported that you may run into problems with 512MB of RAM and no swap. Of course, compiling the packages may need more. --- #### 🐫 Some packages fail during compilation, complaining about missing dependencies ("m4", "libgtk", etc.) > NOTE: since opam 2.1.0, the following is directly handled by opam, without > relying on a plugin. They probably depend on system, non-OCaml libraries: they need to be installed using your system package manager (apt-get, yum, pacman, homebrew, etc.) since they are outside the scope of opam. opam metadata includes documentation about these external dependencies, on a variety of systems/distributions, in the form of a [`depexts:`](https://opam.ocaml.org/doc/2.0/Manual.html#opamfield-depexts) field. Opam should print the required system dependencies, as documented for your OS, upon failure, and the `depext` opam plugin can take care of installing them for you: ``` opam depext ``` This should install `opam-depext` if needed and prompt to install the system packages required by your opam packages or their dependencies, through your OS's packaging system. If that doesn't work... * Check for hints printed by the failing package * Lookup the development packages corresponding to the error in your system's package repositories. * Dependencies for your specific system may not be known, but check the output of `opam list --rec --resolve ,... --columns name,depexts:`: it will list dependencies on all known systems and may get you in the right direction. In any of these cases, that's useful information that was missing from the opam repository: we would really appreciate that you take a minute to save others the trouble of looking by filling an issue in [the opam-repository tracker](https://github.com/ocaml/opam-repository/issues), with your system details, the output of `opam config report`, and the solution, if you found it. Thanks! --- #### 🐫 I have weird checksum errors: where do they come from? First of all, you should make sure your repositories are up-to-date: ``` opam update ``` If this isn't enough, or if you get the checksum errors while running `opam init`, this could be caused by a badly configured proxy cache that is serving stale files. To clear your proxy cache, you can use `wget --no-cache ` and retry. As a last resort, you can bypass the checksum checks using `--no-checksums`. --- #### 🐫 opam is prompting me to install or upgrade packages that I am not interested in, or doesn't install the latest version by default. Why? What can I do? * You can be more explicit in your request (`opam upgrade PACKAGES`, `opam install 'PACKAGE>=VERSION' PACKAGE...`, etc.). The latest version may not be available on your system, in this case this will tell you why. * See how to set [solver preferences](External_solvers.html) that could match your intentions better than the defaults * Check for pending reinstallations `opam reinstall --list-pending` --- #### 🐫 When trying to install a new package, opam wants to remove or downgrade packages that I have installed. How to know why? There is likely a conflict between them or their dependencies and what you are requesting, here is how to find out. We'll suppose you were trying to install `foo` and `bar` got removed: * `opam install foo bar`, if not possible, will tell you why. * The above may find a solution by using older version of the packages, in that case try and force the latest versions thusly: `opam install foo.2.0 bar.1.1` (you can also use constraints like `'foo>=2.0'`). --- #### 🐫 Where do I report Bugs, Issues and Feature Requests? - Bug reports and feature requests for the opam **tool** should be reported on [opam's issue-tracker](https://github.com/ocaml/opam/issues). Please include the output of `opam config report` whenever applicable. - Packaging issues or requests for a new package can be reported on the [official repository's issue-tracker](https://github.com/ocaml/opam-repository/issues). - General queries for both the tool and the packages can be addressed on the [OCaml-platform mailing-list](http://lists.ocaml.org/listinfo/platform) and insights and evolution of opam internals can discussed on the [opam-devel mailing-list](http://lists.ocaml.org/listinfo/opam-devel). - https://discuss.ocaml.org is a good place for community assistance. - You may also try IRC channel `#ocaml` on Freenode. --- #### 🐫 How to link to libraries installed with opam? The standard way of doing this is to use [ocamlfind](https://opam.ocaml.org/packages/ocamlfind), which is orthogonal to opam: `ocamlfind query `. If you use [dune](https://github.com/ocaml/dune), this should be completely transparent. Your libraries are installed to the directory returned by ``opam var lib``, which is by default `~/.opam//lib`. Note that using `ocamlc`'s option `-I +dir` will make `dir` relative to `lib/ocaml`, and will only work for the libraries that ship with the compiler. Also, remember to add the dependency when you package your project! --- #### 🐫 How does opam tell which version of a package is newer? We use the basics of the [version ordering](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version) from Debian: - version strings are sliced into alternate, possibly empty non-digit / digit sequences, always starting with a non-digit sequence. - those are sorted lexicographically, using resp. ASCII (with symbol > letter) and number order. For example `a` gives `["a"]`, and `1` gives `["";1]`, so `a` is latest (`"" < "a"`). - the `~` character is special as it sorts even before the end of sequence. It's most convenient for pre-releases, allowing `1.0~beta` to be before `1.0`. Here is an example of an ordered sequence: `~~`, `~`, `~beta2`, `~beta10`, `0.1`, `1.0~beta`, `1.0`, `1.0-test`, `1.0.1`, `1.0.10`, `dev`, `trunk` --- #### 🐫 What does the `--jobs` option do? It doesn't seem to enable parallel builds. It does, but at the _package_ granularity: it will only be noticeable if you build independent packages in the same command. Each package has its own build commands, and it's up to them to enable parallelism. If you are a packager, you may use the `jobs` opam variable, e.g. `make "-j%{jobs}%"`. --- #### 🐫 opam wants to do reinstallations after update. Can I skip them? When opam detects meaningful changes in upstream packages, it marks them for reinstallation, to be sure you get the latest fixes — repository managers generally don't abuse modifying existing packages. You can check this with: ``` opam reinstall --list-pending ``` And, in case you want to skip them: ``` opam reinstall --forget-pending ``` You should only do this if you know the changes you are skipping, though. --- #### 🐫 Some package installation fails with "ocamlfind: already installed" Probably the package was either installed from outside of opam, or uncleanly removed. You should try: ``` opam remove --force opam install ``` This will process the uninstall instructions, even if opam has no knowledge of the package being installed. You may also try to uninstall directly with ocamlfind, or just remove the problematic files. --- #### 🐫 opam is slow on top of NFS. How can I make it faster? opam root is usually located in the `home` directory, which, on top of NFS, slows down opam operations. Locating opam root in `/tmp` is not a solution: you could lose your opam configuration at each reboot. You can use the [`nfsopam`](https://github.com/UnixJunkie/nfsopam) script to have the best of both worlds: persistence of NFS directories and fast operations of local directories. --- #### 🐫 What does the `--cli` option do? Should I be using it everywhere? `--cli` was introduced in opam 2.1 to deal with changes in the command line interface between releases. It tells opam to interpret the command line as a specific version, in particular it means that new options or options which have had their meaning altered will not be available, or will be behave as they did in that version. It only affects the command-line - it does not, for example, stop a root from being upgraded from an older version to the current version. We recommend using it in scripts (and programs which call opam) since they can then expect to work seamlessly with future versions of the opam client. It's also a good idea to use it in blog posts, or other documentation you may share, since it allows copy-and-paste to work reliably (a user with a newer version of opam should have no issues and a user with an older opam gets a clearer error message). We don't recommend using it in day-to-day use of opam in the shell, because you'll be typing more and you won't get to notice exciting new features! If the behaviour of a command or option is altered, and you write something which in no longer valid, opam will try to tell you what the new command should look like. opam-2.1.2/doc/pages/Install.md0000644000650106067230000001710114153703467015115 0ustar glondused# How to install opam This page describes how to install and configure opam. For further help on how to use opam, either read [`opam --help`](man/opam.html) or move on to the [Usage](Usage.html) guide. ## Upgrading from a previous version Generally, you should just reproduce the same installation steps as for the original installation: upgrade from your system's package manager, or re-run the binary installer. Opam will automatically update its internal repository at `~/.opam` on first run if needed (if using our installer script, a backup can be made automatically). To upgrade shell scripts, and enable sandboxing, don't forget to run `opam init --reinit -ni`. Then see the [Upgrade guide](Upgrade_guide.html) to check the changes. ## Binary distribution The quickest way to get the latest opam up and working is to run [this script](https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh): ``` sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) ``` This will simply check your architecture, download and install the proper pre-compiled binary, backup your opam data if from an older version, and run `opam init`. (If you have trouble with `curl`, just [download the script](https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) and run `sh install.sh`) We provide pre-compiled binaries for: - Linux i686, amd64, arm7, arm64 - OSX (intel 64 bits, arm64) - We do not at present provide an official Windows distribution of opam, but please see [this separately maintained distribution](https://fdopen.github.io/opam-repository-mingw/) (other platforms are available using the other methods below) If you don't like scripts, you can just pick your download [here](https://github.com/ocaml/opam/releases), put it in your PATH as `opam`, and set it as executable, e.g. ``` sudo install /usr/local/bin/opam ``` > Note that this script is intended for end-users, not CI. For that purpose, > you can use pre-built [Docker images for various > configurations](https://hub.docker.com/r/ocaml/opam2/). ## Using your distribution's package system This is generally the recommended way, **when available and up-to-date** (you can check [here](Distribution.html) the latest available release per distribution). Here is a list of supported distributions: #### Arch Linux [![badge](https://repology.org/badge/version-for-repo/arch/opam.svg)](https://repology.org/project/opam/versions) The [opam](https://www.archlinux.org/packages/community/x86_64/opam/) package is available in the official distribution. To install it simply run: ``` pacman -S opam ``` If you'd like to use the development version there is an [opam-git](https://aur.archlinux.org/packages/opam-git/) package available in the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository). Assuming you have [yay](https://github.com/Jguer/yay) installed just run the following command: ``` yay -S opam-git ``` #### Debian [![badge](https://repology.org/badge/version-for-repo/debian_stable/opam.svg)](https://repology.org/project/opam/versions) [![badge](https://repology.org/badge/version-for-repo/debian_testing/opam.svg)](https://repology.org/project/opam/versions) [![badge](https://repology.org/badge/version-for-repo/debian_unstable/opam.svg)](https://repology.org/project/opam/versions) Binary packages of opam are available for the [stable](http://packages.debian.org/jessie/opam), [testing](http://packages.debian.org/stretch/opam) and [unstable](http://packages.debian.org/sid/opam) distributions, from the official repositories. You should be set with: ``` apt-get install opam ``` #### [Exherbo](http://exherbo.org) The [`dev-ocaml/opam`](http://git.exherbo.org/summer/packages/dev-ocaml/opam/index.html) package can be installed with the command: ``` cave resolve -x dev-ocaml/opam ``` You might need to add the `::ocaml-unofficial` repository first: ``` cave resolve -x repository/ocaml-unofficial ``` #### [Fedora](http://fedoraproject.org), [CentOS](http://centos.org) and RHEL [![Fedora 32](https://repology.org/badge/version-for-repo/fedora_32/opam.svg)](https://repology.org/project/opam/versions) The opam package for Fedora can be installed with the command: ``` dnf install opam ``` There is not currently a package for CentOS/RHEL. You will need to use our pre-built binaries, or build from sources. #### Mageia [![badge](https://repology.org/badge/version-for-repo/mageia_cauldron/opam.svg)](https://repology.org/project/opam/versions) The opam package for Mageia can be installed with the command: ``` urpmi opam ``` #### OpenBSD [![badge](https://repology.org/badge/version-for-repo/openbsd/opam.svg)](https://repology.org/project/opam/versions) The opam package for OpenBSD can be installed with the command (since OpenBSD 5.7): ``` pkg_add opam ``` #### FreeBSD [![badge](https://repology.org/badge/version-for-repo/freebsd/opam.svg)](https://repology.org/project/opam/versions) Opam is available in the ports and packages tree on FreeBSD 11 or higher. ``` cd /usr/ports/devel/ocaml-opam make install ``` #### OSX [![badge](https://repology.org/badge/version-for-repo/homebrew/opam.svg)](https://repology.org/project/opam/versions) [![badge](https://repology.org/badge/version-for-repo/macports/opam.svg)](https://repology.org/project/opam/versions) Opam packages for [homebrew](http://mxcl.github.com/homebrew/) and [MacPorts](http://www.macports.org/) are available. homebrew need a prior installation of `gpatch`, as opam uses gnu-specific options. ``` # Homebrew brew install gpatch brew install opam # MacPort port install opam ``` See also [howto setup Emacs.app](https://github.com/ocaml/opam/wiki/Setup-Emacs.app-on-macosx-for-opam-usage) for Opam usage. #### Ubuntu [![badge](https://repology.org/badge/version-for-repo/ubuntu_20_04/opam.svg)](https://repology.org/project/opam/versions) ##### Versions 18.04 and newer There is a [ppa](https://launchpad.net/~avsm/+archive/ubuntu/ppa) available that contains the current stable version of `opam`. ``` add-apt-repository ppa:avsm/ppa apt update apt install opam ``` ##### Versions older than 18.04 Use the binary distribution. Instructions provided at https://opam.ocaml.org/doc/Install.html#Binary-distribution #### Windows Full support for Windows is planned for opam 2.2, and we expect to provide an opam package in [Chocolatey](https://chocolatey.org/) and [winget](https://docs.microsoft.com/en-us/windows/package-manager/). If you'd like to help out, please get in touch! #### Guix & Guix System [![badge](https://repology.org/badge/version-for-repo/gnuguix/opam.svg)](https://repology.org/project/opam/versions) The opam package for [guix](https://www.gnu.org/software/guix/) can be installed with the command: ``` # Guix guix install opam ``` ## From Sources #### Getting the Sources Sources of the latest stable version of opam are available on Github: * [Opam releases on Github](https://github.com/ocaml/opam/releases) You can also download the full archives, including opam dependencies (these don't require any extra downloads, just the OCaml compiler -- 4.02.3 or later for the latest version): * [2.0.8](https://github.com/ocaml/opam/releases/download/2.0.8/opam-full-2.0.8.tar.gz) - MD5: 69e95d318fec8027b9eb6af6075a2a13 - SHA384: f534860f511768f78f646be4248df58ecaf699dc55eea90e21f0d8d6e2bd23235a9ca132fcf17bf854cf3c25adfab4c8 Follow the instructions in the included [`README.md`](https://github.com/ocaml/opam#readme) to get opam built and installed from there. > Note that opam1.2.2 doesn't build from source with OCaml 4.06.0. Use this command to compile `lib_ext` > ``` > OCAMLPARAM="safe-string=0,_" make lib-ext > ``` opam-2.1.2/doc/pages/Manual.md0000644000650106067230000023614114153703467014733 0ustar glondused # The opam manual This manual gathers reference information on opam and its file formats. It is primarily of use for packagers, package maintainers and repository maintainers. * For simple usage of opam, see the [Usage](Usage.html) page, and the comprehensive built-in documentation [`opam [command] --help`](man/index.html). * For a gentler introduction to packaging, see the [Packaging guide](Packaging.html) * If you want to hack on opam or build related tools, the API documentation can be browsed [here](api/index.html) ## File hierarchies ### opam root opam holds its configuration, metadata, logs, temporary directories and caches within a directory that we will call _opam root_. By default, this is `~/.opam`, and we may refer to it by this name in this manual for the sake of simplicity, but this can be changed using the `OPAMROOT` environment variable or the `--root` command-line argument. An existing opam root is required for opam to operate normally, and one is created upon running `opam init`. The initial configuration can be defined through a configuration file at `~/.opamrc`, `/etc/opamrc` or at a location specified through the `--config` command-line option. If none is present, opam defaults to its built-in configuration that binds to the OCaml repository at `https://opam.ocaml.org`. Except in explicit cases, opam only alters files within its opam root. It is organised as follows: - [`~/.opam/config`](#config): the global opam configuration file - `~/.opam/repo/`: contains the mirrors of the configured package repositories - [`~/.opam/repo/repos-config`](#repos-config): lists the configured package repositories and their URLs - `~/.opam/repo/`: mirror of the given repository - `~/.opam/opam-init/`: contains opam configuration scripts for the outside world, e.g. shell environment initialisation - `~/.opam/download-cache/`: caches of downloaded files - `~/.opam/plugins/`: reserved for plugins - `~/.opam/`: prefixes of named [switches](#Switches) ### Repositories Repositories are collection of opam package definitions. They respect the following hierarchy: - [`/repo`](#repo): repository configuration file - [`/packages//./opam`](#opam): holds the metadata for the given package. `url` and `descr` may also be present, in which case they override what may already be present in the `opam` file - [`/packages//./files/`](#files): contains files that are copied over the root of the source tree of the given package before it gets used. - `/cache/`: cached package files, by checksum. Note that the cache location is configured in the [repo](#repofield-archive-mirrors) file, this name is only where `opam admin cache` puts it by default. - `/archives/`: this is no longer used by opam automatically, but is the canonical place where you should place your package archives if you want to serve them from the repository server directly. The URLs of the packages will have to be set accordingly. - `/index.tar.gz`: archive containing the whole repository contents (except the cache), needed when serving over HTTP. It can be generated using `opam admin index`. opam repositories can be accessed using local or remote (ssh) paths, HTTP URLs, or one of the supported version control systems (git, Mercurial, Darcs). A repository is set up using ``` opam repository add [--this-switch|--all-switches|--set-default] ``` The last flag sets what switches are affected by the new repository: - `--this-switch` (**default**) selects only the current switch - `--all-switches` affects all the currently existing switches - `--set-default` affects all switches created in the future Creating a new switch using e.g. a custom repository overlay on the default repository can be done in a single call using: ``` opam switch create --repos==,default ``` which will define the new repository `` at `` if needed. Use `opam repository list --all` for an overview of configured repositories. Repository selection is always ordered, with the definition of a given version of a package being taken from the repository with the lowest index where it is found. Data from the configured repositories is updated from the upstreams manually using the `opam update` command. This only updates repositories in use by the currently selected switches, unless `--all` is specified. ### Switches opam is designed to hold any number of concurrent installation prefixes, called _switches_. Switches are isolated from each other and have their own set of installed packages, selection of repositories, and configuration options. All package-related commands operate on a single switch, and require one to be selected. The current switch can be selected in the following ways: - globally, using `opam switch `. opam will use that switch for all further commands, except when overridden in one of the following ways. - for local switches, which are external to the opam root, when in the directory where the switch resides or a descendant. - by setting the `OPAMSWITCH=` environment variable, to set it within a single shell session. This can be done by running `eval $(opam env --switch )` to set the shell environment at once, see below. - through the `--switch ` command-line flag, for a single command. Switches have their own prefix, normally `~/.opam/`, where packages get installed ; to use what is installed in a switch, some environment variables need to be set, _e.g._ to make executables installed into `~/.opam//bin` visible, that directory needs to be added to `PATH`, but individual packages can define their own settings as well. Command `opam env` returns the environment updates corresponding to the current switch, in a format readable by your shell, and when needed opam will prompt you to run: ``` eval $(opam env) ``` A switch is created using `opam switch create (|--empty)`. - `` can be either a plain name, or a directory name (if containing `/` or starting with `.`). In the latter case the switch is _local_ and instead of being held at `~/.opam/`, it will be created in the given directory, as a `_opam` subdirectory. Local switches are automatically selected depending on the current directory, see above. - If a `` is selected, opam will install the corresponding packages and their dependencies in the new switch. These packages will be marked as _base_, protected against removal and unaffected by upgrade commands. `` can be selected among packages which have the `compiler` flag set, or their versions. Use `opam switch list-available` to list them. #### Structure If we define `` as: - `~/.opam/` for plain switches - `/_opam` for local switches, when `` is a path Switches are laid out thusly: - `/`: prefix of the switch, holding the installation hierarchy in the UNIX `/usr` standard (with subdirectories `bin`, `lib`, `share`, `man`, `doc`, `etc`...) - `/.opam-switch/`: holds all opam data regarding this switch - [`/.opam-switch/switch-config`: switch-specific configuration](#switch-config) - [`/.opam-switch/switch-state`: stores the sets of installed, base, pinned packages](#switch-state) - `/.opam-switch/environment`: contains the environment variable settings for this switch - `/.opam-switch/reinstall`: list of packages marked for reinstallation (development packages where changes have been detected) - [`/.opam-switch/config/.config`](#lt-pkgname-gt-config): installed package's, opam specific configuration - [`/.opam-switch/install/.install`](#lt-pkgname-gt-install): `.install` files used to install the given package - `/.opam-switch/install/.changes`: file system changes done by the installation of the given package, as tracked by opam - `/.opam-switch/packages/./`: metadata of the given package as it has been used for its installation - `/.opam-switch/sources/./` or `/`: unpacked sources of packages. The version is omitted from the directory name for pinned packages, which are typically synchronised to a version-control system rather than unpacked from an archive. - `/.opam-switch/overlay//`: custom definition for the given pinned packages - `/.opam-switch/build/./`: temporary directories where the packages are compiled - `/.opam-switch/remove/./`: temporary directories used for calling the packages' `remove` commands, when those need the source. - `/.opam-switch/backup`: snapshots of previous states of the switch, and other backup files. #### Pinning Pinning is an operation by which a package definition can be created or altered locally in a switch. In its most simple form, `opam pin `, `` is bound to the specified version and won't be changed on `opam upgrade` (assuming it is an existing package). `opam pin edit ` provides a way to directly pin and edit the metadata of the given package, locally to the current switch, for example to tweak a dependency. `opam pin [package] ` can further be used to divert the source of a package, or even create a new package ; this is very useful to point to a local path containing a development or patched version of the package source. When pinning a package, the source is searched for metadata in an `opam` or `.opam` file, either at the root of the source tree or in an `opam` directory. You can also replace that file by a directory containing an `opam` file and optionally other metadata, like a `files/` subdirectory. As the `package` argument is optional, `opam` guesses package name from the `` or the `opam` file found. Note that for local VCS pinning, when given without package name, `opam` retrieves the locally found `opam` file, even if not versioned. If this file is versioned, `opam` relies on the versioned version. Whenever an install, reinstall or upgrade command-line refers to a pinned package, opam first fetches its latest source. `opam update [--development]` is otherwise the standard way to update the sources of all the packages pinned in the current switch. `opam install ` is an automatic way to handle pinning packages whose definitions are found in ``, synchronise and install them. The `upgrade`, `reinstall` and `remove` commands can likewise be used with a directory argument to refer to pinned packages. ## Common file format ### Conventions Syntax is given in a BNF-like notation. Non-terminals are written ``, terminals are either plain text or written in double-quotes (`"terminal"`), curly brackets denote zero or more repetitions when suffixed with `*`, or one or more when suffixed with `+`, and square brackets denote zero or one occurrence. Parentheses are for grouping. `(")` and `(""")` respectively mean one and three quotation mark characters. As a special case, and for readability, we add simplified notations for _lists_ and _options_: - `[ ... ]` means `"[" { }* "]" | `. It corresponds to a case of the `` non-terminal and is a list of `` repeated any number of times. The square brackets can be omitted when `` occurs just once. - ` { ... }` means ` "{" { }* "}"`, and is a shortcut for the `