diff options
-rw-r--r-- | CHANGES | 17 | ||||
-rwxr-xr-x | config.guess | 500 | ||||
-rwxr-xr-x | config.sub | 165 | ||||
-rwxr-xr-x | configure | 879 | ||||
-rw-r--r-- | configure.ac | 41 | ||||
-rwxr-xr-x | install-sh | 381 | ||||
-rw-r--r-- | m4/base_checks.m4 | 35 | ||||
-rw-r--r-- | m4/detect_binding.m4 | 6 | ||||
-rw-r--r-- | m4/ocaml.m4 | 14 | ||||
-rw-r--r-- | m4/ocaml_compilers.m4 | 21 | ||||
-rw-r--r-- | m4/pkg_config.m4 | 16 | ||||
-rw-r--r-- | src/META.in | 5 | ||||
-rw-r--r-- | src/Makefile.in | 11 | ||||
-rw-r--r-- | src/duppy.ml | 135 | ||||
-rw-r--r-- | src/duppy.mli | 42 | ||||
-rw-r--r-- | src/duppy_secure_transport.ml | 19 | ||||
-rw-r--r-- | src/duppy_secure_transport.mli | 6 | ||||
-rw-r--r-- | src/duppy_ssl.ml | 13 | ||||
-rw-r--r-- | src/duppy_ssl.mli | 2 |
19 files changed, 1663 insertions, 645 deletions
@@ -1,3 +1,20 @@ +0.7.0 (03-11-2017) +===== +* Fix bytes compatibility with OCaml 4.06 and above. +* Fix camlp4 availability test. + +0.6.1 (23-08-2017) +===== +* Added SecureTransport support. + +0.6.0 (11-04-2017) +===== +* Added SSL support. + +0.5.2 (03-08-2015) +===== +* Dummy github release. + 0.5.1 (05-08-2013) ===== * Removed win32 select work-around: patch applied upstream. diff --git a/config.guess b/config.guess index d622a44..2e9ad7f 100755 --- a/config.guess +++ b/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2016-10-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to <config-patches@gnu.org>. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include <features.h> + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -153,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -182,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -192,18 +224,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -216,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -232,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -302,7 +345,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -340,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -374,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -560,8 +603,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -598,13 +642,13 @@ EOF sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -643,11 +687,11 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -660,12 +704,12 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -770,14 +814,14 @@ EOF echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -801,10 +845,13 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -852,21 +899,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +926,60 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +998,69 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1073,7 +1136,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1201,6 +1264,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1219,6 +1285,9 @@ EOF SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1227,24 +1296,36 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1256,7 +1337,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1275,7 +1356,7 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1317,7 +1398,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1328,174 +1409,25 @@ EOF x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi +esac cat >&2 <<EOF $0: unable to guess system type -This script, last modified $timestamp, has failed to recognize -the operating system you are using. It is advised that you -download the most up to date version of the config scripts from +This script (version $timestamp), has failed to recognize the +operating system you are using. If your script is old, overwrite +config.guess and config.sub with the latest versions from: - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub -If the version you run ($0) is already up to date, please -send the following data and any information you think might be -pertinent to <config-patches@gnu.org> in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp @@ -1,24 +1,18 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2012-04-18' +timestamp='2016-11-04' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program 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 General Public License for more details. +# This program 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 +# General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. @@ -26,11 +20,12 @@ timestamp='2012-04-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to <config-patches@gnu.org>. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -38,7 +33,7 @@ timestamp='2012-04-18' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -58,8 +53,7 @@ timestamp='2012-04-18' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -73,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,9 +115,9 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -156,7 +148,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -259,21 +251,25 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -287,26 +283,30 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -314,6 +314,7 @@ case $basic_machine in | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -328,7 +329,10 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -370,26 +374,29 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -403,28 +410,34 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -432,6 +445,7 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -508,6 +522,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -628,6 +645,14 @@ case $basic_machine in basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -769,6 +794,9 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -788,11 +816,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -820,6 +852,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -828,7 +864,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -996,7 +1032,7 @@ case $basic_machine in ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -1006,7 +1042,7 @@ case $basic_machine in ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -1019,7 +1055,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1346,29 +1386,30 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1492,9 +1533,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1503,6 +1541,8 @@ case $os in ;; -nacl*) ;; + -ios) + ;; -none) ;; *) @@ -1543,6 +1583,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ocaml-duppy 0.5.1. +# Generated by GNU Autoconf 2.69 for ocaml-duppy 0.7.0. # # Report bugs to <savonet-users@lists.sourceforge.net>. # @@ -639,8 +639,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ocaml-duppy' PACKAGE_TARNAME='ocaml-duppy' -PACKAGE_VERSION='0.5.1' -PACKAGE_STRING='ocaml-duppy 0.5.1' +PACKAGE_VERSION='0.7.0' +PACKAGE_STRING='ocaml-duppy 0.7.0' PACKAGE_BUGREPORT='savonet-users@lists.sourceforge.net' PACKAGE_URL='' @@ -653,11 +653,20 @@ INC PA_DOC PA_DUPPY_META PA_DUPPY +W_CAMLP4 +DUPPY_SECURE_TRANSPORT_META +DUPPY_SECURE_TRANSPORT +W_OSX_SECURE_TRANSPORT +DUPPY_SSL_META +DUPPY_SSL +W_SSL +W_BYTES W_PCRE PIC_FLAGS OCAMLFLAGS CAMLLIBPATH OCAMLNCFLAGS +OCAML_STDLIB OCAMLFIND CAMLP4RF CAMLP4R @@ -695,6 +704,7 @@ INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM AUTOCONF_INSTALL_FILES +TARGET_TOOLCHAIN host_os host_vendor host_cpu @@ -730,6 +740,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -755,12 +766,21 @@ enable_option_checking enable_ldconf enable_camlp4 enable_debugging +with_ocaml_warnings enable_profiling enable_nativecode enable_custom enable_pic with_pcre_dir enable_pcre_dynamic_plugin +with_bytes_dir +enable_bytes_dynamic_plugin +with_ssl_dir +enable_ssl_dynamic_plugin +with_osx_secure_transport_dir +enable_osx_secure_transport_dynamic_plugin +with_camlp4_dir +enable_camlp4_dynamic_plugin ' ac_precious_vars='build_alias host_alias @@ -809,6 +829,7 @@ 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}' @@ -1061,6 +1082,15 @@ do | -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=* \ @@ -1198,7 +1228,7 @@ fi 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 + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1311,7 +1341,7 @@ 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 ocaml-duppy 0.5.1 to adapt to many kinds of systems. +\`configure' configures ocaml-duppy 0.7.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1351,6 +1381,7 @@ Fine tuning of the installation directories: --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] @@ -1376,7 +1407,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ocaml-duppy 0.5.1:";; + short | recursive ) echo "Configuration of ocaml-duppy 0.7.0:";; esac cat <<\_ACEOF @@ -1397,12 +1428,32 @@ Optional Features: builds on supported platforms] --enable-pcre-dynamic-plugin Compile pcre as an optional dynamic plugin. + --enable-bytes-dynamic-plugin + Compile bytes as an optional dynamic plugin. + --enable-ssl-dynamic-plugin + Compile ssl as an optional dynamic plugin. + --enable-osx-secure-transport-dynamic-plugin + Compile osx-secure-transport as an optional dynamic + plugin. + --enable-camlp4-dynamic-plugin + Compile camlp4 as an optional dynamic plugin. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-ocaml-warnings=WARNINGS + Enable specific list of ocaml compiler warnings. --with-pcre-dir=path look for ocaml-pcre library in "path" (autodetected by default) + --with-bytes-dir=path look for ocaml-bytes library in "path" + (autodetected by default) + --with-ssl-dir=path look for ocaml-ssl library in "path" + (autodetected by default) + --with-osx_secure_transport-dir=path + look for ocaml-osx_secure_transport library in "path" + (autodetected by default) + --with-camlp4-dir=path look for ocaml-camlp4 library in "path" + (autodetected by default) Some influential environment variables: CC C compiler command @@ -1480,7 +1531,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ocaml-duppy configure 0.5.1 +ocaml-duppy configure 0.7.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1566,7 +1617,7 @@ 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 ocaml-duppy $as_me 0.5.1, which was +It was created by ocaml-duppy $as_me 0.7.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2904,18 +2955,30 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that calling user is not root" >&5 -$as_echo_n "checking that calling user is not root... " >&6; } -RUNNING_USER="$USER" -if test -z "$RUNNING_USER"; then - RUNNING_USER=`whoami` -fi -if test $RUNNING_USER = "root"; then - as_fn_error $? "configure script must not be run with root user!" "$LINENO" 5 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target toolchain" >&5 +$as_echo_n "checking target toolchain... " >&6; } +case "${host_os}" in + linux*) + TARGET_TOOLCHAIN="linux" + ;; + mingw*) + TARGET_TOOLCHAIN="mingw" + ;; + cygwin*) + TARGET_TOOLCHAIN="cygwin" + ;; + darwin*) + TARGET_TOOLCHAIN="darwin" + ;; + *) + TARGET_TOOLCHAIN="other" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_TOOLCHAIN" >&5 +$as_echo "$TARGET_TOOLCHAIN" >&6; } # AC_CANONICAL_HOST needs those files @@ -4381,7 +4444,7 @@ fi -if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}camlidl", so it can be a program name with args. set dummy ${ac_tool_prefix}camlidl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -4475,6 +4538,7 @@ fi + # checking for ocamllex if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamllex", so it can be a program name with args. @@ -5245,7 +5309,18 @@ fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocaml standard library path" >&5 +$as_echo_n "checking for ocaml standard library path... " >&6; } + OCAML_STDLIB=`$OCAMLFIND printconf stdlib` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAML_STDLIB" >&5 +$as_echo "$OCAML_STDLIB" >&6; } + + # Check if caml/threads.h is present +old_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -I${OCAML_STDLIB}" ac_fn_c_check_header_compile "$LINENO" "caml/threads.h" "ac_cv_header_caml_threads_h" "#include <caml/misc.h> " if test "x$ac_cv_header_caml_threads_h" = xyes; then : @@ -5253,6 +5328,7 @@ if test "x$ac_cv_header_caml_threads_h" = xyes; then : fi +CFLAGS=${old_CFLAGS} # Check whether --enable-debugging was given. if test "${enable_debugging+set}" = set; then : @@ -5260,10 +5336,23 @@ if test "${enable_debugging+set}" = set; then : fi -if test "x$enable_debugging" = "xyes" ; then +if test "$enable_debugging" \!= "no" ; then OCAMLFLAGS="$OCAMLFLAGS -g" fi + +# Check whether --with-ocaml-warnings was given. +if test "${with_ocaml_warnings+set}" = set; then : + withval=$with_ocaml_warnings; +fi + + +if test -n "${with_ocaml_warnings}" ; then + OCAMLFLAGS="$OCAMLFLAGS -w +${with_ocaml_warnings}" +else + OCAMLFLAGS="$OCAMLFLAGS -w +A-4@5-7@8-9@11@12@20-35-44-45-50" +fi + # Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; @@ -5294,7 +5383,6 @@ CAMLLIBPATH=$OCAMLLIB - # Check whether --enable-pic was given. if test "${enable_pic+set}" = set; then : enableval=$enable_pic; enable_pic="$enableval" @@ -5468,7 +5556,7 @@ fi as_fn_error $? "requires version >= found ${PCRE_version}." "$LINENO" 5 else if test -z "${PCRE_SHARED}"; then - PCRE_PACKAGES="`${OCAMLFIND} query -r -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`" + PCRE_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`" liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${PCRE_PACKAGES}" W_PCRE=yes else @@ -5518,7 +5606,7 @@ fi fi fi if test -z "${PCRE_STOP_CHECK}"; then - PCRE_PACKAGES="`${OCAMLFIND} query -r -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`" + PCRE_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`" echo ${with_pcre_dir} | grep ^/ > /dev/null 2>&1 \ || with_pcre_dir=${PWD}/${with_pcre_dir} if test -z "${PCRE_SHARED}"; then @@ -5534,7 +5622,7 @@ fi PCRE_CMA=pcre.${cma} fi for i in ${PCRE_requires}; do - PCRE_PACKAGES="${PCRE_PACKAGES} `${OCAMLFIND} query -r -separator " " -format "-package %p" $i 2>/dev/null`" + PCRE_PACKAGES="${PCRE_PACKAGES} `${OCAMLFIND} query -separator " " -format "-package %p" $i 2>/dev/null`" done if test -z "${PCRE_SHARED}"; then liquidsoap_ocamllflags="${liquidsoap_ocamllflags} ${PCRE_PACKAGES} ${PCRE_CMA}" @@ -5566,7 +5654,740 @@ pcre_packages=${pcre_packages}" fi INC="$INC `$OCAMLFIND query pcre`" -if test "$CAMLP4O" != "no" ; then + + + + + +if test -n ""; then + BINDING_PKGS="" +else + BINDING_PKGS="bytes" +fi + + +# Check whether --with-bytes-dir was given. +if test "${with_bytes_dir+set}" = set; then : + withval=$with_bytes_dir; +fi + + +# Check whether --enable-bytes-dynamic-plugin was given. +if test "${enable_bytes_dynamic_plugin+set}" = set; then : + enableval=$enable_bytes_dynamic_plugin; +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocaml bytes module" >&5 +$as_echo_n "checking for ocaml bytes module... " >&6; } + +OCAML_CHECK="${OCAMLFIND} query bytes" + + +if test "x$enable_bytes_dynamic_plugin" = "xyes" ; then + BYTES_SHARED="yes" + PLUGINS="$PLUGINS bytes" +fi + + +DEPS_CHECK=yes +for i in ; do + eval "dep_check=\$W_$i" + if test -z "${dep_check}"; then + DEPS_CHECK= + break + fi +done +if test -z $DEPS_CHECK; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: bytes needs " >&5 +$as_echo "bytes needs " >&6; } +else + if test -z "${with_bytes_dir}" ; then + if ! ${OCAML_CHECK} > /dev/null 2>&1 ; then + as_fn_error $? "Not found." "$LINENO" 5 + else + BYTES_version="`${OCAMLFIND} query -format "%v" bytes 2>/dev/null`" + if test -z "" ; then + VERSION_OK=yes + else + as_arg_v1=${BYTES_version} +as_arg_v2= +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + VERSION_OK= ;; #( + 0) : + VERSION_OK=yes ;; #( + 2) : + VERSION_OK=yes ;; #( + *) : + ;; +esac +fi + if test -z "${VERSION_OK}"; then + as_fn_error $? "requires version >= found ${BYTES_version}." "$LINENO" 5 + else + if test -z "${BYTES_SHARED}"; then + BYTES_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`" + liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${BYTES_PACKAGES}" + W_BYTES=yes + else + bytes_packages="`${OCAMLFIND} query -r -separator " " -format "%p" $BINDING_PKGS 2>/dev/null`" + W_BYTES=bytes + fi + LIBS_VERSIONS="${LIBS_VERSIONS} bytes=$BYTES_version" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + fi + fi + else + BYTES_STOP_CHECK= + BYTES_version="[unknown version]" + BYTES_requires= + if test -r ${with_bytes_dir}/META >/dev/null 2>&1; then + # Grab version + BYTES_version=`cat "${with_bytes_dir}/META" | grep version | cut -d'=' -f 2 | tr -d ' ' | tr -d '"' | head -n 1` + if test -z "" ; then + VERSION_OK=yes + else + as_arg_v1=${BYTES_version} +as_arg_v2= +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + VERSION_OK= ;; #( + 0) : + VERSION_OK=yes ;; #( + 2) : + VERSION_OK=yes ;; #( + *) : + ;; +esac +fi + if test -z "${VERSION_OK}"; then + as_fn_error $? "requires version >= found ${BYTES_version}." "$LINENO" 5 + BYTES_STOP_CHECK=yes + fi + BYTES_requires=`cat "${with_bytes_dir}/META" | grep 'requires' | cut -d '=' -f 2 | tr -d '"'` + BYTES_path="${with_bytes_dir}" + else + BYTES_path=`${OCAMLFIND} -query bytes 2>/dev/null` + if ! test -z ""; then + as_fn_error $? "cannot find version from META file." "$LINENO" 5 + BYTES_STOP_CHECK=yes + fi + fi + if test -z "${BYTES_STOP_CHECK}"; then + BYTES_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`" + echo ${with_bytes_dir} | grep ^/ > /dev/null 2>&1 \ + || with_bytes_dir=${PWD}/${with_bytes_dir} + if test -z "${BYTES_SHARED}"; then + liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} -I ${with_bytes_dir} ${BYTES_PACKAGES}" + else + bytes_ocamlcflags="-I ${with_bytes_dir} ${BYTES_PACKAGES}" + fi + # We need to recurse here because + #Â some package may not be registered using ocamlfind + if test -n ""; then + BYTES_CMA=.${cma} + else + BYTES_CMA=bytes.${cma} + fi + for i in ${BYTES_requires}; do + BYTES_PACKAGES="${BYTES_PACKAGES} `${OCAMLFIND} query -separator " " -format "-package %p" $i 2>/dev/null`" + done + if test -z "${BYTES_SHARED}"; then + liquidsoap_ocamllflags="${liquidsoap_ocamllflags} ${BYTES_PACKAGES} ${BYTES_CMA}" + W_BYTES=yes + else + bytes_ocamllflags="${BYTES_PACKAGES} ${BYTES_CMA}" + W_BYTES=bytes + fi + LIBS_VERSIONS="${LIBS_VERSIONS} bytes=$BYTES_version" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + fi + fi +fi + + +if test -z "${W_BYTES}" ; then + w_BYTES="no (requires bytes)" +else + if test -z "${BYTES_SHARED}"; then + w_BYTES=yes + else + PLUGINS_DATA="$PLUGINS_DATA +bytes_ocamlcflags=${bytes_ocamlcflags} +bytes_ocamllflags=${bytes_ocamllflags} +bytes_packages=${bytes_packages}" + w_BYTES=plugin + fi +fi +INC="$INC `$OCAMLFIND query bytes`" + + + + + + +if test -n ""; then + BINDING_PKGS="" +else + BINDING_PKGS="ssl" +fi + + +# Check whether --with-ssl-dir was given. +if test "${with_ssl_dir+set}" = set; then : + withval=$with_ssl_dir; +fi + + +# Check whether --enable-ssl-dynamic-plugin was given. +if test "${enable_ssl_dynamic_plugin+set}" = set; then : + enableval=$enable_ssl_dynamic_plugin; +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocaml ssl module" >&5 +$as_echo_n "checking for ocaml ssl module... " >&6; } + +OCAML_CHECK="${OCAMLFIND} query ssl" + + +if test "x$enable_ssl_dynamic_plugin" = "xyes" ; then + SSL_SHARED="yes" + PLUGINS="$PLUGINS ssl" +fi + + +DEPS_CHECK=yes +for i in ; do + eval "dep_check=\$W_$i" + if test -z "${dep_check}"; then + DEPS_CHECK= + break + fi +done +if test -z $DEPS_CHECK; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ssl needs " >&5 +$as_echo "ssl needs " >&6; } +else + if test -z "${with_ssl_dir}" ; then + if ! ${OCAML_CHECK} > /dev/null 2>&1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found." >&5 +$as_echo "Not found." >&6; } + else + SSL_version="`${OCAMLFIND} query -format "%v" ssl 2>/dev/null`" + if test -z "" ; then + VERSION_OK=yes + else + as_arg_v1=${SSL_version} +as_arg_v2= +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + VERSION_OK= ;; #( + 0) : + VERSION_OK=yes ;; #( + 2) : + VERSION_OK=yes ;; #( + *) : + ;; +esac +fi + if test -z "${VERSION_OK}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requires version >= found ${SSL_version}." >&5 +$as_echo "requires version >= found ${SSL_version}." >&6; } + else + if test -z "${SSL_SHARED}"; then + SSL_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`" + liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${SSL_PACKAGES}" + W_SSL=yes + else + ssl_packages="`${OCAMLFIND} query -r -separator " " -format "%p" $BINDING_PKGS 2>/dev/null`" + W_SSL=ssl + fi + LIBS_VERSIONS="${LIBS_VERSIONS} ssl=$SSL_version" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + fi + fi + else + SSL_STOP_CHECK= + SSL_version="[unknown version]" + SSL_requires= + if test -r ${with_ssl_dir}/META >/dev/null 2>&1; then + # Grab version + SSL_version=`cat "${with_ssl_dir}/META" | grep version | cut -d'=' -f 2 | tr -d ' ' | tr -d '"' | head -n 1` + if test -z "" ; then + VERSION_OK=yes + else + as_arg_v1=${SSL_version} +as_arg_v2= +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + VERSION_OK= ;; #( + 0) : + VERSION_OK=yes ;; #( + 2) : + VERSION_OK=yes ;; #( + *) : + ;; +esac +fi + if test -z "${VERSION_OK}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requires version >= found ${SSL_version}." >&5 +$as_echo "requires version >= found ${SSL_version}." >&6; } + SSL_STOP_CHECK=yes + fi + SSL_requires=`cat "${with_ssl_dir}/META" | grep 'requires' | cut -d '=' -f 2 | tr -d '"'` + SSL_path="${with_ssl_dir}" + else + SSL_path=`${OCAMLFIND} -query ssl 2>/dev/null` + if ! test -z ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find version from META file." >&5 +$as_echo "cannot find version from META file." >&6; } + SSL_STOP_CHECK=yes + fi + fi + if test -z "${SSL_STOP_CHECK}"; then + SSL_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`" + echo ${with_ssl_dir} | grep ^/ > /dev/null 2>&1 \ + || with_ssl_dir=${PWD}/${with_ssl_dir} + if test -z "${SSL_SHARED}"; then + liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} -I ${with_ssl_dir} ${SSL_PACKAGES}" + else + ssl_ocamlcflags="-I ${with_ssl_dir} ${SSL_PACKAGES}" + fi + # We need to recurse here because + #Â some package may not be registered using ocamlfind + if test -n ""; then + SSL_CMA=.${cma} + else + SSL_CMA=ssl.${cma} + fi + for i in ${SSL_requires}; do + SSL_PACKAGES="${SSL_PACKAGES} `${OCAMLFIND} query -separator " " -format "-package %p" $i 2>/dev/null`" + done + if test -z "${SSL_SHARED}"; then + liquidsoap_ocamllflags="${liquidsoap_ocamllflags} ${SSL_PACKAGES} ${SSL_CMA}" + W_SSL=yes + else + ssl_ocamllflags="${SSL_PACKAGES} ${SSL_CMA}" + W_SSL=ssl + fi + LIBS_VERSIONS="${LIBS_VERSIONS} ssl=$SSL_version" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + fi + fi +fi + + +if test -z "${W_SSL}" ; then + w_SSL="no (requires ssl)" +else + if test -z "${SSL_SHARED}"; then + w_SSL=yes + else + PLUGINS_DATA="$PLUGINS_DATA +ssl_ocamlcflags=${ssl_ocamlcflags} +ssl_ocamllflags=${ssl_ocamllflags} +ssl_packages=${ssl_packages}" + w_SSL=plugin + fi +fi + +if test "$w_SSL" == "yes"; then + INC="$INC `$OCAMLFIND query ssl`" + DUPPY_SSL="duppy_ssl" + DUPPY_SSL_META="package \"ssl\" ( + description = \"OCaml advanced scheduler (SSL module)\" + requires = \"duppy ssl\" + version=\"${VERSION}\" + archive(byte) = \"duppy_ssl.cma\" + archive(native) = \"duppy_ssl.cmxa\" +)" +fi + + + + + + + + +if test -n ""; then + BINDING_PKGS="" +else + BINDING_PKGS="osx-secure-transport" +fi + + +# Check whether --with-osx_secure_transport-dir was given. +if test "${with_osx_secure_transport_dir+set}" = set; then : + withval=$with_osx_secure_transport_dir; +fi + + +# Check whether --enable-osx-secure-transport-dynamic-plugin was given. +if test "${enable_osx_secure_transport_dynamic_plugin+set}" = set; then : + enableval=$enable_osx_secure_transport_dynamic_plugin; +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocaml osx-secure-transport module" >&5 +$as_echo_n "checking for ocaml osx-secure-transport module... " >&6; } + +OCAML_CHECK="${OCAMLFIND} query osx-secure-transport" + + +if test "x$enable_osx_secure_transport_dynamic_plugin" = "xyes" ; then + OSX_SECURE_TRANSPORT_SHARED="yes" + PLUGINS="$PLUGINS osx_secure_transport" +fi + + +DEPS_CHECK=yes +for i in ; do + eval "dep_check=\$W_$i" + if test -z "${dep_check}"; then + DEPS_CHECK= + break + fi +done +if test -z $DEPS_CHECK; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: osx_secure_transport needs " >&5 +$as_echo "osx_secure_transport needs " >&6; } +else + if test -z "${with_osx_secure_transport_dir}" ; then + if ! ${OCAML_CHECK} > /dev/null 2>&1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found." >&5 +$as_echo "Not found." >&6; } + else + OSX_SECURE_TRANSPORT_version="`${OCAMLFIND} query -format "%v" osx-secure-transport 2>/dev/null`" + if test -z "" ; then + VERSION_OK=yes + else + as_arg_v1=${OSX_SECURE_TRANSPORT_version} +as_arg_v2= +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + VERSION_OK= ;; #( + 0) : + VERSION_OK=yes ;; #( + 2) : + VERSION_OK=yes ;; #( + *) : + ;; +esac +fi + if test -z "${VERSION_OK}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requires version >= found ${OSX_SECURE_TRANSPORT_version}." >&5 +$as_echo "requires version >= found ${OSX_SECURE_TRANSPORT_version}." >&6; } + else + if test -z "${OSX_SECURE_TRANSPORT_SHARED}"; then + OSX_SECURE_TRANSPORT_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`" + liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${OSX_SECURE_TRANSPORT_PACKAGES}" + W_OSX_SECURE_TRANSPORT=yes + else + osx_secure_transport_packages="`${OCAMLFIND} query -r -separator " " -format "%p" $BINDING_PKGS 2>/dev/null`" + W_OSX_SECURE_TRANSPORT=osx_secure_transport + fi + LIBS_VERSIONS="${LIBS_VERSIONS} osx-secure-transport=$OSX_SECURE_TRANSPORT_version" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + fi + fi + else + OSX_SECURE_TRANSPORT_STOP_CHECK= + OSX_SECURE_TRANSPORT_version="[unknown version]" + OSX_SECURE_TRANSPORT_requires= + if test -r ${with_osx_secure_transport_dir}/META >/dev/null 2>&1; then + # Grab version + OSX_SECURE_TRANSPORT_version=`cat "${with_osx_secure_transport_dir}/META" | grep version | cut -d'=' -f 2 | tr -d ' ' | tr -d '"' | head -n 1` + if test -z "" ; then + VERSION_OK=yes + else + as_arg_v1=${OSX_SECURE_TRANSPORT_version} +as_arg_v2= +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + VERSION_OK= ;; #( + 0) : + VERSION_OK=yes ;; #( + 2) : + VERSION_OK=yes ;; #( + *) : + ;; +esac +fi + if test -z "${VERSION_OK}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requires version >= found ${OSX_SECURE_TRANSPORT_version}." >&5 +$as_echo "requires version >= found ${OSX_SECURE_TRANSPORT_version}." >&6; } + OSX_SECURE_TRANSPORT_STOP_CHECK=yes + fi + OSX_SECURE_TRANSPORT_requires=`cat "${with_osx_secure_transport_dir}/META" | grep 'requires' | cut -d '=' -f 2 | tr -d '"'` + OSX_SECURE_TRANSPORT_path="${with_osx_secure_transport_dir}" + else + OSX_SECURE_TRANSPORT_path=`${OCAMLFIND} -query osx-secure-transport 2>/dev/null` + if ! test -z ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find version from META file." >&5 +$as_echo "cannot find version from META file." >&6; } + OSX_SECURE_TRANSPORT_STOP_CHECK=yes + fi + fi + if test -z "${OSX_SECURE_TRANSPORT_STOP_CHECK}"; then + OSX_SECURE_TRANSPORT_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`" + echo ${with_osx_secure_transport_dir} | grep ^/ > /dev/null 2>&1 \ + || with_osx_secure_transport_dir=${PWD}/${with_osx_secure_transport_dir} + if test -z "${OSX_SECURE_TRANSPORT_SHARED}"; then + liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} -I ${with_osx_secure_transport_dir} ${OSX_SECURE_TRANSPORT_PACKAGES}" + else + osx_secure_transport_ocamlcflags="-I ${with_osx_secure_transport_dir} ${OSX_SECURE_TRANSPORT_PACKAGES}" + fi + # We need to recurse here because + #Â some package may not be registered using ocamlfind + if test -n ""; then + OSX_SECURE_TRANSPORT_CMA=.${cma} + else + OSX_SECURE_TRANSPORT_CMA=osx-secure-transport.${cma} + fi + for i in ${OSX_SECURE_TRANSPORT_requires}; do + OSX_SECURE_TRANSPORT_PACKAGES="${OSX_SECURE_TRANSPORT_PACKAGES} `${OCAMLFIND} query -separator " " -format "-package %p" $i 2>/dev/null`" + done + if test -z "${OSX_SECURE_TRANSPORT_SHARED}"; then + liquidsoap_ocamllflags="${liquidsoap_ocamllflags} ${OSX_SECURE_TRANSPORT_PACKAGES} ${OSX_SECURE_TRANSPORT_CMA}" + W_OSX_SECURE_TRANSPORT=yes + else + osx_secure_transport_ocamllflags="${OSX_SECURE_TRANSPORT_PACKAGES} ${OSX_SECURE_TRANSPORT_CMA}" + W_OSX_SECURE_TRANSPORT=osx_secure_transport + fi + LIBS_VERSIONS="${LIBS_VERSIONS} osx-secure-transport=$OSX_SECURE_TRANSPORT_version" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + fi + fi +fi + + +if test -z "${W_OSX_SECURE_TRANSPORT}" ; then + w_OSX_SECURE_TRANSPORT="no (requires osx-secure-transport)" +else + if test -z "${OSX_SECURE_TRANSPORT_SHARED}"; then + w_OSX_SECURE_TRANSPORT=yes + else + PLUGINS_DATA="$PLUGINS_DATA +osx_secure_transport_ocamlcflags=${osx_secure_transport_ocamlcflags} +osx_secure_transport_ocamllflags=${osx_secure_transport_ocamllflags} +osx_secure_transport_packages=${osx_secure_transport_packages}" + w_OSX_SECURE_TRANSPORT=plugin + fi +fi + +if test "$w_OSX_SECURE_TRANSPORT" == "yes"; then + INC="$INC `$OCAMLFIND query osx-secure-transport`" + DUPPY_SECURE_TRANSPORT="duppy_secure_transport" + DUPPY_SECURE_TRANSPORT_META="package \"secure_transport\" ( + description = \"OCaml advanced scheduler (SecureTransport module)\" + requires = \"duppy secure_transport\" + version=\"${VERSION}\" + archive(byte) = \"duppy_secure_transport.cma\" + archive(native) = \"duppy_secure_transport.cmxa\" +)" +fi + + + + + + + + +if test -n ""; then + BINDING_PKGS="" +else + BINDING_PKGS="camlp4" +fi + + +# Check whether --with-camlp4-dir was given. +if test "${with_camlp4_dir+set}" = set; then : + withval=$with_camlp4_dir; +fi + + +# Check whether --enable-camlp4-dynamic-plugin was given. +if test "${enable_camlp4_dynamic_plugin+set}" = set; then : + enableval=$enable_camlp4_dynamic_plugin; +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocaml camlp4 module" >&5 +$as_echo_n "checking for ocaml camlp4 module... " >&6; } + +OCAML_CHECK="${OCAMLFIND} query camlp4" + + +if test "x$enable_camlp4_dynamic_plugin" = "xyes" ; then + CAMLP4_SHARED="yes" + PLUGINS="$PLUGINS camlp4" +fi + + +DEPS_CHECK=yes +for i in ; do + eval "dep_check=\$W_$i" + if test -z "${dep_check}"; then + DEPS_CHECK= + break + fi +done +if test -z $DEPS_CHECK; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: camlp4 needs " >&5 +$as_echo "camlp4 needs " >&6; } +else + if test -z "${with_camlp4_dir}" ; then + if ! ${OCAML_CHECK} > /dev/null 2>&1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found." >&5 +$as_echo "Not found." >&6; } + else + CAMLP4_version="`${OCAMLFIND} query -format "%v" camlp4 2>/dev/null`" + if test -z "" ; then + VERSION_OK=yes + else + as_arg_v1=${CAMLP4_version} +as_arg_v2= +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + VERSION_OK= ;; #( + 0) : + VERSION_OK=yes ;; #( + 2) : + VERSION_OK=yes ;; #( + *) : + ;; +esac +fi + if test -z "${VERSION_OK}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requires version >= found ${CAMLP4_version}." >&5 +$as_echo "requires version >= found ${CAMLP4_version}." >&6; } + else + if test -z "${CAMLP4_SHARED}"; then + CAMLP4_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`" + liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${CAMLP4_PACKAGES}" + W_CAMLP4=yes + else + camlp4_packages="`${OCAMLFIND} query -r -separator " " -format "%p" $BINDING_PKGS 2>/dev/null`" + W_CAMLP4=camlp4 + fi + LIBS_VERSIONS="${LIBS_VERSIONS} camlp4=$CAMLP4_version" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + fi + fi + else + CAMLP4_STOP_CHECK= + CAMLP4_version="[unknown version]" + CAMLP4_requires= + if test -r ${with_camlp4_dir}/META >/dev/null 2>&1; then + # Grab version + CAMLP4_version=`cat "${with_camlp4_dir}/META" | grep version | cut -d'=' -f 2 | tr -d ' ' | tr -d '"' | head -n 1` + if test -z "" ; then + VERSION_OK=yes + else + as_arg_v1=${CAMLP4_version} +as_arg_v2= +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + VERSION_OK= ;; #( + 0) : + VERSION_OK=yes ;; #( + 2) : + VERSION_OK=yes ;; #( + *) : + ;; +esac +fi + if test -z "${VERSION_OK}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requires version >= found ${CAMLP4_version}." >&5 +$as_echo "requires version >= found ${CAMLP4_version}." >&6; } + CAMLP4_STOP_CHECK=yes + fi + CAMLP4_requires=`cat "${with_camlp4_dir}/META" | grep 'requires' | cut -d '=' -f 2 | tr -d '"'` + CAMLP4_path="${with_camlp4_dir}" + else + CAMLP4_path=`${OCAMLFIND} -query camlp4 2>/dev/null` + if ! test -z ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find version from META file." >&5 +$as_echo "cannot find version from META file." >&6; } + CAMLP4_STOP_CHECK=yes + fi + fi + if test -z "${CAMLP4_STOP_CHECK}"; then + CAMLP4_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`" + echo ${with_camlp4_dir} | grep ^/ > /dev/null 2>&1 \ + || with_camlp4_dir=${PWD}/${with_camlp4_dir} + if test -z "${CAMLP4_SHARED}"; then + liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} -I ${with_camlp4_dir} ${CAMLP4_PACKAGES}" + else + camlp4_ocamlcflags="-I ${with_camlp4_dir} ${CAMLP4_PACKAGES}" + fi + # We need to recurse here because + #Â some package may not be registered using ocamlfind + if test -n ""; then + CAMLP4_CMA=.${cma} + else + CAMLP4_CMA=camlp4.${cma} + fi + for i in ${CAMLP4_requires}; do + CAMLP4_PACKAGES="${CAMLP4_PACKAGES} `${OCAMLFIND} query -separator " " -format "-package %p" $i 2>/dev/null`" + done + if test -z "${CAMLP4_SHARED}"; then + liquidsoap_ocamllflags="${liquidsoap_ocamllflags} ${CAMLP4_PACKAGES} ${CAMLP4_CMA}" + W_CAMLP4=yes + else + camlp4_ocamllflags="${CAMLP4_PACKAGES} ${CAMLP4_CMA}" + W_CAMLP4=camlp4 + fi + LIBS_VERSIONS="${LIBS_VERSIONS} camlp4=$CAMLP4_version" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + fi + fi +fi + + +if test -z "${W_CAMLP4}" ; then + w_CAMLP4="no (requires camlp4)" +else + if test -z "${CAMLP4_SHARED}"; then + w_CAMLP4=yes + else + PLUGINS_DATA="$PLUGINS_DATA +camlp4_ocamlcflags=${camlp4_ocamlcflags} +camlp4_ocamllflags=${camlp4_ocamllflags} +camlp4_packages=${camlp4_packages}" + w_CAMLP4=plugin + fi +fi + +if test "$w_CAMLP4" == "yes" ; then PA_DUPPY="pa_duppy.cmo" PA_DOC="pa_duppy.mli" PA_DUPPY_META="package \"syntax\" ( @@ -6147,7 +6968,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ocaml-duppy $as_me 0.5.1, which was +This file was extended by ocaml-duppy $as_me 0.7.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6200,7 +7021,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ocaml-duppy config.status 0.5.1 +ocaml-duppy config.status 0.7.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 36794bc..5303bab 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([ocaml-duppy],[0.5.1],[savonet-users@lists.sourceforge.net]) +AC_INIT([ocaml-duppy],[0.7.0],[savonet-users@lists.sourceforge.net]) VERSION=$PACKAGE_VERSION AC_SUBST(VERSION) @@ -9,7 +9,44 @@ AC_BASE_CHECKS() AC_CHECK_OCAML_BINDING([pcre],[],[],[1]) INC="$INC `$OCAMLFIND query pcre`" -if test "$CAMLP4O" != "no" ; then +AC_CHECK_OCAML_BINDING([bytes],[],[],[1]) +INC="$INC `$OCAMLFIND query bytes`" + +AC_CHECK_OCAML_BINDING([ssl]) + +if test "$w_SSL" == "yes"; then + INC="$INC `$OCAMLFIND query ssl`" + DUPPY_SSL="duppy_ssl" + DUPPY_SSL_META="package \"ssl\" ( + description = \"OCaml advanced scheduler (SSL module)\" + requires = \"duppy ssl\" + version=\"${VERSION}\" + archive(byte) = \"duppy_ssl.cma\" + archive(native) = \"duppy_ssl.cmxa\" +)" +fi +AC_SUBST(DUPPY_SSL) +AC_SUBST(DUPPY_SSL_META) + +AC_CHECK_OCAML_BINDING([osx-secure-transport]) + +if test "$w_OSX_SECURE_TRANSPORT" == "yes"; then + INC="$INC `$OCAMLFIND query osx-secure-transport`" + DUPPY_SECURE_TRANSPORT="duppy_secure_transport" + DUPPY_SECURE_TRANSPORT_META="package \"secure_transport\" ( + description = \"OCaml advanced scheduler (SecureTransport module)\" + requires = \"duppy secure_transport\" + version=\"${VERSION}\" + archive(byte) = \"duppy_secure_transport.cma\" + archive(native) = \"duppy_secure_transport.cmxa\" +)" +fi +AC_SUBST(DUPPY_SECURE_TRANSPORT) +AC_SUBST(DUPPY_SECURE_TRANSPORT_META) + +AC_CHECK_OCAML_BINDING([camlp4]) + +if test "$w_CAMLP4" == "yes" ; then PA_DUPPY="pa_duppy.cmo" PA_DOC="pa_duppy.mli" PA_DUPPY_META="package \"syntax\" ( @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,25 +35,21 @@ scriptversion=2011-01-19.21; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dir_arg= dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -190,7 +186,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,12 +198,21 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -240,7 +245,7 @@ fi for src do - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -269,41 +274,15 @@ do # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,81 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +377,51 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +456,12 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +474,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff --git a/m4/base_checks.m4 b/m4/base_checks.m4 index c956830..bfd98a2 100644 --- a/m4/base_checks.m4 +++ b/m4/base_checks.m4 @@ -1,19 +1,31 @@ AC_DEFUN([AC_BASE_CHECKS], [AC_REQUIRE([AC_PROG_CC]) -dnl check that running user is not root -AC_MSG_CHECKING([that calling user is not root]) -RUNNING_USER="$USER" -if test -z "$RUNNING_USER"; then - RUNNING_USER=`whoami` -fi -if test $RUNNING_USER = "root"; then - AC_MSG_ERROR([configure script must not be run with root user!]) -else - AC_MSG_RESULT([ok]) -fi dnl check for base compilers AC_CANONICAL_HOST() + +dnl Detect the target toolchain +AC_MSG_CHECKING([target toolchain]) +case "${host_os}" in + linux*) + TARGET_TOOLCHAIN="linux" + ;; + mingw*) + TARGET_TOOLCHAIN="mingw" + ;; + cygwin*) + TARGET_TOOLCHAIN="cygwin" + ;; + darwin*) + TARGET_TOOLCHAIN="darwin" + ;; + *) + TARGET_TOOLCHAIN="other" + ;; +esac +AC_MSG_RESULT([$TARGET_TOOLCHAIN]) +AC_SUBST(TARGET_TOOLCHAIN) + # AC_CANONICAL_HOST needs those files AUTOCONF_INSTALL_FILES="config.guess config.sub install-sh m4/*.m4" AC_SUBST(AUTOCONF_INSTALL_FILES) @@ -24,7 +36,6 @@ AC_CHECK_TOOL([AR],[ar],no) AC_SUBST(AR) AC_CHECK_OCAML_COMPILERS() - dnl add some flags AC_DETECT_PIC_FLAGS() diff --git a/m4/detect_binding.m4 b/m4/detect_binding.m4 index 359eaa6..eb02f90 100644 --- a/m4/detect_binding.m4 +++ b/m4/detect_binding.m4 @@ -104,7 +104,7 @@ else AC_MSG_RESULT_NOT([$4],[requires version >= $2 found ${[]BINDING()_version}.]) else if test -z "${[]BINDING()_SHARED}"; then - BINDING()_PACKAGES="`${OCAMLFIND} query -r -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`" + BINDING()_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`" liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${[]BINDING()_PACKAGES}" W_[]BINDING()=yes else @@ -137,7 +137,7 @@ else fi fi if test -z "${BINDING()_STOP_CHECK}"; then - BINDING()_PACKAGES="`${OCAMLFIND} query -r -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`" + BINDING()_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`" echo ${with_[]binding()_dir} | grep ^/ > /dev/null 2>&1 \ || with_[]binding()_dir=${PWD}/${with_[]binding()_dir} if test -z "${[]BINDING()_SHARED}"; then @@ -153,7 +153,7 @@ else BINDING()_CMA=$1.${cma} fi for i in ${[]BINDING()_requires}; do - BINDING()_PACKAGES="${[]BINDING()_PACKAGES} `${OCAMLFIND} query -r -separator " " -format "-package %p" $i 2>/dev/null`" + BINDING()_PACKAGES="${[]BINDING()_PACKAGES} `${OCAMLFIND} query -separator " " -format "-package %p" $i 2>/dev/null`" done if test -z "${[]BINDING()_SHARED}"; then liquidsoap_ocamllflags="${liquidsoap_ocamllflags} ${[]BINDING()_PACKAGES} ${[]BINDING()_CMA}" diff --git a/m4/ocaml.m4 b/m4/ocaml.m4 index 14e7948..28d1350 100644 --- a/m4/ocaml.m4 +++ b/m4/ocaml.m4 @@ -209,6 +209,11 @@ AC_DEFUN([AC_PROG_CAMLP4], AC_SUBST([CAMLP4RF]) ]) +AC_DEFUN([AC_PROG_CAMLIDL], +[dnl + AC_CHECK_TOOL(CAMLIDL,camlidl,no) + AC_SUBST(CAMLIDL) +]) AC_DEFUN([AC_PROG_FINDLIB], [dnl @@ -219,6 +224,15 @@ AC_DEFUN([AC_PROG_FINDLIB], AC_SUBST([OCAMLFIND]) ]) +AC_DEFUN([AC_CHECK_OCAML_STDLIB], +[dnl + AC_REQUIRE([AC_PROG_FINDLIB])dnl + + AC_MSG_CHECKING([for ocaml standard library path]) + OCAML_STDLIB=`$OCAMLFIND printconf stdlib` + AC_SUBST(OCAML_STDLIB) + AC_MSG_RESULT([$OCAML_STDLIB]) +]) dnl Thanks to Jim Meyering for working this next bit out for us. dnl XXX We should define AS_TR_SH if it's not defined already diff --git a/m4/ocaml_compilers.m4 b/m4/ocaml_compilers.m4 index 007ee61..0da2421 100644 --- a/m4/ocaml_compilers.m4 +++ b/m4/ocaml_compilers.m4 @@ -11,8 +11,7 @@ AC_SUBST(OCAMLFIND_LDCONF) AC_PROG_OCAML() -AC_CHECK_TOOL(CAMLIDL,camlidl,no) -AC_SUBST(CAMLIDL) +AC_PROG_CAMLIDL() AC_PROG_OCAMLLEX() @@ -22,18 +21,34 @@ AC_PROG_CAMLP4() AC_PROG_FINDLIB() +AC_CHECK_OCAML_STDLIB() + # Check if caml/threads.h is present +old_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -I${OCAML_STDLIB}" AC_CHECK_HEADER([caml/threads.h],[CAML_THREADS=yes],[],[#include <caml/misc.h>]) +CFLAGS=${old_CFLAGS} AC_ARG_ENABLE([debugging], AC_HELP_STRING( [--disable-debugging], [disable debugging information (backtrace printing in particular)])) -if test "x$enable_debugging" = "xyes" ; then +if test "$enable_debugging" \!= "no" ; then OCAMLFLAGS="$OCAMLFLAGS -g" fi +AC_ARG_WITH([ocaml-warnings], + AC_HELP_STRING( + [--with-ocaml-warnings=WARNINGS], + [Enable specific list of ocaml compiler warnings.])) + +if test -n "${with_ocaml_warnings}" ; then + OCAMLFLAGS="$OCAMLFLAGS -w +${with_ocaml_warnings}" +else + OCAMLFLAGS="$OCAMLFLAGS -w +A-4@5-7@8-9@11@12@20-35-44-45-50" +fi + AC_ARG_ENABLE([profiling], AC_HELP_STRING( [--enable-profiling], diff --git a/m4/pkg_config.m4 b/m4/pkg_config.m4 index 207fe6f..f940dff 100644 --- a/m4/pkg_config.m4 +++ b/m4/pkg_config.m4 @@ -44,6 +44,8 @@ if test -n "$PKG_CONFIG"; then fi[]dnl ])dnl PKG_PROG_PKG_CONFIG +AC_ARG_VAR([PKG_CONFIG_OPTIONS], [Additional options passed when invoking pkg-config]) + dnl PKG_CONFIG_CHECK_MODULE([name],[min-version]) dnl min-version is optional AC_DEFUN([PKG_CONFIG_CHECK_MODULE], @@ -53,12 +55,12 @@ else PKGCONFIG_CHECK_VERSION="" fi AC_MSG_CHECKING([whether pkg-config knows about $1${PKGCONFIG_CHECK_VERSION}]) -if ! $PKG_CONFIG --exists $1; then +if ! $PKG_CONFIG $PKG_CONFIG_OPTIONS --exists $1; then AC_MSG_ERROR([$1.pc not found.. Do you need to set PKG_CONFIG_PATH?]) else if test -n "$2"; then - if ! $PKG_CONFIG --atleast-version=$2 $1; then - $1_VERSION="`pkg-config --modversion $1`" + if ! $PKG_CONFIG $PKG_CONFIG_OPTIONS --atleast-version=$2 $1; then + $1_VERSION="`$PKG_CONFIG $PKG_CONFIG_OPTIONS --modversion $1`" AC_MSG_ERROR([requires version >= $2, found ${$1_VERSION}]) else AC_MSG_RESULT([ok]) @@ -67,8 +69,8 @@ else AC_MSG_RESULT([ok]) fi fi -CFLAGS="$CFLAGS `$PKG_CONFIG --cflags $1`" -CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $1`" -LIBS="$LIBS `$PKG_CONFIG --libs-only-l $1`" -LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs-only-L $1`" +CFLAGS="$CFLAGS `$PKG_CONFIG $PKG_CONFIG_OPTIONS --cflags $1`" +CPPFLAGS="$CPPFLAGS `$PKG_CONFIG $PKG_CONFIG_OPTIONS --cflags $1`" +LIBS="$LIBS `$PKG_CONFIG $PKG_CONFIG_OPTIONS --libs-only-l $1`" +LDFLAGS="$LDFLAGS `$PKG_CONFIG $PKG_CONFIG_OPTIONS --libs-only-L $1`" ]) diff --git a/src/META.in b/src/META.in index de83602..f6d5d5c 100644 --- a/src/META.in +++ b/src/META.in @@ -5,5 +5,8 @@ requires="@requires@" archive(byte)="duppy.cma" archive(native)="duppy.cmxa" -@PA_DUPPY_META@ +@DUPPY_SSL_META@ + +@DUPPY_SECURE_TRANSPORT_META@ +@PA_DUPPY_META@ diff --git a/src/Makefile.in b/src/Makefile.in index bd1fb91..6c659d9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -39,9 +39,10 @@ CPPFLAGS = @CPPFLAGS@ INCDIRS = @INC@ NO_CUSTOM = yes OCAMLFLAGS = @OCAMLFLAGS@ -TRASH = pa_duppy.cmo pa_duppy.cmi +TRASH = pa_duppy.cm* +ANNOTATE = true -all: @PA_DUPPY@ $(OCAMLBEST) +all: $(OCAMLBEST) @PA_DUPPY@ @DUPPY_SSL@ @DUPPY_SECURE_TRANSPORT@ pa_duppy.cmo: pa_duppy.ml pa_duppy.cmi $(OCAMLFIND) ocamlc -c -package camlp4 -package camlp4.quotations.o -package camlp4.extend -syntax camlp4o pa_duppy.ml @@ -49,6 +50,12 @@ pa_duppy.cmo: pa_duppy.ml pa_duppy.cmi pa_duppy.cmi: pa_duppy.mli $(OCAMLFIND) ocamlc -c -package camlp4 -package camlp4.quotations.o -package camlp4.extend -syntax camlp4o pa_duppy.mli +duppy_ssl: + $(MAKE) SOURCES="duppy_ssl.mli duppy_ssl.ml" RESULT="duppy_ssl" $(OCAMLBEST) + +duppy_secure_transport: + $(MAKE) SOURCES="duppy_secure_transport.mli duppy_secure_transport.ml" RESULT="duppy_secure_transport" $(OCAMLBEST) + byte: byte-code-library opt: native-code-library diff --git a/src/duppy.ml b/src/duppy.ml index 1ef8696..854d9d5 100644 --- a/src/duppy.ml +++ b/src/duppy.ml @@ -84,7 +84,7 @@ let create ?(compare=compare) () = stop = false; } -let wake_up s = ignore (Unix.write s.in_pipe "x" 0 1) +let wake_up s = ignore (Unix.write s.in_pipe (Bytes.of_string "x") 0 1) module Task = struct @@ -155,7 +155,7 @@ let stop s = s.stop <- true ; wake_up s -let tmp = String.create 1024 +let tmp = Bytes.create 1024 (** There should be only one call of #process at a time. * Process waits for tasks to become ready, and moves ready tasks @@ -244,7 +244,7 @@ let exec s (priorities:'a->bool) = try let (_,task),remaining = remove - (fun (p,f) -> + (fun (p,_) -> priorities p) s.ready in @@ -331,7 +331,7 @@ struct (* A pipe to wake up the task *) let out_pipe,in_pipe = Unix.pipe () in let stop = ref false in - let tmp = String.create 1024 in + let tmp = Bytes.create 1024 in let rec task l = if List.exists ((=) (`Read out_pipe)) l then (* Consume data from the pipe *) @@ -376,7 +376,7 @@ struct try begin match t.fd with - | Some t -> ignore (Unix.write t " " 0 1) + | Some t -> ignore (Unix.write t (Bytes.of_string " ") 0 1) | None -> raise Stopped end ; Mutex.unlock t.m @@ -391,7 +391,7 @@ struct match t.fd with | Some c -> t.stop := true ; - ignore (Unix.write c " " 0 1) + ignore (Unix.write c (Bytes.of_string " ") 0 1) | None -> raise Stopped end ; t.fd <- None ; @@ -400,8 +400,49 @@ struct | e -> Mutex.unlock t.m; raise e end -module Io = +module type Transport_t = +sig + type t + type bigarray = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t + val sock : t -> Unix.file_descr + val read : t -> Bytes.t -> int -> int -> int + val write : t -> Bytes.t -> int -> int -> int + val ba_write : t -> bigarray -> int -> int -> int +end + +module Unix_transport : Transport_t with type t = Unix.file_descr = struct + type t = Unix.file_descr + type bigarray = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t + let sock s = s + let read = Unix.read + let write = Unix.write + external ba_write : t -> bigarray -> int -> int -> int = "ocaml_duppy_write_ba" +end + +module type Io_t = +sig + type socket + type marker = Length of int | Split of string + type bigarray = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t + type failure = + | Io_error + | Unix of Unix.error*string*string + | Unknown of exn + | Timeout + val read : + ?recursive:bool -> ?init:string -> ?on_error:(string*failure -> unit) -> + ?timeout:float -> priority:'a -> 'a scheduler -> socket -> + marker -> (string*(string option) -> unit) -> unit + val write : + ?exec:(unit -> unit) -> ?on_error:(failure -> unit) -> + ?bigarray:bigarray -> ?string:Bytes.t -> ?timeout:float -> priority:'a -> + 'a scheduler -> socket -> unit +end + +module MakeIo(Transport:Transport_t) : Io_t with type socket = Transport.t = +struct + type socket = Transport.t type marker = Length of int | Split of string type failure = | Io_error @@ -414,29 +455,28 @@ struct type bigarray = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t - external ba_write : Unix.file_descr -> bigarray -> int -> int -> int = "ocaml_duppy_write_ba" - let read ?(recursive=false) ?(init="") ?(on_error=fun _ -> ()) ?timeout ~priority (scheduler:'a scheduler) socket marker exec = let length = 1024 in let b = Buffer.create length in - let buf = String.make length ' ' in + let buf = Bytes.make length ' ' in Buffer.add_string b init ; + let unix_socket = Transport.sock socket in let events,check_timeout = match timeout with - | None -> [`Read socket], fun _ -> false - | Some f -> [`Read socket; `Delay f], + | None -> [`Read unix_socket], fun _ -> false + | Some f -> [`Read unix_socket; `Delay f], (List.mem (`Delay f)) in let rec f l = if check_timeout l then raise Timeout_exc ; - if (List.mem (`Read socket) l) then + if (List.mem (`Read unix_socket) l) then begin - let input = Unix.read socket buf 0 length in + let input = Transport.read socket buf 0 length in if input<=0 then raise Io ; - Buffer.add_substring b buf 0 input + Buffer.add_subbytes b buf 0 input end ; let ret = match marker with @@ -497,7 +537,7 @@ struct | Some x -> begin match x with - | s,Some s' when recursive -> + | s,Some _ when recursive -> exec (s,None) ; [{ priority = priority ; events = events ; @@ -527,7 +567,7 @@ struct let task = { priority = priority ; - events = [`Delay 0.; `Read socket] ; + events = [`Delay 0.; `Read unix_socket] ; handler = f } in @@ -539,32 +579,33 @@ struct let length,write = match string,bigarray with | Some s,_ -> - String.length s, - Unix.write socket s + Bytes.length s, + Transport.write socket s | None,Some b -> Bigarray.Array1.dim b, - ba_write socket b + Transport.ba_write socket b | _ -> 0,fun _ _ -> 0 in + let unix_socket = Transport.sock (socket:Transport.t) in let events,check_timeout = match timeout with - | None -> [`Write socket], fun _ -> false - | Some f -> [`Write socket; `Delay f], + | None -> [`Write unix_socket], fun _ -> false + | Some f -> [`Write unix_socket; `Delay f], (List.mem (`Delay f)) in let rec f pos l = try if check_timeout l then raise Timeout_exc ; - assert (List.exists ((=) (`Write socket)) l) ; + assert (List.exists ((=) (`Write unix_socket)) l) ; let len = length - pos in let n = write pos len in if n<=0 then (on_error Io_error ; []) else begin if n < len then - [{ priority = priority ; events = [`Write socket] ; + [{ priority = priority ; events = [`Write unix_socket] ; handler = f (pos+n) }] else (exec () ; []) @@ -587,8 +628,9 @@ struct exec () end -(** A monad for implicit - * continuations or responses *) +module Io : Io_t with type socket = Unix.file_descr = MakeIo(Unix_transport) + +(** A monad for implicit continuations or responses *) module Monad = struct type ('a,'b) handler = @@ -689,13 +731,13 @@ struct module Control = Control - let tmp = String.create 1024 + let tmp = Bytes.create 1024 let (x,y) = Unix.pipe () let stop = ref false - let wake_up () = ignore(Unix.write y " " 0 1) + let wake_up () = ignore(Unix.write y (Bytes.of_string " ") 0 1) let ctl_m = Mutex_o.create () @@ -884,15 +926,42 @@ struct end end - module Io = + module type Monad_io_t = + sig + type socket + module Io : Io_t with type socket = socket + type ('a,'b) handler = + { scheduler : 'a scheduler ; + socket : Io.socket ; + mutable data : string ; + on_error : Io.failure -> 'b } + val exec : ?delay:float -> priority:'a -> ('a,'b) handler -> + ('c,'b) t -> ('c,'b) t + val delay : priority:'a -> ('a,'b) handler -> float -> (unit,'b) t + val read : ?timeout:float -> priority:'a -> + marker:Io.marker -> ('a,'b) handler -> + (string,'b) t + val read_all : ?timeout:float -> + priority:'a -> + 'a scheduler -> + Io.socket -> (string,(string*Io.failure)) t + val write : ?timeout:float -> priority:'a -> ('a,'b) handler -> + Bytes.t -> (unit,'b) t + val write_bigarray : ?timeout:float -> priority:'a -> ('a,'b) handler -> + Io.bigarray -> (unit,'b) t + end + + module MakeIo(Io:Io_t) = struct + type socket = Io.socket + module Io = Io type ('a,'b) handler = { scheduler : 'a scheduler ; - socket : Unix.file_descr ; + socket : Io.socket ; mutable data : string ; on_error : Io.failure -> 'b } - - let rec exec ?(delay=0.) ~priority h f = + + let exec ?(delay=0.) ~priority h f = (fun h' -> let handler _ = begin @@ -986,5 +1055,7 @@ struct Io.write ?timeout ~priority ~on_error ~exec ~bigarray:ba h.scheduler h.socket) end + + module Io = MakeIo(Io) end diff --git a/src/duppy.mli b/src/duppy.mli index e411f0f..5c02d52 100644 --- a/src/duppy.mli +++ b/src/duppy.mli @@ -153,6 +153,17 @@ sig val stop : t -> unit end +(** Module type for Io functor. *) +module type Transport_t = +sig + type t + type bigarray = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t + val sock : t -> Unix.file_descr + val read : t -> Bytes.t -> int -> int -> int + val write : t -> Bytes.t -> int -> int -> int + val ba_write : t -> bigarray -> int -> int -> int +end + (** Easy parsing of [Unix.file_descr]. * * With {!Duppy.Io.read}, you can pass a file descriptor to the scheduler, @@ -161,9 +172,11 @@ end * * With {!Duppy.Io.write}, the schdeduler will try to write recursively to the file descriptor * the given string. *) -module Io : +module type Io_t = sig + type socket + (** Type for markers. * * [Split s] recognizes all regexp allowed by the @@ -209,12 +222,12 @@ sig * forever. *) val read : ?recursive:bool -> ?init:string -> ?on_error:(string*failure -> unit) -> - ?timeout:float -> priority:'a -> 'a scheduler -> Unix.file_descr -> + ?timeout:float -> priority:'a -> 'a scheduler -> socket -> marker -> (string*(string option) -> unit) -> unit (** Similar to [read] but less complex. * [write ?exec ?on_error ?string ?bigarray ~priority scheduler socket] - * write data from [string], or from [bigarray] is no string is given, + * write data from [string], or from [bigarray] if no string is given, * to [socket], and executes [exec] or [on_error] if errors occured. * @param exec function to execute after writing, default: [fun () -> ()] * @param on_error function to execute when an error occured, default: [fun _ -> ()] @@ -227,10 +240,14 @@ sig * forever. *) val write : ?exec:(unit -> unit) -> ?on_error:(failure -> unit) -> - ?bigarray:bigarray -> ?string:string -> ?timeout:float -> priority:'a -> - 'a scheduler -> Unix.file_descr -> unit + ?bigarray:bigarray -> ?string:Bytes.t -> ?timeout:float -> priority:'a -> + 'a scheduler -> socket -> unit end +module MakeIo : functor (Transport : Transport_t) -> Io_t with type socket = Transport.t + +module Io : Io_t with type socket = Unix.file_descr + (** Monadic interface to {!Duppy.Io}. * * This module can be used to write code @@ -398,8 +415,11 @@ sig * computations that read or write from a socket, * and also to redirect a computation in a different * queue with a new priority. *) - module Io : + module type Monad_io_t = sig + type socket + + module Io : Io_t with type socket = socket (** {2 Type } *) @@ -417,7 +437,7 @@ sig * error. *) type ('a,'b) handler = { scheduler : 'a scheduler ; - socket : Unix.file_descr ; + socket : Io.socket ; mutable data : string ; on_error : Io.failure -> 'b } @@ -464,7 +484,7 @@ sig val read_all : ?timeout:float -> priority:'a -> 'a scheduler -> - Unix.file_descr -> (string,(string*Io.failure)) t + Io.socket -> (string,(string*Io.failure)) t (** [write ?timeout ~priority h s] creates a computation * that writes string [s] to [h.socket]. This @@ -474,7 +494,7 @@ sig * nothing has been written for more than [timeout] * seconds. Default: wait forever. *) val write : ?timeout:float -> priority:'a -> ('a,'b) handler -> - string -> (unit,'b) t + Bytes.t -> (unit,'b) t (** [write_bigarray ?timeout ~priority h ba] creates a computation * that writes data from [ba] to [h.socket]. This function @@ -482,6 +502,10 @@ sig val write_bigarray : ?timeout:float -> priority:'a -> ('a,'b) handler -> Io.bigarray -> (unit,'b) t end + + module MakeIo : functor (Io:Io_t) -> Monad_io_t with type socket = Io.socket and module Io = Io + + module Io : Monad_io_t with type socket = Unix.file_descr and module Io = Io end (** {2 Some culture..} diff --git a/src/duppy_secure_transport.ml b/src/duppy_secure_transport.ml new file mode 100644 index 0000000..273d30c --- /dev/null +++ b/src/duppy_secure_transport.ml @@ -0,0 +1,19 @@ +type secure_transport_socket = { + ctx: SecureTransport.t; + sock: Unix.file_descr +} +module Ssl_transport : Duppy.Transport_t with type t = secure_transport_socket = +struct + type t = secure_transport_socket + type bigarray = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t + let sock {sock} = sock + let read {ctx} buf ofs len = + SecureTransport.read ctx buf ofs len + let write {ctx} buf ofs len = + SecureTransport.write ctx buf ofs len + let ba_write _ _ _ _ = + failwith "Not implemented!" +end + +module Io = Duppy.MakeIo(Ssl_transport) +module Monad_io = Duppy.Monad.MakeIo(Io) diff --git a/src/duppy_secure_transport.mli b/src/duppy_secure_transport.mli new file mode 100644 index 0000000..e176117 --- /dev/null +++ b/src/duppy_secure_transport.mli @@ -0,0 +1,6 @@ +type secure_transport_socket = { + ctx: SecureTransport.t; + sock: Unix.file_descr +} +module Io : Duppy.Io_t with type socket = secure_transport_socket +module Monad_io : Duppy.Monad.Monad_io_t with type socket = secure_transport_socket diff --git a/src/duppy_ssl.ml b/src/duppy_ssl.ml new file mode 100644 index 0000000..d087677 --- /dev/null +++ b/src/duppy_ssl.ml @@ -0,0 +1,13 @@ +module Ssl_transport : Duppy.Transport_t with type t = Ssl.socket = +struct + type t = Ssl.socket + type bigarray = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t + let sock = Ssl.file_descr_of_socket + let read = Ssl.read + let write = Ssl.write + let ba_write _ _ _ _ = + failwith "Not implemented!" +end + +module Io = Duppy.MakeIo(Ssl_transport) +module Monad_io = Duppy.Monad.MakeIo(Io) diff --git a/src/duppy_ssl.mli b/src/duppy_ssl.mli new file mode 100644 index 0000000..b417a0e --- /dev/null +++ b/src/duppy_ssl.mli @@ -0,0 +1,2 @@ +module Io : Duppy.Io_t with type socket = Ssl.socket +module Monad_io : Duppy.Monad.Monad_io_t with type socket = Ssl.socket |