Commit a80908b1 authored by Mehdi Dogguy's avatar Mehdi Dogguy

New upstream version 0.3.1

parent 01882a62
0.3.1 (16-10-2017)
=====
* Fixed compilation with OCaml 4.06
0.3.0 (03-08-2015)
=====
* Add support for S16BE, S24LE and S32LE
......
This diff is collapsed.
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2014 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2014-09-11'
timestamp='2016-11-04'
# 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
......@@ -25,7 +25,7 @@ timestamp='2014-09-11'
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
# 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.
......@@ -33,7 +33,7 @@ timestamp='2014-09-11'
# 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
......@@ -53,8 +53,7 @@ timestamp='2014-09-11'
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.
......@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2014 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."
......@@ -117,8 +116,8 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-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/'`
......@@ -255,12 +254,13 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
| 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 \
......@@ -301,11 +301,12 @@ case $basic_machine in
| 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 \
......@@ -313,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)
......@@ -327,6 +329,9 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
leon|leon[3-9])
basic_machine=sparc-$basic_machine
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
......@@ -372,12 +377,13 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| 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-* \
......@@ -423,13 +429,15 @@ case $basic_machine in
| 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*-* \
......@@ -437,6 +445,7 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
......@@ -513,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
......@@ -633,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
......@@ -774,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
......@@ -1009,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-*)
......@@ -1019,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-*)
......@@ -1365,18 +1388,18 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -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* \
| -bitrig* | -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* | -mingw64* | -linux-gnu* | -linux-android* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
......@@ -1385,7 +1408,8 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos* | -phoenix* | -fuchsia*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
......@@ -1517,6 +1541,8 @@ case $os in
;;
-nacl*)
;;
-ios)
;;
-none)
;;
*)
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ocaml-mm 0.3.0.
# Generated by GNU Autoconf 2.69 for ocaml-mm 0.3.1.
#
# Report bugs to <savonet-users@lists.sourceforge.net>.
#
......@@ -640,8 +640,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ocaml-mm'
PACKAGE_TARNAME='ocaml-mm'
PACKAGE_VERSION='0.3.0'
PACKAGE_STRING='ocaml-mm 0.3.0'
PACKAGE_VERSION='0.3.1'
PACKAGE_STRING='ocaml-mm 0.3.1'
PACKAGE_BUGREPORT='savonet-users@lists.sourceforge.net'
PACKAGE_URL=''
......@@ -784,6 +784,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
......@@ -876,6 +877,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}'
......@@ -1128,6 +1130,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=* \
......@@ -1265,7 +1276,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.
......@@ -1378,7 +1389,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-mm 0.3.0 to adapt to many kinds of systems.
\`configure' configures ocaml-mm 0.3.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1418,6 +1429,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]
......@@ -1443,7 +1455,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ocaml-mm 0.3.0:";;
short | recursive ) echo "Configuration of ocaml-mm 0.3.1:";;
esac
cat <<\_ACEOF
......@@ -1571,7 +1583,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ocaml-mm configure 0.3.0
ocaml-mm configure 0.3.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1940,7 +1952,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-mm $as_me 0.3.0, which was
It was created by ocaml-mm $as_me 0.3.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3276,18 +3288,6 @@ 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
# AC_CANONICAL_HOST needs those files
......@@ -5628,6 +5628,8 @@ $as_echo "$OCAML_STDLIB" >&6; }
# Check if caml/threads.h is present
old_CFLAGS=$FLAGS
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 :
......@@ -5635,6 +5637,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 :
......@@ -5656,7 +5659,7 @@ fi
if test -n "${with_ocaml_warnings}" ; then
OCAMLFLAGS="$OCAMLFLAGS -w +${with_ocaml_warnings}"
else
OCAMLFLAGS="$OCAMLFLAGS -w +A@5-7@8@11@12@20-35-44-45"
OCAMLFLAGS="$OCAMLFLAGS -w +A-4@5-7@8-9@11@12@20-35-44-45-50"
fi
# Check whether --enable-profiling was given.
......@@ -6941,7 +6944,7 @@ fi
as_fn_error $? "requires version >= found ${BYTES_version}." "$LINENO" 5
else
if test -z "${BYTES_SHARED}"; then
BYTES_PACKAGES="`${OCAMLFIND} query -r -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`"
BYTES_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`"
liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${BYTES_PACKAGES}"
W_BYTES=yes
else
......@@ -6991,7 +6994,7 @@ fi
fi
fi
if test -z "${BYTES_STOP_CHECK}"; then
BYTES_PACKAGES="`${OCAMLFIND} query -r -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`"
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
......@@ -7007,7 +7010,7 @@ fi
BYTES_CMA=bytes.${cma}
fi
for i in ${BYTES_requires}; do
BYTES_PACKAGES="${BYTES_PACKAGES} `${OCAMLFIND} query -r -separator " " -format "-package %p" $i 2>/dev/null`"
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}"
......@@ -7561,7 +7564,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-mm $as_me 0.3.0, which was
This file was extended by ocaml-mm $as_me 0.3.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -7623,7 +7626,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-mm config.status 0.3.0
ocaml-mm config.status 0.3.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
AC_INIT([ocaml-mm],[0.3.0],[savonet-users@lists.sourceforge.net])
AC_INIT([ocaml-mm],[0.3.1],[savonet-users@lists.sourceforge.net])
VERSION=$PACKAGE_VERSION
AC_MSG_RESULT(configuring $PACKAGE_STRING)
......
......@@ -2,13 +2,13 @@
ifeq "no" "yes"
LIBS += alsa
endif
ifeq "no" "yes"
ifeq "yes" "yes"
LIBS += ao
endif
ifeq "no" "yes"
LIBS += ffmpeg
endif
ifeq "no" "yes"
ifeq "yes" "yes"
LIBS += gstreamer
endif
ifeq "no" "yes"
......
OCAMLFLAGS = -g -w +A@5-7@8@11@12@20-35-44-45
OCAMLFLAGS = -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50
OCAMLNCFLAGS =
OCAMLLDFLAGS = -linkall
CFLAGS = -g -O2 -I.. -g -Wall -O3
INCDIRS = .. /home/toots/.opam/system/lib/ogg /home/toots/.opam/system/lib/bytes
CFLAGS = -I.. -g -Wall -O3
INCDIRS = .. /home/toots/.opam/system/lib/ao /home/toots/.opam/system/lib/gstreamer /home/toots/.opam/system/lib/bytes
NO_CUSTOM = yes
OCAMLDOCFLAGS = -sort -stars
ANNOTATE = yes
......@@ -10,15 +10,15 @@ ANNOTATE = yes
OCAMLMAKEFILE = OCamlMakefile
OCAMLFIND = ocamlfind
OCAMLFIND_LDCONF =
OCAMLC = ocamlc
OCAMLOPT = ocamlopt
OCAMLC = ocamlc.opt
OCAMLOPT = ocamlopt.opt
OCAMLMKTOP = ocamlmktop
OCAMLMKLIB = ocamlmklib
OCAMLCP = @OCAMLCP@
OCAMLDEP = ocamldep
OCAMLLEX = ocamllex
OCAMLDEP = ocamldep.opt
OCAMLLEX = ocamllex.opt
OCAMLYACC = ocamlyacc
OCAMLDOC = ocamldoc
OCAMLDOC = ocamldoc.opt
CC = gcc
AR = ar
LATEX = @LATEX@
......@@ -27,4 +27,4 @@ PS2PDF = @PS2PDF@
OCAMLLIBPATH = /usr/lib/ocaml
OCAMLBEST = byte opt
INCDIRS+= .. /home/toots/.opam/system/lib/ogg /home/toots/.opam/system/lib/bytes
INCDIRS+= .. /home/toots/.opam/system/lib/ao /home/toots/.opam/system/lib/gstreamer /home/toots/.opam/system/lib/bytes
......@@ -55,7 +55,7 @@ CAMLprim value caml_sdl_rgb_to32(value _rgb, value _surf, value shift)
*/
frame rgb;
frame_of_value(_rgb, &rgb);
uint32 *surf = Caml_ba_data_val(_surf);
uint32_t *surf = Caml_ba_data_val(_surf);
int i, j;
int w = rgb.width;
int h = rgb.height;
......
This diff is collapsed.
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()
......
......@@ -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}"
......
......@@ -24,7 +24,10 @@ AC_PROG_FINDLIB()
AC_CHECK_OCAML_STDLIB()
# Check if caml/threads.h is present
old_CFLAGS=$FLAGS
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(
......@@ -43,7 +46,7 @@ AC_ARG_WITH([ocaml-warnings],
if test -n "${with_ocaml_warnings}" ; then
OCAMLFLAGS="$OCAMLFLAGS -w +${with_ocaml_warnings}"
else
OCAMLFLAGS="$OCAMLFLAGS -w +A@5-7@8@11@12@20-35-44-45"
OCAMLFLAGS="$OCAMLFLAGS -w +A-4@5-7@8-9@11@12@20-35-44-45-50"
fi
AC_ARG_ENABLE([profiling],
......
......@@ -38,7 +38,7 @@ exception Invalid_data
module Unix = struct
(** To be inherited to read and write from files. *)
class virtual rw ?(read=false) ?(write=false) fname =
object (self)
object
val fd =
let flag, perms =
match read, write with
......@@ -51,7 +51,8 @@ module Unix = struct
method private stream_read buf ofs len = Unix.read fd buf ofs len
method private stream_write buf ofs len = Unix.write fd buf ofs len
method private stream_write buf ofs len =
Unix.write fd (Bytes.of_string buf) ofs len
method private stream_close = Unix.close fd
......@@ -65,18 +66,19 @@ end
class virtual helper =
object (self)
method virtual private stream_read : string -> int -> int -> int
method virtual private stream_read : Bytes.t -> int -> int -> int
method private input_once n =
let buf = Bytes.create n in
let n = self#stream_read buf 0 n in
if n = String.length buf then
if n = Bytes.length buf then
buf
else
String.sub buf 0 n
Bytes.sub buf 0 n
method private input n =
let buf = self#input_once n in
let buf = Bytes.to_string buf in
let buflen = String.length buf in
if buflen = n || buflen = 0 then
buf
......@@ -128,9 +130,9 @@ object (self)
method private output_num b n =
let s = Bytes.create b in
for i = 0 to b - 1 do
s.[i] <- char_of_int ((n lsr (8 * i)) land 0xff)
Bytes.set s i (char_of_int ((n lsr (8 * i)) land 0xff))
done;
self#output s
self#output (Bytes.to_string s)
method private output_byte n = self#output_num 1 n
......@@ -141,9 +143,9 @@ object (self)
method private output_num_be b n =
let s = Bytes.create b in
for i = 0 to b - 1 do
s.[i] <- char_of_int ((n lsr (8 * (b - i - 1))) land 0xff)
Bytes.set s i (char_of_int ((n lsr (8 * (b - i - 1))) land 0xff))
done;
self#output s
self#output (Bytes.to_string s)
method private output_short_be n = self#output_num_be 2 n
......
......@@ -115,7 +115,7 @@ let encode_event chan e =
(* TODO *)
assert false
);
s
Bytes.to_string s
type buffer =
{
......@@ -292,7 +292,7 @@ module IO = struct
ans.[i] <- char_of_int data.(!pos + i)
done;
pos := !pos + len;
ans
Bytes.to_string ans
in
let advance len =
pos := !pos + len
......
......@@ -953,7 +953,9 @@ module S16LE = struct
let make buf ofs len =
let slen = length (channels buf) len in
let sbuf = Bytes.create slen in
let sbuf = Bytes.to_string
(Bytes.create slen)
in
of_audio buf ofs sbuf 0 len;
sbuf
......@@ -971,7 +973,9 @@ module S16BE = struct
let make buf ofs len =
let slen = length (channels buf) len in
let sbuf = Bytes.create slen in
let sbuf = Bytes.to_string
(Bytes.create slen)
in
of_audio buf ofs sbuf 0 len;
sbuf
......
......@@ -259,6 +259,9 @@ module Mono : sig
(** Generate a saw waveform. *)
class saw : int -> ?volume:float -> ?phase:float -> float -> t
(** Generate a triangle waveform. *)
class triangle : int -> ?volume:float -> ?phase:float -> float -> t
class white_noise : ?volume:float -> int -> t
class chain : t -> Effect.t -> t
......
......@@ -469,6 +469,8 @@ module RGBA32 = struct
(* TODO: faster implementation? *)
let translate f x y = affine f 1. 1. x y
external flip : t -> unit = "caml_rgb_flip"
external mask : t -> t -> unit = "caml_rgb_mask"
external lomo : t -> unit = "caml_rgb_lomo"
......
......@@ -161,6 +161,9 @@ module RGBA32 : sig
(** Apply an affine transformation to an image. *)
val affine : t -> float -> float -> int -> int -> unit
(** Flip (mirror across horizontal axis). *)
val flip : t -> unit
(** Convert to greyscale. *)
val greyscale : t -> unit
......
......@@ -540,6 +540,7 @@ CAMLprim value caml_rgb_of_rgb8_string(value _rgb, value _data)
int datalen = rgb.height * rgb.width * 3;
char *data = (char*)memalign(ALIGNMENT_BYTES, datalen);
if (data == NULL) caml_raise_out_of_memory();
memcpy(data, String_val(_data), datalen);
int i, j;
......@@ -554,8 +555,6 @@ CAMLprim value caml_rgb_of_rgb8_string(value _rgb, value _data)
}
caml_leave_blocking_section();
memcpy(String_val(_data), data, datalen);
CAMLreturn(Val_unit);
}
......@@ -960,6 +959,29 @@ CAMLprim value caml_rgb_greyscale(value _rgb, value _sepia)
CAMLreturn(Val_unit);
}
CAMLprim value caml_rgb_flip(value _rgb)
{
CAMLparam1(_rgb);
frame rgb;
frame_of_value(_rgb,&rgb);
int i,j,jj;
uint32_t p;
caml_enter_blocking_section();
for (j = 0; j < rgb.height / 2; j++)
for (i = 0; i < rgb.width; i++)
{
jj = rgb.height - j - 1;
p = Int_pixel(&rgb,i,j);
Int_pixel(&rgb,i,j) = Int_pixel(&rgb,i,jj);
Int_pixel(&rgb,i,jj) = p;
}
caml_leave_blocking_section();
CAMLreturn(Val_unit);
}
CAMLprim value caml_rgba_swap_rb(value _rgba)
{
CAMLparam1(_rgba);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment